From 394d23012245db985659a791fc8820f41d8d57b8 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 7 Jul 2006 23:03:03 +0000 Subject: [PATCH] restructuring of files 2 git-svn-id: svn://192.168.202.10@19 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/AST_VDhopper.pl | 810 +- agc_2-X/trunk/DBI-scripts/AST_agent_week.pl | 336 - agc_2-X/trunk/DTMF_sounds/0.gsm | Bin 429 -> 0 bytes agc_2-X/trunk/DTMF_sounds/0.wav | Bin 4100 -> 0 bytes agc_2-X/trunk/DTMF_sounds/1.gsm | 1 - agc_2-X/trunk/DTMF_sounds/1.wav | Bin 4100 -> 0 bytes agc_2-X/trunk/DTMF_sounds/2.gsm | 3 - agc_2-X/trunk/DTMF_sounds/2.wav | Bin 4018 -> 0 bytes agc_2-X/trunk/DTMF_sounds/3.gsm | 2 - agc_2-X/trunk/DTMF_sounds/3.wav | Bin 4046 -> 0 bytes agc_2-X/trunk/DTMF_sounds/4.gsm | 2 - agc_2-X/trunk/DTMF_sounds/4.wav | Bin 3990 -> 0 bytes agc_2-X/trunk/DTMF_sounds/5.gsm | 1 - agc_2-X/trunk/DTMF_sounds/5.wav | Bin 3990 -> 0 bytes agc_2-X/trunk/DTMF_sounds/6.gsm | 1 - agc_2-X/trunk/DTMF_sounds/6.wav | Bin 4046 -> 0 bytes agc_2-X/trunk/DTMF_sounds/7.gsm | 2 - agc_2-X/trunk/DTMF_sounds/7.wav | Bin 4072 -> 0 bytes agc_2-X/trunk/DTMF_sounds/8.gsm | Bin 429 -> 0 bytes agc_2-X/trunk/DTMF_sounds/8.wav | Bin 4018 -> 0 bytes agc_2-X/trunk/DTMF_sounds/9.gsm | Bin 429 -> 0 bytes agc_2-X/trunk/DTMF_sounds/9.wav | Bin 4018 -> 0 bytes .../trunk/DTMF_sounds/US_pol_survey_hello.gsm | Bin 55737 -> 0 bytes .../DTMF_sounds/US_pol_survey_transfer.gsm | Bin 10461 -> 0 bytes .../DTMF_sounds/US_reminder_callback.gsm | Bin 5610 -> 0 bytes .../trunk/DTMF_sounds/US_reminder_goodbye.gsm | Bin 1980 -> 0 bytes .../trunk/DTMF_sounds/US_reminder_message.gsm | Bin 14058 -> 0 bytes .../trunk/DTMF_sounds/US_reminder_options.gsm | Bin 11748 -> 0 bytes .../DTMF_sounds/US_thanks_no_contact.gsm | Bin 3894 -> 0 bytes agc_2-X/trunk/DTMF_sounds/auth-thankyou.gsm | Bin 1947 -> 0 bytes agc_2-X/trunk/DTMF_sounds/buzz.gsm | Bin 363 -> 0 bytes agc_2-X/trunk/DTMF_sounds/ding.gsm | Bin 363 -> 0 bytes agc_2-X/trunk/DTMF_sounds/enter.gsm | Bin 231 -> 0 bytes agc_2-X/trunk/DTMF_sounds/four_digit_id.gsm | Bin 2211 -> 0 bytes agc_2-X/trunk/DTMF_sounds/generic_hold.gsm | Bin 8250 -> 0 bytes agc_2-X/trunk/DTMF_sounds/hash.gsm | 2 - agc_2-X/trunk/DTMF_sounds/hash.wav | Bin 3990 -> 0 bytes agc_2-X/trunk/DTMF_sounds/hold_tone.gsm | Bin 759 -> 0 bytes .../DTMF_sounds/ld_invalid_pin_number.gsm | Bin 2772 -> 0 bytes .../DTMF_sounds/ld_welcome_pin_number.gsm | Bin 4587 -> 0 bytes agc_2-X/trunk/DTMF_sounds/leave.gsm | Bin 330 -> 0 bytes agc_2-X/trunk/DTMF_sounds/silence.wav | Bin 8044 -> 0 bytes agc_2-X/trunk/DTMF_sounds/star.gsm | 2 - agc_2-X/trunk/DTMF_sounds/star.wav | Bin 4124 -> 0 bytes agc_2-X/trunk/DTMF_sounds/vm-goodbye.gsm | Bin 1419 -> 0 bytes agc_2-X/trunk/DTMF_sounds/vm-msgsaved.gsm | Bin 3168 -> 0 bytes agc_2-X/trunk/DTMF_sounds/vm-rec-generic.gsm | Bin 6534 -> 0 bytes agc_2-X/trunk/DTMF_sounds/vm-review.gsm | Bin 14487 -> 0 bytes .../astguiclient/AST_inboundEXTstats.php | 400 - .../trunk/LANG_admin/astguiclient/admin.php | 1824 ----- .../LANG_admin/astguiclient/dbconnect.php | 15 - .../trunk/LANG_admin/astguiclient/help.gif | Bin 492 -> 0 bytes .../LANG_admin/astguiclient/inbound_popup.php | 228 - .../LANG_admin/astguiclient/phone_stats.php | 244 - .../astguiclient/remote_inbound.php | 162 - .../trunk/LANG_admin/astguiclient/test.php | 30 - .../astguiclient_de/AST_inboundEXTstats.php | 400 - .../LANG_admin/astguiclient_de/admin.php | 1824 ----- .../LANG_admin/astguiclient_de/dbconnect.php | 15 - .../trunk/LANG_admin/astguiclient_de/help.gif | Bin 492 -> 0 bytes .../astguiclient_de/inbound_popup.php | 228 - .../astguiclient_de/phone_stats.php | 244 - .../astguiclient_de/remote_inbound.php | 162 - .../astguiclient_el/AST_inboundEXTstats.php | 400 - .../LANG_admin/astguiclient_el/admin.php | 1824 ----- .../LANG_admin/astguiclient_el/dbconnect.php | 15 - .../trunk/LANG_admin/astguiclient_el/help.gif | Bin 492 -> 0 bytes .../astguiclient_el/inbound_popup.php | 228 - .../astguiclient_el/phone_stats.php | 244 - .../astguiclient_el/remote_inbound.php | 162 - .../astguiclient_en/AST_inboundEXTstats.php | 400 - .../LANG_admin/astguiclient_en/admin.php | 1824 ----- .../LANG_admin/astguiclient_en/dbconnect.php | 16 - .../trunk/LANG_admin/astguiclient_en/help.gif | Bin 492 -> 0 bytes .../astguiclient_en/inbound_popup.php | 228 - .../astguiclient_en/phone_stats.php | 244 - .../astguiclient_en/remote_inbound.php | 162 - .../astguiclient_es/AST_inboundEXTstats.php | 400 - .../LANG_admin/astguiclient_es/admin.php | 1824 ----- .../LANG_admin/astguiclient_es/dbconnect.php | 15 - .../trunk/LANG_admin/astguiclient_es/help.gif | Bin 492 -> 0 bytes .../astguiclient_es/inbound_popup.php | 228 - .../astguiclient_es/phone_stats.php | 244 - .../astguiclient_es/remote_inbound.php | 162 - .../LANG_admin/vicidial/AST_CLOSERstats.php | 396 - .../LANG_admin/vicidial/AST_VDADstats.php | 417 -- .../vicidial/AST_VICIDIAL_hopperlist.php | 161 - .../vicidial/AST_admin_log_display.php | 118 - .../vicidial/AST_agent_performance.php | 232 - .../vicidial/AST_agent_performance_detail.php | 406 - .../vicidial/AST_agent_time_sheet.php | 281 - .../vicidial/AST_agent_time_sheet_archive.php | 281 - .../LANG_admin/vicidial/AST_parkstats.php | 396 - .../vicidial/AST_server_performance.php | 310 - .../LANG_admin/vicidial/AST_timeonVDAD.php | 255 - .../vicidial/AST_timeonVDAD_closer.php | 316 - .../LANG_admin/vicidial/AST_timeonVDADall.php | 349 - .../vicidial/AST_timeonVDADall_SIPmonitor.php | 301 - .../LANG_admin/vicidial/AST_timeoncall.php | 180 - .../LANG_admin/vicidial/AST_timeonpark.php | 197 - .../trunk/LANG_admin/vicidial/admin-old.php | 2289 ------ agc_2-X/trunk/LANG_admin/vicidial/admin.php | 6514 ----------------- .../LANG_admin/vicidial/admin_modify_lead.php | 476 -- .../LANG_admin/vicidial/admin_search_lead.php | 224 - .../vicidial/closer-fronter_popup.php | 508 -- .../vicidial/closer-fronter_popup2.php | 423 -- agc_2-X/trunk/LANG_admin/vicidial/closer.php | 345 - .../LANG_admin/vicidial/closer_dispo.php | 329 - .../LANG_admin/vicidial/closer_popup.php | 445 -- agc_2-X/trunk/LANG_admin/vicidial/count.htm | 1 - .../trunk/LANG_admin/vicidial/dbconnect.php | 15 - .../vicidial/group_hourly_stats.php | 252 - agc_2-X/trunk/LANG_admin/vicidial/help.gif | Bin 492 -> 0 bytes .../trunk/LANG_admin/vicidial/listloader.php | 698 -- .../trunk/LANG_admin/vicidial/listloader.pl | 690 -- .../LANG_admin/vicidial/listloaderMAIN.php | 79 - .../vicidial/listloader_rowdisplay.pl | 56 - .../LANG_admin/vicidial/listloader_super.pl | 691 -- .../trunk/LANG_admin/vicidial/log_test.php | 37 - .../vicidial/new_listloader_superL.php | 1364 ---- .../vicidial/record_conf_1_hour.php | 156 - .../LANG_admin/vicidial/remote_dispo.php | 327 - .../LANG_admin/vicidial/server_stats.php | 96 - agc_2-X/trunk/LANG_admin/vicidial/test.txt | 1 - .../trunk/LANG_admin/vicidial/user_stats.php | 316 - .../trunk/LANG_admin/vicidial/user_status.php | 238 - .../trunk/LANG_admin/vicidial/vdremote.php | 602 -- .../vicidial_de/AST_CLOSERstats.php | 396 - .../LANG_admin/vicidial_de/AST_VDADstats.php | 417 -- .../vicidial_de/AST_VICIDIAL_hopperlist.php | 161 - .../vicidial_de/AST_admin_log_display.php | 118 - .../vicidial_de/AST_agent_performance.php | 232 - .../AST_agent_performance_detail.php | 406 - .../vicidial_de/AST_agent_time_sheet.php | 281 - .../vicidial_de/AST_server_performance.php | 310 - .../LANG_admin/vicidial_de/AST_timeonVDAD.php | 255 - .../vicidial_de/AST_timeonVDAD_closer.php | 316 - .../vicidial_de/AST_timeonVDADall.php | 349 - .../AST_timeonVDADall_SIPmonitor.php | 301 - .../LANG_admin/vicidial_de/AST_timeoncall.php | 180 - .../LANG_admin/vicidial_de/AST_timeonpark.php | 197 - .../trunk/LANG_admin/vicidial_de/admin.php | 6514 ----------------- .../vicidial_de/admin_modify_lead.php | 476 -- .../vicidial_de/admin_search_lead.php | 224 - .../trunk/LANG_admin/vicidial_de/count.htm | 1 - .../LANG_admin/vicidial_de/dbconnect.php | 15 - .../vicidial_de/group_hourly_stats.php | 252 - agc_2-X/trunk/LANG_admin/vicidial_de/help.gif | Bin 492 -> 0 bytes .../LANG_admin/vicidial_de/listloader.php | 698 -- .../LANG_admin/vicidial_de/listloaderMAIN.php | 79 - .../vicidial_de/new_listloader_superL.php | 1364 ---- .../LANG_admin/vicidial_de/remote_dispo.php | 327 - .../LANG_admin/vicidial_de/server_stats.php | 96 - .../LANG_admin/vicidial_de/user_stats.php | 316 - .../LANG_admin/vicidial_de/user_status.php | 238 - .../trunk/LANG_admin/vicidial_de/vdremote.php | 602 -- .../vicidial_el/AST_CLOSERstats.php | 396 - .../LANG_admin/vicidial_el/AST_VDADstats.php | 417 -- .../vicidial_el/AST_VICIDIAL_hopperlist.php | 161 - .../vicidial_el/AST_admin_log_display.php | 118 - .../vicidial_el/AST_agent_performance.php | 232 - .../AST_agent_performance_detail.php | 406 - .../vicidial_el/AST_agent_time_sheet.php | 281 - .../vicidial_el/AST_server_performance.php | 310 - .../LANG_admin/vicidial_el/AST_timeonVDAD.php | 255 - .../vicidial_el/AST_timeonVDAD_closer.php | 316 - .../vicidial_el/AST_timeonVDADall.php | 349 - .../AST_timeonVDADall_SIPmonitor.php | 282 - .../LANG_admin/vicidial_el/AST_timeoncall.php | 180 - .../LANG_admin/vicidial_el/AST_timeonpark.php | 197 - .../trunk/LANG_admin/vicidial_el/admin.php | 6514 ----------------- .../vicidial_el/admin_modify_lead.php | 476 -- .../vicidial_el/admin_search_lead.php | 224 - .../trunk/LANG_admin/vicidial_el/count.htm | 1 - .../LANG_admin/vicidial_el/dbconnect.php | 16 - .../vicidial_el/group_hourly_stats.php | 252 - agc_2-X/trunk/LANG_admin/vicidial_el/help.gif | Bin 492 -> 0 bytes .../LANG_admin/vicidial_el/htglobalize.php | 23 - .../LANG_admin/vicidial_el/listloader.php | 698 -- .../LANG_admin/vicidial_el/listloaderMAIN.php | 79 - .../vicidial_el/listloader_stmts.txt | 0 .../vicidial_el/new_listloader_superL.php | 1364 ---- .../vicidial_el/project_auth_entries.txt | 114 - .../LANG_admin/vicidial_el/remote_dispo.php | 327 - .../LANG_admin/vicidial_el/server_stats.php | 96 - .../LANG_admin/vicidial_el/user_stats.php | 316 - .../LANG_admin/vicidial_el/user_status.php | 238 - .../trunk/LANG_admin/vicidial_el/vdremote.php | 602 -- .../vicidial_en/AST_CLOSERstats.php | 396 - .../LANG_admin/vicidial_en/AST_VDADstats.php | 417 -- .../vicidial_en/AST_VICIDIAL_hopperlist.php | 161 - .../vicidial_en/AST_admin_log_display.php | 118 - .../vicidial_en/AST_agent_performance.php | 232 - .../AST_agent_performance_detail.php | 406 - .../vicidial_en/AST_agent_time_sheet.php | 281 - .../vicidial_en/AST_server_performance.php | 310 - .../LANG_admin/vicidial_en/AST_timeonVDAD.php | 255 - .../vicidial_en/AST_timeonVDAD_closer.php | 316 - .../vicidial_en/AST_timeonVDADall.php | 349 - .../AST_timeonVDADall_SIPmonitor.php | 301 - .../LANG_admin/vicidial_en/AST_timeoncall.php | 180 - .../LANG_admin/vicidial_en/AST_timeonpark.php | 197 - .../trunk/LANG_admin/vicidial_en/admin.php | 6514 ----------------- .../vicidial_en/admin_changes_log.txt | 37 - .../vicidial_en/admin_modify_lead.php | 476 -- .../vicidial_en/admin_search_lead.php | 224 - .../trunk/LANG_admin/vicidial_en/count.htm | 1 - .../LANG_admin/vicidial_en/dbconnect.php | 15 - .../vicidial_en/group_hourly_stats.php | 252 - agc_2-X/trunk/LANG_admin/vicidial_en/help.gif | Bin 492 -> 0 bytes .../LANG_admin/vicidial_en/listloader.php | 698 -- .../LANG_admin/vicidial_en/listloaderMAIN.php | 79 - .../vicidial_en/new_listloader_superL.php | 1364 ---- .../vicidial_en/project_auth_entries.txt | 129 - .../LANG_admin/vicidial_en/remote_dispo.php | 327 - .../LANG_admin/vicidial_en/server_stats.php | 96 - .../LANG_admin/vicidial_en/user_stats.php | 316 - .../LANG_admin/vicidial_en/user_status.php | 238 - .../trunk/LANG_admin/vicidial_en/vdremote.php | 602 -- .../vicidial_es/AST_CLOSERstats.php | 396 - .../LANG_admin/vicidial_es/AST_VDADstats.php | 417 -- .../vicidial_es/AST_VICIDIAL_hopperlist.php | 161 - .../vicidial_es/AST_admin_log_display.php | 118 - .../vicidial_es/AST_agent_performance.php | 232 - .../AST_agent_performance_detail.php | 406 - .../vicidial_es/AST_agent_time_sheet.php | 281 - .../vicidial_es/AST_server_performance.php | 310 - .../LANG_admin/vicidial_es/AST_timeonVDAD.php | 255 - .../vicidial_es/AST_timeonVDAD_closer.php | 316 - .../vicidial_es/AST_timeonVDADall.php | 349 - .../AST_timeonVDADall_SIPmonitor.php | 301 - .../LANG_admin/vicidial_es/AST_timeoncall.php | 180 - .../LANG_admin/vicidial_es/AST_timeonpark.php | 197 - .../trunk/LANG_admin/vicidial_es/admin.php | 6514 ----------------- .../vicidial_es/admin_changes_log.txt | 5 - .../vicidial_es/admin_modify_lead.php | 476 -- .../vicidial_es/admin_search_lead.php | 224 - .../trunk/LANG_admin/vicidial_es/count.htm | 1 - .../LANG_admin/vicidial_es/dbconnect.php | 15 - .../vicidial_es/group_hourly_stats.php | 252 - agc_2-X/trunk/LANG_admin/vicidial_es/help.gif | Bin 492 -> 0 bytes .../LANG_admin/vicidial_es/listloader.php | 698 -- .../LANG_admin/vicidial_es/listloaderMAIN.php | 79 - .../vicidial_es/new_listloader_superL.php | 1364 ---- .../vicidial_es/project_auth_entries.txt | 170 - .../LANG_admin/vicidial_es/remote_dispo.php | 327 - .../LANG_admin/vicidial_es/server_stats.php | 96 - .../LANG_admin/vicidial_es/user_stats.php | 316 - .../LANG_admin/vicidial_es/user_status.php | 238 - .../trunk/LANG_admin/vicidial_es/vdremote.php | 602 -- .../LANG_agc/agc/active_list_refresh.php | 463 -- agc_2-X/trunk/LANG_agc/agc/astguiclient.php | 2890 -------- agc_2-X/trunk/LANG_agc/agc/calendar.php | 125 - .../trunk/LANG_agc/agc/call_log_display.php | 192 - .../trunk/LANG_agc/agc/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc/dbconnect.php | 15 - .../trunk/LANG_agc/agc/fix-dispo-list.patch | 73 - .../agc/images/agc_check_voicemail_BLINK.gif | Bin 2627 -> 0 bytes .../images/agc_check_voicemail_BLINK_e.gif | Bin 780 -> 0 bytes .../images/agc_check_voicemail_BLINK_es.gif | Bin 780 -> 0 bytes .../images/agc_check_voicemail_BLINK_ptbr.gif | Bin 886 -> 0 bytes .../agc/images/agc_check_voicemail_OFF.gif | Bin 919 -> 0 bytes .../agc/images/agc_check_voicemail_OFF_es.gif | Bin 785 -> 0 bytes .../images/agc_check_voicemail_OFF_ptbr.gif | Bin 880 -> 0 bytes .../agc/images/agc_check_voicemail_ON.gif | Bin 919 -> 0 bytes .../agc/images/agc_check_voicemail_ON_es.gif | Bin 781 -> 0 bytes .../images/agc_check_voicemail_ON_ptbr.gif | Bin 881 -> 0 bytes .../LANG_agc/agc/images/agc_live_call_OFF.gif | Bin 541 -> 0 bytes .../agc/images/agc_live_call_OFF_es.gif | Bin 513 -> 0 bytes .../agc/images/agc_live_call_OFF_ptbr.gif | Bin 459 -> 0 bytes .../LANG_agc/agc/images/agc_live_call_ON.gif | Bin 793 -> 0 bytes .../agc/images/agc_live_call_ON_es.gif | Bin 871 -> 0 bytes .../agc/images/agc_live_call_ON_ptbr.gif | Bin 2750 -> 0 bytes .../agc/images/agc_tab_active_lines.gif | Bin 886 -> 0 bytes .../agc/images/agc_tab_active_lines_es.gif | Bin 704 -> 0 bytes .../agc/images/agc_tab_active_lines_ptbr.gif | Bin 1005 -> 0 bytes .../agc/images/agc_tab_astguiclient.gif | Bin 1092 -> 0 bytes .../agc/images/agc_tab_astguiclient_ptbr.gif | Bin 1092 -> 0 bytes .../agc/images/agc_tab_conferences.gif | Bin 928 -> 0 bytes .../agc/images/agc_tab_conferences_es.gif | Bin 718 -> 0 bytes .../agc/images/agc_tab_conferences_ptbr.gif | Bin 718 -> 0 bytes .../LANG_agc/agc/images/agc_tab_main.gif | Bin 596 -> 0 bytes .../LANG_agc/agc/images/agc_tab_main_es.gif | Bin 541 -> 0 bytes .../LANG_agc/agc/images/agc_tab_main_ptbr.gif | Bin 541 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/blank.gif | Bin 43 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/br.gif | Bin 397 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/de.gif | Bin 162 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/down.gif | Bin 169 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/el.gif | Bin 245 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/en.gif | Bin 322 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/es.gif | Bin 222 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/fr.gif | Bin 217 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/it.gif | Bin 198 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/pt.gif | Bin 208 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/remove.gif | Bin 176 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/images/up.gif | Bin 169 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber.gif | Bin 831 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber_OFF.gif | Bin 827 -> 0 bytes .../images/vdc_LB_dialnextnumber_OFF_es.gif | Bin 914 -> 0 bytes .../images/vdc_LB_dialnextnumber_OFF_ptbr.gif | Bin 961 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber_es.gif | Bin 914 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber_ptbr.gif | Bin 965 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall.gif | Bin 804 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall_OFF.gif | Bin 802 -> 0 bytes .../images/vdc_LB_grabparkedcall_OFF_es.gif | Bin 827 -> 0 bytes .../images/vdc_LB_grabparkedcall_OFF_ptbr.gif | Bin 981 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall_es.gif | Bin 826 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall_ptbr.gif | Bin 985 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer.gif | Bin 803 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer_OFF.gif | Bin 803 -> 0 bytes .../images/vdc_LB_hangupcustomer_OFF_es.gif | Bin 693 -> 0 bytes .../images/vdc_LB_hangupcustomer_OFF_ptbr.gif | Bin 811 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer_es.gif | Bin 697 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer_ptbr.gif | Bin 1029 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_parkcall.gif | Bin 601 -> 0 bytes .../agc/images/vdc_LB_parkcall_OFF.gif | Bin 607 -> 0 bytes .../agc/images/vdc_LB_parkcall_OFF_es.gif | Bin 644 -> 0 bytes .../agc/images/vdc_LB_parkcall_OFF_ptbr.gif | Bin 830 -> 0 bytes .../agc/images/vdc_LB_parkcall_es.gif | Bin 646 -> 0 bytes .../agc/images/vdc_LB_parkcall_ptbr.gif | Bin 858 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_pause.gif | Bin 483 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_pause_OFF.gif | Bin 483 -> 0 bytes .../agc/images/vdc_LB_pause_OFF_es.gif | Bin 404 -> 0 bytes .../agc/images/vdc_LB_pause_OFF_ptbr.gif | Bin 438 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_pause_es.gif | Bin 410 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_pause_ptbr.gif | Bin 989 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_resume.gif | Bin 535 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_resume_OFF.gif | Bin 533 -> 0 bytes .../agc/images/vdc_LB_resume_OFF_es.gif | Bin 495 -> 0 bytes .../agc/images/vdc_LB_resume_OFF_ptbr.gif | Bin 416 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_resume_es.gif | Bin 500 -> 0 bytes .../agc/images/vdc_LB_resume_ptbr.gif | Bin 394 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_senddtmf.gif | Bin 567 -> 0 bytes .../agc/images/vdc_LB_senddtmf_OFF.gif | Bin 563 -> 0 bytes .../agc/images/vdc_LB_senddtmf_OFF_es.gif | Bin 563 -> 0 bytes .../agc/images/vdc_LB_senddtmf_OFF_ptbr.gif | Bin 563 -> 0 bytes .../agc/images/vdc_LB_senddtmf_es.gif | Bin 564 -> 0 bytes .../agc/images/vdc_LB_senddtmf_ptbr.gif | Bin 564 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_spacer.gif | Bin 90 -> 0 bytes .../agc/images/vdc_LB_startrecording.gif | Bin 778 -> 0 bytes .../agc/images/vdc_LB_startrecording_OFF.gif | Bin 778 -> 0 bytes .../images/vdc_LB_startrecording_OFF_es.gif | Bin 788 -> 0 bytes .../images/vdc_LB_startrecording_OFF_ptbr.gif | Bin 783 -> 0 bytes .../agc/images/vdc_LB_startrecording_es.gif | Bin 788 -> 0 bytes .../agc/images/vdc_LB_startrecording_ptbr.gif | Bin 784 -> 0 bytes .../agc/images/vdc_LB_stoprecording.gif | Bin 758 -> 0 bytes .../agc/images/vdc_LB_stoprecording_OFF.gif | Bin 757 -> 0 bytes .../images/vdc_LB_stoprecording_OFF_es.gif | Bin 701 -> 0 bytes .../images/vdc_LB_stoprecording_OFF_ptbr.gif | Bin 778 -> 0 bytes .../agc/images/vdc_LB_stoprecording_es.gif | Bin 699 -> 0 bytes .../agc/images/vdc_LB_stoprecording_ptbr.gif | Bin 779 -> 0 bytes .../agc/images/vdc_LB_transferconf.gif | Bin 732 -> 0 bytes .../agc/images/vdc_LB_transferconf_OFF.gif | Bin 732 -> 0 bytes .../agc/images/vdc_LB_transferconf_OFF_es.gif | Bin 712 -> 0 bytes .../images/vdc_LB_transferconf_OFF_ptbr.gif | Bin 896 -> 0 bytes .../agc/images/vdc_LB_transferconf_es.gif | Bin 714 -> 0 bytes .../agc/images/vdc_LB_transferconf_ptbr.gif | Bin 898 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_webform.gif | Bin 542 -> 0 bytes .../agc/images/vdc_LB_webform_OFF.gif | Bin 615 -> 0 bytes .../agc/images/vdc_LB_webform_OFF_es.gif | Bin 661 -> 0 bytes .../agc/images/vdc_LB_webform_OFF_ptbr.gif | Bin 661 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_webform_es.gif | Bin 583 -> 0 bytes .../agc/images/vdc_LB_webform_ptbr.gif | Bin 583 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_ammessage.gif | Bin 396 -> 0 bytes .../agc/images/vdc_XB_ammessage_OFF.gif | Bin 403 -> 0 bytes .../agc/images/vdc_XB_blindtransfer.gif | Bin 774 -> 0 bytes .../agc/images/vdc_XB_blindtransfer_OFF.gif | Bin 774 -> 0 bytes .../images/vdc_XB_blindtransfer_OFF_es.gif | Bin 758 -> 0 bytes .../images/vdc_XB_blindtransfer_OFF_ptbr.gif | Bin 901 -> 0 bytes .../agc/images/vdc_XB_blindtransfer_es.gif | Bin 758 -> 0 bytes .../agc/images/vdc_XB_blindtransfer_ptbr.gif | Bin 901 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_channel.gif | Bin 314 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_channel_es.gif | Bin 242 -> 0 bytes .../agc/images/vdc_XB_channel_ptbr.gif | Bin 242 -> 0 bytes .../trunk/LANG_agc/agc/images/vdc_XB_code.gif | Bin 247 -> 0 bytes .../agc/images/vdc_XB_dialwithcustomer.gif | Bin 881 -> 0 bytes .../images/vdc_XB_dialwithcustomer_OFF.gif | Bin 881 -> 0 bytes .../images/vdc_XB_dialwithcustomer_OFF_es.gif | Bin 776 -> 0 bytes .../vdc_XB_dialwithcustomer_OFF_ptbr.gif | Bin 873 -> 0 bytes .../agc/images/vdc_XB_dialwithcustomer_es.gif | Bin 776 -> 0 bytes .../images/vdc_XB_dialwithcustomer_ptbr.gif | Bin 873 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines.gif | Bin 849 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines_OFF.gif | Bin 849 -> 0 bytes .../images/vdc_XB_hangupbothlines_OFF_es.gif | Bin 809 -> 0 bytes .../vdc_XB_hangupbothlines_OFF_ptbr.gif | Bin 858 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines_es.gif | Bin 809 -> 0 bytes .../images/vdc_XB_hangupbothlines_ptbr.gif | Bin 858 -> 0 bytes .../agc/images/vdc_XB_hangupxferline.gif | Bin 803 -> 0 bytes .../agc/images/vdc_XB_hangupxferline_OFF.gif | Bin 803 -> 0 bytes .../images/vdc_XB_hangupxferline_OFF_es.gif | Bin 702 -> 0 bytes .../images/vdc_XB_hangupxferline_OFF_ptbr.gif | Bin 828 -> 0 bytes .../agc/images/vdc_XB_hangupxferline_es.gif | Bin 702 -> 0 bytes .../agc/images/vdc_XB_hangupxferline_ptbr.gif | Bin 828 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_header.gif | Bin 884 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_header_es.gif | Bin 639 -> 0 bytes .../agc/images/vdc_XB_header_ptbr.gif | Bin 639 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive.gif | Bin 791 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive_OFF.gif | Bin 786 -> 0 bytes .../vdc_XB_hotkeysactive_OFF_es-orig.gif | Bin 1231 -> 0 bytes .../images/vdc_XB_hotkeysactive_OFF_es.gif | Bin 1256 -> 0 bytes .../images/vdc_XB_hotkeysactive_OFF_ptbr.gif | Bin 948 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive_es.gif | Bin 1231 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive_ptbr.gif | Bin 997 -> 0 bytes .../agc/images/vdc_XB_hotkeysinactive_es.gif | Bin 1256 -> 0 bytes .../agc/images/vdc_XB_internalcloser.gif | Bin 801 -> 0 bytes .../agc/images/vdc_XB_internalcloser_OFF.gif | Bin 801 -> 0 bytes .../images/vdc_XB_internalcloser_OFF_es.gif | Bin 640 -> 0 bytes .../images/vdc_XB_internalcloser_OFF_ptbr.gif | Bin 640 -> 0 bytes .../agc/images/vdc_XB_internalcloser_es.gif | Bin 640 -> 0 bytes .../agc/images/vdc_XB_internalcloser_ptbr.gif | Bin 640 -> 0 bytes .../agc/images/vdc_XB_leave3waycall.gif | Bin 816 -> 0 bytes .../agc/images/vdc_XB_leave3waycall_OFF.gif | Bin 816 -> 0 bytes .../images/vdc_XB_leave3waycall_OFF_es.gif | Bin 834 -> 0 bytes .../images/vdc_XB_leave3waycall_OFF_ptbr.gif | Bin 816 -> 0 bytes .../agc/images/vdc_XB_leave3waycall_es.gif | Bin 834 -> 0 bytes .../agc/images/vdc_XB_leave3waycall_ptbr.gif | Bin 816 -> 0 bytes .../agc/images/vdc_XB_localcloser.gif | Bin 728 -> 0 bytes .../agc/images/vdc_XB_localcloser_OFF.gif | Bin 728 -> 0 bytes .../agc/images/vdc_XB_localcloser_OFF_es.gif | Bin 607 -> 0 bytes .../images/vdc_XB_localcloser_OFF_ptbr.gif | Bin 607 -> 0 bytes .../agc/images/vdc_XB_localcloser_es.gif | Bin 606 -> 0 bytes .../agc/images/vdc_XB_localcloser_ptbr.gif | Bin 606 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_number.gif | Bin 480 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_number_es.gif | Bin 416 -> 0 bytes .../agc/images/vdc_XB_number_ptbr.gif | Bin 449 -> 0 bytes .../agc/images/vdc_XB_parkcustomerdial.gif | Bin 896 -> 0 bytes .../images/vdc_XB_parkcustomerdial_OFF.gif | Bin 896 -> 0 bytes .../images/vdc_XB_parkcustomerdial_OFF_es.gif | Bin 661 -> 0 bytes .../vdc_XB_parkcustomerdial_OFF_ptbr.gif | Bin 916 -> 0 bytes .../agc/images/vdc_XB_parkcustomerdial_es.gif | Bin 659 -> 0 bytes .../images/vdc_XB_parkcustomerdial_ptbr.gif | Bin 916 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_seconds.gif | Bin 352 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_seconds_es.gif | Bin 333 -> 0 bytes .../agc/images/vdc_XB_seconds_ptbr.gif | Bin 333 -> 0 bytes .../LANG_agc/agc/images/vdc_tab_script.gif | Bin 825 -> 0 bytes .../LANG_agc/agc/images/vdc_tab_script_es.gif | Bin 916 -> 0 bytes .../agc/images/vdc_tab_script_ptbr.gif | Bin 825 -> 0 bytes .../LANG_agc/agc/images/vdc_tab_vicidial.gif | Bin 866 -> 0 bytes .../agc/images/vdc_tab_vicidial_ptbr.gif | Bin 866 -> 0 bytes agc_2-X/trunk/LANG_agc/agc/inbound_popup.php | 348 - .../trunk/LANG_agc/agc/live_exten_check.php | 273 - agc_2-X/trunk/LANG_agc/agc/manager_send.php | 903 --- .../trunk/LANG_agc/agc/park_calls_display.php | 142 - agc_2-X/trunk/LANG_agc/agc/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc/voicemail_check.php | 136 - .../LANG_agc/agc_br/active_list_refresh.php | 463 -- .../trunk/LANG_agc/agc_br/astguiclient.php | 2890 -------- .../LANG_agc/agc_br/call_log_display.php | 192 - .../LANG_agc/agc_br/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc_br/dbconnect.php | 15 - .../trunk/LANG_agc/agc_br/inbound_popup.php | 348 - .../LANG_agc/agc_br/live_exten_check.php | 273 - .../trunk/LANG_agc/agc_br/manager_send.php | 903 --- .../LANG_agc/agc_br/park_calls_display.php | 142 - .../trunk/LANG_agc/agc_br/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc_br/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc_br/voicemail_check.php | 136 - .../LANG_agc/agc_de/active_list_refresh.php | 463 -- .../trunk/LANG_agc/agc_de/astguiclient.php | 2890 -------- .../LANG_agc/agc_de/call_log_display.php | 192 - .../LANG_agc/agc_de/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc_de/dbconnect.php | 15 - .../trunk/LANG_agc/agc_de/inbound_popup.php | 348 - .../LANG_agc/agc_de/live_exten_check.php | 273 - .../trunk/LANG_agc/agc_de/manager_send.php | 903 --- .../LANG_agc/agc_de/park_calls_display.php | 142 - .../trunk/LANG_agc/agc_de/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc_de/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc_de/voicemail_check.php | 136 - .../LANG_agc/agc_el/active_list_refresh.php | 463 -- .../trunk/LANG_agc/agc_el/astguiclient.php | 2890 -------- .../LANG_agc/agc_el/call_log_display.php | 192 - .../LANG_agc/agc_el/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc_el/dbconnect.php | 15 - .../trunk/LANG_agc/agc_el/inbound_popup.php | 348 - .../LANG_agc/agc_el/live_exten_check.php | 273 - .../trunk/LANG_agc/agc_el/manager_send.php | 903 --- .../LANG_agc/agc_el/park_calls_display.php | 142 - .../trunk/LANG_agc/agc_el/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc_el/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc_el/voicemail_check.php | 136 - .../LANG_agc/agc_en/active_list_refresh.php | 463 -- .../trunk/LANG_agc/agc_en/astguiclient.php | 2890 -------- .../LANG_agc/agc_en/call_log_display.php | 192 - .../LANG_agc/agc_en/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc_en/dbconnect.php | 15 - .../trunk/LANG_agc/agc_en/inbound_popup.php | 348 - .../LANG_agc/agc_en/live_exten_check.php | 273 - .../trunk/LANG_agc/agc_en/manager_send.php | 903 --- .../LANG_agc/agc_en/park_calls_display.php | 142 - .../trunk/LANG_agc/agc_en/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc_en/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc_en/voicemail_check.php | 136 - .../LANG_agc/agc_es/active_list_refresh.php | 463 -- .../trunk/LANG_agc/agc_es/astguiclient.php | 2890 -------- .../LANG_agc/agc_es/call_log_display.php | 192 - .../LANG_agc/agc_es/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc_es/dbconnect.php | 15 - .../trunk/LANG_agc/agc_es/inbound_popup.php | 348 - .../LANG_agc/agc_es/live_exten_check.php | 273 - .../trunk/LANG_agc/agc_es/manager_send.php | 903 --- .../LANG_agc/agc_es/park_calls_display.php | 142 - .../trunk/LANG_agc/agc_es/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc_es/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc_es/voicemail_check.php | 136 - .../LANG_agc/agc_fr/active_list_refresh.php | 463 -- .../trunk/LANG_agc/agc_fr/astguiclient.php | 2890 -------- .../LANG_agc/agc_fr/call_log_display.php | 192 - .../LANG_agc/agc_fr/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc_fr/dbconnect.php | 15 - .../trunk/LANG_agc/agc_fr/inbound_popup.php | 348 - .../LANG_agc/agc_fr/live_exten_check.php | 273 - .../trunk/LANG_agc/agc_fr/manager_send.php | 903 --- .../LANG_agc/agc_fr/park_calls_display.php | 142 - .../trunk/LANG_agc/agc_fr/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc_fr/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc_fr/voicemail_check.php | 136 - .../LANG_agc/agc_it/active_list_refresh.php | 463 -- .../trunk/LANG_agc/agc_it/astguiclient.php | 2890 -------- .../LANG_agc/agc_it/call_log_display.php | 192 - .../LANG_agc/agc_it/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc_it/dbconnect.php | 15 - .../trunk/LANG_agc/agc_it/inbound_popup.php | 348 - .../LANG_agc/agc_it/live_exten_check.php | 273 - .../trunk/LANG_agc/agc_it/manager_send.php | 903 --- .../LANG_agc/agc_it/park_calls_display.php | 142 - .../trunk/LANG_agc/agc_it/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc_it/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc_it/voicemail_check.php | 136 - .../LANG_agc/agc_pt/active_list_refresh.php | 463 -- .../trunk/LANG_agc/agc_pt/astguiclient.php | 2890 -------- .../LANG_agc/agc_pt/call_log_display.php | 192 - .../LANG_agc/agc_pt/conf_exten_check.php | 258 - agc_2-X/trunk/LANG_agc/agc_pt/dbconnect.php | 15 - .../trunk/LANG_agc/agc_pt/inbound_popup.php | 348 - .../LANG_agc/agc_pt/live_exten_check.php | 273 - .../trunk/LANG_agc/agc_pt/manager_send.php | 903 --- .../LANG_agc/agc_pt/park_calls_display.php | 142 - .../trunk/LANG_agc/agc_pt/vdc_db_query.php | 1512 ---- agc_2-X/trunk/LANG_agc/agc_pt/vicidial.php | 5435 -------------- .../trunk/LANG_agc/agc_pt/voicemail_check.php | 136 - .../AST_VDhopper.pl | 814 +- .../trunk/VICIDIAL_web/AST_CLOSERstats.php | 396 - agc_2-X/trunk/VICIDIAL_web/AST_VDADstats.php | 417 -- .../VICIDIAL_web/AST_VICIDIAL_hopperlist.php | 161 - .../VICIDIAL_web/AST_admin_log_display.php | 118 - .../VICIDIAL_web/AST_agent_performance.php | 232 - .../AST_agent_performance_detail.php | 406 - .../VICIDIAL_web/AST_agent_time_sheet.php | 281 - .../AST_agent_time_sheet_archive.php | 281 - agc_2-X/trunk/VICIDIAL_web/AST_parkstats.php | 396 - .../VICIDIAL_web/AST_server_performance.php | 310 - agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD.php | 255 - .../VICIDIAL_web/AST_timeonVDAD_closer.php | 316 - .../trunk/VICIDIAL_web/AST_timeonVDADall.php | 391 - .../AST_timeonVDADall_SIPmonitor.php | 395 - agc_2-X/trunk/VICIDIAL_web/AST_timeoncall.php | 202 - agc_2-X/trunk/VICIDIAL_web/AST_timeonpark.php | 219 - agc_2-X/trunk/VICIDIAL_web/admin.php | 6514 ----------------- .../trunk/VICIDIAL_web/admin_modify_lead.php | 476 -- .../trunk/VICIDIAL_web/admin_search_lead.php | 224 - .../VICIDIAL_web/closer-fronter_popup.php | 515 -- .../VICIDIAL_web/closer-fronter_popup2.php | 430 -- agc_2-X/trunk/VICIDIAL_web/closer.php | 353 - agc_2-X/trunk/VICIDIAL_web/closer_dispo.php | 329 - agc_2-X/trunk/VICIDIAL_web/closer_popup.php | 453 -- agc_2-X/trunk/VICIDIAL_web/count.htm | 1 - agc_2-X/trunk/VICIDIAL_web/dbconnect.php | 20 - .../trunk/VICIDIAL_web/group_hourly_stats.php | 252 - agc_2-X/trunk/VICIDIAL_web/help.gif | Bin 492 -> 0 bytes agc_2-X/trunk/VICIDIAL_web/listloader.php | 698 -- agc_2-X/trunk/VICIDIAL_web/listloader.pl | 690 -- agc_2-X/trunk/VICIDIAL_web/listloaderMAIN.php | 79 - .../VICIDIAL_web/listloader_rowdisplay.pl | 62 - .../trunk/VICIDIAL_web/listloader_super.pl | 691 -- agc_2-X/trunk/VICIDIAL_web/log_test.php | 37 - .../VICIDIAL_web/new_listloader_superL.php | 1364 ---- .../trunk/VICIDIAL_web/record_conf_1_hour.php | 156 - agc_2-X/trunk/VICIDIAL_web/remote_dispo.php | 327 - agc_2-X/trunk/VICIDIAL_web/server_stats.php | 96 - agc_2-X/trunk/VICIDIAL_web/test.txt | 1 - agc_2-X/trunk/VICIDIAL_web/user_stats.php | 316 - agc_2-X/trunk/VICIDIAL_web/user_status.php | 238 - agc_2-X/trunk/VICIDIAL_web/vdremote.php | 602 -- agc_2-X/trunk/agc/active_list_refresh.php | 482 -- agc_2-X/trunk/agc/astguiclient.php | 2899 -------- agc_2-X/trunk/agc/call_log_display.php | 196 - agc_2-X/trunk/agc/conf_exten_check.php | 262 - agc_2-X/trunk/agc/dbconnect.php | 18 - .../agc/images/agc_check_voicemail_BLINK.gif | Bin 2627 -> 0 bytes .../images/agc_check_voicemail_BLINK_e.gif | Bin 780 -> 0 bytes .../images/agc_check_voicemail_BLINK_es.gif | Bin 780 -> 0 bytes .../images/agc_check_voicemail_BLINK_ptbr.gif | Bin 886 -> 0 bytes .../agc/images/agc_check_voicemail_OFF.gif | Bin 919 -> 0 bytes .../agc/images/agc_check_voicemail_OFF_es.gif | Bin 785 -> 0 bytes .../images/agc_check_voicemail_OFF_ptbr.gif | Bin 880 -> 0 bytes .../agc/images/agc_check_voicemail_ON.gif | Bin 919 -> 0 bytes .../agc/images/agc_check_voicemail_ON_es.gif | Bin 781 -> 0 bytes .../images/agc_check_voicemail_ON_ptbr.gif | Bin 881 -> 0 bytes .../trunk/agc/images/agc_live_call_OFF.gif | Bin 541 -> 0 bytes .../trunk/agc/images/agc_live_call_OFF_es.gif | Bin 513 -> 0 bytes .../agc/images/agc_live_call_OFF_ptbr.gif | Bin 459 -> 0 bytes agc_2-X/trunk/agc/images/agc_live_call_ON.gif | Bin 793 -> 0 bytes .../trunk/agc/images/agc_live_call_ON_es.gif | Bin 871 -> 0 bytes .../agc/images/agc_live_call_ON_ptbr.gif | Bin 2750 -> 0 bytes .../trunk/agc/images/agc_tab_active_lines.gif | Bin 886 -> 0 bytes .../agc/images/agc_tab_active_lines_el.gif | Bin 984 -> 0 bytes .../agc/images/agc_tab_active_lines_es.gif | Bin 704 -> 0 bytes .../agc/images/agc_tab_active_lines_ptbr.gif | Bin 1005 -> 0 bytes .../trunk/agc/images/agc_tab_astguiclient.gif | Bin 1092 -> 0 bytes .../agc/images/agc_tab_astguiclient_ptbr.gif | Bin 1092 -> 0 bytes .../trunk/agc/images/agc_tab_conferences.gif | Bin 928 -> 0 bytes .../agc/images/agc_tab_conferences_el.gif | Bin 861 -> 0 bytes .../agc/images/agc_tab_conferences_es.gif | Bin 718 -> 0 bytes .../agc/images/agc_tab_conferences_ptbr.gif | Bin 718 -> 0 bytes agc_2-X/trunk/agc/images/agc_tab_main.gif | Bin 596 -> 0 bytes agc_2-X/trunk/agc/images/agc_tab_main_el.gif | Bin 722 -> 0 bytes agc_2-X/trunk/agc/images/agc_tab_main_es.gif | Bin 541 -> 0 bytes .../trunk/agc/images/agc_tab_main_ptbr.gif | Bin 541 -> 0 bytes agc_2-X/trunk/agc/images/blank.gif | Bin 43 -> 0 bytes agc_2-X/trunk/agc/images/br.gif | Bin 397 -> 0 bytes agc_2-X/trunk/agc/images/de.gif | Bin 162 -> 0 bytes agc_2-X/trunk/agc/images/down.gif | Bin 169 -> 0 bytes agc_2-X/trunk/agc/images/el.gif | Bin 245 -> 0 bytes agc_2-X/trunk/agc/images/en.gif | Bin 322 -> 0 bytes agc_2-X/trunk/agc/images/es.gif | Bin 222 -> 0 bytes agc_2-X/trunk/agc/images/fr.gif | Bin 217 -> 0 bytes agc_2-X/trunk/agc/images/it.gif | Bin 198 -> 0 bytes agc_2-X/trunk/agc/images/pt.gif | Bin 208 -> 0 bytes agc_2-X/trunk/agc/images/remove.gif | Bin 176 -> 0 bytes agc_2-X/trunk/agc/images/up.gif | Bin 169 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber.gif | Bin 831 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber_OFF.gif | Bin 827 -> 0 bytes .../images/vdc_LB_dialnextnumber_OFF_es.gif | Bin 914 -> 0 bytes .../images/vdc_LB_dialnextnumber_OFF_ptbr.gif | Bin 961 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber_es.gif | Bin 914 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber_ptbr.gif | Bin 965 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall.gif | Bin 804 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall_OFF.gif | Bin 802 -> 0 bytes .../images/vdc_LB_grabparkedcall_OFF_es.gif | Bin 827 -> 0 bytes .../images/vdc_LB_grabparkedcall_OFF_ptbr.gif | Bin 981 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall_es.gif | Bin 826 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall_ptbr.gif | Bin 985 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer.gif | Bin 803 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer_OFF.gif | Bin 803 -> 0 bytes .../images/vdc_LB_hangupcustomer_OFF_es.gif | Bin 693 -> 0 bytes .../images/vdc_LB_hangupcustomer_OFF_ptbr.gif | Bin 811 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer_es.gif | Bin 697 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer_ptbr.gif | Bin 1029 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_parkcall.gif | Bin 601 -> 0 bytes .../trunk/agc/images/vdc_LB_parkcall_OFF.gif | Bin 607 -> 0 bytes .../agc/images/vdc_LB_parkcall_OFF_es.gif | Bin 644 -> 0 bytes .../agc/images/vdc_LB_parkcall_OFF_ptbr.gif | Bin 830 -> 0 bytes .../trunk/agc/images/vdc_LB_parkcall_es.gif | Bin 646 -> 0 bytes .../trunk/agc/images/vdc_LB_parkcall_ptbr.gif | Bin 858 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_pause.gif | Bin 483 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_pause_OFF.gif | Bin 483 -> 0 bytes .../trunk/agc/images/vdc_LB_pause_OFF_es.gif | Bin 404 -> 0 bytes .../agc/images/vdc_LB_pause_OFF_ptbr.gif | Bin 438 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_pause_es.gif | Bin 410 -> 0 bytes .../trunk/agc/images/vdc_LB_pause_ptbr.gif | Bin 989 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_resume.gif | Bin 535 -> 0 bytes .../trunk/agc/images/vdc_LB_resume_OFF.gif | Bin 533 -> 0 bytes .../trunk/agc/images/vdc_LB_resume_OFF_es.gif | Bin 495 -> 0 bytes .../agc/images/vdc_LB_resume_OFF_ptbr.gif | Bin 416 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_resume_es.gif | Bin 500 -> 0 bytes .../trunk/agc/images/vdc_LB_resume_ptbr.gif | Bin 394 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_senddtmf.gif | Bin 567 -> 0 bytes .../trunk/agc/images/vdc_LB_senddtmf_OFF.gif | Bin 563 -> 0 bytes .../agc/images/vdc_LB_senddtmf_OFF_es.gif | Bin 563 -> 0 bytes .../agc/images/vdc_LB_senddtmf_OFF_ptbr.gif | Bin 563 -> 0 bytes .../trunk/agc/images/vdc_LB_senddtmf_es.gif | Bin 564 -> 0 bytes .../trunk/agc/images/vdc_LB_senddtmf_ptbr.gif | Bin 564 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_spacer.gif | Bin 90 -> 0 bytes .../agc/images/vdc_LB_startrecording.gif | Bin 778 -> 0 bytes .../agc/images/vdc_LB_startrecording_OFF.gif | Bin 778 -> 0 bytes .../images/vdc_LB_startrecording_OFF_es.gif | Bin 788 -> 0 bytes .../images/vdc_LB_startrecording_OFF_ptbr.gif | Bin 783 -> 0 bytes .../agc/images/vdc_LB_startrecording_es.gif | Bin 788 -> 0 bytes .../agc/images/vdc_LB_startrecording_ptbr.gif | Bin 784 -> 0 bytes .../trunk/agc/images/vdc_LB_stoprecording.gif | Bin 758 -> 0 bytes .../agc/images/vdc_LB_stoprecording_OFF.gif | Bin 757 -> 0 bytes .../images/vdc_LB_stoprecording_OFF_es.gif | Bin 701 -> 0 bytes .../images/vdc_LB_stoprecording_OFF_ptbr.gif | Bin 778 -> 0 bytes .../agc/images/vdc_LB_stoprecording_es.gif | Bin 699 -> 0 bytes .../agc/images/vdc_LB_stoprecording_ptbr.gif | Bin 779 -> 0 bytes .../trunk/agc/images/vdc_LB_transferconf.gif | Bin 732 -> 0 bytes .../agc/images/vdc_LB_transferconf_OFF.gif | Bin 732 -> 0 bytes .../agc/images/vdc_LB_transferconf_OFF_es.gif | Bin 712 -> 0 bytes .../images/vdc_LB_transferconf_OFF_ptbr.gif | Bin 896 -> 0 bytes .../agc/images/vdc_LB_transferconf_es.gif | Bin 714 -> 0 bytes .../agc/images/vdc_LB_transferconf_ptbr.gif | Bin 898 -> 0 bytes agc_2-X/trunk/agc/images/vdc_LB_webform.gif | Bin 542 -> 0 bytes .../trunk/agc/images/vdc_LB_webform_OFF.gif | Bin 615 -> 0 bytes .../agc/images/vdc_LB_webform_OFF_es.gif | Bin 661 -> 0 bytes .../agc/images/vdc_LB_webform_OFF_ptbr.gif | Bin 661 -> 0 bytes .../trunk/agc/images/vdc_LB_webform_es.gif | Bin 583 -> 0 bytes .../trunk/agc/images/vdc_LB_webform_ptbr.gif | Bin 583 -> 0 bytes agc_2-X/trunk/agc/images/vdc_XB_ammessage.gif | Bin 396 -> 0 bytes .../trunk/agc/images/vdc_XB_ammessage_OFF.gif | Bin 403 -> 0 bytes .../trunk/agc/images/vdc_XB_blindtransfer.gif | Bin 774 -> 0 bytes .../agc/images/vdc_XB_blindtransfer_OFF.gif | Bin 774 -> 0 bytes .../images/vdc_XB_blindtransfer_OFF_es.gif | Bin 758 -> 0 bytes .../images/vdc_XB_blindtransfer_OFF_ptbr.gif | Bin 901 -> 0 bytes .../agc/images/vdc_XB_blindtransfer_es.gif | Bin 758 -> 0 bytes .../agc/images/vdc_XB_blindtransfer_ptbr.gif | Bin 901 -> 0 bytes agc_2-X/trunk/agc/images/vdc_XB_channel.gif | Bin 314 -> 0 bytes .../trunk/agc/images/vdc_XB_channel_es.gif | Bin 242 -> 0 bytes .../trunk/agc/images/vdc_XB_channel_ptbr.gif | Bin 242 -> 0 bytes agc_2-X/trunk/agc/images/vdc_XB_code.gif | Bin 247 -> 0 bytes .../agc/images/vdc_XB_dialwithcustomer.gif | Bin 881 -> 0 bytes .../images/vdc_XB_dialwithcustomer_OFF.gif | Bin 881 -> 0 bytes .../images/vdc_XB_dialwithcustomer_OFF_es.gif | Bin 776 -> 0 bytes .../vdc_XB_dialwithcustomer_OFF_ptbr.gif | Bin 873 -> 0 bytes .../agc/images/vdc_XB_dialwithcustomer_es.gif | Bin 776 -> 0 bytes .../images/vdc_XB_dialwithcustomer_ptbr.gif | Bin 873 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines.gif | Bin 849 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines_OFF.gif | Bin 849 -> 0 bytes .../images/vdc_XB_hangupbothlines_OFF_es.gif | Bin 809 -> 0 bytes .../vdc_XB_hangupbothlines_OFF_ptbr.gif | Bin 858 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines_es.gif | Bin 809 -> 0 bytes .../images/vdc_XB_hangupbothlines_ptbr.gif | Bin 858 -> 0 bytes .../agc/images/vdc_XB_hangupxferline.gif | Bin 803 -> 0 bytes .../agc/images/vdc_XB_hangupxferline_OFF.gif | Bin 803 -> 0 bytes .../images/vdc_XB_hangupxferline_OFF_es.gif | Bin 702 -> 0 bytes .../images/vdc_XB_hangupxferline_OFF_ptbr.gif | Bin 828 -> 0 bytes .../agc/images/vdc_XB_hangupxferline_es.gif | Bin 702 -> 0 bytes .../agc/images/vdc_XB_hangupxferline_ptbr.gif | Bin 828 -> 0 bytes agc_2-X/trunk/agc/images/vdc_XB_header.gif | Bin 884 -> 0 bytes agc_2-X/trunk/agc/images/vdc_XB_header_es.gif | Bin 639 -> 0 bytes .../trunk/agc/images/vdc_XB_header_ptbr.gif | Bin 639 -> 0 bytes .../trunk/agc/images/vdc_XB_hotkeysactive.gif | Bin 791 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive_OFF.gif | Bin 786 -> 0 bytes .../vdc_XB_hotkeysactive_OFF_es-orig.gif | Bin 1231 -> 0 bytes .../images/vdc_XB_hotkeysactive_OFF_es.gif | Bin 1256 -> 0 bytes .../images/vdc_XB_hotkeysactive_OFF_ptbr.gif | Bin 948 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive_es.gif | Bin 1231 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive_ptbr.gif | Bin 997 -> 0 bytes .../agc/images/vdc_XB_hotkeysinactive_es.gif | Bin 1256 -> 0 bytes .../agc/images/vdc_XB_internalcloser.gif | Bin 801 -> 0 bytes .../agc/images/vdc_XB_internalcloser_OFF.gif | Bin 801 -> 0 bytes .../images/vdc_XB_internalcloser_OFF_es.gif | Bin 640 -> 0 bytes .../images/vdc_XB_internalcloser_OFF_ptbr.gif | Bin 640 -> 0 bytes .../agc/images/vdc_XB_internalcloser_es.gif | Bin 640 -> 0 bytes .../agc/images/vdc_XB_internalcloser_ptbr.gif | Bin 640 -> 0 bytes .../trunk/agc/images/vdc_XB_leave3waycall.gif | Bin 816 -> 0 bytes .../agc/images/vdc_XB_leave3waycall_OFF.gif | Bin 816 -> 0 bytes .../images/vdc_XB_leave3waycall_OFF_es.gif | Bin 834 -> 0 bytes .../images/vdc_XB_leave3waycall_OFF_ptbr.gif | Bin 816 -> 0 bytes .../agc/images/vdc_XB_leave3waycall_es.gif | Bin 834 -> 0 bytes .../agc/images/vdc_XB_leave3waycall_ptbr.gif | Bin 816 -> 0 bytes .../trunk/agc/images/vdc_XB_localcloser.gif | Bin 728 -> 0 bytes .../agc/images/vdc_XB_localcloser_OFF.gif | Bin 728 -> 0 bytes .../agc/images/vdc_XB_localcloser_OFF_es.gif | Bin 607 -> 0 bytes .../images/vdc_XB_localcloser_OFF_ptbr.gif | Bin 607 -> 0 bytes .../agc/images/vdc_XB_localcloser_es.gif | Bin 606 -> 0 bytes .../agc/images/vdc_XB_localcloser_ptbr.gif | Bin 606 -> 0 bytes agc_2-X/trunk/agc/images/vdc_XB_number.gif | Bin 480 -> 0 bytes agc_2-X/trunk/agc/images/vdc_XB_number_es.gif | Bin 416 -> 0 bytes .../trunk/agc/images/vdc_XB_number_ptbr.gif | Bin 449 -> 0 bytes .../agc/images/vdc_XB_parkcustomerdial.gif | Bin 896 -> 0 bytes .../images/vdc_XB_parkcustomerdial_OFF.gif | Bin 896 -> 0 bytes .../images/vdc_XB_parkcustomerdial_OFF_es.gif | Bin 661 -> 0 bytes .../vdc_XB_parkcustomerdial_OFF_ptbr.gif | Bin 916 -> 0 bytes .../agc/images/vdc_XB_parkcustomerdial_es.gif | Bin 659 -> 0 bytes .../images/vdc_XB_parkcustomerdial_ptbr.gif | Bin 916 -> 0 bytes agc_2-X/trunk/agc/images/vdc_XB_seconds.gif | Bin 352 -> 0 bytes .../trunk/agc/images/vdc_XB_seconds_es.gif | Bin 333 -> 0 bytes .../trunk/agc/images/vdc_XB_seconds_ptbr.gif | Bin 333 -> 0 bytes agc_2-X/trunk/agc/images/vdc_tab_script.gif | Bin 825 -> 0 bytes .../trunk/agc/images/vdc_tab_script_es.gif | Bin 916 -> 0 bytes .../trunk/agc/images/vdc_tab_script_ptbr.gif | Bin 825 -> 0 bytes agc_2-X/trunk/agc/images/vdc_tab_vicidial.gif | Bin 866 -> 0 bytes .../agc/images/vdc_tab_vicidial_ptbr.gif | Bin 866 -> 0 bytes agc_2-X/trunk/agc/inbound_popup.php | 351 - agc_2-X/trunk/agc/live_exten_check.php | 277 - agc_2-X/trunk/agc/manager_send.php | 908 --- agc_2-X/trunk/agc/park_calls_display.php | 146 - agc_2-X/trunk/agc/vdc_db_query.php | 1512 ---- agc_2-X/trunk/agc/vicidial.php | 5435 -------------- agc_2-X/trunk/agc/voicemail_check.php | 140 - agc_2-X/trunk/app_conference/0.gsm | Bin 429 -> 0 bytes agc_2-X/trunk/app_conference/0.wav | Bin 4100 -> 0 bytes agc_2-X/trunk/app_conference/1.gsm | 1 - agc_2-X/trunk/app_conference/1.wav | Bin 4100 -> 0 bytes agc_2-X/trunk/app_conference/2.gsm | 3 - agc_2-X/trunk/app_conference/2.wav | Bin 4018 -> 0 bytes agc_2-X/trunk/app_conference/3.gsm | 2 - agc_2-X/trunk/app_conference/3.wav | Bin 4046 -> 0 bytes agc_2-X/trunk/app_conference/4.gsm | 2 - agc_2-X/trunk/app_conference/4.wav | Bin 3990 -> 0 bytes agc_2-X/trunk/app_conference/5.gsm | 1 - agc_2-X/trunk/app_conference/5.wav | Bin 3990 -> 0 bytes agc_2-X/trunk/app_conference/6.gsm | 1 - agc_2-X/trunk/app_conference/6.wav | Bin 4046 -> 0 bytes agc_2-X/trunk/app_conference/64_Makefile | 115 - agc_2-X/trunk/app_conference/7.gsm | 2 - agc_2-X/trunk/app_conference/7.wav | Bin 4072 -> 0 bytes agc_2-X/trunk/app_conference/8.gsm | Bin 429 -> 0 bytes agc_2-X/trunk/app_conference/8.wav | Bin 4018 -> 0 bytes agc_2-X/trunk/app_conference/9.gsm | Bin 429 -> 0 bytes agc_2-X/trunk/app_conference/9.wav | Bin 4018 -> 0 bytes agc_2-X/trunk/app_conference/LICENSE | 341 - agc_2-X/trunk/app_conference/Makefile | 121 - agc_2-X/trunk/app_conference/README | 170 - agc_2-X/trunk/app_conference/VICIDIAL.txt | 86 - agc_2-X/trunk/app_conference/app_conference.c | 146 - agc_2-X/trunk/app_conference/app_conference.h | 200 - agc_2-X/trunk/app_conference/cli.c | 332 - agc_2-X/trunk/app_conference/cli.h | 47 - agc_2-X/trunk/app_conference/common.h | 50 - agc_2-X/trunk/app_conference/conf_frame.h | 61 - agc_2-X/trunk/app_conference/conference.c | 1410 ---- agc_2-X/trunk/app_conference/conference.h | 121 - agc_2-X/trunk/app_conference/enter.gsm | Bin 231 -> 0 bytes agc_2-X/trunk/app_conference/frame.c | 614 -- agc_2-X/trunk/app_conference/frame.h | 60 - agc_2-X/trunk/app_conference/hash.gsm | 2 - agc_2-X/trunk/app_conference/hash.wav | Bin 3990 -> 0 bytes agc_2-X/trunk/app_conference/leave.gsm | Bin 330 -> 0 bytes .../trunk/app_conference/libspeex/CVS/Entries | 7 - .../app_conference/libspeex/CVS/Repository | 1 - .../trunk/app_conference/libspeex/CVS/Root | 1 - agc_2-X/trunk/app_conference/libspeex/misc.c | 145 - agc_2-X/trunk/app_conference/libspeex/misc.h | 147 - .../app_conference/libspeex/preprocess.c | 1136 --- .../app_conference/libspeex/qc_20060323.zip | Bin 22409 -> 0 bytes .../trunk/app_conference/libspeex/smallft.c | 1256 ---- .../trunk/app_conference/libspeex/smallft.h | 42 - .../libspeex/speex_preprocess.h | 139 - agc_2-X/trunk/app_conference/member.c | 1946 ----- agc_2-X/trunk/app_conference/member.h | 212 - agc_2-X/trunk/app_conference/star.gsm | 2 - agc_2-X/trunk/app_conference/star.wav | Bin 4124 -> 0 bytes .../astguiclient_web/AST_inboundEXTstats.php | 400 - agc_2-X/trunk/astguiclient_web/admin.php | 1824 ----- agc_2-X/trunk/astguiclient_web/dbconnect.php | 14 - agc_2-X/trunk/astguiclient_web/help.gif | Bin 492 -> 0 bytes .../trunk/astguiclient_web/inbound_popup.php | 228 - .../trunk/astguiclient_web/phone_stats.php | 244 - .../trunk/astguiclient_web/remote_inbound.php | 169 - agc_2-X/trunk/astguiclient_web/test.php | 30 - agc_2-X/trunk/libs/AST_VICI_conf.pl.bak | 146 - agc_2-X/trunk/libs/AUS_zipcode_ranges.txt | 14 - agc_2-X/trunk/libs/Asterisk.pm | 20 - agc_2-X/trunk/libs/Asterisk/AGI.pm | 685 -- .../libs/Asterisk/DONOTUSE_AST_VICI_conf.pl | 146 - agc_2-X/trunk/libs/Asterisk/Manager.pm | 412 -- agc_2-X/trunk/libs/Asterisk/Outgoing.pm | 110 - agc_2-X/trunk/libs/Asterisk/QCall.pm | 61 - agc_2-X/trunk/libs/Asterisk/Voicemail.pm | 261 - agc_2-X/trunk/libs/Asterisk/buttons.gif | Bin 10160 -> 0 bytes .../trunk/libs/Asterisk/vm_indicator_anim.gif | Bin 311 -> 0 bytes .../trunk/libs/Asterisk/voicemail_digits.gif | Bin 1812 -> 0 bytes agc_2-X/trunk/libs/Asterisk/voicemail_new.gif | Bin 240 -> 0 bytes agc_2-X/trunk/libs/Asterisk/voicemail_old.gif | Bin 230 -> 0 bytes agc_2-X/trunk/libs/Asterisk/voicemail_up.gif | Bin 520 -> 0 bytes agc_2-X/trunk/libs/MySQL.pm | 1015 --- agc_2-X/trunk/libs/Net/HTTP.pm | 266 - agc_2-X/trunk/libs/Net/HTTP/Methods.pm | 520 -- agc_2-X/trunk/libs/Net/HTTP/NB.pm | 106 - agc_2-X/trunk/libs/Net/HTTPS.pm | 55 - agc_2-X/trunk/libs/Net/MySQL.pm | 1015 --- agc_2-X/trunk/libs/Net/SSH.pm | 255 - agc_2-X/trunk/libs/Net/Telnet.pm | 5252 ------------- agc_2-X/trunk/libs/Telnet.pm | 5252 ------------- agc_2-X/trunk/libs/Time/HiRes.1.59.pm | 359 - agc_2-X/trunk/libs/Time/HiRes.1.65.pm | 369 - agc_2-X/trunk/libs/Time/HiRes.pm | 351 - agc_2-X/trunk/libs/Time/Local.pm | 289 - .../Time/Other_HiRes_versions/HiRes.1.55.pm | 351 - .../Time/Other_HiRes_versions/HiRes.1.59.pm | 359 - .../Time/Other_HiRes_versions/HiRes.1.65.pm | 369 - .../libs/Time/Other_HiRes_versions/HiRes.pm | 359 - agc_2-X/trunk/libs/Time/gmtime.pm | 90 - agc_2-X/trunk/libs/Time/localtime.pm | 86 - agc_2-X/trunk/libs/Time/tm.pm | 33 - agc_2-X/trunk/libs/US_zipcode_ranges.txt | 51 - 879 files changed, 812 insertions(+), 274387 deletions(-) delete mode 100644 agc_2-X/trunk/DBI-scripts/AST_agent_week.pl delete mode 100644 agc_2-X/trunk/DTMF_sounds/0.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/0.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/1.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/1.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/2.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/2.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/3.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/3.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/4.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/4.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/5.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/5.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/6.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/6.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/7.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/7.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/8.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/8.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/9.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/9.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/US_pol_survey_hello.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/US_pol_survey_transfer.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/US_reminder_callback.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/US_reminder_goodbye.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/US_reminder_message.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/US_reminder_options.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/US_thanks_no_contact.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/auth-thankyou.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/buzz.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/ding.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/enter.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/four_digit_id.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/generic_hold.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/hash.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/hash.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/hold_tone.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/ld_invalid_pin_number.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/ld_welcome_pin_number.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/leave.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/silence.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/star.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/star.wav delete mode 100644 agc_2-X/trunk/DTMF_sounds/vm-goodbye.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/vm-msgsaved.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/vm-rec-generic.gsm delete mode 100644 agc_2-X/trunk/DTMF_sounds/vm-review.gsm delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient/AST_inboundEXTstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient/phone_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient/remote_inbound.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient/test.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_de/AST_inboundEXTstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_de/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_de/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_de/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_de/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_de/phone_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_de/remote_inbound.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_el/AST_inboundEXTstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_el/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_el/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_el/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_el/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_el/phone_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_el/remote_inbound.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_en/AST_inboundEXTstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_en/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_en/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_en/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_en/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_en/phone_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_en/remote_inbound.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_es/AST_inboundEXTstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_es/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_es/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_es/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_es/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_es/phone_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/astguiclient_es/remote_inbound.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_CLOSERstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_VDADstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_VICIDIAL_hopperlist.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_admin_log_display.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_agent_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_agent_performance_detail.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_agent_time_sheet.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_agent_time_sheet_archive.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_parkstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_server_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDAD.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDAD_closer.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDADall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDADall_SIPmonitor.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_timeoncall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/AST_timeonpark.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/admin-old.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/admin_modify_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/admin_search_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/closer-fronter_popup.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/closer-fronter_popup2.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/closer.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/closer_dispo.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/closer_popup.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/count.htm delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/group_hourly_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/listloader.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/listloader.pl delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/listloaderMAIN.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/listloader_rowdisplay.pl delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/listloader_super.pl delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/log_test.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/new_listloader_superL.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/record_conf_1_hour.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/remote_dispo.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/server_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/test.txt delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/user_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/user_status.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial/vdremote.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_CLOSERstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_VDADstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_VICIDIAL_hopperlist.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_admin_log_display.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_performance_detail.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_time_sheet.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_server_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDAD.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDAD_closer.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDADall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDADall_SIPmonitor.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeoncall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonpark.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/admin_modify_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/admin_search_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/count.htm delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/group_hourly_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/listloader.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/listloaderMAIN.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/new_listloader_superL.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/remote_dispo.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/server_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/user_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/user_status.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_de/vdremote.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_CLOSERstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_VDADstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_VICIDIAL_hopperlist.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_admin_log_display.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_performance_detail.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_time_sheet.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_server_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDAD.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDAD_closer.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDADall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDADall_SIPmonitor.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeoncall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonpark.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/admin_modify_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/admin_search_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/count.htm delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/group_hourly_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/htglobalize.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/listloader.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/listloaderMAIN.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/listloader_stmts.txt delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/new_listloader_superL.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/project_auth_entries.txt delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/remote_dispo.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/server_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/user_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/user_status.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_el/vdremote.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_CLOSERstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_VDADstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_VICIDIAL_hopperlist.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_admin_log_display.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_performance_detail.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_time_sheet.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_server_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDAD.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDAD_closer.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDADall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDADall_SIPmonitor.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeoncall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonpark.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/admin_changes_log.txt delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/admin_modify_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/admin_search_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/count.htm delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/group_hourly_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/listloader.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/listloaderMAIN.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/new_listloader_superL.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/project_auth_entries.txt delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/remote_dispo.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/server_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/user_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/user_status.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_en/vdremote.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_CLOSERstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_VDADstats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_VICIDIAL_hopperlist.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_admin_log_display.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_performance_detail.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_time_sheet.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_server_performance.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDAD.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDAD_closer.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDADall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDADall_SIPmonitor.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeoncall.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonpark.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/admin.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/admin_changes_log.txt delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/admin_modify_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/admin_search_lead.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/count.htm delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/group_hourly_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/help.gif delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/listloader.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/listloaderMAIN.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/new_listloader_superL.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/project_auth_entries.txt delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/remote_dispo.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/server_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/user_stats.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/user_status.php delete mode 100644 agc_2-X/trunk/LANG_admin/vicidial_es/vdremote.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/calendar.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/fix-dispo-list.patch delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_e.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_ON.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_ON_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_ON_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_active_lines.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_active_lines_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_active_lines_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_astguiclient.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_astguiclient_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_conferences.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_conferences_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_conferences_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_main.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_main_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/agc_tab_main_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/blank.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/br.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/de.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/down.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/el.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/en.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/fr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/it.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/pt.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/remove.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/up.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_spacer.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_transferconf.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_transferconf_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_transferconf_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_transferconf_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_transferconf_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_transferconf_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_ammessage.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_ammessage_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_blindtransfer.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_blindtransfer_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_blindtransfer_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_blindtransfer_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_blindtransfer_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_blindtransfer_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_channel.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_channel_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_channel_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_code.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupbothlines.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupbothlines_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupbothlines_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupbothlines_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupbothlines_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupbothlines_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_header.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_header_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_header_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysinactive_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_number.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_number_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_number_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_seconds.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_seconds_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_seconds_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_tab_script.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_tab_script_es.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_tab_script_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_tab_vicidial.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/images/vdc_tab_vicidial_ptbr.gif delete mode 100644 agc_2-X/trunk/LANG_agc/agc/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc/voicemail_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_br/voicemail_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_de/voicemail_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_el/voicemail_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_en/voicemail_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_es/voicemail_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_fr/voicemail_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_it/voicemail_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/active_list_refresh.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/astguiclient.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/call_log_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/conf_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/dbconnect.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/inbound_popup.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/live_exten_check.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/manager_send.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/park_calls_display.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/vdc_db_query.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/vicidial.php delete mode 100644 agc_2-X/trunk/LANG_agc/agc_pt/voicemail_check.php rename agc_2-X/trunk/{DBI-scripts => Net-MySQL_scripts}/AST_VDhopper.pl (60%) delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_CLOSERstats.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_VDADstats.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_VICIDIAL_hopperlist.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_admin_log_display.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_agent_performance.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_agent_performance_detail.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_agent_time_sheet.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_agent_time_sheet_archive.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_parkstats.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_server_performance.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD_closer.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_timeonVDADall.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_timeonVDADall_SIPmonitor.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_timeoncall.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/AST_timeonpark.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/admin.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/admin_modify_lead.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/admin_search_lead.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/closer-fronter_popup.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/closer-fronter_popup2.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/closer.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/closer_dispo.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/closer_popup.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/count.htm delete mode 100644 agc_2-X/trunk/VICIDIAL_web/dbconnect.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/group_hourly_stats.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/help.gif delete mode 100644 agc_2-X/trunk/VICIDIAL_web/listloader.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/listloader.pl delete mode 100644 agc_2-X/trunk/VICIDIAL_web/listloaderMAIN.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/listloader_rowdisplay.pl delete mode 100644 agc_2-X/trunk/VICIDIAL_web/listloader_super.pl delete mode 100644 agc_2-X/trunk/VICIDIAL_web/log_test.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/new_listloader_superL.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/record_conf_1_hour.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/remote_dispo.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/server_stats.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/test.txt delete mode 100644 agc_2-X/trunk/VICIDIAL_web/user_stats.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/user_status.php delete mode 100644 agc_2-X/trunk/VICIDIAL_web/vdremote.php delete mode 100644 agc_2-X/trunk/agc/active_list_refresh.php delete mode 100644 agc_2-X/trunk/agc/astguiclient.php delete mode 100644 agc_2-X/trunk/agc/call_log_display.php delete mode 100644 agc_2-X/trunk/agc/conf_exten_check.php delete mode 100644 agc_2-X/trunk/agc/dbconnect.php delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_e.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_es.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_ON.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_ON_es.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_check_voicemail_ON_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_live_call_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_live_call_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_live_call_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_live_call_ON.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_live_call_ON_es.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_live_call_ON_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_active_lines.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_active_lines_el.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_active_lines_es.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_active_lines_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_astguiclient.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_astguiclient_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_conferences.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_conferences_el.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_conferences_es.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_conferences_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_main.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_main_el.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_main_es.gif delete mode 100644 agc_2-X/trunk/agc/images/agc_tab_main_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/blank.gif delete mode 100644 agc_2-X/trunk/agc/images/br.gif delete mode 100644 agc_2-X/trunk/agc/images/de.gif delete mode 100644 agc_2-X/trunk/agc/images/down.gif delete mode 100644 agc_2-X/trunk/agc/images/el.gif delete mode 100644 agc_2-X/trunk/agc/images/en.gif delete mode 100644 agc_2-X/trunk/agc/images/es.gif delete mode 100644 agc_2-X/trunk/agc/images/fr.gif delete mode 100644 agc_2-X/trunk/agc/images/it.gif delete mode 100644 agc_2-X/trunk/agc/images/pt.gif delete mode 100644 agc_2-X/trunk/agc/images/remove.gif delete mode 100644 agc_2-X/trunk/agc/images/up.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_parkcall.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_parkcall_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_parkcall_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_parkcall_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_parkcall_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_parkcall_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_pause.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_pause_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_pause_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_pause_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_pause_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_pause_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_resume.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_resume_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_resume_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_resume_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_resume_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_resume_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_senddtmf.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_senddtmf_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_senddtmf_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_senddtmf_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_senddtmf_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_senddtmf_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_spacer.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_startrecording.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_startrecording_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_startrecording_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_stoprecording.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_stoprecording_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_stoprecording_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_stoprecording_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_stoprecording_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_transferconf.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_transferconf_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_transferconf_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_transferconf_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_transferconf_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_transferconf_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_webform.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_webform_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_webform_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_webform_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_webform_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_LB_webform_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_ammessage.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_ammessage_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_blindtransfer.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_blindtransfer_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_blindtransfer_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_blindtransfer_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_blindtransfer_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_blindtransfer_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_channel.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_channel_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_channel_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_code.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupbothlines.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupbothlines_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupbothlines_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupbothlines_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupbothlines_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupbothlines_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupxferline.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_header.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_header_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_header_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_hotkeysinactive_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_internalcloser.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_internalcloser_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_internalcloser_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_leave3waycall.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_localcloser.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_localcloser_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_localcloser_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_localcloser_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_localcloser_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_localcloser_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_number.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_number_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_number_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_seconds.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_seconds_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_XB_seconds_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_tab_script.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_tab_script_es.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_tab_script_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_tab_vicidial.gif delete mode 100644 agc_2-X/trunk/agc/images/vdc_tab_vicidial_ptbr.gif delete mode 100644 agc_2-X/trunk/agc/inbound_popup.php delete mode 100644 agc_2-X/trunk/agc/live_exten_check.php delete mode 100644 agc_2-X/trunk/agc/manager_send.php delete mode 100644 agc_2-X/trunk/agc/park_calls_display.php delete mode 100644 agc_2-X/trunk/agc/vdc_db_query.php delete mode 100644 agc_2-X/trunk/agc/vicidial.php delete mode 100644 agc_2-X/trunk/agc/voicemail_check.php delete mode 100644 agc_2-X/trunk/app_conference/0.gsm delete mode 100644 agc_2-X/trunk/app_conference/0.wav delete mode 100644 agc_2-X/trunk/app_conference/1.gsm delete mode 100644 agc_2-X/trunk/app_conference/1.wav delete mode 100644 agc_2-X/trunk/app_conference/2.gsm delete mode 100644 agc_2-X/trunk/app_conference/2.wav delete mode 100644 agc_2-X/trunk/app_conference/3.gsm delete mode 100644 agc_2-X/trunk/app_conference/3.wav delete mode 100644 agc_2-X/trunk/app_conference/4.gsm delete mode 100644 agc_2-X/trunk/app_conference/4.wav delete mode 100644 agc_2-X/trunk/app_conference/5.gsm delete mode 100644 agc_2-X/trunk/app_conference/5.wav delete mode 100644 agc_2-X/trunk/app_conference/6.gsm delete mode 100644 agc_2-X/trunk/app_conference/6.wav delete mode 100644 agc_2-X/trunk/app_conference/64_Makefile delete mode 100644 agc_2-X/trunk/app_conference/7.gsm delete mode 100644 agc_2-X/trunk/app_conference/7.wav delete mode 100644 agc_2-X/trunk/app_conference/8.gsm delete mode 100644 agc_2-X/trunk/app_conference/8.wav delete mode 100644 agc_2-X/trunk/app_conference/9.gsm delete mode 100644 agc_2-X/trunk/app_conference/9.wav delete mode 100644 agc_2-X/trunk/app_conference/LICENSE delete mode 100644 agc_2-X/trunk/app_conference/Makefile delete mode 100644 agc_2-X/trunk/app_conference/README delete mode 100644 agc_2-X/trunk/app_conference/VICIDIAL.txt delete mode 100644 agc_2-X/trunk/app_conference/app_conference.c delete mode 100644 agc_2-X/trunk/app_conference/app_conference.h delete mode 100644 agc_2-X/trunk/app_conference/cli.c delete mode 100644 agc_2-X/trunk/app_conference/cli.h delete mode 100644 agc_2-X/trunk/app_conference/common.h delete mode 100644 agc_2-X/trunk/app_conference/conf_frame.h delete mode 100644 agc_2-X/trunk/app_conference/conference.c delete mode 100644 agc_2-X/trunk/app_conference/conference.h delete mode 100644 agc_2-X/trunk/app_conference/enter.gsm delete mode 100644 agc_2-X/trunk/app_conference/frame.c delete mode 100644 agc_2-X/trunk/app_conference/frame.h delete mode 100644 agc_2-X/trunk/app_conference/hash.gsm delete mode 100644 agc_2-X/trunk/app_conference/hash.wav delete mode 100644 agc_2-X/trunk/app_conference/leave.gsm delete mode 100644 agc_2-X/trunk/app_conference/libspeex/CVS/Entries delete mode 100644 agc_2-X/trunk/app_conference/libspeex/CVS/Repository delete mode 100644 agc_2-X/trunk/app_conference/libspeex/CVS/Root delete mode 100644 agc_2-X/trunk/app_conference/libspeex/misc.c delete mode 100644 agc_2-X/trunk/app_conference/libspeex/misc.h delete mode 100644 agc_2-X/trunk/app_conference/libspeex/preprocess.c delete mode 100644 agc_2-X/trunk/app_conference/libspeex/qc_20060323.zip delete mode 100644 agc_2-X/trunk/app_conference/libspeex/smallft.c delete mode 100644 agc_2-X/trunk/app_conference/libspeex/smallft.h delete mode 100644 agc_2-X/trunk/app_conference/libspeex/speex_preprocess.h delete mode 100644 agc_2-X/trunk/app_conference/member.c delete mode 100644 agc_2-X/trunk/app_conference/member.h delete mode 100644 agc_2-X/trunk/app_conference/star.gsm delete mode 100644 agc_2-X/trunk/app_conference/star.wav delete mode 100644 agc_2-X/trunk/astguiclient_web/AST_inboundEXTstats.php delete mode 100644 agc_2-X/trunk/astguiclient_web/admin.php delete mode 100644 agc_2-X/trunk/astguiclient_web/dbconnect.php delete mode 100644 agc_2-X/trunk/astguiclient_web/help.gif delete mode 100644 agc_2-X/trunk/astguiclient_web/inbound_popup.php delete mode 100644 agc_2-X/trunk/astguiclient_web/phone_stats.php delete mode 100644 agc_2-X/trunk/astguiclient_web/remote_inbound.php delete mode 100644 agc_2-X/trunk/astguiclient_web/test.php delete mode 100644 agc_2-X/trunk/libs/AST_VICI_conf.pl.bak delete mode 100644 agc_2-X/trunk/libs/AUS_zipcode_ranges.txt delete mode 100644 agc_2-X/trunk/libs/Asterisk.pm delete mode 100644 agc_2-X/trunk/libs/Asterisk/AGI.pm delete mode 100644 agc_2-X/trunk/libs/Asterisk/DONOTUSE_AST_VICI_conf.pl delete mode 100644 agc_2-X/trunk/libs/Asterisk/Manager.pm delete mode 100644 agc_2-X/trunk/libs/Asterisk/Outgoing.pm delete mode 100644 agc_2-X/trunk/libs/Asterisk/QCall.pm delete mode 100644 agc_2-X/trunk/libs/Asterisk/Voicemail.pm delete mode 100644 agc_2-X/trunk/libs/Asterisk/buttons.gif delete mode 100644 agc_2-X/trunk/libs/Asterisk/vm_indicator_anim.gif delete mode 100644 agc_2-X/trunk/libs/Asterisk/voicemail_digits.gif delete mode 100644 agc_2-X/trunk/libs/Asterisk/voicemail_new.gif delete mode 100644 agc_2-X/trunk/libs/Asterisk/voicemail_old.gif delete mode 100644 agc_2-X/trunk/libs/Asterisk/voicemail_up.gif delete mode 100644 agc_2-X/trunk/libs/MySQL.pm delete mode 100644 agc_2-X/trunk/libs/Net/HTTP.pm delete mode 100644 agc_2-X/trunk/libs/Net/HTTP/Methods.pm delete mode 100644 agc_2-X/trunk/libs/Net/HTTP/NB.pm delete mode 100644 agc_2-X/trunk/libs/Net/HTTPS.pm delete mode 100644 agc_2-X/trunk/libs/Net/MySQL.pm delete mode 100644 agc_2-X/trunk/libs/Net/SSH.pm delete mode 100644 agc_2-X/trunk/libs/Net/Telnet.pm delete mode 100644 agc_2-X/trunk/libs/Telnet.pm delete mode 100644 agc_2-X/trunk/libs/Time/HiRes.1.59.pm delete mode 100644 agc_2-X/trunk/libs/Time/HiRes.1.65.pm delete mode 100644 agc_2-X/trunk/libs/Time/HiRes.pm delete mode 100644 agc_2-X/trunk/libs/Time/Local.pm delete mode 100644 agc_2-X/trunk/libs/Time/Other_HiRes_versions/HiRes.1.55.pm delete mode 100644 agc_2-X/trunk/libs/Time/Other_HiRes_versions/HiRes.1.59.pm delete mode 100644 agc_2-X/trunk/libs/Time/Other_HiRes_versions/HiRes.1.65.pm delete mode 100644 agc_2-X/trunk/libs/Time/Other_HiRes_versions/HiRes.pm delete mode 100644 agc_2-X/trunk/libs/Time/gmtime.pm delete mode 100644 agc_2-X/trunk/libs/Time/localtime.pm delete mode 100644 agc_2-X/trunk/libs/Time/tm.pm delete mode 100644 agc_2-X/trunk/libs/US_zipcode_ranges.txt diff --git a/agc_2-X/trunk/AST_VDhopper.pl b/agc_2-X/trunk/AST_VDhopper.pl index ab55395c..414bdded 100644 --- a/agc_2-X/trunk/AST_VDhopper.pl +++ b/agc_2-X/trunk/AST_VDhopper.pl @@ -1,9 +1,10 @@ #!/usr/bin/perl # -# AST_VDhopper.pl version 0.9 +# AST_VDhopper.pl version 0.10 +# *** DBI version *** # # DESCRIPTION: -# uses Net::MySQL to update the VICIDIAL leads hopper for the new streamlined +# uses DBD::MySQL to update the VICIDIAL leads hopper for the streamlined # approach of allocating leads to client machines. # # SUMMARY: @@ -74,7 +75,7 @@ if (length($ARGV[0])>1) if ($args =~ /--help/i) { - print "allowed run time options(must stay in this order):\n [--debug] = debug\n [--debugX] = super debug\n [--dbgmt] = show GMT offset of records as they are inserted into hopper\n [-t] = test\n [--level=XXX] = force a hopper_level of XXX\n [--campaign=XXX] = run for campaign XXX only\n\n"; + print "allowed run time options(must stay in this order):\n [--debug] = debug\n [--debugX] = super debug\n [--dbgmt] = show GMT offset of records as they are inserted into hopper\n [-t] = test\n [--level=XXX] = force a hopper_level of XXX\n [--campaign=XXX] = run for campaign XXX only\n\n"; } else { @@ -132,28 +133,20 @@ require("/home/cron/AST_SERVER_conf.pl"); # local configuration file if (!$DB_port) {$DB_port='3306';} -sleep(1); ### sleep for 5 seconds to stagger cron script load +use DBI; -#use lib './lib', '../lib'; -use Net::MySQL; - +$dbhA = DBI->connect("DBI:mysql:$DB_database:$DB_server:$DB_port", "$DB_user", "$DB_pass") + or die "Couldn't connect to database: " . DBI->errstr; - my $dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") - or die "Couldn't connect to database: $DB_server - $DB_database\n"; ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; -$dbhA->query("$stmtA"); -if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $DBSERVER_GMT = "$record->[0]"; - if (length($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - } - } - +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +@aryA = $sthA->fetchrow_array; +$DBSERVER_GMT = $aryA[0]; +if (length($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} +$sthA->finish(); $secX = time(); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secX); @@ -161,7 +154,6 @@ $secX = time(); $LOCAL_GMT_OFF_STD = $SERVER_GMT; if ($isdst) {$LOCAL_GMT_OFF++;} - $GMT_now = ($secX - ($LOCAL_GMT_OFF * 3600)); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($GMT_now); $mon++; @@ -172,105 +164,93 @@ $GMT_now = ($secX - ($LOCAL_GMT_OFF * 3600)); if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} - if ($DB) {print "TIME DEBUG: $LOCAL_GMT_OFF_STD|$LOCAL_GMT_OFF|$isdst| GMT: $hour:$min\n";} if ($wipe_hopper_clean) { $stmtA = "DELETE from $vicidial_hopper;"; - $dbhA->query("$stmtA"); - my $affected_rows = $dbhA->get_affected_rows_length; + $affected_rows = $dbhA->do($stmtA); if ($DB) {print "Hopper Wiped Clean: $affected_rows\n";} $event_string = "|HOPPER WIPE CLEAN|"; &event_logger; exit; } - ### Delete leads from inactive lists if there are any $stmtA = "SELECT * FROM vicidial_lists where active='N';"; if ($DB) {print $stmtA;} $inactive_lists=''; $inactive_lists_count=0; -$dbhA->query("$stmtA"); -if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $inactive_list = $record->[0]; - $inactive_lists .= "'$inactive_list',"; - $inactive_lists_count++; - } - } +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +while ($sthArows > $inactive_lists_count) + { + @aryA = $sthA->fetchrow_array; + $inactive_list = $aryA[0]; + $inactive_lists .= "'$inactive_list',"; + $inactive_lists_count++; + } +$sthA->finish(); if ($DB) {print "Inactive Lists: $inactive_lists_count\n";} if ($inactive_lists_count > 0) { chop($inactive_lists); $stmtA = "DELETE from $vicidial_hopper where list_id IN($inactive_lists);"; - $dbhA->query("$stmtA"); - my $affected_rows = $dbhA->get_affected_rows_length; + $affected_rows = $dbhA->do($stmtA); if ($DB) {print "Inactive List Leads Deleted: $affected_rows |$stmtA|\n";} $event_string = "|INACTIVE LIST DEL|$affected_rows|"; &event_logger; } - ### BEGIN Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed $stmtA = "SELECT count(*) FROM vicidial_callbacks where callback_time <= '$now_date' and status='ACTIVE';"; -$dbhA->query("$stmtA"); -if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $CBHOLD_count = "$record->[0]"; - } - } - +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +@aryA = $sthA->fetchrow_array; +$CBHOLD_count = $aryA[0]; if ($DB) {print "CALLBACK HOLD: $CBHOLD_count|$stmtA|\n";} +$sthA->finish(); if ($CBHOLD_count > 0) { $update_leads=''; + $cbc=0; + $cba=0; $stmtA = "SELECT vicidial_callbacks.lead_id,recipient,campaign_id,vicidial_callbacks.list_id,gmt_offset_now FROM vicidial_callbacks,vicidial_list where callback_time <= '$now_date' and vicidial_callbacks.status='ACTIVE' and vicidial_callbacks.lead_id=vicidial_list.lead_id;"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + while ($sthArows > $cbc) { - $iter=$dbhA->create_record_iterator; - $cbc=0; - $cba=0; - while ( $record = $iter->each) + @aryA = $sthA->fetchrow_array; + $lead_ids[$cbc] = $aryA[0]; + $recipient = $aryA[1]; + $update_leads .= "'$lead_ids[$cbc]',"; + if ($recipient == 'ANYONE') { - $lead_ids[$cbc] = $record->[0]; - $recipient = $record->[1]; - $update_leads .= "'$lead_ids[$cbc]',"; - if ($recipient == 'ANYONE') - { - $CA_lead_id[$cba] = $record->[0]; - $CA_campaign_id[$cba] = $record->[2]; - $CA_list_id[$cba] = $record->[3]; - $CA_gmt_offset_now[$cba] = $record->[4]; - $cba++; - } - $cbc++; + $CA_lead_id[$cba] = $aryA[0]; + $CA_campaign_id[$cba] = $aryA[2]; + $CA_list_id[$cba] = $aryA[3]; + $CA_gmt_offset_now[$cba] = $aryA[4]; + $cba++; } + $cbc++; } + $sthA->finish(); if ($cbc > 0) { chop($update_leads); $stmtA = "UPDATE vicidial_list set status='CALLBK', called_since_last_reset='N' where lead_id IN($update_leads);"; - $dbhA->query("$stmtA"); - my $affected_rows = $dbhA->get_affected_rows_length; + $affected_rows = $dbhA->do($stmtA); if ($DB) {print "Scheduled Callbacks Activated: $affected_rows\n";} $event_string = "|CALLBACKS LISTACT|$affected_rows|"; &event_logger; $stmtA = "UPDATE vicidial_callbacks set status='LIVE' where lead_id IN($update_leads);"; - $dbhA->query("$stmtA"); - my $affected_rows = $dbhA->get_affected_rows_length; + $affected_rows = $dbhA->do($stmtA); if ($DB) {print "Scheduled Callbacks Activated: $affected_rows\n";} $event_string = "|CALLBACKS CB ACT |$affected_rows|"; &event_logger; @@ -279,14 +259,15 @@ if ($CBHOLD_count > 0) ### INSERT ANYONE CALLBACKS INTO HOPPER DIRECTLY ### if ( ($cba > 0) && ($insert_auto_CB_to_hopper) ) { - if ($DB) {print "ANYONE Scheduled Callbacks Inserted into hopper: $cba\n";} + if ($DB) {print "ANYONE Scheduled Callbacks to Insert into hopper: $cba\n";} $event_string = "|ANYONE CB HOPPER |$cba|"; &event_logger; $CAu=0; foreach(@CA_lead_id) { $stmtA = "INSERT INTO $vicidial_hopper SET lead_id='$CA_lead_id[$CAu]',campaign_id='$CA_campaign_id[$CAu]',list_id='$CA_list_id[$CAu]',gmt_offset_now='$CA_gmt_offset_now[$CAu]';"; - $dbhA->query("$stmtA"); + $affected_rows = $dbhA->do($stmtA); + if ($DB) {print "ANYONE Scheduled Callback Inserted into hopper: $affected_rows|$CA_lead_id[$CAu]\n";} $CAu++; } } @@ -294,7 +275,6 @@ if ($CBHOLD_count > 0) ### END Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed - @campaign_id=@MT; if ($CLIcampaign) @@ -305,48 +285,37 @@ else { $stmtA = "SELECT * from vicidial_campaigns where active='Y'"; } +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $campaign_id[$rec_count] = "$aryA[0]"; + $dial_status_a[$rec_count] = "$aryA[3]"; + $dial_status_b[$rec_count] = "$aryA[4]"; + $dial_status_c[$rec_count] = "$aryA[5]"; + $dial_status_d[$rec_count] = "$aryA[6]"; + $dial_status_e[$rec_count] = "$aryA[7]"; + $lead_order[$rec_count] = "$aryA[8]"; + if (!$CLIlevel) + {$hopper_level[$rec_count] = "$aryA[13]";} + else + {$hopper_level[$rec_count] = "$CLIlevel";} + $local_call_time[$rec_count] = "$aryA[16]"; + $lead_filter_id[$rec_count] = "$aryA[35]"; + $use_internal_dnc[$rec_count] = "$aryA[43]"; + $rec_count++; + } +$sthA->finish(); +if ($DB) {print "CAMPAIGNS TO PROCESSES HOPPER FOR: $rec_count|$#campaign_id\n";} -$dbhA->query("$stmtA"); -if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - $rec_count=0; - while ( $record = $iter->each) - { - $campaign_id[$rec_count] = "$record->[0]"; - $dial_status_a[$rec_count] = "$record->[3]"; - $dial_status_b[$rec_count] = "$record->[4]"; - $dial_status_c[$rec_count] = "$record->[5]"; - $dial_status_d[$rec_count] = "$record->[6]"; - $dial_status_e[$rec_count] = "$record->[7]"; - $lead_order[$rec_count] = "$record->[8]"; - if (!$CLIlevel) - {$hopper_level[$rec_count] = "$record->[13]";} - else - {$hopper_level[$rec_count] = "$CLIlevel";} - $local_call_time[$rec_count] = "$record->[16]"; - $lead_filter_id[$rec_count] = "$record->[35]"; - $use_internal_dnc[$rec_count] = "$record->[43]"; - $rec_count++; - } - } +##### LOOP THROUGH EACH CAMPAIGN AND PROCESS THE HOPPER ##### $i=0; foreach(@campaign_id) { - ### close out MySQL connection and re-connect to start new connection ### -# $dbhA->close(); -# my $dbhA = ''; - - ### Make sure this file is in a libs path or put the absolute path to it -# require("/home/cron/AST_SERVER_conf.pl"); # local configuration file -# if (!$DB_port) {$DB_port='3306';} -# use Net::MySQL; - -# my $dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") -# or die "Couldn't connect to database: $DB_server - $DB_database\n"; - - $VCSdialable_leads=0; $VCScalls_today=0; $VCSdrops_today=0; @@ -354,49 +323,56 @@ foreach(@campaign_id) $vicidial_log = 'vicidial_log'; $stmtA = "SELECT dialable_leads from vicidial_campaign_stats where campaign_id='$campaign_id[$i]';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - $rec_count=0; - while ( $record = $iter->each) - { - $VCSdialable_leads = "$record->[0]"; - } - } + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $VCSdialable_leads = "$aryA[0]"; + $rec_count++; + } + $sthA->finish(); + $stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_date';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - $rec_count=0; - while ( $record = $iter->each) - { - $VCScalls_today = "$record->[0]"; - } - } + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $VCScalls_today = "$aryA[0]"; + $rec_count++; + } + $sthA->finish(); if ($VCScalls_today > 0) { $stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_date' and status IN('DROP','XDROP');"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - $rec_count=0; - while ( $record = $iter->each) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $VCSdrops_today = "$aryA[0]"; + if ($VCSdrops_today > 0) { - $VCSdrops_today = "$record->[0]"; - if ($VCSdrops_today > 0) - { - $VCSdrops_today_pct = ( ($VCSdrops_today / $VCScalls_today) * 100 ); - $VCSdrops_today_pct = sprintf("%.2f", $VCSdrops_today_pct); - } + $VCSdrops_today_pct = ( ($VCSdrops_today / $VCScalls_today) * 100 ); + $VCSdrops_today_pct = sprintf("%.2f", $VCSdrops_today_pct); } - } + $rec_count++; + } + $sthA->finish(); } + + $stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today',drops_today='$VCSdrops_today',drops_today_pct='$VCSdrops_today_pct' where campaign_id='$campaign_id[$i]';"; - $dbhA->query("$stmtA"); + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "campaign stats updated: $affected_rows|$VCScalls_today|$VCSdrops_today|$VCSdrops_today_pct|$campaign_id[$i]|\n";} ##### BEGIN calculate what gmt_offset_now values are within the allowed local_call_time setting ### $g=0; @@ -422,31 +398,33 @@ foreach(@campaign_id) $stmtA = "SELECT * FROM vicidial_call_times where call_time_id='$local_call_time[$i]';"; if ($DBX) {print " |$stmtA|\n";} - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $Gct_default_start = "$record->[3]"; - $Gct_default_stop = "$record->[4]"; - $Gct_sunday_start = "$record->[5]"; - $Gct_sunday_stop = "$record->[6]"; - $Gct_monday_start = "$record->[7]"; - $Gct_monday_stop = "$record->[8]"; - $Gct_tuesday_start = "$record->[9]"; - $Gct_tuesday_stop = "$record->[10]"; - $Gct_wednesday_start = "$record->[11]"; - $Gct_wednesday_stop = "$record->[12]"; - $Gct_thursday_start = "$record->[13]"; - $Gct_thursday_stop = "$record->[14]"; - $Gct_friday_start = "$record->[15]"; - $Gct_friday_stop = "$record->[16]"; - $Gct_saturday_start = "$record->[17]"; - $Gct_saturday_stop = "$record->[18]"; - $Gct_state_call_times = "$record->[19]"; - } + @aryA = $sthA->fetchrow_array; + $Gct_default_start = "$aryA[3]"; + $Gct_default_stop = "$aryA[4]"; + $Gct_sunday_start = "$aryA[5]"; + $Gct_sunday_stop = "$aryA[6]"; + $Gct_monday_start = "$aryA[7]"; + $Gct_monday_stop = "$aryA[8]"; + $Gct_tuesday_start = "$aryA[9]"; + $Gct_tuesday_stop = "$aryA[10]"; + $Gct_wednesday_start = "$aryA[11]"; + $Gct_wednesday_stop = "$aryA[12]"; + $Gct_thursday_start = "$aryA[13]"; + $Gct_thursday_stop = "$aryA[14]"; + $Gct_friday_start = "$aryA[15]"; + $Gct_friday_stop = "$aryA[16]"; + $Gct_saturday_start = "$aryA[17]"; + $Gct_saturday_stop = "$aryA[18]"; + $Gct_state_call_times = "$aryA[19]"; + $rec_count++; } + $sthA->finish(); $ct_states = ''; $ct_state_gmt_SQL = ''; @@ -464,33 +442,35 @@ foreach(@campaign_id) { $stmtA = "SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; if ($DBX) {print " |$stmtA|\n";} - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $Gstate_call_time_id = "$record->[0]"; - $Gstate_call_time_state = "$record->[1]"; - $Gsct_default_start = "$record->[4]"; - $Gsct_default_stop = "$record->[5]"; - $Gsct_sunday_start = "$record->[6]"; - $Gsct_sunday_stop = "$record->[7]"; - $Gsct_monday_start = "$record->[8]"; - $Gsct_monday_stop = "$record->[9]"; - $Gsct_tuesday_start = "$record->[10]"; - $Gsct_tuesday_stop = "$record->[11]"; - $Gsct_wednesday_start = "$record->[12]"; - $Gsct_wednesday_stop = "$record->[13]"; - $Gsct_thursday_start = "$record->[14]"; - $Gsct_thursday_stop = "$record->[15]"; - $Gsct_friday_start = "$record->[16]"; - $Gsct_friday_stop = "$record->[17]"; - $Gsct_saturday_start = "$record->[18]"; - $Gsct_saturday_stop = "$record->[19]"; - $ct_states .="'$Gstate_call_time_state',"; - } + @aryA = $sthA->fetchrow_array; + $Gstate_call_time_id = "$aryA[0]"; + $Gstate_call_time_state = "$aryA[1]"; + $Gsct_default_start = "$aryA[4]"; + $Gsct_default_stop = "$aryA[5]"; + $Gsct_sunday_start = "$aryA[6]"; + $Gsct_sunday_stop = "$aryA[7]"; + $Gsct_monday_start = "$aryA[8]"; + $Gsct_monday_stop = "$aryA[9]"; + $Gsct_tuesday_start = "$aryA[10]"; + $Gsct_tuesday_stop = "$aryA[11]"; + $Gsct_wednesday_start = "$aryA[12]"; + $Gsct_wednesday_stop = "$aryA[13]"; + $Gsct_thursday_start = "$aryA[14]"; + $Gsct_thursday_stop = "$aryA[15]"; + $Gsct_friday_start = "$aryA[16]"; + $Gsct_friday_stop = "$aryA[17]"; + $Gsct_saturday_start = "$aryA[18]"; + $Gsct_saturday_stop = "$aryA[19]"; + $ct_states .="'$Gstate_call_time_state',"; + $rec_count++; } + $sthA->finish(); $r=0; $state_gmt=''; @@ -773,23 +753,23 @@ foreach(@campaign_id) ##### BEGIN lead recycling parsing and prep ### $stmtA = "SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id[$i]' and active='Y';"; - $dbhA->query("$stmtA"); + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + @recycle_status=@MT; + @recycle_delay=@MT; + @recycle_maximum=@MT; + @RSQLdate=@MT; $rec_ct=0; - if ($dbhA->has_selected_record) + while ($sthArows > $rec_ct) { - @recycle_status=@MT; - @recycle_delay=@MT; - @recycle_maximum=@MT; - @RSQLdate=@MT; - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $recycle_status[$rec_ct] = $record->[2]; - $recycle_delay[$rec_ct] = $record->[3]; - $recycle_maximum[$rec_ct] = $record->[4]; - $rec_ct++; - } + @aryA = $sthA->fetchrow_array; + $recycle_status[$rec_ct] = "$aryA[2]"; + $recycle_delay[$rec_ct] = "$aryA[3]"; + $recycle_maximum[$rec_ct] = "$aryA[4]"; + $rec_ct++; } + $sthA->finish(); if ($rec_ct > 0) { @@ -834,36 +814,34 @@ foreach(@campaign_id) ### Delete the DONE leads if there are any $stmtA = "DELETE from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('DONE');"; - $dbhA->query("$stmtA"); - my $affected_rows = $dbhA->get_affected_rows_length; + $affected_rows = $dbhA->do($stmtA); if ($DB) {print " hopper DONE cleared: $affected_rows\n";} if ($DBX) {print " |$stmtA|\n";} ### Delete the leads that are out of GMT time range if there are any $stmtA = "DELETE from $vicidial_hopper where campaign_id='$campaign_id[$i]' and ($del_gmtSQL);"; - $dbhA->query("$stmtA"); - my $affected_rows = $dbhA->get_affected_rows_length; + $affected_rows = $dbhA->do($stmtA); if ($DB) {print " hopper GMT BAD cleared: $affected_rows\n";} if ($DBX) {print " |$stmtA|\n";} ### Find out how many leads are in the hopper from a specific campaign $hopper_ready_count=0; $stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status='READY';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) { - $iter=$dbhA->create_record_iterator; - $rec_countA=0; - while ( $record = $iter->each) - { - $hopper_ready_count = $record->[0]; - if ($DB) {print " hopper READY count: $hopper_ready_count\n";} - if ($DBX) {print " |$stmtA|\n";} - $rec_countA++; - } + @aryA = $sthA->fetchrow_array; + $hopper_ready_count = $aryA[0]; + if ($DB) {print " hopper READY count: $hopper_ready_count\n";} + if ($DBX) {print " |$stmtA|\n";} + $rec_count++; } - $event_string = "|$campaign_id[$i]|$hopper_level[$i]|$hopper_ready_count|$local_call_time[$i]||"; - &event_logger; + $sthA->finish(); + $event_string = "|$campaign_id[$i]|$hopper_level[$i]|$hopper_ready_count|$local_call_time[$i]||"; + &event_logger; ##### IF hopper level is below set minimum, then try to add more leads ##### if ($hopper_ready_count < $hopper_level[$i]) @@ -872,19 +850,21 @@ foreach(@campaign_id) ### Get list of the lists in the campaign ### $stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$campaign_id[$i]' and active='Y';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_countLISTS=0; + $camp_lists = ''; + while ($sthArows > $rec_countLISTS) { - $iter=$dbhA->create_record_iterator; - $rec_countLISTS=0; - $camp_lists = ''; - while ( $record = $iter->each) - { - $camp_lists .= "'$record->[0]',"; - $rec_countLISTS++; - } - chop($camp_lists); + @aryA = $sthA->fetchrow_array; + $camp_lists .= "'$aryA[0]',"; + $rec_countLISTS++; } + $sthA->finish(); + if (length($camp_lists)<3) {$camp_lists="''";} + else {chop($camp_lists);} + if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";} if ($DBX) {print " |$stmtA|\n";} @@ -892,15 +872,17 @@ foreach(@campaign_id) { ### Get SQL of lead filter for the campaign ### $stmtA = "SELECT lead_filter_sql FROM vicidial_lead_filters where lead_filter_id='$lead_filter_id[$i]';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $lead_filter_sql[$i] = "$record->[0]"; - } + @aryA = $sthA->fetchrow_array; + $lead_filter_sql[$i] = "$aryA[0]"; + $rec_count++; } + $sthA->finish(); $lead_filter_sql[$i] =~ s/^and|and$|^or|or$|^ and|and $|^ or|or $//gi; $lead_filter_sql[$i] = "and $lead_filter_sql[$i]"; if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";} @@ -916,33 +898,36 @@ foreach(@campaign_id) $stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and ($all_gmtSQL) $lead_filter_sql[$i];"; if ($DBX) {print " |$stmtA|\n";} - $dbhA->query("$stmtA"); - $campaign_leads_to_call=0; - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $campaign_leads_to_call = "$record->[0]"; - if ($DB) {print " leads to call count: $campaign_leads_to_call\n";} - if ($DBX) {print " |$stmtA|\n";} - } + @aryA = $sthA->fetchrow_array; + $campaign_leads_to_call = "$aryA[0]"; + if ($DB) {print " leads to call count: $campaign_leads_to_call\n";} + if ($DBX) {print " |$stmtA|\n";} + $rec_count++; } + $sthA->finish(); + if ($lead_order[$i] =~ /DOWN COUNT 2nd NEW|DOWN COUNT 3rd NEW|DOWN COUNT 4th NEW/) { $stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and ($all_gmtSQL) $lead_filter_sql[$i];"; - $dbhA->query("$stmtA"); - $NEW_campaign_leads_to_call=0; - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $NEW_campaign_leads_to_call = "$record->[0]"; - if ($DB) {print " NEW leads to call count: $NEW_campaign_leads_to_call\n";} - if ($DBX) {print " |$stmtA|\n";} - } + @aryA = $sthA->fetchrow_array; + $NEW_campaign_leads_to_call = "$aryA[0]"; + if ($DB) {print " NEW leads to call count: $NEW_campaign_leads_to_call\n";} + if ($DBX) {print " |$stmtA|\n";} + $rec_count++; } + $sthA->finish(); } ##### IF no NEW leads to be called, error out of this campaign ##### @@ -959,7 +944,8 @@ foreach(@campaign_id) if ($VCSdialable_leads > 0) { $stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0' where campaign_id='$campaign_id[$i]';"; - $dbhA->query("$stmtA"); + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";} } } else @@ -967,162 +953,170 @@ foreach(@campaign_id) if ($VCSdialable_leads != $campaign_leads_to_call) { $stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='$campaign_leads_to_call' where campaign_id='$campaign_id[$i]';"; - $dbhA->query("$stmtA"); + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";} } if ($DB) {print " Getting Leads to add to hopper\n";} ### grab leads already in hopper so we don't duplicate $stmtA = "SELECT lead_id FROM $vicidial_hopper where campaign_id='$campaign_id[$i]';"; if ($DBX) {print " |$stmtA|\n";} - $dbhA->query("$stmtA"); - $rec_countLISTS=0; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; $lead_id_lists = ''; - if ($dbhA->has_selected_record) + $rec_countLISTS=0; + while ($sthArows > $rec_countLISTS) { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $lead_id_lists .= "'$record->[0]',"; - $rec_countLISTS++; - } - $lead_id_lists .= "'0'"; + @aryA = $sthA->fetchrow_array; + $lead_id_lists .= "'$aryA[0]',"; + $rec_countLISTS++; } - - $order_stmt=''; - $NEW_count = 0; - $NEW_level = 0; - $OTHER_level = $hopper_level[$i]; - if ($lead_order[$i] eq "DOWN") {$order_stmt = 'order by lead_id asc';} - if ($lead_order[$i] eq "UP") {$order_stmt = 'order by lead_id desc';} - if ($lead_order[$i] eq "UP LAST NAME") {$order_stmt = 'order by last_name desc, lead_id asc';} - if ($lead_order[$i] eq "DOWN LAST NAME") {$order_stmt = 'order by last_name, lead_id asc';} - if ($lead_order[$i] eq "UP PHONE") {$order_stmt = 'order by phone_number desc, lead_id asc';} - if ($lead_order[$i] eq "DOWN PHONE") {$order_stmt = 'order by phone_number, lead_id asc';} - if ($lead_order[$i] eq "UP COUNT") {$order_stmt = 'order by called_count desc, lead_id asc';} - if ($lead_order[$i] eq "DOWN COUNT") {$order_stmt = 'order by called_count, lead_id asc';} - if ($lead_order[$i] eq "DOWN COUNT 2nd NEW") {$NEW_count = 2;} - if ($lead_order[$i] eq "DOWN COUNT 3rd NEW") {$NEW_count = 3;} - if ($lead_order[$i] eq "DOWN COUNT 4th NEW") {$NEW_count = 4;} + $sthA->finish(); + $lead_id_lists .= "'0'"; + $order_stmt=''; + $NEW_count = 0; + $NEW_level = 0; + $OTHER_level = $hopper_level[$i]; + if ($lead_order[$i] eq "DOWN") {$order_stmt = 'order by lead_id asc';} + if ($lead_order[$i] eq "UP") {$order_stmt = 'order by lead_id desc';} + if ($lead_order[$i] eq "UP LAST NAME") {$order_stmt = 'order by last_name desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN LAST NAME") {$order_stmt = 'order by last_name, lead_id asc';} + if ($lead_order[$i] eq "UP PHONE") {$order_stmt = 'order by phone_number desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN PHONE") {$order_stmt = 'order by phone_number, lead_id asc';} + if ($lead_order[$i] eq "UP COUNT") {$order_stmt = 'order by called_count desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN COUNT") {$order_stmt = 'order by called_count, lead_id asc';} + if ($lead_order[$i] eq "DOWN COUNT 2nd NEW") {$NEW_count = 2;} + if ($lead_order[$i] eq "DOWN COUNT 3rd NEW") {$NEW_count = 3;} + if ($lead_order[$i] eq "DOWN COUNT 4th NEW") {$NEW_count = 4;} - ### BEGIN recycle grab leads ### - if ($rec_ct > 0) + ### BEGIN recycle grab leads ### + if ($rec_ct > 0) + { + if ($DB) {print " looking for RECYCLE leads, maximum of 100\n";} + + $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where $recycle_SQL and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] limit 100;"; + if ($DBX) {print " |$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($DB) {print " RECYCLE leads to call count: $sthArows\n";} + if ($DBX) {print " |$stmtA|\n";} + $REC_rec_countLEADS=0; + @REC_leads_to_hopper=@MT; + @REC_lists_to_hopper=@MT; + @REC_phone_to_hopper=@MT; + while ($sthArows > $REC_rec_countLEADS) { - if ($DB) {print " looking for RECYCLE leads, maximum of 100\n";} - - $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where $recycle_SQL and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] limit 100;"; - if ($DBX) {print " |$stmtA|\n";} - $REC_rec_countLEADS=0; - @REC_leads_to_hopper=@MT; - @REC_lists_to_hopper=@MT; - @REC_phone_to_hopper=@MT; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $REC_leads_to_hopper[$REC_rec_countLEADS] = "$record->[0]"; - $REC_lists_to_hopper[$REC_rec_countLEADS] = "$record->[1]"; - $REC_gmt_to_hopper[$REC_rec_countLEADS] = "$record->[2]"; - $REC_phone_to_hopper[$REC_rec_countLEADS] = "$record->[3]"; - $REC_state_to_hopper[$REC_rec_countLEADS] = "$record->[4]"; - if ($DB_show_offset) {print "LEAD_ADD: $record->[2] $record->[3] $record->[4]\n";} - $REC_rec_countLEADS++; - } - } - if ($DB) {print " RECYCLE leads to call count: $REC_rec_countLEADS\n";} - if ($DBX) {print " |$stmtA|\n";} + @aryA = $sthA->fetchrow_array; + $REC_leads_to_hopper[$REC_rec_countLEADS] = "$aryA[0]"; + $REC_lists_to_hopper[$REC_rec_countLEADS] = "$aryA[1]"; + $REC_gmt_to_hopper[$REC_rec_countLEADS] = "$aryA[2]"; + $REC_phone_to_hopper[$REC_rec_countLEADS] = "$aryA[3]"; + $REC_state_to_hopper[$REC_rec_countLEADS] = "$aryA[4]"; + if ($DB_show_offset) {print "LEAD_ADD: $aryA[2] $aryA[3] $aryA[4]\n";} + $REC_rec_countLEADS++; } - ### END recycle grab leads ### + $sthA->finish(); + } + ### END recycle grab leads ### - if ($NEW_count > 0) + + + + + + + + if ($NEW_count > 0) + { + $NEW_level = int($hopper_level[$i] / $NEW_count); + $OTHER_level = ($hopper_level[$i] - $NEW_level); + $order_stmt = 'order by called_count, lead_id asc'; + if ($DB) {print " looking for $NEW_level NEW leads mixed in with $OTHER_level other leads\n";} + + $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] $order_stmt limit $NEW_level;"; + if ($DBX) {print " |$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $NEW_rec_countLEADS=0; + @NEW_leads_to_hopper=@MT; + @NEW_lists_to_hopper=@MT; + @NEW_phone_to_hopper=@MT; + while ($sthArows > $NEW_rec_countLEADS) { - $NEW_level = int($hopper_level[$i] / $NEW_count); - $OTHER_level = ($hopper_level[$i] - $NEW_level); - $order_stmt = 'order by called_count, lead_id asc'; - if ($DB) {print " looking for $NEW_level NEW leads mixed in with $OTHER_level other leads\n";} - - $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] $order_stmt limit $NEW_level;"; - if ($DBX) {print " |$stmtA|\n";} - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - $NEW_rec_countLEADS=0; - @NEW_leads_to_hopper=@MT; - @NEW_lists_to_hopper=@MT; - @NEW_phone_to_hopper=@MT; - while ( $record = $iter->each) - { - $NEW_leads_to_hopper[$NEW_rec_countLEADS] = "$record->[0]"; - $NEW_lists_to_hopper[$NEW_rec_countLEADS] = "$record->[1]"; - $NEW_gmt_to_hopper[$NEW_rec_countLEADS] = "$record->[2]"; - $NEW_phone_to_hopper[$NEW_rec_countLEADS] = "$record->[3]"; - $NEW_state_to_hopper[$NEW_rec_countLEADS] = "$record->[4]"; - if ($DB_show_offset) {print "LEAD_ADD: $record->[2] $record->[3] $record->[4]\n";} - $NEW_rec_countLEADS++; - } - } - + @aryA = $sthA->fetchrow_array; + $NEW_leads_to_hopper[$NEW_rec_countLEADS] = "$aryA[0]"; + $NEW_lists_to_hopper[$NEW_rec_countLEADS] = "$aryA[1]"; + $NEW_gmt_to_hopper[$NEW_rec_countLEADS] = "$aryA[2]"; + $NEW_phone_to_hopper[$NEW_rec_countLEADS] = "$aryA[3]"; + $NEW_state_to_hopper[$NEW_rec_countLEADS] = "$aryA[4]"; + if ($DB_show_offset) {print "LEAD_ADD: $aryA[2] $aryA[3] $aryA[4]\n";} + $NEW_rec_countLEADS++; } + $sthA->finish(); + } if ($DB) {print " lead call order: $order_stmt\n";} $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] $order_stmt limit $OTHER_level;"; if ($DBX) {print " |$stmtA|\n";} - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_countLEADS=0; $NEW_dec=99; $NEW_in=0; + @leads_to_hopper=@MT; + @lists_to_hopper=@MT; + @gmt_to_hopper=@MT; + @state_to_hopper=@MT; + @phone_to_hopper=@MT; + $rec_count=0; + $REC_insert_count=0; + while ($sthArows > $rec_count) { - $iter=$dbhA->create_record_iterator; - $rec_countLEADS=0; $NEW_dec=99; $NEW_in=0; - @leads_to_hopper=@MT; - @lists_to_hopper=@MT; - @gmt_to_hopper=@MT; - @state_to_hopper=@MT; - @phone_to_hopper=@MT; - while ( $record = $iter->each) + @aryA = $sthA->fetchrow_array; + if ( ($NEW_count > 0) && ($NEW_rec_countLEADS > $NEW_in) ) { - if ( ($NEW_count > 0) && ($NEW_rec_countLEADS > $NEW_in) ) + if ($DB_show_offset) {print "NEW_COUNT: $NEW_count|$NEW_dec|$NEW_in|$NEW_rec_countLEADS\n";} + if ($NEW_count > $NEW_dec) { - if ($DB_show_offset) {print "NEW_COUNT: $NEW_count|$NEW_dec|$NEW_in|$NEW_rec_countLEADS\n";} - if ($NEW_count > $NEW_dec) - { - $NEW_dec++; - } - else - { - $leads_to_hopper[$rec_countLEADS] = "$NEW_leads_to_hopper[$NEW_in]"; - $lists_to_hopper[$rec_countLEADS] = "$NEW_lists_to_hopper[$NEW_in]"; - $gmt_to_hopper[$rec_countLEADS] = "$NEW_gmt_to_hopper[$NEW_in]"; - $state_to_hopper[$rec_countLEADS] = "$NEW_state_to_hopper[$NEW_in]"; - $phone_to_hopper[$rec_countLEADS] = "$NEW_phone_to_hopper[$NEW_in]"; - if ($DB_show_offset) {print "LEAD_ADD: $NEW_leads_to_hopper[$NEW_in] $NEW_phone_to_hopper[$NEW_in]\n";} - $rec_countLEADS++; - $NEW_in++; - $NEW_dec=2; - } + $NEW_dec++; } - if ($REC_rec_countLEADS > $REC_insert_count) + else { - $leads_to_hopper[$rec_countLEADS] = "$REC_leads_to_hopper[$REC_insert_count]"; - $lists_to_hopper[$rec_countLEADS] = "$REC_lists_to_hopper[$REC_insert_count]"; - $gmt_to_hopper[$rec_countLEADS] = "$REC_gmt_to_hopper[$REC_insert_count]"; - $state_to_hopper[$rec_countLEADS] = "$REC_state_to_hopper[$REC_insert_count]"; - $phone_to_hopper[$rec_countLEADS] = "$REC_phone_to_hopper[$REC_insert_count]"; + $leads_to_hopper[$rec_countLEADS] = "$NEW_leads_to_hopper[$NEW_in]"; + $lists_to_hopper[$rec_countLEADS] = "$NEW_lists_to_hopper[$NEW_in]"; + $gmt_to_hopper[$rec_countLEADS] = "$NEW_gmt_to_hopper[$NEW_in]"; + $state_to_hopper[$rec_countLEADS] = "$NEW_state_to_hopper[$NEW_in]"; + $phone_to_hopper[$rec_countLEADS] = "$NEW_phone_to_hopper[$NEW_in]"; + if ($DB_show_offset) {print "LEAD_ADD: $NEW_leads_to_hopper[$NEW_in] $NEW_phone_to_hopper[$NEW_in]\n";} $rec_countLEADS++; - $REC_insert_count++; + $NEW_in++; + $NEW_dec=2; } - $leads_to_hopper[$rec_countLEADS] = "$record->[0]"; - $lists_to_hopper[$rec_countLEADS] = "$record->[1]"; - $gmt_to_hopper[$rec_countLEADS] = "$record->[2]"; - $state_to_hopper[$rec_countLEADS] = "$record->[4]"; - $phone_to_hopper[$rec_countLEADS] = "$record->[3]"; - if ($DB_show_offset) {print "LEAD_ADD: $record->[2] $record->[3] $record->[4]\n";} + } + if ($REC_rec_countLEADS > $REC_insert_count) + { + $leads_to_hopper[$rec_countLEADS] = "$REC_leads_to_hopper[$REC_insert_count]"; + $lists_to_hopper[$rec_countLEADS] = "$REC_lists_to_hopper[$REC_insert_count]"; + $gmt_to_hopper[$rec_countLEADS] = "$REC_gmt_to_hopper[$REC_insert_count]"; + $state_to_hopper[$rec_countLEADS] = "$REC_state_to_hopper[$REC_insert_count]"; + $phone_to_hopper[$rec_countLEADS] = "$REC_phone_to_hopper[$REC_insert_count]"; $rec_countLEADS++; - } + $REC_insert_count++; + } + $leads_to_hopper[$rec_countLEADS] = "$aryA[0]"; + $lists_to_hopper[$rec_countLEADS] = "$aryA[1]"; + $gmt_to_hopper[$rec_countLEADS] = "$aryA[2]"; + $state_to_hopper[$rec_countLEADS] = "$aryA[4]"; + $phone_to_hopper[$rec_countLEADS] = "$aryA[3]"; + if ($DB_show_offset) {print "LEAD_ADD: $aryA[2] $aryA[3] $aryA[4]\n";} + $rec_countLEADS++; + $rec_count++; } - - if ($DB) {print " Adding to hopper: $rec_countLEADS\n";} - $event_string = "|$campaign_id[$i]|Added to hopper $rec_countLEADS|"; - &event_logger; + $sthA->finish(); + if ($DB) {print " Adding to hopper: $rec_countLEADS\n";} + $event_string = "|$campaign_id[$i]|Added to hopper $rec_countLEADS|"; + &event_logger; $h=0; foreach(@leads_to_hopper) @@ -1132,29 +1126,31 @@ foreach(@campaign_id) $DNClead=0; if ($use_internal_dnc[$i] =~ /Y/) { - if ($DB) {print " Doinbg DNC Check: $phone_to_hopper[$h]\n";} + if ($DB) {print " Doinbg DNC Check: $phone_to_hopper[$h] - $use_internal_dnc[$i]\n";} $stmtA = "SELECT count(*) from vicidial_dnc where phone_number='$phone_to_hopper[$h]';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - $rec_count=0; - while ( $record = $iter->each) - { - $DNClead = "$record->[0]"; - } - } + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DNClead = "$aryA[0]"; + $rec_count++; + } + $sthA->finish(); if ($DNClead != '0') { $stmtA = "UPDATE vicidial_list SET status='DNCL' where lead_id='$leads_to_hopper[$h]';"; - $dbhA->query("$stmtA"); - if ($DB) {print "Flagging DNC lead: $leads_to_hopper[$h] $phone_to_hopper[$h]\n";} + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "Flagging DNC lead: $affected_rows $phone_to_hopper[$h]\n";} } } if ($DNClead == '0') { $stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state) values('$leads_to_hopper[$h]','$campaign_id[$i]','READY','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]','$state_to_hopper[$h]');"; - $dbhA->query("$stmtA"); + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "LEAD INSERTED: $affected_rows|$leads_to_hopper[$h]|\n";} } } $h++; @@ -1169,7 +1165,7 @@ foreach(@campaign_id) } -$dbhA->close; +$dbhA->disconnect(); if($DB){print "DONE... Exiting... Goodbye... See you later... Really, I mean it :)\n";} diff --git a/agc_2-X/trunk/DBI-scripts/AST_agent_week.pl b/agc_2-X/trunk/DBI-scripts/AST_agent_week.pl deleted file mode 100644 index e8eb993a..00000000 --- a/agc_2-X/trunk/DBI-scripts/AST_agent_week.pl +++ /dev/null @@ -1,336 +0,0 @@ -#!/usr/bin/perl - -# AST_agent_week.pl -# -# This script is designed to gather stats for all agent activity over the course -# of a week(Sunday to Saturday) and print it in an ASCI text file to be placed -# on a web server for viewing. -# -# CHANGES -# 60517-1100 - First version -# - -$txt = '.txt'; -$US = '_'; -$MT[0] = ''; - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help/i) - { - print "allowed run time options:\n [-q] = quiet\n [-t] = test\n\n"; - exit; - } - else - { - if ($args =~ /--debug/i) - { - $DB=1; - print "\n-----DEBUG MODE-----\n\n"; - } - if ($args =~ /-q/i) - { - $q=1; $Q=1; - } - if ($args =~ /-t/i) - { - $T=1; $TEST=1; - print "\n-----TESTING-----\n\n"; - } - } -} -else -{ -print "no command line options set\n"; -} -### end parsing run-time options ### - - -$secX = time(); - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); - $year = ($year + 1900); - $mon++; - if ($mon < 10) {$mon = "0$mon";} - if ($mday < 10) {$mday = "0$mday";} - if ($hour < 10) {$hour = "0$hour";} - if ($min < 10) {$min = "0$min";} - if ($sec < 10) {$sec = "0$sec";} - $filedate = "$year$mon$mday-$hour$min$sec"; - $ABIfiledate = "$mon-$mday-$year$us$hour$min$sec"; - $shipdate = "$year-$mon-$mday"; - $datestamp = "$year/$mon/$mday $hour:$min"; - - $STARTtarget = ($secX - (86400 * $wday)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($STARTtarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $START_week = (($Syday/7)+1); $START_week = sprintf("%2d", $START_week); - $STARTtarget_date = "$Syear-$Smon-$Smday"; - - $ENDtarget = ($STARTtarget + (86400 * 6)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($ENDtarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $ENDtarget_date = "$Syear-$Smon-$Smday"; - - $PAST_STARTtarget = ($STARTtarget - (86400 * 7)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_STARTtarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $PAST_START_week = (($Syday/7)+1); $PAST_START_week = sprintf("%2d", $PAST_START_week); - $PAST_STARTtarget_date = "$Syear-$Smon-$Smday"; - - $PAST_ENDtarget = ($ENDtarget - (86400 * 7)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_ENDtarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $PAST_ENDtarget_date = "$Syear-$Smon-$Smday"; - - $PAST_date[0] = $PAST_STARTtarget_date; - $PAST_day[0] = 'Sunday '; - $PAST_date[6] = $PAST_ENDtarget_date; - $PAST_day[6] = 'Saturday '; - - $PAST_Mondaytarget = ($STARTtarget - (86400 * 6)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Mondaytarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $PAST_date[1] = "$Syear-$Smon-$Smday"; - $PAST_day[1] = 'Monday '; - - $PAST_Tuesdaytarget = ($STARTtarget - (86400 * 5)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Tuesdaytarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $PAST_date[2] = "$Syear-$Smon-$Smday"; - $PAST_day[2] = 'Tuesday '; - - $PAST_Wednesdaytarget = ($STARTtarget - (86400 * 4)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Wednesdaytarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $PAST_date[3] = "$Syear-$Smon-$Smday"; - $PAST_day[3] = 'Wednesday'; - - $PAST_Thursdaytarget = ($STARTtarget - (86400 * 3)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Thursdaytarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $PAST_date[4] = "$Syear-$Smon-$Smday"; - $PAST_day[4] = 'Thursday '; - - $PAST_Fridaytarget = ($STARTtarget - (86400 * 2)); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($PAST_Fridaytarget); - $Syear = ($Syear + 1900); $Smon++; - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - $PAST_date[5] = "$Syear-$Smon-$Smday"; - $PAST_day[5] = 'Friday '; - -print "\n\n\n\n\n\n\n\n\n\n\n\n-- AST_agent_week.pl --\n\n"; -print "This program is designed to print stats to a file for agents' activity for the previous week. \n\n"; - -$TLoutfile = ''; -$TLoutfile .= "TODAY: $shipdate\n"; -$TLoutfile .= "THIS WEEK: week $START_week $STARTtarget_date - $ENDtarget_date\n"; -$TLoutfile .= "LAST WEEK: week $PAST_START_week $PAST_STARTtarget_date - $PAST_ENDtarget_date\n\n"; - -#$h=0; -#foreach(@PAST_date) -#{ -#$TLoutfile .= "$PAST_day[$h] $PAST_date[$h]\n"; -#$h++; -#} - -#print "$TLoutfile"; - - -$outfile = "AGENT_HOURS_$PAST_STARTtarget_date$US$PAST_ENDtarget_date$txt"; - -#$dir = '/usr/local/apache2/htdocs'; -$dir = '/home/www/htdocs'; - -### open the X out file for writing ### -open(out, ">$dir/vicidial/agent_reports/$outfile") - || die "Can't open $outfile: $!\n"; - -### Make sure this file is in a libs path or put the absolute path to it -require("/home/cron/AST_SERVER_conf.pl"); # local configuration file - -if (!$DB_port) {$DB_port='3306';} - -use DBI; - -$dbhA = DBI->connect("DBI:mysql:$DB_database:$DB_server:$DB_port", "$DB_user", "$DB_pass") - or die "Couldn't connect to database: " . DBI->errstr; - -$dbhB = DBI->connect("DBI:mysql:$DB_database:$DB_server:$DB_port", "$DB_user", "$DB_pass") - or die "Couldn't connect to database: " . DBI->errstr; - -#$vicidial_agent_log = 'vicidial_agent_log_archive'; -$vicidial_agent_log = 'vicidial_agent_log'; - -########################################################################### -########### PAST WEEK STAT GATHERING LOOP ################################# -########################################################################### -$h=0; -foreach(@PAST_date) -{ - print out "\n$PAST_day[$h] $PAST_date[$h]\n\n"; - print out "AGENT USER CALLS TALK PAUSE WAIT DISPO ACTIVE LOGTIME FIRST LAST \n"; - print "\n$PAST_day[$h] $PAST_date[$h]\n\n"; - print "AGENT USER CALLS TALK PAUSE WAIT DISPO ACTIVE LOGTIME FIRST LAST \n"; - - $stmtA = "select count(*) as calls, full_name,vicidial_users.user,sum(talk_sec),sum(pause_sec),sum(wait_sec),sum(dispo_sec) from vicidial_users,$vicidial_agent_log where event_time <= '$PAST_date[$h] 23:59:59' and event_time >= '$PAST_date[$h] 00:00:00' and vicidial_users.user=$vicidial_agent_log.user and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by vicidial_users.user order by full_name limit 10000;"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - - $calls = sprintf("%7s", $aryA[0]); - $name = sprintf("%-20s", $aryA[1]); while(length($name)>20) {chop($name);} - $user = sprintf("%-8s", $aryA[2]); - - ### TOTAL ACTIVE TIME - $active = ($aryA[3] + $aryA[4] + $aryA[5] + $aryA[6]); - $TIME_S = $active; - $TIME_H = int($TIME_S / 3600); - $TIME_S = ($TIME_S - ($TIME_H * 3600)); - $TIME_M = int($TIME_S / 60); - $TIME_S = ($TIME_S - ($TIME_M * 60)); - if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} - if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} - $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; - $active = sprintf("%9s", $TIME_HMS); - - ### TOTAL TALK TIME - $TIME_S = $aryA[3]; - $TIME_H = int($TIME_S / 3600); - $TIME_S = ($TIME_S - ($TIME_H * 3600)); - $TIME_M = int($TIME_S / 60); - $TIME_S = ($TIME_S - ($TIME_M * 60)); - if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} - if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} - $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; - $talk = sprintf("%9s", $TIME_HMS); - - ### TOTAL PAUSE TIME - $TIME_S = $aryA[4]; - $TIME_H = int($TIME_S / 3600); - $TIME_S = ($TIME_S - ($TIME_H * 3600)); - $TIME_M = int($TIME_S / 60); - $TIME_S = ($TIME_S - ($TIME_M * 60)); - if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} - if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} - $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; - $pause = sprintf("%9s", $TIME_HMS); - - ### TOTAL WAIT TIME - $TIME_S = $aryA[5]; - $TIME_H = int($TIME_S / 3600); - $TIME_S = ($TIME_S - ($TIME_H * 3600)); - $TIME_M = int($TIME_S / 60); - $TIME_S = ($TIME_S - ($TIME_M * 60)); - if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} - if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} - $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; - $wait = sprintf("%9s", $TIME_HMS); - - ### TOTAL DISPO TIME - $TIME_S = $aryA[6]; - $TIME_H = int($TIME_S / 3600); - $TIME_S = ($TIME_S - ($TIME_H * 3600)); - $TIME_M = int($TIME_S / 60); - $TIME_S = ($TIME_S - ($TIME_M * 60)); - if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} - if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} - $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; - $dispo = sprintf("%9s", $TIME_HMS); - - $stmtB = "select event_time,UNIX_TIMESTAMP(event_time) from $vicidial_agent_log where event_time <= '$PAST_date[$h] 23:59:59' and event_time >= '$PAST_date[$h] 00:00:00' and user='$aryA[2]' order by event_time limit 1;"; - $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; - $sthB->execute or die "executing: $stmtA ", $dbhB->errstr; - @aryB = $sthB->fetchrow_array; - $first_time = sprintf("%21s", $aryB[0]); - $first_log = $aryB[1]; - - $stmtB = "select event_time,UNIX_TIMESTAMP(event_time) from $vicidial_agent_log where event_time <= '$PAST_date[$h] 23:59:59' and event_time >= '$PAST_date[$h] 00:00:00' and user='$aryA[2]' order by event_time desc limit 1;"; - $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; - $sthB->execute or die "executing: $stmtA ", $dbhB->errstr; - @aryB = $sthB->fetchrow_array; - $last_time = sprintf("%21s", $aryB[0]); - $last_log = $aryB[1]; - - $TIME_S = ($last_log - $first_log); - $TIME_H = int($TIME_S / 3600); - $TIME_S = ($TIME_S - ($TIME_H * 3600)); - $TIME_M = int($TIME_S / 60); - $TIME_S = ($TIME_S - ($TIME_M * 60)); - if ($TIME_S < 10) {$TIME_S = "0$TIME_S";} - if ($TIME_M < 10) {$TIME_M = "0$TIME_M";} - $TIME_HMS = "$TIME_H:$TIME_M:$TIME_S"; - $login_time = sprintf("%9s", $TIME_HMS); - - - - print out "$name$user$calls$talk$pause$wait$dispo$active$login_time$first_time$last_time\n"; - print "$name$user$calls$talk$pause$wait$dispo$active$login_time$first_time$last_time\n"; - - - $rec_count++; - } - $sthA->finish(); - - - - - - - - - - -#if ($h=='1') -# { -# exit; -# } - -$h++; -} - - - -close(out); - -### calculate time to run script ### -$secY = time(); -$secZ = ($secY - $secX); -$secZm = ($secZ /60); - -print "script execution time in seconds: $secZ minutes: $secZm\n"; - -exit; - - - - - diff --git a/agc_2-X/trunk/DTMF_sounds/0.gsm b/agc_2-X/trunk/DTMF_sounds/0.gsm deleted file mode 100644 index 8c57c4117ffddedb818b6b0e6b4e15364ce9ea05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 429 zcmV;e0aE_ec#AgtP%`nIJarvX3!dC=Hygf02+C$7Qtm@g*lbiN)p&b5Gw{PSTNpT( zsUwQagC!bO!lPN~;^|d_K3+1L4%K;M{_=SO8q|WPA@L!ZQ^PYT?_trIuwtss;dJ9% zX6My-p#5M?F!<|ASQS*wpO`{5=B9fOL!x^;k(!K+w*$>jzdKhABj3EyYpIJ zN{j8k##CptM-;e@YBS8`h%9_EoZ)Qo9SzUnU7^$rS2Zv1d50FHpU&cv*XhUPW`iCJ zvaS+y`~}`J>_svekPOxKs75}gF|y#KNO(YgUYatxpZP=LB}N-G%Y0}2FknO8vR@q@ zfS3`dlO4=u=AIAx+up+|$vvV!sj`s~rO0Fk<`D}}=RH^9hOl2FcjJ8ezhwd4BuaJm zec@BU-t)bz&m^F%jb2ANJ8^5Ag~Sj>11pT*s>57+*efzMG2SteR3Ni^PQ+eG9ibN4 ztp>Y&7Ep~o<8B&r1xh2!;*Obwh;N|cV>;bRNA5X-D zLxFN_Rp%Z{edM^fG9k}>Pe6=7P8vjw zhr3>*si`y42%)Uu6Kanw5<45e*{5_ZL+O~CqauO*eT~h_h7K_1h|?fy|ZFb*+uLtBV`g@dnK&o|0E!XqHKIqsCN!#N04Y! zSZ)B5c*_!w;Zyr=H^yrggr#OJOQ}b_QlD4dbbK2UBwh-Zd+4Zhv@#lVV!0~VzR^+7 zEzGUq&9W(5Iy)Q?hW#iy2Fx9=94`fy;Lk#6!y|(SNlrke?oO>io-e6%+5vzG%|+ZG zZ6n%Un^YCOVF6^~?(8y#*ibK7s%QZCaRa;|tYnODiwa)Cj6%c_$LL&efj}e(2ex$Y zY?K%_G5ndF_$;_mt<}DOQbY3bM(=gc1AI$l8I3Yd=+w0@f!-u6$gO2>HcgUUP~Hr@ zioC(v3=E9xd?K(F_lsklT4uP7Bd0zPE&zX2;u`a{E6L>4WjsIPf5Ww=a#)FJ@^2i| zI~k-e;udh|9%S3P=4g8_FCk}R^j62C?kDOm{SZYKx&jt?i?Jr!wa`xMnywSQ6~M~0 zCE5MtaLxV?Th+hgcg9Arvye1E5~Ip_t0>#n$vza%UraIHgH^gU&U+ZOzxN1F~2P!>$CnJQq=C zNOYr>CjMEv5;$FFZ%_&VA?Wr+AA%;3 z?PD>b<8s2z83|2)bWcOy6VA_)kp}b+JIahj*vWJ?f$jUm_XfO4?L?UjgH=J`}djK_AW^r=u&8QpZJ0IASXkGJp$`?u#5r&@1Uc>=M*jN%V4&A0`At}(_?1p~1~>8bRe47VD-=-Pw^QW{b|4aplhsC(u#VahShp4HCl z0GHhz?M1b!wl%#PoWYcf?MdB!QqO27%h5=wWz57jK+|DG$fu;~-hA~!l@mJ7AJ6`g z{d%P4LqmrSE{+Yv83?CsN{io@hPmWdnd{B3&|mP6B|gOO?`>;{*W9J7$lRX9Kt0qJ z^&fH-5^fM6|8dWAG>UbYL7$l3Q`{Eoc*t|*QhC>Hd9C`c{E57Xf7p4rShp79W52*p za~JEV1An1166a+cB_C9ezxSz@g4rqC6ZT?&k#6H=?_4Y$amGI1@f>X9?TI-K8#X!_c^EtrbA;%zej=3GP;2#RAcp8D3qO>b=Lcr{`Pr^xX} zq1H`?dF1ur#fcr>OQ4-)?(Zn~i`Z%jYe7 zJDTCLl&{4g-8{6Y{k47p@Q6M@iiDHA3$X#p6zr4{VmEuxOnNRlo3;!X??irhU~Hjo z6L2GJK7wWC_-o)Us?q+H@zi)FV<@GFqp|I2`n=_=r$7EsW;CzFl^yA|1l1KgM_O9k!D}_Z~nv?ypTkNAL$yEkxn35o;}9Rwmp{mTW@*{ zF~<|%l0%$J%x|D<%*&v0Ol#^xER1=WSW0ARvm2i(?-AZ*V1yNTlzyp-Yx@kpjmSc5 z@hFhXX-dZJ0Iu&ddEICUdu?u9LagUgxx8(%i^ObN;!jMW<(B@cpv^# zfmYNxndB$odO!mig0slA+Y=79fGU1?xzl$1hINg@fgP=81ZxTk>AaE;!#?ns;>Qpnok)posU zt+4BPzvfnR*V`w{H}-6sILYL)R%70~ss0~9E7rTkTT9&bWm<8l2L>k*ZBsqts$1{}&HVY3X0@{ezT4oE$)T zW3fKkRq`aq;jXEQzy3SJU&Lg_UV}qAuDT3ZW7^m)z#~VJ=RVqxdF_0nZ!oP1Igm1t z!~^bhY8yfaJ@kr<+q`Ff>_FL2ntvv~4$<#i>X}L8a4#?+$5(QJyw3A5;YJR?E*$-> zt+xN?;01;}YK>CU0)SH&JU+V3k%SCG z%g5ghcRPL$t4#Wb%k%szb4wrFSiGLB>6{d2es8G(hH1nh%m8#~Vl>nkIh}OO49U+a zr=Tl^@3S4`Qti8DmhL?6GUo{Walqwz3GW7H0?C$n>VnZ-)WnRXiFo+F9F{yVDh2X|BQWT6m-5Cm`3i&qzPjISy!<%Y50EFuW=Cly6@ze5emWjkd4+ihE?Mo%$Bsb zoO+u~s%*LIX^Be_RWjPgzE+Q#w8)3x>p-pRDttLSDQ0Vk)-bu**?WhuDs!G_7U6Us zOCB=3AmoS0{Uog~=-GprPjn)_9U`a{)(+OutZ(A?x@%kBH=FDuQ8mf!G{-n)q|em~ zY(w##W#$ooMdV;&Y%d}IS%f(wwk8X@&(YN=v(nRVu{mgsq%GUM&M)S`jG*|K3;Un zZIWBFs$s5bKOs6DPI-YVG+gU%win@Q2o8UNdmXTtc{QRmU{PkZP8!`9H7(Z`f5#nc zyW6pJ{5(C6O$Oh3?s+9x0pSPeJKbH496lG%$~;ML8bCCj?1q55f=2=ue)*_ics=w2 z;|#vF7uh(t6}+|ly{Hq4a}t?B%)BM$CmQ@Xl~+j~Ur9Poeu`KFZACqx{vD=pi4lWw5#L5KHl*J%bHNBxuvx4$# z`o4tiNZG)=0Ty%^e+0eCo#r0FKjrjASRhk}zU3qPd7e6VGS^}|&^}A~W&+1(p}j(t zdnO0_L$48}ju)yBO(|eV9?B$8wy5Vf^7=|Zp5Q)j0{~c*Rzh$C=6kQvG}%@iI+{=w zy91uuPWkZMlpe(ri(^?(T<;96bix~Y5p0~e3&D7H#N05gEwQ7zTLT|UF3*|4Ko8Do z-r08nkaGTtV58Q!u1|#GAOAP16`J1RS)t)+p5!Fpqb_^H$Aey4iSPoq#9ut99C-)p zu(j~_cD83Rc>}*V;x9);>!a3do}GfcoY|54MjJY~+Unp8S`$eH|LFB%mQf4A2ctK- zZfQ4xc^UQ$Cs?3L{cuEYB%0!Fk=FvZtOesmz;1x$Bn@qMIH_@|4|s3gb7im;w6Ev3 oWdc!0oOS(TqcBJf5u?_-xxQQEe$GMibklv=GsS9jmC%&+|5D}*g#Z8m diff --git a/agc_2-X/trunk/DTMF_sounds/1.gsm b/agc_2-X/trunk/DTMF_sounds/1.gsm deleted file mode 100644 index 7f6c842f..00000000 --- a/agc_2-X/trunk/DTMF_sounds/1.gsm +++ /dev/null @@ -1 +0,0 @@ -Õ8z*½PScOȪP,ór)" × ‰¼+àEÓ<7‘Ôøj2ýîÕhØÕÑ#8誙éBØ,ƒ65ŸÂCb (ÔøRºý¡aá.4³ Áµ‘•™âáäWFR2¹Á) ±‰Õ8z.ý¿¤hÜÍK]…º%Mq]¤œ°Í·M]ƒ %tñ•Ôøyî½\ƒ á‘,Yµc:â•SÄÏd<,ióŸ£UäôÔøK:ô»B.e©Z%¢Vn*àóä¡Q´­Eã!tä+DìÔùC5ÑWETÁbíÁ´øo‡k]¡Žb­ÉŸ›”cÔøCz´ãÁÕ”ª.”ãÂ4û6±£_ÂM¬è]]¸æDóÔøbv¼]áÅ–)`]¢kéÊœ_uYª®©]ÁUU2FòÔør.½]á·Mt÷…ÃZÇlöd]£C]6¦ø]‚Y[Ê.jÔøR÷=_a ë­º_ ‚Ü­ÊÜâÁ1©Z…šâÁÌ]…æßÔør2ýÕ¢)6A›]â­É]¢(,Qáœ]™”\gSÕ4Âaõ‹¦&¬Q2cÊ>”¬vø\ud’I$P`ë®ÚÝu \ No newline at end of file diff --git a/agc_2-X/trunk/DTMF_sounds/1.wav b/agc_2-X/trunk/DTMF_sounds/1.wav deleted file mode 100644 index e5f5359a294a5900b1b74f9df930ece805b3e34b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4100 zcmWN{XIN8*0)XL@y%Q3W03jq{g%uLO09C1qs4aC?oGlKlIBK=lxaETG_pAy`{S$SG5H{Jz+e@j5*^rc?M9ClozOeow9R^=z+z} zcqYtBm*C3{^M}2L??VE_QTMOv1*%zrIL=4msuU*_8~|FXq%PkhvN#L`Y_5XPBif7j z-=nU$&WK9tK1mNFP>JV~Ux(YliMFgjIc_|r#eP#P6G^o#_!Mqwp3oe(G)&J4EBv29e zir>l%g)W)oHXYP~KJ80V9_hWTI)trDFUeWVI_hc>?-z%epTJk5SNhJHZaMA|?k0P9 ze^Rz+YMT;UUAhY5C~F!WfU-OgNOpKwqy!$LoY&mb`N46IwLj|&_Y~^9@uGI7rxo!6 zGS&21+N&T!_1yWnnnZD6)&N6PrP>0VBs@l3bfr6^s=Uo?YI(=yWO*^T=?flhm=%xHy75=6ilEsn(=doHf>l9B{L{NVQ0L7o5*}Arz$D zL@ts~Y;78N?ERVa7ij|U+1VA`LtCE+V?OcnyU*3dOO8Nu;!=~v;WvFQTWat!J{Onh zY!lz_IHi`8oEb^Nqmd8ov*Z?~&YgoQ zw@-Rfa=^3!whSfr#v2XRDfo%WW&AvPfgz!#w8fy=i~G!!P#;17&oPK4d;;S-im&Qw z&TFSxI~i9qOL^hX(CDMY%PWQRc5S!MX9tF zkLXRwKqq{I`{_vZ@M=#r^RaMT`fChhcwgJ!k~;S%0*fdPzHt-=_tAE9FR(uO^Ltfa zuJoM?_OJ)I+o`<3w+?EkjG)1DWi9}#@2=w^~cs3doK8-%+kbfX<0$1!yD=)J|gyeT#~1)6Ngr!U+~I= z8Yap+Pw{00bni!837s(NlMsLI%2!KbGvaNHj~+v|6Ph_vE-I5w05nNqxr2$5fvv-Hr5}xaXeZ*T zN2gt8I*5)+x}RCb#M`kQ+NS3tlaQRK?cu|aah|zQ3oU_Fj<3}gxA0rm>K;(t=?zJP z_%F70qYI2hKZ5m{8pZPm;=L7|E4lqV82XV?+@n_>@>gTppb&e9=`Ns;spmU5U-_ALZeQd(lFT+N>TEiyyhb>m{zhqplduncQ2O75yX2iMas1eu(tbVVMKGvVK#sacYv-6EH(lgz8ymH#6nNd zd)RA9WW(33f~J?FzmUiC4kT|T?r~O`)jknA0AFT4AkG!%I&Z|B&RNTc;Kr*@_Z2HI z`ts1*A*HrE#>mjOF;fMj@$z77Ut|4mVqQQQX^KYU62PfGHBKLuMLF;I(q(Og4^?B* z(u{)V5w|@^-8gF*qySmuaSd-6C^Iu??O8EnTEj_tLU*QQgI$b1iT&9>WMP6u;nm6W zxSNp+Wl!svqJ7Rw5!2$A(|jSc`zd4sc@brv|ATa(xm;2M`IK~A_?B}jcv1Zyb&_Wo zUK&yv-VdJF*WsV?W@JmEake9(q0X1Obx0_=4;kgjcFQo0oXLra1gUCAqq6zAflWP= zw3+;+7)rU6{Dc(do@eRu7hD=<;?O8}`X+koc6hg7Z;rAV=R}eFU*0KY0=r(*Bu-D9XgFtHR<4 zk?BB>N^G*aP=%OZeBW459v;P-aw=JfT``o>!0Fgw>!xzzCedyKU2Y6?1!W!edQdF0 zH$CYC16LA@gfrsmfoSa!O}&SY5CT6MHpwL#5oRaPl0A;S&PnV^79G>L;PXh|BmZ?> zaV@|EIJ=Tgg#p^QCQFk-JBJ*_?PFD=(p{^(x6r|`R#^6EamSzC_0DGYhwOy31?bC&}JyaB}9&?`M&MpIuy zB2r6pPR4?s&wblOM@H{KtpqG$yerO$LVp)ql(IHF$xzc=*Z7ATPaK<|VC_U7cR%%( zU>;KhNQ`z(N2Msu_Kf*X*q2s;lk3k6Up5T^2*g&`Z>pmzK?sa}m#t6Q45^WDTW`oW z2X2xtlZrw_*LvXVh&u_KNUlTGA+Osik3}UUu1z{j=7T~zDs%$B8?)ZFqW`MsYkecN zbj-S}iPS0PEz&`Tdz~z=gCDfOZ|H8P#c}3h7}kUs)328Ogo*$rz>j?G<~aLQjT-rIFa{X2v}$cINb-`L+HOJdKY zMn`B&yjDizIVBrc6t|!C8NJfu1>3OSQlFw<=vH^k>0p`1MOBaK;vFN*Fnv(^OiLlJ z;o+{IM)oRee9t)3vS+3K3jbRsZ-vV;e9uW|2`_^h=U_-f=Ww&5-?&eScGfME0`Nm| z=eTz%a?ov`6rvLGxKH-9{t2D&niFJIX5^T#hDl<(o>;qpTn;{qU8zjeuYk(76XReH! z1Q29Z-M_1?p)0sZ*j@+UwhZx_vy+Eo?6Fzewl&la7of?U)|h+@*Sp?Vj!U9X!d4mn z>Uh!iQO~D;$-JKai4&+VPJ9 zZH`r;g%Nv`Ud8A^LQip>vwu6##JQb#lalB6IQ|9J6Bpp2&Ma|3J6(01C=vW9Oo&?R zm_Jmj+TmS**bxK`8%M$&PiVI?iZcqr>QvP&k=YG5%X}_{?m##qKcs=#Mfz~IZ1IbzUA^7=>hX3*j>aFw^J8w zEyr(5u?Y4=w+Y56|tfM5-mjmfj3 zjZHo=Y9sWW{-78y-y2w;@HzKWiVnJKu(~H%y(yT19f7>E&9_X4k8*tJA*S0Y?HH-& z4f^0EF;|%%Ff+V&d}iF~2rC{iP3ttaXh+K^?2Ov@B&8QUQlP`JOrAHdoDAMMov13fwUAjcor-$$sM+_y9^hs90I4Zq@_ptBL`1OA(66Ym)=>&Fu4T%?k=he&NnIu8 zx47!?^C-3Fq4#fmc*JW*C<-UO|I1MW7>anq03p?ir5Jqxqk?6L77zFQx*2E~W-L*;vv4Y#```$Cc!^r4füaâ- -ì®ØwCY Œè—¡J,ƒFsÏÁ­Í®ZÕx<>ô_"q-³£µ )²‹ Ÿ¡*Ƭså ÷ Ps‹Õv‘æµ_åÃc•Ûã„íÓg‹Î²rG$R 埗Yµ \ No newline at end of file diff --git a/agc_2-X/trunk/DTMF_sounds/2.wav b/agc_2-X/trunk/DTMF_sounds/2.wav deleted file mode 100644 index c3e9edd97f771d36d77ca1a4cd0958b628209a3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4018 zcmWNRS6GvW0zk9=Y{-HPLJ|lGAqkMM#aTrhwRKk9RuAMmaaUT=I*L`R zIB`^5xENst5)wuN2>}9u?7eTl^LD=Td=}20G2;#n1X?n+Ab-PmJL8BT5D5GqpRquo zLz6)u2nhe5`DX3TwLkw?y$r{*i_%?mdO$ul(|ZH89r)JpdAq$+1e(Ne$W+JpUFAao zTRSWXx@HtmwrezqDXG+~N=kv{R$rX)JXi;rXxgBDs2`4qNH=F(A@mFvcGV8Q1ucYe z?T>U}({Yj@10~MFME1{ z(@KJkauYN9RoojK;7<&!#V0Vqkq7nT8&X>#gQ`G*&kiD_6P0fOogb4m{IRh z%S7<9IFG21e!x`TyjFVB!j61E5Q2P;XsCo)DX1b9>$f&A+r~M6j>@CnhkbJY0l7yP zax9qH+7Gn{WNKdv9n74DGJ4*E^2u8mi-40VeJxk{60Bk0PN>IN-PGVpd^|ZXe4zWE z`mfc;QIUdEJU+(cz(Ouf69_7(W zGLP_2!>1V_qo0SCBaXQbs&^@u*ppe4b7myzKzQBdff{c$km_yIPVTk)syNo1W1Io+ z_o}SEH?C}WTHvGJJ;(*O^VVdCnB_K6hpLj2vrsP()Hsnz)7x}A~?;zPHacr9R9AAScbwH5XLtSf}i zO-adC(tb7H>DoHDAh;FS;<_|IHO#|)FLGwUNcZ$M*$yos2th>#_K%*hyvK<}>QpDj z(YL>4ye1+1F(M8!!}^(PA+b7nCLa%*(luXlR&yJAnxscga$~$?BA9=cjSj@fPS*SS z=b=`|#7DCH?|oQ&e?m`8w)1Jrs`?bY1NR}WnY1a`qv#W ziWW-Wk%SAcQ3hL=3`+n5wmh)iJnFwle=b6?11?S*wK>o56`D^pKsKlwz(H=7pc#*HOP!@sF|_x!?Fiow=QRt)C$d zLT6Z&22+@y@Iz)fYnSa_+cNnh>ml?t)LHjL%PQ#R1iUz!`q;3ti6>j&*p92gT@R9- znZSK(Oo#f=b*@ho;5e37RTQa}yG zE&;>3&eoQ84*}aa)$!d(iaQvZMVu222|QJNQGZF=Wb`F`wDwQ zj*7E9IJrMKBns33F4uewR1*w!@se|n$9?14*Rxprz&jNl;&RCKdK zzY(dJzdY%#A0sLgYZB+c-gXM>>r`cs^VDO6?}CxuF-#eI4=X2_D6gp1^rfS8tf!QF zAdWW=)e_5~qFjB_+M#jWXo6*_19!QV?VgSek1e< zH;8_36i8F0&Gu?meHx#2F|^;b&9eigh8K;&WXBXv|G~s1ncp&wdhx?Its}5)FsKo# zY*5!jTZERZ#WB_)>kdHcVH3;vFgfWZSLQj1!T+>{!XzLQjLT{c|f zE2DV6Oq3W5dXDUo~TK<{K{G&*-Rc`)o{)_=G0=V$Il4 zBy)=RI`c2vnbs4nH;rg)96=14=#YWZ89w136#S@4vZ?if^)T@sB@QliUjyHbxx>xE z#SDI5_du#}-KRA&PoXuQdEvz9M&<`(R$q1PTKV?iiMYoJ*%3hxFCf6Lp!9*Ys@HX- z?t{QiUU8BoVyJpS=rB=LkHuP`IQs0Z72dzeZeUvZ# zU*RbfbnFkqir_dT&ihlZy(4J0(C=qY7OaL%8vJ`;ndc@T_bK~Nspq=W<7ea~^L`1k zdrNz_INt%Qg1-%~9iW8t9C%JV`<#oa{HLqg&P3?IIP>p@V(7}mx{TNK-%S0|I|{9X zh^a!9JKHQ(a8_cYNKInt=QZx@*y8r!nu;VqH`V$IPKt?7<<$?0t z#}LO@H`u#jqVC+ z71|}N^;s7Z)`mNV`%Og<3B2DL(*^6E?w_7W$k`Ns*lX7QJF+;006Ogvy=@vD?)wp3k4ctqY44#q}ah7JLP5 z4Q|9A_SQrSIA<6lFRIN~CmMK)CC3#;RfoRvp2OgoSIF0GzGivDqY)WtQ{pn}u`u6# z5B@8q8h6cjxcPFE%A%mpNv6?DLk9b1FrQ#Y%`|j3)7o(!ctVp{PXEhKG3k73F{^-; zBjmP%t~3yj|1jf7%ng@K&vht)j}XZSUD4CmiCB_)I+H@7TTW;-rUQ`M5b2nu=Ysx7 zHfAVAEDWfh(XmZm3??C{ZtXDJIi8Y{P85!Z zHg&_Lj-dc_8g^mut{LphrX`C#oPB@Ud5cAgcZ*iyZ=3T+c)k(DoZ!9w*pBnV@lg{qpNsBdUW`=qTOFqXP4Lao zfu3>;HYPcHD7hARt~IN8);q9LQ0nNo{)z6JOhI-l{2LLclzXjz;|Xd@Nq z&o_MAmgj6CrIN2hDQ+!Pz*xeyV$_;fwOeJiz8myov1sIa&j)ZH039pe^p&;A;Yj(h-{11+E`d*-=06qY@vWbDgKXb(l_ko^NC4myON3eS|MXtCJ?6 zc3FvbIdBCt%RR4)Ae}PSOs&b-%%{Uiqa9;!!@Y=CuJx)Bh0lJAm6-F9R|0Aocsz8& z{{p~zc5AxSF5fneECS1_g1_Lu%J@LJZ1A;~cWw7P$6N$7whHS%sH!A}C>fut%Wr(rnc?3{pkkMK7dp9^ zyu^)3ImoFhU!A-wCH$09Li{_l+oMBAu^-3Z0^L`fsYR)G0@cha%0}=>&opFRY;KIw zOO!R&y0k&8k=q=59vbWBLD!QHlG+?bX}DqMFgki_GAHgeq|u%nnv4r!t1R=|a4m4l zh1dmY!MIbP95dPzM!rTqH08?b>%on K2d#)V-v0w3v(Uo; diff --git a/agc_2-X/trunk/DTMF_sounds/3.gsm b/agc_2-X/trunk/DTMF_sounds/3.gsm deleted file mode 100644 index a41d6679..00000000 --- a/agc_2-X/trunk/DTMF_sounds/3.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õ÷;û=PW1W#X õ[r)¢dÑ[K±ä%7® -ÒÕø$þô£c±#2¤ê¡+)U…˜¡BV4F¬£Á›S´½Õ÷C{4[ãHŸnpÞ¥¤ê•·”£âØbªσ`åg¸âÕ÷C?=åãW n(*¹¢EÍn,©¹ÂÆ{Qá–åÁáÎ6¦qÕ÷R·=¹!çÆ®\Ïb#¡V‰)¹«°Ë £À…h~ Õ÷R»=£ š²´Ñ“£¡ç Š\%¢.ÌÐkå‚nÍÌ\–Õ÷R»=åÁ—pzÛÏáµr’ä>šÜ™=£¡$u ÈìÕ÷R»=ÏfîG…ϠȵjÕ&Ïa·ÓyÏà×Õ÷C¿<Ï·+61ゎaÍ×Ï£pôK¦ó¹¢âéçÕ÷;¾ôWCÑlRš¡™ƒLÔÉJ×å$Џ=R£Áf¤‡ª¶Õø%>³ã##xw…b¢ ÉLMäá“Ù}‰ˆÏbj&‡V¤Õøúì¹à¹ê:3 ¥áÔÝk¶ºá+[µ? ¡à®kŠSÕø%vó£A¥bY—ØÍ•9‹‰ë7q·©àÝ‘Øå \ No newline at end of file diff --git a/agc_2-X/trunk/DTMF_sounds/3.wav b/agc_2-X/trunk/DTMF_sounds/3.wav deleted file mode 100644 index bc37ff5d389bdaf8bb4566cfaaba19a938ba7bb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4046 zcmW-hcUaVg~*~xpT43r^`ZY($E-xI0rc#_&vwNIA)uw zlIl!Iv=Apu#}}dzq`7i8r`hsz9b{OA*0WAU4!9;^%?$6@DS~VZsuncSTzevv!CM?= z>`(sAlyV_vap)5|jGiHa06jbO1GYqZBcn{T$(GohI4UgPSMf^jP{jd#dK3Rs$aqQKhp&|3O2;U=f?M&w8=$j4lQ_%6-Tp`PX1C zBF@K7;E!0kR7;GfFbRDx@mFXUc8lXoj1Wn!vvu^=CGJ8}t@qT(2JEs(njR^hZ2Px? z+%xEV6nw|Av9B1ND0eAmh}aIWZPrLgP=h~q@Lc;7WM@=Q#&!V}nAblUz8_lbQnizt z0+D|ew^A2#9AK$cANYp!9;$2T(o5k(a#cbltpJ{ZouTAK<~U`#MBOJaRq|DogV>5J z58B6D##(RRrc!Bp;4r>~zdCR=x{f@mDC3n_X{w`!VI+%LK~-W>>;`jH!V%#W>pP9T zslwGy`7|ie&cVtA#i`ZeskWkeerJStcGz6_`rs+_f^@p_g?NSCZGs1DahZY7KLVXN z^i#!BWvFPtS=r5WZVcY!`Nv$^JPT$;Y0_8m3c>XsCwuFO#}T$Ew_X6RQyfZK##F+O z!B>Pm)H^_&VV$lR@<>*WX{9g_w!etEhaqyDS2MIfLP^30;`t$dq>_*$iRA9K%~LJc zmB9t<`HU(r8EcHJ9`jH@uqoB=jCW93q&5r!@Ypi$+T`Qna@+s(?$%%27m4wnFF(#h zbHr0Jc1jM|3!2({pZjj(m)VFtXAz40iBcq<>|EAaKYAf3&|loYw>1@3D~2=lg1f-x z!A0n)u$Nd(o1&o$TA?7NF65{nspBEOg8T~FZJexEKql$C_{FpinB+D`7-(Ca8?`1) z2UsCmD$gS(qT_=L1tVAeze( zjf)d|Y}2*3n*YXTkYD3oTL5I6fRI)z`QAQkoZ2Px9t<4|Uhd~0mn3(UJ0-K6tJ?@e z(g0#$-q7-nE$}gUt#Y!+2psC24Mc?mdlI^4HgTZ^3Ss&_-eG9f=yrd5xC6nOnhbw~ zuVio{gBgKLhcih-5e&%^-TE zH+b=mx2hT)0P$I8X=G0}%BADRP7r-(-=ulaun?6*0KsWa33`#+mwZ{W*ukuCZ5!); zOW2D+L;DfA_=}7~Qj(Ktn$kbrZwgAZcA60=UG|IePcZ|0-PL8if-m;1>h+i~5S6db z*d~|>6%LJettQlCyIOh1Ss+(VN-?tM!DF0%gp8x^hUCWg+ElPpa%Ak=h-*l-=Q`~) z;}c+x_PVA4&Gng<80R7=E+(p?Z;by`e8zEK>u9)zlvCpIf7@>%T;9ag zds4iUVl=dGbf*vi#5_0!-Yha_R7tad87)ZzxBZf!<)ive6X=mr#&4Dopv&DpTV8OD zx1&3``6{qRW=<~`OoZPI(>>M1tyoFRdc$sKyHt@}$gV(CKyO$lbv;~KpRYaYyd*w6 zW>JI$HF;YY51F;V4sDYfbq4YCB_&}Zv?x?8dCt>0`_wI(R^S!ucjg4&RP-hF@t6UT z$hlT?zupI_BbF1~U5Op z)DSe4&L9rPofBA&&Lb(JRl@7eBbwFvLfQ)JbTApU%F*E&``&|{Soj+KXj_4N~4k6~{J(e7hIo1k8SJAJPF9eB`m zqSxv*;GbIOm=^}={|3`!XNTmc44)_!**r8ITSw?}f7*V{ z@RcK2`YOfG-HX&aLPDNWNvNYCU-Q(?5w(o%p!K7d+*cyMWzL1j`b%nyoyLD5yF|=F zAv|7a;cWxmnm%=fb0TX3XJWtsG>3d7=AzgDBx_gb&w!I6^GF1w2R_M&O6-yqf)4$- zrX9!v(t!W((d$qSuOm&V7zV#-%IcDO@@Am8oj&X+d2!YqaTqQ-3gXlUR4HpOW zimA#S(pp40xC-77_MNx9Q*3->`yl=)b+h0Wdd4;waFX%{`=zN_W3$c` z)g-u>2x>t8qI59sAa27Z)oj~M-k7KoayS+r_!lpiR}Sm7|Ejq5-&nu$nD}O-ikKQz zC9Z)gwG~>vb1bc!+KQ>+x3tWJ^JJ8Rn{>#{C*_VNVyI50jzagt{bR(N6e*_D9Vwdl;jVk>vBktEtSmKV@s-e|3)xD&Pub zd)P}L6*|U@PKFg#Fx`00WJ2~4Xr7@VDbUL6Pya1y8$xes>{fdo;xE{-F1KTh@U`-& zVkVksP8j_;a1QR-K)mUw?TtvRTq%8u_J1%S*9bn(+m3(q`>YQ|?i8-zYmDXi5&WWL69E@@;f>p6Pf&|i1bn#tWS?+a&Qok4j5mS8-xRJTO6-xk1p z%$XHffV>Z%8_krmkW8IJ+wD+9l#p}K&*4^D_PFPYQY5cFztIY937-{^V(A6MoQSmE zs5{7^rd=JiE@OxtlJ_Z{(E?Y-x6wz@)g8DGS-4k$<3B!a{le}NZd9t}IP9N(rE^C} zzi(^zZsRxB0@0kbUePKn!P4o=Cx7ie-GXYqu=oW2aTT0p*l+N(@Ue^-?3B?|x8G90 z6UID`$iU9{FR_QXcI248tZvkTu-*#~hUk&?Vcjx~cn)$~m#Rs%ucn!4(>yh>k6Jpm zS`H%b^&$02U<3J1$T`P3a11j$#UGW8E^RDn$wuFY<+yS`oN;FJ#%2^pBk1|o!rpD( z1$c(-Rp(}Vm0-29TCp7a*nQtJ17Cp4?4Qu|)cQgAEWK1pa$On@brlgiJeS&M>TRRZ z!j;K4`Bj+Dc{8LUveWfv<5|@YqeuDPxcQ7XSf6_p4Po2S-G;2X+ZF>mNcMr4fYO3b ziZVpU(VuiPRYA6B#%%U>+?U8jQcCP1*+z7)euHkG!$t8Bm%!gbPiO&2JEG2`V~pO$ zB&eJy^ZzwsagO6urx9bwn838B%jgOWxd}|`G1wpTF=ckN3L|#?GK33A417E!ZNaR3 zVT|%;d7^9Hpbeykedil*K2`4=O%(Q}UKhz+8*O<35M_gVm+5!)XQKxG_;H==wXRH* zNy%p}aGf#c*AarW8LTh!SCs(r1xFZ zM((;_gs<_QXv@{2BP0A{NvZq-mlWI`mO#&Omo%oRz8l%b?T9U*f5hZoJhO=V8}_9k zvMz2kmenlYK==~99jp=eh_kR!-AmO%>%WoPncMvP;1V)r3@D$0ePtl%*EvA)r-Yxt z3*bijgru|4h1m0kGtEBeFTxJ*hT#>Ces*rUF{Z%fY1v{HxyysQ95l1u=HvYzIe|t* diff --git a/agc_2-X/trunk/DTMF_sounds/4.gsm b/agc_2-X/trunk/DTMF_sounds/4.gsm deleted file mode 100644 index d2bae3f8..00000000 --- a/agc_2-X/trunk/DTMF_sounds/4.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õ8‚®ýPRáW¸é\-Ѹ£¬eŒ•lñìG'„XVÔÔùbúýî¤Õ,‹µbÓ*V èÂÔrK"“bTÕJ¤°Ôú5~³ÕaÈ‹fÅ9áZÚÉTŽÈ¥`Í•ááI”ŒZ^Õ8‚nýYäÃZ2!QÄhzã˜äk¥Ì*Š·‘ƒ›"xSÕ8‚nô“£ªâ漓‚Ƹ®‘ÃÓ*Ž‹"“‚fsŒãÔùSzó‘CdÖƒHÝΡµQTëÎÁºmqÓÂZ•£sÔùbû=iB -ª‘·V“bc« #“meTQ¢ÅJeÔùS;4‘¡Š²ŽUQ¡\ÔÆH'k‚ JéXž»á+ ˜ÊÓÕ8‚2¼U"àê #ÒçÃØ9еkÃÚ:'œQ„ "‘IÔø‚.ü‘S”Ìc§"7ÊоÏRërŒâ“Á%ÚœÎÄÔúD~óÕV΢Ée’¢ VãÒÁ¸Õqräã!±·EÔùK¾üáÁ¡i}9EiÁšë™UEã¡Lyª¥ê“áXz«9#Õ3âáõ—È­°ržQ¨ Y”ÍsÌq[‘HܘaM­òí2 \ No newline at end of file diff --git a/agc_2-X/trunk/DTMF_sounds/4.wav b/agc_2-X/trunk/DTMF_sounds/4.wav deleted file mode 100644 index 05f1adf82f2799a28bc85b85eee27935ab5975da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3990 zcmWNSXsYmF%T+Twwpy*#R%^9Z z+P%tVsjXaXohsmkqTm4vawrIL$_?*+&$s9Ie1D4P&zW-?4+1SO`f&EA+xMgrK_C$L zKi*9NfeuXvf#N{%|Cx;&_H5YvU-f%zGiyshGkbL$-%vKR%W(*j2=5FO*uHhwV777= zWUa(4GbA;)wnAJ*iDKTvloOCayI~v|mBFt@xz_Krz}PJ84*n5gI%St7Dxcea)258C zO35V$K{>u7Q43}z-WM_t=5-#?HzMcfN+fJXp6hERu_u3=kE|sa;hzT{2XfG4#(RmX zsJ(BV^t)aPWFTvwSd=^?&^T1CyXVov{)J9Vi0w%KUqnI{CnE*6rQiDYq|z4pnkD6R zCZ3MejVT?KF*^M7&@J=vp)^-JnUjAgcQ-~c)F7?tT06m^wx(_-+=*PCxB&`bN6?iM z|MZ{iI%26va0{OZX$gYSQpLXBe>{(|F9~~~OZ?2pGu(XUQu4NmIo%bq>$-AmdEO); zKsoLFUXyJ|52OP2IEN=;e0pRrEtX|XSs%((LL2M*v*1~oALk5`YJAz&s4D_q2D{>m z8m14g3yw0TiSBX_fTyXaHm~X9#f~u)DFawVfa*g*mfTZU5VXnd2iqY^WTwg5JAuZ zx4`)}PRl%+1)>!@r?eF}-!ja=-^pp`&c}sZ$rhg{1nGuM^?WeA+SdCVeZGsn*|6u>3CIG=V9&gMaHNQhnDlvOU39pY*%2F_AGbB(2OK3P z@t=wFk+PG{Bgm$`t*M<0yg=&5lE>VYP=sM)|4eHhcpSlv0j`(snaCcVyIxBP(EMW$k(hfV$r_*v>w+OJ^5Akb2* zw#OjcKmjl9Wyq=R9@yx33UwhahtE0>`%E}3+nqiOsM3m>iaVSA!qji`Zl*+H4VGG~ zF$je(jNP?qhl`v~3GedpxwG)IhNnvZ>VUZ6)LgcM5{td#$qG3Ur_etK&J8v9a7Gu$ z>jfh5Qp!|ob-P|!=QLq=Q_M(8C?Uv4`ly>p+CV`4T7GAci+YoLQH)M}*L|`dHu%g_ z0ce0klEzo#)nwI*y~Twpg6t3rSW7lEM;B50nc0~PA)j$*n_+>=*=nWp!*8hU+x7I7>2 z0lXowGW;4dKs$lI?UZ$STX~~jkamcU=l@8UYW<)3s$LOLBL9N_?qB4x$7*QjIo0%K zo|=xlW|BT0TgdyK2M`yz7n`cacY-Qlpa5euVMH4}mmn&XSZ~ut zup9k_r_A#kxCK=P_Kga9 zAL*t+zUQ_`5NTU{IAwNQlBo_}M>|TK1}6K3;6B1;N)@DPIMi09x*4wE6cx_SD2awN zZR%p{DF_>LF|OD9dcuHgPqCzxBdhcj>A&p+FFYlZA5K38L65F9DZSI7<#DO*AIygx z_pzev+x**ve@!1sQ``O>-%VMZxr>2>TysUeDp4sdv?rrPc>zD_KG1oy&9&oT3 zSIc^ytODKd6E`KP+F~a;Kj#0+TphY)WQ;uW?}U8|n&K!QK~5x)SM$@el)!w=)yAz| zb^i5CF!yJwFiLY?@zue|h@<|6`ak+skH14cFB}paz)vyEZdu-a-n$}UQ{sBeq0s)o zR$v$D3jUJ!pn7HdBhya855lveF4EW-w1=QsGC@Y|Mkhw$-pWWY;Xzt4J>CDTE6^k! z+>P4IqY99eT2I;Vozc(3wXo9YL)&i4_VBu-aCBSuD z30#AJ34iI{Gk8|B*XL*6Dma#7g0AVWlCA3B9yw24OSdB~1uBDoBZZ_e>JNKcS6!!P z{8Hj-$k%mUatx0n4nke zhJrb4WYDUtmG9S0f{i7u_fgn}TAW8FnS{v()YATc#rUj&`RL%RD7Ilz9(!W~5qI>(GEF!}NZo^&dwWauMef zULc`(bc4(;uO9P}rewnTj`>3lML%y3myx@7JrIbla^N@D_Xtyuts#KNoeGd7QZs za$U=lPU^lLUX}4yq+#Ks^9(!mF?SWT1p3DN*2?#;h=0U=!d-@%KNR1zNYUf1WKeU4 z85ck+#%ZojP$xVue9dgqK1eBYC0Xcc+~wOGXmQqU(HRU6n}{iYYkN2Jzg9I|{G&R~aBf zW1g$@T+tUiGtjHKD_x@+49=%5NfzV&4yk-aP=5Rj^c?qgbxYS0+al^gF+TqwZrCX3 z{CdFP@5Zgidq7Kk+oDwB+T_UzWv=+nW|_$dA_N77yeL6!&({8Aj)hRb1(3y=VxI>} zVASMHW|mBpE9N(y96W_g<_fYtAiVS{tS`O$p>Ws=Po`crJR{;uT_!HiD2+6B7fDIl z49G>sJZ20zGqA@$2Fr@CgWniacfVB)Oq@yGRQM=oD-^9=q4-S4i2WNc#Uf&vzO`{v z$Y+^MEYD(VZEADapCrB~7Uq18Tt8B->9IVD)dEYRfJ5xehUc=*XU`@#j0NR3Y3&F* zVGd85aR9Z&`Nmq|N5WRb{pz@?t2AGOZOObZ8fOyR&Fwqob;gsZnw0890(_<~HCT;M z;EsXyCTCZs=4TL%D=fU7{$=olO0B3iOQC`UKe{hW_Zwg;>cOOoup9b~a*1+QU}?Im z;6z3Y^uE4FQ#EdgI{-9=J{~{n;b21S*O{r~@+Nos_bj!z{$ zfENWkq5GKM6U!3TOw@PFofsj`fS&N9qCk92;%ltNhF93z zOA7#^VMNYrj z=9(GzA=K?P7&ndFiaVU1EqsvT@R~c|(yO{mWP}Ax%|SIx{OSECPKmC8?6bzJO&VF` zIa?$7ljDyJsVdtD!?PjjluZN%`0#%(-c9_S_6(q!=d}ISbznls8kYcBs)Vsi9 z0+pg}f){(*Jt9PF%JGbPT+q}m)wN6==Oq>h$}+NnOJn2a@4WM&in#l(YsQN<5$YnB zESN#97?a2wF)Z#ZJ;MXg=8Sg&Ryu z<=ms)0y$hW{5JR~k{n#B7pl>gjQDy%muN59IGWU^=z8JA;D4fpF}(1{fiS$CTuS^V zu(B_u6``Y{Pv^HZrZ@su&1~ZKr9q!@`vqI* zI{zQWla`*49VU&CYljK4UiR2EAIe!hd0tE*GceWux)B^({r}?0_r5OU*#e2y#MCk$IHeIKIoPG`4q)7LiHfck-9VKOHSp zy+8C_K!=(@OazyBLa|KhJM3iYh?}6;*DTkc!A1Ck{B8o=#WsL#r=xdazXhjSr&@He zhsh$rd{%2f-MPJKgEkX5onFYkiEH&uIKK)%M3h2n9YX`ZXthBD%T-XxodUkDu9us% z$3YF$cus-gW4!1xya6gh{vGz>}J8!i7A8z^7f&c&j diff --git a/agc_2-X/trunk/DTMF_sounds/5.gsm b/agc_2-X/trunk/DTMF_sounds/5.gsm deleted file mode 100644 index 239c7aca..00000000 --- a/agc_2-X/trunk/DTMF_sounds/5.gsm +++ /dev/null @@ -1 +0,0 @@ -Õxj·=P3cWc•T qFÜš$·DV•ìD%CHÕxS&‡T»ÕxD?4åAáœ9EŒ©Á'Ú¸½UÁÅ2r [SªyÇqÕxb·<©ÂH×maQb ÅZ%ãB#hS¢H;K)Õxbû=mAâ¹K&²«¡µÊÐ^WW¡›CÈjg“¡¦ú’ŠäÕxbû=§¡óu¹UÁ5q^ƒåŠÓ©ÆÝSÂ;L­fŸÕw’.ýåÂÙPÞS¡ Ó¥ÊÜFär6zœA[´»M­ \ No newline at end of file diff --git a/agc_2-X/trunk/DTMF_sounds/5.wav b/agc_2-X/trunk/DTMF_sounds/5.wav deleted file mode 100644 index 709a729f361f061537a415c9401ba69f2b70b66e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3990 zcmWNTXIqnp0zk9gY!b2wAtZz_Ll|KdS6#(X_o#b)FoZaXVJGsdKb;$j)}V7_ZNLPDB~2J|!9&-DEZT`mx0 z-DIq^9#FB(2B-*re&U~zFDyr>CqBZ~||P_yhZk=Xl@}8Ns0wYP4U9bGs^h`}xO&Q)zi%qpGP6mCP&BEJgpE(ilvJJiI(9Dyleb2;vMD_ z`L-)#WNPjWbpcdgS`<`2q zAAZ6ksb*Ocn{*j!ydXg z;0^RULWXaWVn@fYekXlJ_65Na0H_*d$Z6gx94i z67o^irU=Vj$Z1rUt5i8v(eC}5UzW?_=XaJm^Ns6iNcPR(iR0V61>SEt3(y77k#+LZ{REKpJ{NDoKfR{8c3~Mo~QkIMEkW8arv?dH33{WX*{9T{JEx=1- zV%Q1~sq0y5`2pbIRlo|3-kz?;OsbMn~->=^?W)lL2;WVx3! zR%x*l)(IC13((sK>cwqJC?b(L7On_1da`g??BleBwySNQx0p=Y$dt6a=(OOF=_eP6 zL;(*>d3|SxrXX8|>$CUKv&LmT-;c%wNf>)TY~JjwCZ9{W6Tc?(uA9-M9jU-YaOP64 z24!v{W^)9JINMkuY3fJ?&&O&q6s&vhqxyW?$A}8pBU9_ZK^=~O$k;EMO;|p%v-9w% z6tX1j5;V)6?Wv;XCQ~?zT=i{X;tIn|%0a$_c0OaY$-%edbxl z&ov z-=yvzTUQ&B@Fa#7jrP!kwUoEqDuPX$CU$mg@B*=?Q>v(cfsZWfgZnXqyOvMVY~?c4B6m(G=A3iHVR0e&T-pnB(Eg*%_qq^)@vN#9S!_R;+rGQ z19uqqXn2S3{6Knpg8nMqn8i!kge=p{A1QP016~J~j%hXbg5i8oRwo;3DQ>&jJk0aM4-iYtU_SvbiptAnGD^M)n6K&dlp_^yf!>rH~@ zDk6uCmd@1!iJnzq{m9F%B&P#+Bko4rA23Mow1!WW$(V^)e-st*k!vdCX87M>={8B% zqYkqT7xQKIblx%FtkGo#Phcug;)1D{>EEK~39~Xw$XC^GCCLh7z)$)IH{UzSy&>!a z@B8T8UT#-?BT}=BbUJBX^j_Fh`%iuVKNYjUOp`ifxBS}@*X7)0Uw6D5T&&#{U?Ev< zu3l$m5pz=~r!K+dC|qLL&^T-ZqmJ;>@AQcAif9}|W!v1gsd>maCvtJ>Y4*n8u=%`u zIl35lYg{9P4^;z0!VlR4^sD2Yy*t#U!D(ot&u%>HKv0xIRAMl6QMyeWJ^BPoWnUwQ z0vA1G+=a+B#C+rNR&o1j*Hhk;jBBhCkIWG5i~t5j zpgH)5q3^5*J#T2U1$xd_m%r`4IMR?sKF#}*$_o7Met-&4<1zPj0?BOIrO@w5+cOIp z(e?}K_14w!ZLr@>M~50r+o{_#YlUUV^8+RA6PgRa#qfjhW6lo$K{_L$Fv4rP-;8cO zX9XhfCCsLs_9Z*V;CsSr;4{^qv|kxSV!G146&)hW$0iJ4mx zlKfvt1#PzsP1tbS2=Wa`4bGx*d1j(pYiY{wSnhcjQy>si4!QSP7eeZByF+QCC%cuJ zUrEJTY`So z{~ey+1)50W$~Y!cEA8gKb$p%VfOwYIn1{0H+`PNP5sd#n)j?l%KS0s1>|uO$y+ ziPj1Ij4flsVo?Xi`7Gi@^fO$MXJ=p&(M9J$V+JdmHOl4qV`;aAQ}FvtMS7>3jojo9 zsx5;zU9sF5xhe6dJVQO4o|_X)tQkl3Ke8`@Cvr*?RfJn34Go&^0l$aS%{zvB2(I&% z;wni>-%7bsV%2V>~Zz! zvJ|GVE}`PN=K%f)@R9SqV+p<`{#1MyT-Tf4aA;7En!)>u^#NvbeFuF)?kB|B{GF3J zWVX%Rxa?5O*Zwq3{g^)Z6QbJ@Kf=?sqv^uROfH42akbSbz6{(8zlHhU{TiH3Xybp* zIp?Kz9cWysmWKxt;@AObmSaxvWY~L5oEhjYlWBZU6Xxc8%AV{zp=9Wb100~`zQ#Tc{k+Y*~q#x+bpXpj0KxMJdt_XXxI zfHVqvQU*f^rf^^Od`6rpp}$u1G$;B8+p}Z7&Ewd$T3*)IH!NRW_B1_v>>yPcwbGI{;QdQ zB;tetg9YzdN>5MO9%FayYkwd{#NYJF621Yna7BPNgPCC!R#bbQ(ZQ7QR`F-KK6Q4e!L#pYF`M;!FX;;dVVw*wC8 zt~Qn7XY2z?HgEwf4OY?pv2VkNwELTQ9jiPqxfhZ!l#}jyTQAImSA{^8wR5`W3)11t zgXwtOUd<%M3o{C_6JBF&&=Y+dqM4#TuF&zkjo8*@-WAS?n1hb;d>rbc9*!PBcMaPb zlVvp6?ZjJxrf{`=re!FYhPmQLjNp4qO?Awla#B;+@STIp`rKv~G6i|t=`%frWOBJ_ z6hkYOi zeP#V;TI)4bno~4IfIz|Y%QXu<5@5Y=m9}fd7WkHbCHqs3YC_(@>ESz$5b6j^1B+c$ zEEH8WKxjDBKM6p@6~^wxtaM&<$6(9CQo+Z4`#YyvnCx{qf<$L%ovL``0(c%^ z23C$4^@WJy#LJ@7^c8w>%Qo3M&uZ!&@(W0|yBql~s*YU~Tq0Z5m_A%V*dQq6n~<5- z5r+|2iuuIxjr>S&zPpJJ{m9SLfy?CuL$AOf>Rt#myUoWiGn3W{&0*A`iAH>Xb!c*= zm!1t<;=T>skC4#!f>mADo9+5@3|;yZ{tg(!_;g|`Yz6X=ovJ8QUV(r~X}KZR74tXJ zs=@VMIrcPszWtd!CG2qG?gR)T(EFj`@ZcHLE3TJmhq}N$a4z*!c(t{x6WKn+x|yTN zw8bp+=V?2Qn;`Xwop$E%kmg79Z$d|AEybhpwI3Zk6Znz%3>9#(-1~^^_(pE657{-| s7#P(MYvO-q6+){VF_1c<2wP#g*NN{r|i761SM diff --git a/agc_2-X/trunk/DTMF_sounds/6.gsm b/agc_2-X/trunk/DTMF_sounds/6.gsm deleted file mode 100644 index 2a25381f..00000000 --- a/agc_2-X/trunk/DTMF_sounds/6.gsm +++ /dev/null @@ -1 +0,0 @@ -Õ÷D;3P×2FêXL¤QÅŽEFÆFFyäD¬šáÖŸÕ÷-~ªã„§(Ñ;Em¦3Úµ<\£Ô¬K—i¹da1s Õø5~êåyjX®W§QŒ¼W™ŠÈÌ䢤øVƒÕø=?4åBÒã2%XW¢jŽfRyUBž]iðí¥Â‰‘ÐÎÕøD=åÂ'¢µ:ÅWB¥ax½ç"tí —)硺,NÁšÕ÷S<ÏÂØÖNH9W„ÙF‰èsã¤*«‘ÅFã·(Î/Õ÷Zûõå¡W¤²XWôlK%aå¡.ÕŒôñ¹Â̩حÖ4¹ê¾åÌ+Mìv_dȗ˱.…Ëñ#µIZAØÿ›Yµ \ No newline at end of file diff --git a/agc_2-X/trunk/DTMF_sounds/6.wav b/agc_2-X/trunk/DTMF_sounds/6.wav deleted file mode 100644 index 7c32ca3622960600b4a58cd647f297a98a22a74a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4046 zcmWN{d0di*$cl9tF^9g_ql$p zYnHBB>(264L{wA|K~&@rko)2M?e+QZ{rW7NIc-`E832||S^D|<&D;4@003bBHJJwh z`zHbb9EkW&)~(*Y`o@3P{qW~;CdnBp;5cE!B5Bwc)*Siqo~bB9+7IG?ut`R@nFC*j z{LYlx88Rvj6LYgZ&@q<)-#Fv z40p@T@(o6XlQ~gOhK6f*ca_8PqCXKALs6lt(f`JcV$|KD8j+SnD(C-7GC-YSe^f4K zlRs8gQ-5V7fxRLABvI;NhXavUs4J|Sn(np!7@!Ix5-r$&oM5m#q8=+9ifP)V+=`D( zYZbx~3oYY(`|$%Xmu9N8ZTKQfl>JPQ5;5m}XNMzQg=}S3 zp`gU(Z0%Hj2yzIUf|-`m;N%!EeJSmrwx{8qrWlz?^etE`maXShcL>M~4AUI%d?%rjzGjnnmC$vDTdVNDR zVH6^2WUZ#s^GocU+?AZG=8=vy`Ymuh0&O+w!|)p-ZssvkYoA`W)Tlvm(JK3DE0TCE z^|eSJ_Q>_p1-2a00bGxJpF2Q(lA_=pv9TLJwmpRI(N~b>LMi?Sj9(J%l*|47HDFIU zlFt1mVzU2>P;^wPpbfNl*3~>8z)>g1?T#4lI~{sXFJ-Rx_Dd}dDEr@IaEW(GP42;KkEScs9l`9BRHREWU-dQg zsGMt2Y5w5QTuWhOPv(N8ZN3K`#ocw@er$HoWSZ`I!fR>3*JghEayI%I`pFUSmzw1UHD{-7FOaeLGNW$gL>8Xbu0RLkwo!3PC-Cs zw}6<4fPaqSddrY4MIcLm8}-zQv1G#vaKAd=c9=RbKyFHR`cGuPNoL@LPoloI)hqV& zA0?g0DocHdF!r;Dpx`qE(JJWu&O&8h&y9{3yAO5$GLR4+3mUAmHIy9@2FiIY;?!brcVl_woz?~bq&yCA@; zq@ERZv%WB6>(|L=1QpE9lsZ2?P(+^`UqqVM7y7hDRf)CmyQzY}l;HJ9Cbt(j*O6Eo zIXs84E@2s!4WR-TDV>oxSBX^Coar8lF^evfqFg;tfcTKWH}^F!Qb#7dAi}= zTi5KaSgtZd(F&V9+)XsI62_(o}geV`J+jn3CVCI7T2gj>~9Ubj&98U8C~KI*8) z2X5de##9Clvt)y*f)`rZ^*{!5(c+I~mNN3~ zO~ycQ6^8H3@4_mlfyHT8-=}DT>60Si`It0C!hek(M_;O(H){^sW{Yg zg|Ru(6u{pnZh?%>gQO**nAk**y*W<$#>tCRQ;r96AvE=2LQ&K|!-KVo_F(uFXG`St z;3IzlZHM3q?uCk0lcU~8+!8mLJ}yw^@1+2&_d$3&v3|1YHfyZNK)vEU1MMKKqa-;t zNhh@OeP0O&QxK#(_FL}bxJ%fV#z|7Dl8HMkp(JaOc_yd56GcR@heB;1^%!P<_WAft z{tW{h+kLPx{9<5J_hT0j*Pr{0eaafwn{6e6L&3-)ix!WFOr4%3BqMasyF|8k$lpVE z40)zWq`VAH>h~~g7p3!+BNA5x<5OI-g(BQKPS+)G@ zn5UjUK>}+JEo{0_|F`U?@Xh#!m=nk}_i4mddL4$=AF6w$;*egYwhLwfEu%Ytmt-=a zRwgwknl^K8W@tHIdO7C0pc&ijUDjESvdB@aK4^?&Y{@~2Tz-u5f@XJsglcsZ52)N9d4J|C8&fngziqB|Kj6ar z=B_d-f%!sD`b5gZK3{X*;4tbL;T*JU^mj~qQj#bF-Xw=N8_Y!VR?6+bCHEeZJu#2> z+J3F^khIFPh#83dD^w1ZMzI7e`G>wkH_SU#55HvS_1{NJ7~UZdT=x6Z8Drf(JZUg^tPe?7hQydd*{N^ zx$M}V;PczJ)gIEP)9&*WxJEAozsho+G6TQ$qzB(LX#~^f~f>3xJ{MXy4~8(CuYy&l)Cl} zkM~K@Ro?HE8C{GJEakVXV(NRNLMMRcqi(vE_FmSVCm=E_(~QV6jkk{mH6j0WnYAR# zKvZVVw+TOZ|Lt6=o)~zAUhF{+KZK-wc6JO~XXutr)6~P(oG@ z^H#_8m>%&Z+V9Rqj%@S}`~q8n>}$nF#4oA!;vD=tbD?!QScY6S!sFzUW3gx zzcOere~70_=Aq-1zse<6Kjsy<)7CY5n(9eAEBxNOyVcRws9rx|6lo zFt&b%VsZE*BM<*SPee$`3M5qH*Q=^(+WG>xDcpWS6U2di$NHJKG}IuwS~uP#iOP-L zPZ;zbfr*)IbhU$VkwXwI(yAS2{R1W@VpU*1F4#jSD9FvoKVZoc& z1Yd#aliw!5WnO0_4K8hVYHlN{NjHP5NB4u)_^~NPm@8e}hHU+OLN)Dc!0Ot7HO4Dr zc0>4IWVnp{x&v*SLT((ge>0K%OOfrGGe^hG?AQ0Fp zYnEKzvjpu=s}V29&NGZP%U~dK)O5FVm3}Y%P0sto!$Fuf*>C{}!&aM!y;jFW0hq_+ z1*{*tRt`&HE8!o_)WM~|JW+HukGfY^C|4N!kn_Mi8#rC`kU1b2Av>VxUh@X9kNE@l97o z?vJ5MN|{=B^yoeiAY`~S?Hk%N0~FD*^oj_FrOZ46%tGI`Qah1-hw!?LHDUmDZ;(4& z5bi_Njx=;%GwGOu+>Ht6pkYl7>n-JjP_jHL~Ql ld?9)gd4lg-|8fRB@e_sA|F(wR<3OI_@+r~&h)^@*{{hWN-?jh% diff --git a/agc_2-X/trunk/DTMF_sounds/7.gsm b/agc_2-X/trunk/DTMF_sounds/7.gsm deleted file mode 100644 index 0260531d..00000000 --- a/agc_2-X/trunk/DTMF_sounds/7.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õ8šê½PRá•=:¢^ -àÜr(ÛžfMÑ[àE8‡Á‘Õ8¢®½áƒv†G—(QE!”fÝ…ã ¢­Q[…¢¬O*Ö©Ôúrû<ÓHWSœ€áw“tÖ8ÜÁµDÅÆxí"IGDèÔüL4ŸÔ:RŠÄ«ÁUX¹…¢Éj¸£]‚H䋨êÔûL~ü¹âãrœãA fa¡»áÖ®2·…_Á(º®9FÔù‚·Ü—ã‰áL]ëRQh_¢¹ÃÓÔø‚²³…7#uG©B.Vƒ³i]‚žM†cj…¢E2•šÅÔù[vª…A¥ÑåDy«œ”Âac]ÂÖloŒÛá‚HtR©FÔùzöô‡—ÃæHy­!ÕЦð«AqŽ8¨ã!Q‡ȤÔûc=á¡á6 áB)SdÞ­U9Æáñ"<55ÅÔûc¿=ÕÁŒÛ‰ømábÛÂSc_žÜ©äëáÂH¬UÉDÔù{7=_!1˜Ö¥•!‰S©Ô왩¸ãn:5P!kuÚëæ \ No newline at end of file diff --git a/agc_2-X/trunk/DTMF_sounds/7.wav b/agc_2-X/trunk/DTMF_sounds/7.wav deleted file mode 100644 index 6cdce5c18b06074dd3b0a8261c857002298e3a5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4072 zcmWNSd0f(m!+_z-eIF_yf+FIH;(?m2W3_czvvpXeX_sxYa;slvEz7O7?n67a%5|^o zuxoFJ9X4w#6>kF%zykyk1(ZYJ%gwvb^WXD%{(n|vE?A%>K_EGESI__U`&}F=1OkEn z$DA+-V>eLHB;Gx`j&vpYhR{J-t%0=`bhE%640E_RpvzNiCOO97Afg0(qG4!Q?mX6=#NKeS zt5|%jalJARUmD*SuOMYl<|*&!;Jz&MS3tBq!CDDd1?$89#I4i{+F24Mm=|$*+ECO9 zZ@EnJsZnb~w$e{iQP2W#$h!#FO4#V7jzFcAW1)l|!51lZYL2Es#P}q$hJ_@>CNS6g zZt9(rJG^eh79ZJ|t^3&}q8G(J2U=~{5{tgvcU7KFQ-MM z_z^#q)GDL|A@z1iLq7-fla2<~qgbv5?g%uV+JVV5Ii-(ei6D%#GhG>->|5D$L3B}Z z7}XT9k9!3--RhpGaZJLaVBi#2J2^1}Jtq>%H&LpzmCgJP+*DWSW+BMKL2s(`gZ4=g z`~z+#;IprBc3{exzti7%*9@F%|6N&*i%Kd?>!+3J=5}81Nwc<7+gJ}s_dN<*vF|hN zIBJ{in6i8b0fHf`QjSL#`Iq&aZ|oj;h*}-JDAq>)e9AeRWt{ROkmVkok!1b|4-EB0 z%E*hxliQ{`_F4KuooRJ3XP~ncYkLomorhtme0-00kK;4g2n7)^(@#^eB!^VN*v|w* zsnh9>@p*0kb`dRGf`q(6`T;-RTx^2^w~$X=55}5Dj)7=~Eddwl_ZRo>Zamq)5+#c3 z6GR8iGaD6UqfXZjj2HgV5oIMoYiKLN?vSn;raJq&mRgR5cBem$TLQb)U)04_OJExq zn}X`$d5-h$$7mhlHH0#DP_{;sg}%rCR#;76uG`#F-tIQOr1RpeY&GT>-L$L!9r9DWP&i0;m~v%@h9bZVI4PkWI^RL^#t`Q*vIq_% zvxnck+>*yWl>UsL3uDWpTjvciU~k#C*=w;;;Mi1&e=E8WC^W7e){oU7-$gN#Hqj60 zftEL|e@re7u1Gw>^TQ-stx9NVh9#h$x&JY5b4=hloFCcakhA?eTQ>ABMq(50q@7@9 zm|k?h>Qh+y2r;x$?0|c^^9B4i*?}#!8v36}k6LWZ3#s*d87x6|y@}R86F9{EDzb|d zZ+~K#WdmTf@EKs{_+7(g*bR;`4h(8HRJZ=t8Zhy9uuvEm>qf{&s{2>#6M*}86XKxr zj-w9QM*oH3h7y#2cEAU3A?7C-)3>nxXRPh=e9AH|CWGv%0Equ9TdjLPDj$P(n$^Ui zucwUk^GTN2<8Zc&)>ti-LKC9&{Kz1VJ#{qSFx`6s3G*MdR0JNL{Iz3k zTazJ+c_ob*G-6p?wsYIZATB^O9k4@S^nRf>r2+iu#TZL&yCm=@bSHb=fiB z8G%?rsD<4%!1_VeBiQli8sRQhwu#*Syv00T6_6jdi~9=k@5J!9*1i*d1sJ!L8Rpt* zi5lLDi2p;-205ZTy=l;Eu>omYSfANA^1}WHmYG-wX(fWIu#6Abia?UMBu7_t%RjGSN8=x<_gNfB44pU8ATJwpq z`9Us$I=UEb7~eW+V)>x`Ks+&{B;)0+lz42nKWz;SU)-Lgn;SZxT+-pHR>_Z?u zxBy`txzYKxT;qQn^M2Z?@I2c`ac<{;ZWTckdVrPzplmN4rx4pPf4l9Y{-Gh`2(?tu z5Pt|;Ftoq1th>(xawQ2l!RgKh&6%+Uu3JbZP;R?uYWC*S;JnxL57t!iZ!Mi#NKkR= zPl+S=$&q!ExymH(Y^s`)1>-n3dp)>jY8xU+m)JXR@DG1wRBC!__2pCu|{yfH=Cw~CofB5{OA&wG{vvU8j<%Gt{8)*j?b z%xm9XTeCZyWMl0QoMlh%^|Zg%UJ6hN!;@=?i`5k!_vJp&MTqY#8>OFX#Q45LfL^u{qQB>< zW)#Ghu+5-Qj1r}&g2;koNn#}VH(j)>K~3}|5OQ%#ecysjkO*oW<086fe4V(UFVWS_ z!(`lz+~+Fl&TQYQxsG`f3TM_KHrT$m*8~0NzkL6_PFZ8PK&awJ3+|ELssC;|*rm27 zbK(*=gdX$)qw%B9>= z0}!Y7XqzTaV#Se)*uA8@k=r6y=jV10XP>Z{3-M``%E5c400asj2IPRxoL}O2Aw(L} zy<9%CBSU?cSeZN_d>imyEA7zritWn4`>Y>{?e1+ht1layg7QpdD7zFsXJzQUl*~w| z$0epUl_`?3yJOGCd?GG4ZyBYUW7EtF9`i1wH*|zoNW7tKX<5~E)du1IoE{!^ z&DS#^=-sN@kC;u3#IN(7b@1VzC@zZGb4vMzgrM=`MTzmLiGj$@Z)T%?(y4SWFG3zoXqV`2%#{t)eX zS(p}wD~eyALJf)@`@EUgdCii_d>{7<%jUnSKVjJJ`UAm%8z0&GXv>&9N+P;$7}V zXqGlgeR`@Ez8#tCR+*1GGl<7H-?1uvX!-e;yrJV5k3f@3VIU`7Nwm_ZRtu?swj5jG z{?+*b@sQkwS#Md{A1~iwt6*?C_TepG4yW- zS<#0+B4|r{#CT&^+!-U0m={v(*d5fHzF^yH_arJ4y&Wu4-%?cDl);STt1)k&=srke zrThS*Bs!kIF<_H5TvK9@d#@qW{PQi*W+i|QdBdAV%`ud;A8Eg9EMPB8e;xN7{E*^P z_qx#>V0J(u@rb|5aS)P0dP&7V_l^up%7&Xz!~B%A`e2a(-JaFC&iFWROJo642z_f} zPJQ9$BP%^ly-+i0!w2EwM4fA%vAcgRV*5JTe_w z8oO9n7CdL7ytSnDrQs-THouwk0fsTC$De^K;J*S3ZOaX2`)}m3NI3Tta6%p9Xfg9Vfv7KGg%*PfJ(de!#>-6148Al$Yins?7(UYTlVnlfAYY8l7`|r| z0b9`xz5wfOa3^+d=n{4|tbQn=^-K9IAxno*F*v{Y(c6v3S4cbpQ zk0XPdhTKxRc^LyEj7vCyl*sFv?n)t$i{X2tUs1C`uKtV#53PfTxZdi8hDqq-(8{DuUn!nU~As7wt_eq@XUJwymZ|L8se?u1VS4by92d)3y?kO37?8@FH@ zC$!nTzbn4$fMG6)6;?po1KnyJcDzEoN8{XGqgxa$=A(fLiQmOdAff%?jc0q?{4aSl zfrNe-yfM-~e#PB^Tn%7t3(OV%k8~0bPP=Me(RHY;RQCg2o4QNz7p7iSFBT6k@sCqy zQBq+(@Rk>X&!SS`17o_Lbwgt4)|jw#dnmzz=v>n_Tepz%DDp0QCp^%cW+HflkxhP> zkv!_NRFa`_SEDzhmJKF19qtkMUq`PtqN6=meP?5yr5y`v zvXkYPW$R33m>(!-P*``b^F3-!U=4`@zLMJ|9r}ksS|KB80>@HDw4Ckha%)2V;uew5 XJKve|ofrfSA+R6T_(p5}Ih_9o9Fpc= diff --git a/agc_2-X/trunk/DTMF_sounds/8.gsm b/agc_2-X/trunk/DTMF_sounds/8.gsm deleted file mode 100644 index e931896ab9637a44a609d6c40288acf63742874d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 429 zcmV;e0aE_ecw=`xP%`mW9Mw)<4T~d@xZJ2Di429(vEoEzWD*xc)p%3?JcVN;T98DR z%|jO%#Yj3~f-MDYVIqaW^qn=j&eeE&_dQ`@!&x;d#hW5P=~YNnzaga}NBI=JWLDGeya_c=V)zx@< z_dMg_i5St&VqxHe+O43yP)TfaT4VXE=Mh)O7Ga^> zGLjtJse$DOD$%0Vcuccel&OPw<8C)&)p%RF^6{fZ zF__L@g`z&4hQ#@W;#N9RykcJ>wz;w%Y}I&Me>~0NDa5UG?(rfY2cqF=so}P}S`7u| z;+qAAQ!3SXV|zS>0nwV2ROIDh)f_d)N8@3ru&y4Wse#ue6}3gxw92M^VTUBK&Ymk_ X$DTE77g=$vWfnC>dsM88B$3G+CN0|n diff --git a/agc_2-X/trunk/DTMF_sounds/8.wav b/agc_2-X/trunk/DTMF_sounds/8.wav deleted file mode 100644 index 3ed04b3b11351fd161c39e8a4390f79746826e1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4018 zcmWNTXH=61!-k)XCwmV9gq08ofdC0ptJZ4Wt6H~KtFKnYy>X${s^HhUTer2fu8L?; z>L`v@D;p9LAS4hH0@-^{lCS6fcb)6+bZGghi9rZP}eh0RRB<-#$wP zfNwtq04PBEkE~t2d-d`EENKkSsVZtoG`cShu#C0Q7=jntY$f}UwEpZBX>wm}M|txD z%jksN{J#_X!#S4K-UxgdY{*7epRg8CnZiXma>&c>q8Ga(Za9ePL)5V*zhCVWDkli?(f^_d(k6+!Kt~zFOl+?>4vy_{&Pu*j*j*h=THr zmViQZqm^k1g5|BvylM+uQdFT`BlZIEL`M4yX9uG61`UdKjv4ypA4B6muh#jk=9Z*3QfkbtXBF zOsR8v^jKd#{Aw&}xiTyZGE?3Oe@mI`nA_Uee%$>>;vG&I$rX6(ISh+nt46MArpc)G z?!<(Wmsx@Ej;;^lMYb5>K-^)ZC@?KLlYEx31#(dNy6v_`PQFyMI`25*yn2ef+-^Zk zMGM0xT`ovrQf5XLHlUi>Sk~K)5a*Qf-{A;Wp6*lMTlkS!jYX;F$L6y~34UOB^sAbl zNbuoUs*l6MU-2&VU|?o+YKSzrqwk3i%lfCJirwkDBDyExc(zc-#%mC_0^4FM$qp(# zlB)njM@_kjw@Xg)L{W5Kt=!;hN6)~tgzkHB;J3*D>uVTZL2o*w8cX~}5aQ91^?IDP z(!T{Pj!v~+G%tkj%P7blL-eX{G!)BPVEZy=aU|$A7ul_V)*{dQ=d0(cvZKMwwZ*lG zA(OIod-tf&qqTa{EkH&ryPV%on zl_e{a8Y21KqULyeD=qtF#Wmms3@Ng6J==l>dHpQP! zCkFmOT2gPvZ-HpNMS4 z*!FuJ(9UrIMrK9vfuuUugZ}GUM05!%J^HhQ>+dIXvk0l6Z%s#G%T#M9aZldvE^f@(LRqUb_e$u4mZ(zYBYG=e`2c;cD<9^8K6UII{@T;bU<=N2Mg?YzCbhsVgt!og zM>mBJxz_>(*e4LZ?nl`fV*_=1Q6M)CZtPvq@r(Wx<~8GgSTNKQ{(z4%o*;G)Eo$%R zCu3m3KH+FWiFT7rW#qse7;JQg8x?)eaB!?7mfqLIk!D9%W}V6ZggWGyseRCF_8*9W?t$71=IucDROm^{OAHL(%_aqwhn1BxnSJ+MH zwd(0jU&_;v*K+;2zv5A5&JfAd3O^5lJG`d+*poD3-r6{W?rG!U&RgM!tf!f70?oU@ zc{9d9T@J4v;wp8%scE;153|Z$M?2n%1MVBNCCu~aF~QDAE54IFE#m2WF1~DDnAlg6 z$g_+rlKj`$oh*U@9; z!mp=q$RQGT*3~D=@g5`85_+O)zZ)!1tVo<6f%Me2 z`1LR2PZ!m4*8;Bw(=}8-1K9=~b5fic=zAHbxz9nWoX{Xu{(=+aC^(Z5Wmc=L5TGJN zzK8~@n+i_P-Yc|_%LivP0rCrwq?EVJv*0ctIC2}e20PBp>zykXheKRqX<5=E>jLp| z#pj{X6ayhM`Yu32)g_#!@A7Vx+-&v7zK}E_yNT9!ILqe$VEuI}Z zz_Fi9%v-{X#TIsJE?Go~fq~WL`@Pbk`M4Behj0ih9O!L3IamQ= z;%^d{kCcS)n5~R2uosQ1MM_x{hZd=k? z-(mD3(sv1eN?7XMJWRDSAqDVkPlln?Yl$15|B7AhALf!f z=OE9F6BT);YU<%a4WAA>AzRgUM)wF?%zQ=Y4}Tp(VEnWS#5}F4LpZPsBNLu1u;Jeg z9q9hjupQ1IT!pZ`bt5*-nZmkUL^^`XBqJIjM=i7Cqr^3`sh#x7S#264QQfr8u^l!=`^b|ig z^fmevuHB#7|FGwyN6H#3{WQJ8S^CblX!ye>|sn zYu04IF_5LA`$|z!SdHhMYYDQJ{e8x4@Tz=i!`^`aZbPmq^8jMM`I$K!`4vP4H|j`+ zZ^8e|`b4md{6T%KaY64jXekSy`X}O!=X8*YCSi7X4k}!V_Yo_%z9hgrX)$zM>)jWc zNZUqP2iy&O0S?8rQ1#w=>2lE&=e@ML5-FPzh$=X$ssIL)318r)dMmIM>D_6mBUh#3 z#)&#ReX$^clL>L@@0l-+DB%|a6#aTj95$ByfIk-%k@q%02CC7gIZu-RfIV|r1BX%9 zk>?%n6*^S`d>Oy4Xqft7xVsJA4+E48kh(pV96W+B)A__1j#&~^*S%oMfA!u>df|93 z%N{%tX~BBnOMO53^9b+R<;;WLEuvd3qixHQPZr!x<%d2FZ!?Rc$soo5*noF>N$>e` z?yi_d`lwMl%qFw5+{~phw_{##J90AIZf)xOUYm$Z6<~!U*cD1)YnK|2n9R(ebVTO| zREQAuDCUq!FPl3V~>49C<4oTuR>zdB6bcv-*&DoT}1bnbN(ne zl33*#GkDo-h!udXzHZY4ZxP+ZA7l~yl^vbUJ1nE(B|KOHJFKxe16srcXp`C8ztQ|D z_49(u{B6)(J%$#pt^i+~JdwOHG9&N@Vg}_ccvm;Avs!f%+brZ2*5glV3=)!VEc`Rl zO7NDyETX5Rq>UvO>APC^T@|tM+0=qvv`X71)dH&rA_XD-j}}>|HX)lonAl`{(Q>w3 z=-HEcFDEW;wSUBNHDCdwu`<(a)p*x|gtEf&OdyokIiYQh`*nOiD}^8lobm(6TD&N7TwT>2u-;5Glz6h9L}J~iB;)OTd;;wlJS$KS zOrg~!5TL92<68R$bIEfHx8>#`EgEfKhSLY0Mf~g!I}k8bsxz|?cU*P5VYI9UT%Y|o zI~h0Iw$r#a_#J4Bc#LZ8i|E+&PGL#>F~g>&cM@p0Af=im!fy1H`6nZO!I}fh2ln>9 z@qS=2OTBD?XIAIxuInB)C7%w3?+jdkG*eH-JrCdN&2E<(kqN6xUS;i$omOi5c6;|;$Dv!o3=0gUwDn2)F@OfB$VY9WN8ourfNf7XbD&o9&fs1ECq>NXugAZQ@y<5 zh3seOrt~8$E=uRl_T?f>sHk_Z@5@hyV(z0Kca-WtwNb0w@c3l|wUw9m0J?d>> zc>s<7ByD%X3U874L#y8ANX8V^rAdOu!DWWd2pwSzoiML-<&yfceHm+FmC`>O&BJk& z@3VKNj0Y~;#NIIcD7?ebqvY!Ia4YjK3Dg*F|K;YhsxOg|2a)aIkhf&d;F+=(Ot3gCZw{spN8*q1J3x z8HCmMTYr6n;^CTgN;;*avCFMWGlRq)D{j+bnWN<$9Xj0A_gjB`gQM{&dMcdHq6<>g z^H!OnX5MQLD}$okC2y&e)%Rn6ePg5-%Z*m@V*_H#k-9RiLkMe;MNH*F)nkhcVb%9z zKYfFOb=7UWWNqR{7fsbVgTeH(iv?lNf@HdmmlM_ZQ~xuAqI2q8EOTMwPHaxM#e;*c z)T(zY&x3a!GfAA)_f!8fgM&o6S)T@jqqWnmW^>QNuB2}@+L@vmB9uv0)%Zm|>S03D zhKfkCtpW8_s$}xwf}Yie;Zo(|7n11cHP!e%{;JR6s~fFWd4oYr)PqF1&jGq+XQt}U z!ARsCtYp>rHa@9?p!1rl*bj7iZt+r X>`0?>I5fHd-L3Zfc3dF6ZMNI4W0~m? diff --git a/agc_2-X/trunk/DTMF_sounds/9.wav b/agc_2-X/trunk/DTMF_sounds/9.wav deleted file mode 100644 index 1439a5954012827576236c3e07e7f2273bc4c8d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4018 zcmWNTXIqm8!$7m{>`j1#5dwq|Ru}=IJk`3eQi@=uTC2rbY^_M0wQfMgibbqiN9(I~ zAdWg(C)O=HKv-dfKtgs1WG8p_+v|Kg*ZBeG^Sp%%Z<8R9<#U(imX_^cQ6Ufr^grfA zK_G`_Lm)5+`9HH^?T)pF|EpdHX2zXOuP5)H_Gt5bSAb*I)G@SvA8mP740qJIwbwpe z>bXD+MqIb4e8my!_`k4^hO3&%ioMiNIdbYw7u?l>drm@FANJ-B9ERre)}|Y<6m`B5 z?U@5yupL#X%|l_+nGLLMQ!e3!k^2w~jfZwRDOGA`d0ED* z{)N%WDXsXuBkNnvC{B>@teJ#z*JHmqh!%9uyrk<|??;d=$^YZs!LHL!Odf}PhuAxP zRC?dIJ^~{MkER>1i!P3hKvog!APg%WeuDLc^Er&r&u=Z6d`o}KE+pnUgS>KL9sayQ z*j+iY87s*6GPwZ$wIW}m@-q+>CdovNQyLA;I!tG&P6-p`UcehfLcDe)AWkw{n3r8A zx-NGV*>*wKZL5^at3wGz)RZ zXnPx6^*4SyV~pQo=_*CX%3JGJz|xl_v`RtjE6 zE6hdWY~{C5B&G!98eW|Z3N)W(4#ub=ogMVu^hoY#&Zp{XTS0Wpu^wus;qEyMw}-m)?L`Or-NbpEOK5< z6FS!MH1G!{7IRJYyi+Hm2HnY&bEw{rC+a49pw-Z8h6cs2ekwPOZzpAp)eFyR%CIHW z^N=@=rI>G{uZCSSZEsHyt@KIb$Z@U6CQE~djE5iy%4;usm)+!08tA)W3 zUzvQmwE#JBEpGxiJ%AHd8TL@pL%)EZ2VH1HWPFfDJF`t9-i@**m&dihc1|5}vd}+3 zE-G>d%~nV34M9!VE4_I@r@e+4Ku+1>Ov%^>3AZ@;p84HRgt^v2Mp{G_A{VqH{|rsU z?N8r71u>ryN zVHQKTDY(aup5f(>FBs-~S0^&EQ>i7&Y4K;%vr&17F!Ln~jr>tcOY{ZHyY^i@zj$~N zSLiz+Bo`j{f?fjvQb}92TF&Urutb(R8#Rf}8f2aul)sW?0)*5@>2J}2k=gyjrpvfv z=uM6pPHs?8;w%P6x4DHOjzlbreG;}i@XEnMHB)f`;>ci^*rbbz&pN^=Ha?yxux$f4 zo<@~HqsB+1KTh87hxJwTuC#TL3kVh$*?l{xiM@^llNU7~9ig^?;&d;oJWwj z*uypbPWMlVpJuJ09@os1lC3$&eZFt>gGLkeK>9BBpVoK6OMSn(%R;}Tq?MBAwrT5IJanI5u1P4FSVf zr#J(Cu~&S+5l?u4SYf^IzDd8HD5d~%LlYpaz=_%KLO$`{1Cclmbr`(SPw9zrArsL2 z_mtwv5@o6jiag}-OpF>Nw3y6&oC^CQQHQv~BcSfaym$WYn@1mEzd$z**Ea7}>S+%X zPK21iSUUnG!>8C*4`dDf3;!+kT>1)ZsG@qD3p#;oF0OXmiVu@!_#*xKws!B(DD)(~ zgb?e_3j7kHjI0VI^yjxt7~Ao zC&(7FO0;-@2n*wZsdq5~4MCIX3k8BL|HvWUx2KNFw}TsFJF{}=2IY^P zvnPfC4dnn7;^+kM(MhcJAff9;$6vNRtW6vbmSH1!CU9jazvj4TkK!fGmZjz7xnD@# z>fQheF=5`R$qd}!NYcI{1|*1%pVfo-{h{v>T4ykFOC*}kHqGc55xM;5xLddiRJHMA z2MO(keNYz+G#Tn6O9jN}x#prlp(+$cLBZ{prhEunJU#gi{D1w6+y6A2r!9%NfQ$l< z1IOrOa;+}1W8csKW>abb_a|7d?z}~Y*aoTAq(}^Q3Y#tP)4$Qkd$cMSVi6AK9_Gg^}{JL31-B;%<93D%MP^VCx{cda2yv zhbQ1N50gF_YwW7i&cU+Dw|$EpALF>}GvT{Tk~UX2-*<|=DmDQ0TYvShBl6+n@`Iv{ z`q)T<;AXu&I1N)lXH3bpw}GFMx_G|=mj~_(2c}%)^}$%^PoNwtindtw#h4flR4*XBhgBFA>#ci92Y8xGEqO41Q7*pbH)iE5E$V)!i1W{V%zm%xXtRXLu z*YzDXl%Z#$%N=Oj05LDY&8#ya+uKC9yoD@91PVrTCL{A`MTmm2bm3;LF&vwvWWKOp zRGhQCM=bV*sOKuJ$W^>&X)VZgLt@bp<1NCE1e1F{xRV^onH{3iENfwl3CQ~R1~ZS`Fo< zkK}$p+RdU8gtFL{d}%J3mGYQb?A>R4?z@ULxw}S_hn{&8k}9&)luD&y=x5Vjb|`X2J}%pXlxJ6o$)!1O5f>c*4Q3L}0#z(pIHzXAm>?M4WTP>u0++pn5>{ z*u8NE@=R({h7DCCSv-(pabx>{+g6dImv$?O!I;wCZ7C7YK?q{@&=2@yz(d$p+9|(y zu)g!8DJAx5W@D($_(I8Zih<>>V#R9>K-`>>lf2E3?vLxoI}D`l*mq8;yEeFsqa>}A z*_!gDG~y91C+u(U273eWk~ji34ift>dM+k5XVy}f+M4kv_7A{ew^oyGyicpl$YZaz zYCBu{C7zIw6-2nF)ccmkXFWucM$%g*RnJ1BQYz^Z=Wf##C=PqX{>gB;WF`QnCT0X< z2FH6P`Su)iwqIqqU{}&Z((Z-t)djUJ8QKYNh%iy+ds*I_6lB=<{*nQGyKXum+L_iI z{K~R<(&@X5Two)Px)u9~2L7s)F9Sygi-rx(SGYXbX|u+?C0vx0L@kj`G%t`o!99sF z1R34C-R*=0L35pd^eq*A<#KV`()W_(lYgkoJUf9ywjtRe!_trqSuoBH`yZmyLwe6c z@-pN~N1q=b4&fA{FAp7TwkVedpXJ8WK7bxaBZf(MYB|)maHs*oW;*rN9eYMxP)2Awb{y;ttYw^vIuZ!(qqH?o^+qmCzCg{hJ+Q<9 zK^T`29H7f;2o8QAc^?EA6^`lLY&73(o@{cPnZKkFXw`B`D||c`b2B2EpmTj4$P133 ziyfsRZ|7XFkWs zHCVxLeM`J5lZuSd5>s4wUq4w(#+c`IGX`>CK|B@jEJmuCsT=p>5OJpd@k{2S$er1> zQLhZkyUWM^gj&d(VPm$Pudx?Wa*X;A8!Y{`u;%kZ0M!@oG>pd`wa0$D`gmswTrBU&N_+Yw_CQ^R2(B zR*_o6$(Zj!68sJQCt9sBU-(sT4diIjbfOvcw_&AOfDpi!=r#=>F>Yt#XOytMHh$9w zRVbiv+;R6U(-j2Be$UlHNquMAx()TACs?0j?>iNc_d$4Ko9=7j`VleiPP#rp1vRJ= zr&3|ru*}IV<4eHjvAAqe=q}aUE>KZ`93+tf(RLT=zYSq!f#scNI%@5FRvCK+W|#f8 zuZ1W^rK%gc7b#u^AJ6)hv)esuT%`+v>R{WZ8&z)tvUov;m+*g*OC3(lVf-B$3zqL( zggy~fOP_7zv@h!UC4k}HwSE(tvW;g?FN zOA8>j1QMzR(hF!v=*6|K>+Zdu|IaheGjraV_sltS6xb14av;c8l{Jcqdp4-38x+<7 zk*d<=p$r|RD0R?G!5U&H?x7^Acc?6O0hJ#fT0n7o02@NibGxK z32|xbc-ESBasWBa{kFTqXhFdgE>JTrv2H(~S0;ddrDS>36k5#37adYg!)(!Mefz$z zf_W@W?YfRIS-Pxt>i*r*pscCy*zuzkqcCfF>Cj09OK1yD2gO#GdZ>U)BNsLgkOyH7 z(w2$8*r=y|DFd@g>mfEZ1%zhWtX9rm>LtnFgr75PX5vs@ZGo-RgDCH)2o6QDF!_!`;5vV7kQ!#`^qDj;*V4E2nG2gM z@6G#alO+npaxW7R3Pk+wK%V(0m?_}&6WlQzPm)9eDEa*`l(!yek$IxTK7qQR!byF6i z6pK@_t*^JJcfn`UZs^#|O<$SGavLE2=y1CMWN#B}d0kOf(JxW_FoLC&0@kHYUoyP=^12)hX9e_mQt zJaAgDcb z;v~Cm78XWMvHvC3V&<%ed^fMDD!BdU$x(~yRQRf$VtJUoh5=b#OzMkm0HAHQH_$I( z2NKWs@8hBzqkOH?({T%Ta}7f2t-qve)ewjyo{M|;iPLKlnO?qHMhNKgx-odc6(l7cOmz+uPn_CrjGzO*<^|x@tg^~lx z(hnFoUSUE1CTKXge7DX3&R{EWJuB3=DA`h(RZIV~SN}UYMY=(7Ay+iD$H1oiB6Uu4pxG>m= zautsFUUIh4eDy_mO#edvmS=sQ17Vq4(seW z+~*m?*Etcx7$=8t2i8+M78P-8I9e%TK-j*itmH<{T(=9aepc^K(!VCRVD9@kCX+?6 zBQMFhaiXeI(2P+p<$s)&Q2^^dhYx8V04?a}MHA8sgjWVLT-+`@^Wp_U7}V|viO6f_ zr~0nNfESliU3Ddm8RbX7}AX+(06=w}+sECU54mhs+`9>7+9)T)!;+k`%A_QQtHqYR1)O9!tQE&HOj+Hf zO%Z5j&sw`3$C9LR-cZhAYjNyUNu1ONe!Y7@mcaT%O$x7zYlh~OxgLxgNmx88EB-#f z|Lr*YEH)KthbcT6Rmv$x3l`iTm@2sTBj3(1JBV6_Cwe2`mKK{zX!jD7|K1kUwLQNu z?5DKWaTnED7oh}bfBrL4cdlW_Hce-{i>egRTx!18jt~$z0_lNnCu5QNaRBpC!ESnx z9CDe?sc-T7!1ajM#yn&sL+}n|dSqd8%YNrEYUMuUqj{yEe=0?wBmwfZ7w(Yx>?O!% zgt;(�dW<)$nv!YX^a+JVs`^H1R%P$U5Ut&SQrKBtu2i_NIWx*x5|dLn5J-bNlL$ zS(4x$zOZ?o&IQi1`E()lqmgoeX0_SQ*PEg_s&KR5PQqX?q1OlCb^5j3)CjTbk(4_3 zGiLbd-89}FNFdHYa|P={!qf@yI$P8NBY_tNnN+_G;= z<3WphhKvhO)0074Q8=R;hjYX=@rbB9TLbo$6MAu_{Hs_Q^v{n9PBNC-*)tTOC`BGcLyzRd zjyrL6R!+`%eHeuaeT#k-%G6f|@hzW)`@a*62JqzJcdUBcHX9}GurVDtv)!?+Xu
    J!LP|^9yG;sZogfQGgZ#wZ#1tZ zOT-2@SiRY{>>BAhLU5Tr_U*b74!L3Jam7Eoc*C1Sg72zeF61(v8Ii@yr!G3CGnjix zKH3}G#!X@WXQ07)p9v40Ub8tujbBrVnnR9$$Y5n*XFpwt&yyw}gPUB>-$uqUw*9%t zY-wFd60N~L+rNd(-g-OnN2X zF_BSu4KQu5mX65QCt?+a<0l|xSKlVAG;8Y_v0>x-4S%>|B6FyOPd#{fYfJr3`l5@f zaCFONt`213ed;h)j!pe7`W?oeZc5?H?MU@MML-Ken`+E1%p1RhAJ>fWa?HjNE)9@# ziU32Q=uK2CLy4UbNo(%j*AI8uw|*X&sTv29Aw$qt*7)0`5uj#?9=dm?UHVH->C0@!Z?RoA zn5ug)FY!-J146%@ z^NLReL~G~B1{GUb4i9kG#9_Ch$(g9SU+W$<)VcFR;+@~TL*)i5c0yCBhs_)Y>V?&a zs;E04&iatjfd?4n9D&Zih6(WDCoRK3JI#p#hBVQAUppJfo&SDmjB-~}p9E}*H3+bO z@0QrHTNM>vZL&VX^PjU;Pw1bOn(@6)g$U14Dt0)N4SY1Om9tA2f>qRB zpM^hZZ_Aw~O_f)eksSFUk&^fk~$Zey9B^UKLVx7@$(YO(@rnfb#uT1lUbES#juoRF?O zly0oSSovxgud_b*>LWGexBW>*Q7UkJiBY@8OEfe2-=*vv{0+&g{srARMMTUcEiyKY zy{G{I(lwa1LB0vC z0d1{|_i_|P;`E4oP?56OrtOB#&ZDkglk0Cr&G531#h|DQ6gXQp7tgRzs1wVH`SLi} zQRDcN50oPVD*X6bR1WiYl^;gm4TXxgcL_R?sf zrB-BlZ+qx}Q(LhjfUgKXkr}3mTu%{{Z|F|jl@4Ns4cdl~66#r6kcnxjy7l7tHFlb% zr@=ePY@Yj=A^usjSk{ZzFGe?-U;e#C#j7#1+Ywy>zRkS6Lz_WhQj_enl+nSpdmFiu zulWNE8hvD~?455KZ7RmU=~R_2;%WbH5S1yxFlfkqb)h%9V+lj2Roh*{Fw^bdct{d+ zzAiKdILw+MYJDDNzxi;~=J|3C+vMFNGLCA-M(!oo6mBJZK_|!8F-P&x&{AC%(nqbJip|vy%9Mb6w4vOF2#TX)Y>} z{Vm&%(xs7^15a8KmT*{-m;KG$NaWCn0_Sm5*m2%c?1-#}PLBD$SskG#EnKf8Lej|m z{?lyda4udqr_&=ysinfPlPqmCqf5aPY+(3Lk;4KoS)s}Wk3RaDXH#K<>ql7cD5_YJ5`YUYm>8?l~MZlD%x~wZ0 zzqhsbjyH@s4^@qSR~kY{NvhZw8vB_JrKQ&%-w)OJq&vg+Ts^{eR1?_ z-;AJ+mK*1iWHeEx$?Cc9_Jx*bxDw!`FS?ZWxiu90&7Ntd- ze)vC}F?~@)YQy{@*oxOKkN$&)yHN2cN2|Vg;gs(u3=9+PGhiaFOL?V82Dya#hHBpc z1NGG>+=&3}dY^J{vRmhwU)_Z>RjJ0{9@zH7*ZlO~!RYFu@t+x65vpq6kEsODm;kg^ zdZDmZ)&+#pUpC-lv$J}u1-&r^DUekE(2GlBBSdC{9NoRg0O!$PnaxH{4Lj4Si}!0$ z#n2;VpqpCvB6u!V20_(7h^GJ2kUNe+Vf>nxfnb= z_hQ3rW0a%xpgxJUadk*Nu>;f5p-GK^iWvz}&Q)HSF?|p7sl)kGDbCvJSU+eX2QsrQ zpXgEUBWcYH=nTuJ!*%itvGhF4YMJ8o3+MYO{n*R7M>i!(AF1QD!X=iC^VsL(Nt>~> z6C7Vf&0FW&rQ@b(=)T$$Zx2cjClqegHk>JL<48%$*lRX-7z$;Z^nK}`#y<9-+1Y}vG8>QGSDF>o zo_a9da$g?gz#YXTU22K8OuNf#_W946!#s~4apdn|U(K;T;6uHbhkBfO%hOy2Mwu8)ZUc71A#F9FpS@0QGtbj`RF!ny zYLz<~e-33RLb|+}U%>D!@S|Ae*099>8<;h~Atsff!i%#0sooo_Qo{o;4WXQb&%>TWc5Wv%Pojifeet%bitL%evnaJ%EvXS z4&2<={zbCR>FKM`0y&sGHvSfL+(U1SS)rCkpa1J)J81b)suaA3$`RvSInPy>lW`=T zJI;S`1ucg@d_@J&wYfOv>Pwxj__DSs67>zby~eBxH8E6JK#{#E@&P({`jo<=+!c2? z^DbbKq7NaVegBhMp5*Y(~Xv$sE4mThxf`f z!1T^k!op9%-hXGhXFy4j58i@yhIu`+NCEX~5^VkvD{sD9ot*dCxfjW}s{Ys7nQc-F z#Pd1Ltz+tw5GOl?G`esvqJhid=Z_(hK|Xt;D1IYctZD+jU!^uGPEj6|0aS!h`8|GE6PdW*1+XLEt zImvfYd>|@RgWEDx$?DVZQ;%BiwMq*^SJ&ToX}LmhJrEQXA_~V%M_s#1E>Vlmt`Zh! z^P2-Zc{{_BUUP0{`yopw%*2uLLFiZzGsOEB_YKgQ(;dB`G}w4Z*-xt*pdQosL$T7= zgxcvwwO1V}dm$Dyj?8$N+YTEty8y?ofFkU~qBKceN<;8FiwD$bPuo6qXLOgChEbo; zsX5P1L&t{tlaj@hC@MucA7fj!)1+|0@=*#LvZ5Zx_+F8|21?qq18b!#h?$>Pnv+D= zeP@5yNXmc6Jif6ahn6}0_%^pKG@LhF9z^||q|bj{Sh>Qjd<=G3>|iQbf6@F^(_<_+IZ4Tjv% zWo_wlD!MxS1JN-&mJeyQy!G^iG&*pKxaJv=PrSK-!0Y#d0Yv&7s zAUCYkOVI84*YMDa!M)3oZp?EQk49b(-L>8#UQQ*2--Cnlf}ClEd^zX6_o)i_jnK?+ zVR5s|v~7>OXd$ys)Xm6#RA>t>=J#bR>#on;yQxY&8dNG!Tp_-j60PSN|3qY*i8|zU znh1?F{-5}8MV=9*>;L+mFl$b<&7wq`SkzAy+R5_bUeJ@gEDh2trfOmIKP^9Am>ZsW znR19E`hZ*()#NZgVPj6sYmp}5-COIngH+i=F>eHR>qO`)@sT2c+`yPn@B6$=S%!z< zZOSR*H|3qql7_`l4b!Soe3Tp;)xbYwRzD4D5Wu2w&E5@soNk7XrjdSp(a-Lb=tG*V zNh9q~%{;uM(et}tB{L3F&|b+<{2jSOd>I-+VYFnWHR+ROQ%d13U5Km_gN%0d*BU zQgv*|JdqYN&&YoxzS5p|p=wd`{IjcL$^^m`2a*%n045n9Tk!`RQhHM(wtCF}xwqi= zdBq9SiV0>N)kU=FweQ!i=JL`4=c5^e4q|Bgctl~|oo?c*zgm8P=FUhv2snYp(*7k%KsUZ9v?uI<^ z`zSHy33_V*+~UcY`dj?;R=tf@&dht~^*l>a=sV83X!GQ|wyGb&zjxU>yrMOv#aqeh zh9B5gJ#5I;#;dACI^rWI?aUfA?{@d&7^J0mZ5L;(!TpObY4kiJd#dVc_cQS|_Z4IV zZz?hjT}0svD)3I;EK9-ehXZYt;X%WcF&8lhwV*#z@V+wD)w1qKc~bR>|2|}T^}Qd5 zRzWHYw_M?h+nYp+RkSnxoJ6NWx3}VnCHgLJEvDNLR-&0ymL8oIp>O7{iKxTS(&wx^ zlvI>L2Oh(&)!$0cNe7S6_K>yW2gDu7m%v8fnyW#U4q3EC16l>5yAj6dIG|FHba z!V5HB0Qq0kgCehTJ&}2%`VF8M>OF+rYp{(rC|)X!Rrs3>!y1I$UM)4SBZxdpTei;A zFp~H8C$ij(8eAZwwi<#~bTA23Ohp&S`#vdteF{j1lE-c7ghXnQlaHi6rQCE{hrW{} z(Z-^pld4yu#(|Ht(qJW?&`D2&8`aSy)U1OJHFU7pGAJ@0Fy zx_@>lX@gVJy!de=4H+x5^Dk(>BaoXGWJTA{$F4oRDI|>yDE1@J%kDQF(mxi7O>e2& zN`|+@K7dER1cxw#kL#79SG8!#^QL(hA^hlhF_Nr~dYO&TrVVK1s2Oe&)H=^2!R&x7 z1Q>Q!rqCaWuv{@_9Q9fAku%@mZX*gH(#B!a7l=b?4Rjw(3TsyEh+r%D)WNyOnd%y? zv*yaz5H2JG`a&zL%Rg@7ZDc5ZceWuWI_Fc2Eo9!GIz)KW%I_?I%OU&9dGk97`| zTuqoTR}4oRyi;b?Opb0;EAdrhU-6~A>A8_~*Fd46SIFZLUf+)FOYh1NO>NK=*(&i~8$ETJPR5kGi=R%A!S77NDoRgI+V7Ea$#-G6-9vM+p!Vn{yz%P4a2=i_}4=X*rB`~+T z$&)ifw4@H_afr{M|8RZXq%xF$;HNnw?buZhzf)>m_t=T^7vLqqCeY#mKnbb3VW*fKHFKt}#Y>us#J_5e`P{8EXkf}7LY)fAG%JW*zgUUc z@lj_e-g}jBmRTk6bv=L@`e5X)h{)VncTb00eMVFnA>Pm)@<90?ykiz%L)`b^4HkrP zzKZ3)vCW-C{q}hFVo>egC)AbBxu|P3XDixWtL??}ddN^q#N_ZW@*q^HG=!B~gn7^z zLOKdv?R-fCcs@Sz_#@yS2Fun|2}l%4jNj7S2UHoH-Dv{o?e;;uq&jt)a(!5`G&3??yftm% zO72?fJXCnaNWdY|2E)ZOVFZ`W{J@iIq@DyW@@K9BSu+q*=9fwstkmCN zF}5~;Vf!x_ORJvYx{Vc2|L$5(NT^(kun;>b0FxXG+0>|O zdK%YPd5CqUfi)Qy4#yIfUm#048qr4i)XuvjI>-cjyE?1CvaZY4hPQeN_uBbxP-Pw^ zZgSBQ;Io5^wx}`u$X*y8fQF47OWrE7od#v4peYMizbV8_u76PeJaRED;#dOYP<^{! z^d{9^>q@(=pnk0kwt z_|aJjmYZzShdRGRD*?W9(e@wre%A=aAD4$&u@jQJ4T~1a{eBL&M%Fs3oqh8bnsR;U zYZ81W$%)u(Z&v2gNYusuOWM3%Dsa{J`IGYSEdA}_I3qDTXZ91p8vKy#o$x2!nR=;d zQ7L%dRyt~=%>RqZwwe?v$j0P&$S={QQI!wDRwn)))I}7+zmyO9lM9b>qOVI78KPGj zkf&*quSug$7q%?UauD#pR_#|8#0_~+W{s7S39`s6o{fq)u>B6qn}hWJ^(Oc9qcpL3 z7wn-He-A7%z!{2SwyYW8`(slGC)f9BbXdcKVO{d9`@mY_L~Xvr2qy-W0j(bRD#H!} zOTW|_MuYvO4T>;bfs8KSzUTdh^!;0|n%?|Km9;+Q&o zbzB`<2v`aFPCk$*ZW#i13EkFGTw?aKwZtg0H~V^i&;6`TzW@9 zY|$I~n*?)fCEC}rfDM*W3+qgx0MEUyPd6B-r0@>MeK{zY$&rwd7tg9cl=j=po2Urm zbzlk7l>w5gZG?8r=QO|)`{eXP0dQhU;%+EwNQsHMO&C)ac|l%qBQ94dVj9&p#W|KH zvueJ{UAUvnETi@nN~gbdazaJWIYZ-~te@brE0XloqoD8wyQC>u!>xVB7{X0$_hP^- z0MBf-G-X@9< z;6zckf%uJ>FbfLU@?dpl!k~_QRQMl~m%yozZn&*D0#$`fa1W&=9lsPqb)S6@gU!>q zym9%1830SS*FUgd{Gdx7^%`Z>c zJXyV#%e`oLyer^^8cGhfv05cq>K}sa7uRJ+-yPz)9LtErq5&2*!JQ=o*4LAuIbi_H zVNO*c!WK0=$;{^{5?^Q#&A3<+NEOH!Slp0JU(eB#RDYe7F1uH5N|yz%I>KjDyyGYE z9qTWzj6?Cv9Ocg2+OkCp3Gmg?NsMVxg6NS%W(;j+co(~*X1kUK6-Qj?O9l-( zAKO(i1Zm$WgZrsilpSy-#3s_&W8^BWQ8#t$TOo6-9)#PIInuF_-jAQfk$vQSkVxjf z3zeAdAcv%rygK^3)ao-o#Rwz{qQ0IA5@~3J@nT)L{&K1BhnR)Ffy=W3tE&68&o9RM zNd3f*6$y2(0>ydTAjjt^nI6rp$GK)#!OD=|8Hj7t#}GwmrUZe~tNYV^UkC|iIuERX z@x^{~AZI9kSy`+DLhq?FlhkJ$5wlRP`k$@Vh}<|#DL*C))Tc+3ngHs_@E1EA#b}cM zj)Y;W7{>lDfg?`K@vgy*ut;i8`krLi4fFnxc(FBghaL-k!k+wxm<e#oQ4o^r==9Qi8uv$kb-MJu04l{ z&KOM;xqVXBYg^a5`t&k#)on9h--_Ea&$VWZ!6En?X5_rMgX46!%pxbqIU7xuK%j(! z%*64e>f_Y2_mcaOCU@w)2hT$d2wtvuj@QGY*m%|4Bt)@4A<8U!ky-!_+xG|Ld=yc$ z{r4P~oDSdbmh%#8Oye_WiF>mb7_Nx!?)a1j?Y~_U7K0hCs;@o==`0u{hw;p2TMFqr z7%b10cS{=xlj4sV$)`}XnXl=ynkjwMfvJBKFwa;#RL5Z9dJaJF7S z1B^u0KyB&RhQcF=;+fo6WVBJ85Ze4_*H~Fk?w36TCw&PO8L0D^ug?fD zYZhqz7t&5OrntL?n@+_jvX^X581EMDM}yEjboFF`vvL#g=)4~NWiA_TN^;$v$^9!e z$$5Gv_QRX$QkvlPhO<^oozePtOlDD`pZAVC=0M>l@BPeXG$O{{hg3P1WK~{>ej)UX zFu3RL4EPil^tfZw&W{@lU zDjOl^A=kXnqTV6+I~v0QoCx;$GbbXNl-$c=CVYAtb34%kx$(k^Ec!qt$G3Yh^E^g! z0%^a1Q=N)?z;u#@Q4m_AD?8+CA;xzp?0R_6q5$jJ7rbvs(V%&6w)I+<6ZxsSq6+O* zBSzPiQvzXYNuTAWe+;`q8lIVIxjFm4P44OAox=AeEQyssWe5kby-J$2E#YyLvHG$; z*jtCa10M>wEG@B#B&^F2A-kyU6oO#(8u#tKeq~}cK~O*B!jo`~cPHtC#E1+8u`9=N zBeAJ*Ln0WOKL>5D=Mbv;o*E@ebI1U<1D0;SV^V!;?E`l*# z%`ob6Yx~|<5o8UJ*7njxlMeHywQ%F)Xb=5s8~7a1K<@)g-*;=kP(A=mLSqI)NdzyP zk(Jq?#X|++42S{pHcj5~kHRwe6)^!wts%cKP1j)x3C+}(ykPUX7zfPOfqz=CP2W4O z;j2G*f6(v`8-8!9Lx$N$FRDok;kVuos>dPm+Zu$jlt>MW*A$vGiI)Q>Acew`LLJj> z1x~^@1iJ>$0jyYos|#U(^yZJm&^J(i0gla#xNK(%7LL_`BFOp7S@}g`IWZH&$EJ*H zl&~mS()PU=)RvAwqIb9FQ-v^0Lmt3Y4P@NQ4$8@Jrf?H)SvyxhL%-%aN zvi6Ku!v#Wo!Qeyz+&VUtjWx>r{sa$6{`yFu}4jx zoQM;P^W5lbBKa;2OrZJ6x&AxcrFwlZn}D$~qs}c;8lNx6hC!d_NG;?{Zf3=*%aqhK zLqsH?j)C~v&VItz+nt_f30os9N(K)~xGu_~K$^7vJ59Pv2%X#W)U#uNfuWxP4qf+B^Wi7{{Ai=0>*e=`s^Vrhqh&cbDl& z&iq-JfmymZAr5%B>hDE)%3Xjq&L)YZIGMT=1YaXx8Bv2y(rEOkApqLU7@6;T*0b-6 zdA-yaRjGUlI=K=$V3JMk-d{awe!EF|z(9m)1#v#5mpm6rQq7|-1H;gGuQ##W(2q$s zKfED$)ETX|Gq|&N9-f>RN-}1V02kq_SJ1)$iO&$1u-(8x%mHUbj@r%cT=R@193`7! z1K~gi0C@^JSpT?L`KqaxS}Rz61LRm;Z-of=XS@+!1Wx97xyH3n{ha>xQRU1#o0Yj! z1Jz;n*CJ7p{kU3c18Cf&BoeoR3Mgt`Fv4bAERuXQZG_zi@rpIcY=(I6@|%9hJ!745 zt|h9g$1TNeRI_;&bLsBa%#VLrN>sRMyEQjn>p_!;YPWHVq(hh*uHB#2u4Z|_#M;%n zdNZN%#wOK-*r*SFJwu=`$0V*776~qy*F%+pCJ8RPsQx>ewTJ~+h)JqvVg$jb^RSBu z1v(36I=Aq-t)?B^MCpZFdc;J)ahsi$vIl0QI_trBMBNt@%r(0SSh}Q2mPEBFb>u-% z z2l;ql`3DTUo_}J*rl&ohSh&n^!tRu{%+LndX}b;OiIYvp$F%=Dcs?Xj%Fhkrk1&fZ z8GHY53?t{{?70Omk{@d|+C?6*A9MH96k=XNKPl!4A*V))jiR5rpCvVpt;rK_*3aBP zuV_PTgEy(W&B9NvOmQbBw>EaM!P&~b7aHkiP?^CKZvYbIJnmbd1v{V9+dB$myG z({v42Y$mFhRuvE{MKI6Qh1^sxY%5%}r+|G5etYywAPuSN@LF%w3N(wyqJy&+hPinL z!nXvpX~TS<-n+BuTEdN}!g2}?>v~Y)-MP-o_{@ok7j_a6D>U9vw0Wf6X7-)^h*2yH z94_=GPcIL@bZErmg&Tuat&HJWd{;(%pn6n3?gC~HQ;Xrds1sVdnmEW)&53%QOlypkK>-bWwC-AO#qhEac>ag6ANEP9t}@attU8>#q2qGe!;oG^@gzZ{9T z(d1*kKw{|yGzR@t89YX6huwu=Uig|o@*n}@9H;gZm}T9Ftd20x4%T;Qmj_jDg*J+6*NLyN|LM7WUP4R%zXNGGuN?v= zp*OZ2H;4rvmp2EAL~pYlDnE?Vy5=9Q`flIbpJ(#ns>enw69FpieI;A<8;@6Rl_$g&`p$yF`Lcr6Ma5Pg2SV~ME@ej3EJ(=iZ8SmcN zTs(KASzb5IXJM!1FM4c|rf1^kmc0JW%y`k>yU4p6?40_#{g$~N(bDr`jFdVyvfPH? z{1l;!bq6e>g$ySp;IcSppArg>APMPOg-491TWo%u-zx$OW-)wathCyKZ&qw#&m~z&po*W3?_49EK z65r@GX-_OaFYi-S!WlcR?+Gl5ynki*V6Y;vX&K!8`$m6*cfgqszqUyJz!Zue@Alx~ zE|PJ0Bqr7Ce#Wkjf>cRmX|saG581NKMVh_>XAbi`^VbjirUfYm4#0} zE~alhuEEhNng#cX`!^(5&;8eeX-dv#Ih8W%e!3l8v`pLSyK8E`p-YqsMcrQKT_nI-6eLG#+|S-Wbt zsKz`C%@rn9jK$FZTdP)x!uJ17gLE3ET3ao<&(c%C1+=XO3A5v|3S?TOYB@)fj`s*; z=~9#E_Z)+V&m)V*=9{T4&B^1IvzBh5(|nIxABu(@o-Q5_*~5+li+9BK*cKAC$<9a1KV!N7Da1=RZ5zB{2X~n_eFN*n@RXZ7J6|$$%Dtp z#@`A%`Cha(UZuQE4G@;P1hFAI)?)ijGf?Aep&TkZ8~aFnWnHv7UWLBR3yXsf%&_O3 zRHe0l24`pf+|az)%9Y0~ZVwl2u+7=w)Wr%hy|xu{gH+Z$8-`9S8fXe)^Z&DUL@*<2 z?TVoW(!%D?36!n6;kT!yjLoz5k5dyINmNUdZ{L4`)~1LQQ#zrT2DTB8>#}(*6njzU zq}dUts7%lgk)^C?No2NO?FNWGliGhv#0^L!PadJ^#GQ2QGl&3fHxK);Z>BcQysqfk zD6$+09oiz?8enW514OhwS$PmKJcxNDSr;CpMp9=PSEZ#b%HIJ2Ih&;6slid;EUg0L zCn8#D;JvwJCm>gIR!nkPd=(Xc{QbCv8gh`Lj-|{1%1A{bPeA(FA!cr#Gg4%E=}-4t ziJd17B+bXM{yS?WjBZiuE2!S~h44?wyj>->P)&k+|9n8RFdar0RPdoP>tfkOB3Rm6M!mv_Cndb>Hs%_uTNKI0IwWl^~JBNI5fRVW@P!-be1+rMX zv&J1HKn~*mokeJ!84tbngeMCHqlz;6EW=${*k+c-Z)-a|m1(3RLe)mW#M{QxQL&l>uZU zh2-wS*#!giFLWuf#h zm!n>SmLQCbXlYcTVI2YHZD`D)Jm+rDbR3T!1x5Wg+(*>+U5ZZ{Q^_rg49BE8-jJXI zMH084mi9f-qZ27h@Ms!r;=f$-HIc|~8G&lh49jY_&0<(7y?ZoPu4C&#GMX0v+YYAm zH;81}dWuf2-%r=vY#X?R^ydrMN^VwcWOPigx|MN%@`8AOMi{k9{X^S})bEKb_iCQd zqziVv9WTRy zTsGvxklBN~V_h4|F^dGFQ{m14-mPSMtW7C8@I6JsfcZwJ6bQLo%!MSuxnOkyJxGVs-a zWz`{S+dRP14e;D81H7ifSf_>3lsXjO;@^j9W6K(M1hPHUPRX^S)|~zl$bI-vN2Ery zA6JL00l_u+vDldJy!vuAwhFuxd9-(S@>%KLq)$gB^*HfP(z8*l^V!`SumdJ;Xz`tOCN{s?7#oh&A(QvFDcb7Z@qv^ zLHv`PlV%+XPfxl7T3G5|*)h zI<==7u+^5qp|U1|jM%|F8+BC_qQ1m*fn+v31-yT~=UO!g8<6>G>?O*SO7$RUk8x6K zMT6U?kJYC+;w^vwq5Q=wWB!DNwfXFfC~(~9E#BuMNt`TT&_FU_GRm^T3m1Wvu(f5AS)?!W{}s8E^983%%8pB zG|Xho`cB$o_=7t*QEO?~MHT!Gc#`?Wl63T;bP+V?h#DU9uk4D6gElVQlJ}zW{C*zv zpk1cUPq?!{GHctYj#0>r9G8=~sl75NHX>Z+v8&Th){c)nqv8kFq)f2M>1f&lB>Q>C zB-K<@ixEa?IB{neXm|1n2r%8!Xb@<&+N*5rB}d zh@12AOkYluG7?^@uNf9cCw4bqrM176%M%;WQ%k#Tqs8bGCl5Q>&c>o%P3O=}E%Jr? zlC6DalQ^#)=lyut$iMJ^==BZ|No3zDGz`ZR9nd16>!u4 zQ*<7FO=VjfHjXo6oo@t0r8t}vI##-6I7kbK(jgQf2>}8G1Ox^dMgl0(R6?(EQh-ne zse&c+szQ1}2}wYzW54P+_sjhU&Mzltuf5k=`(4i~*-M*#WzwWy&K>F9opy21jULQc zh)Sp)O*U~IyTPN*)t2aiFZJRiI>A4P4C5YbM8V%YsuXIJ)4Ja8(^He#TFL$@xFFVo zLPe1*zqQVD&ABXeMcX0#8Z@qs8pS1mB3Xw6$n(t6#uNeRJDv$2-zGPwZTV|XEuGoy zOg1DgJ0eIUE0R^pfkWh**{I!4lsviR z9X*1;{FUS5OXYC2gaV+viHd`|g z`&#LRNA&AyI7JuX9de!zBwYOMvivii=a<*(z!)c4!SS+Etux%e2*a03K@+v>N2zt#On2o6z!zd^N^Rj9L_IME|kVoqRZG{b?0(32jum(mT(MKMVy9{eJb@sGKkLXbH>E z>m~PjU2v!@g6qNSpDu99h@AOqsUyO5vHnj;zv-BP>Q>#R@m#{tEZ{&aJ@<+)P7&Oq zL+0Y>eq#~~y>@xECy=Gda<{x&1eRk;2E`oTlsSJ1E7qiZMe`BdQud2s^L6O^*6pcw zGJp;-*DV&*q!d>s!VtBk&ZIKHVMp%y>P)~&^Thon4s=vP*^|fN;r8PeSZX!s@w*AY z=dc3xYRvhub;_53@ono}Q5|DEA7Z&+7~ZRO(R`1H{P0^$gG;E?iMs#hj08G;*-E=h zpbb^*UxP3{m1sN-a7VZ`&Bp?}szy(vl(|zls=Y~hW??Xytj|ZAT@lSTHOIG|4=90t zDsWB=tb*2!8H|sDBRS_HyOak(SM2#?)aa#yg#6A{ZRJpq^V z1%1&u)#M^ zYInDY&IB4ln$Q}L0LLnyeOmm(DSnlYz%jY&Se-lQRFZ$uFpWGxBL_)tvBU={1I7Za z!s5AUa2y}gud@oX>{dsPz9sMMPF&DX=uEbI2oDRYD-TUfu!e+@RzG-yR*2hsfE+9) z*8A(aKZMG<!!L!vY#*kZa}i%3S*O)g8?hxEl+YQ^(>{{xx~oc}WA zJL4A1aA0zzaE4`uBi`_YSbKDM+znnuO0gJgYlU~;70&>Ug;MHi)vUfim2xQ;)RHtY zBY1v=e!_g{(?*fGcmPD{RBG@UHWeDI3WTzF-bS=+;CNp!6N;jhwhl22WF2^Ja!jBrtkC-T)69mHN=P&_3sq?YSMW&suE`)od=d1}6ip zE9TKB-vCFeU35i4z$KQqzQ6|cM_s!}yn`V%`-4G4Il<>-D`@pY#Kg=K&{^}@lutYO zt-f$V&OegjrqM3-mj(`a-)BwK-S2n40~oSTOsu^~{}%SwKs3)U&a3c|4Y}#KkH{Ss zzn*Z`v;>L@Hxp2bw%^Z7vXm6@Mh_&*>!&sYO*K}{j|&@;#in4f|qR3zi=m>di1^UohzBY@_dPV+JDK{5tcLUuvN z_2dV#249)siLu~BalN_50~}MYUyS5o;=Pm@jd0gOu74p6=WMV2!+=x|b!h?z!6JV_ zu{{Nh9Iwhy$b20)|MzRw)%80}{0*=_EdE)&3>+yYTE5`drtF7TKz)qBNkkRU&rNCM zq<~yP@-ueoFj9h>Jj#{3tC++hKC2ek;e*EvWR$P6^r3}ccRAMG!#UsEXW+pP!{%4t z!;U6=Rd)J@>hp6DI@iGuQ&X!z(Rqy8?b9K`)~3MiMN-k@#D`n6)c&)IVDO2&U);gl z%tX9=&~uzBZ0&pj&JLGHTy_W`p69F9mP?3;@#~K*(mXOPYBO+=Lb3j$l6&79w%d<}kbRzFStGez%#g6ow5OpVb zk)S9nZsJQ*Bt|8UZYwx3tebE?kW-SO?3sUJKiA#Ijqto&tH?3En%44TfYarC2)ND?#RB{5;f<#g}Mt@STfG5eHwf>c+$LqQT{ezr~PI68sPT`rBZN(02_D}oqm=PLUZ<^R;iWbag zG8_b3h*r)?;${&!RO8PpV_|ipgOqb)@*6`vn+0hd*>p#FZjXfhKE*_sxx?$*rv0DU zIK5dT-P7I3^`9sV)Qw?BwfHBl?6+}E{#_$a0%9HVbB1mTOYE02X%5#49e?iF@$y-+ zrGoP}SrM2s>ZqCb5t-M-b&t^pf0)bx>S6Y ztIKqH)5_~dW-^BV$?=zRH_1GD=Bh&_8t|{bd3@&WX$-lZUcNbcfP5nbk<;bR*Uy;j zzMlO#G{z5+Iy)w-nKVw>b*ZJynVuG=8VVTZbG73z_$7q2Fw{~Z!grbq1?j&QFrQE$YSv@aq8&21N{X4L(2ZF(a4=Q*#(R#7YTq&d+Q}5qg zIX}67TNccF)?7@9-|(V;kGajKNjmcYD0gJO&MB*Mb|*@oiuP(?Tz>!HixHl_0{`st zi{vQ9+pp@U+ze$lf5YC6md|^Ug!SczmPD?Z| ztL=?D$LRgqt^pzzPtvN+=R^xdCiwrF{LR`okuZpppJDhfNFr;8q)XTO_^*!W9w66 zHwE4~*eJGbihsP3aUO2|#crWNlJpy)C)}jnejL^2@QVLid|fxY{wgWnKX9q4%qiTu?fi!Bo~*j zg7>Q^ysNWhO-1K`*(6{VKf2b|44_SpFg4h`$U?YcyBXqQmZ%`Z*X+F`fuX~kYBkL0 zh3iUl&1CZ>MDNO3IL4^AleyVaP!ASP-%%?(tx0}?){L%|@J(p5M{Cdywr!`khtbQbSzZZRr2*ycj!_YQFs{Duh8h|9ts+{Y_IsCV9bpkmJ(BjA#f4cn$WG# z*yw_u^cve|5e`3zYqryeP8_;*4|ZDvUMk@%PBe2O;#3K=lgth+Rmak=}F9qCIev+@tR(=UmV5pdho4dc$G|?H>>mg6q$2snxm*Hn2jk)Tfy-p{Iddl?Hjf+x z@5NT$PBO4x0sPjS_tL6BIOoznVXm zI-Z60jDD-Z7iAoFtCj8yJ&#s>13JI@V}{KKoVwj=jDoSwRfp}52tz%p_XopDWmnF; zSpoao{z8W)Qb+ak^)zPzZpw{FHdhpR7#j?`5&V%v3VkXLzYTx8iM>)|Ut3H96xvtr z`?E_U=cxBHrs$Qa#;M?7XEAj)3UuCd@mX#M4xT9CX>v;=-8E&v>*xZ1!))7LP11d8 zA-H+(CO5hiGRuoM^W^&Cf;{FI=lsLqRlPu;2)okaDV>m$8|uBW{JPstt?Wa%1F8em zv~J2c=})LU#J!%g4pT)C@rLd;U0**9EpSRa0%c54uPDu7k%sl5#orP^(nk5dQ9?58 z)nBPbfy%K0E%t+_%$Y;>kuM-yW1{1Qmh^F74-4}lmf5vChcyJ+8ES6WkO3pcaO-ne z_@h$i&g)?K`QphN0WeNWv~wU|BVMi28>{<{`6i+WbS1rW<|@@cYSHGha26x5!S*n> zJf-B&=1}U!?a_n>*glz$9_$&!NGb7EOJ|*qDDivAJ#cNozh+4fPc;{(fX;B&%ITJ; zqw0Hq9a*BHk!9hJIOW&0DXTaPBE!*`2wHP*x|b)j7B>=g-+E#NRjA@Q&f#3`T?#;l zZYS}RvUH|=HkW#Yj zgoFYJ7<*sxna-km2MvuBU~EUC@4oj659{5N{F=boZ1!N|3!Ef{T?0N$s5RDai9Ff( z;w=q--RU>2=&lJ)^uSmXdCwPQr@!L*PYxS)fBU!5HW;-Q#Opi78$IGc&hpG?Ybs-; zaN92$<)bKB+YYCcY}nol(_V>=BlAcMf>S??HcLe0(cN_mUuWLt#W;&z+n(QP|A@39 z_0~AvDCN~s%PZHQB9n&LK#Z-wR3lbHLQYC?_T80EUQLZR6!L3Qi)%KZon8*%Z-Nyr zaM#|k>|yS|;?pL1t3B-BO$oe^t8+0?)61Mf>ci|^5qU35i3zJJ)=j4$Cr$-y_8e{I zn#9d-+@3BST&pM~j8SfBYW5Fgh>8gr-OR9Jss`sfeJB zTJ@lsbLkq3anST@nQMe={VeyypA6N4zsJOB7Df?Hj$cZ3Co>Cx&ZA?D3TF#E#o|}) z@zhmZh2i&Kxv0Rh$%mCWrdi#FUGNJd;+h8Kd$ye9yvsD8_3wPG*~%n9y6Q~Q$RC4a z#bvIKHyEgcTDQlZa})9U;-S&MWy`0vn(>SExlWbMKm2#s^HRlHR@71wUBo?sNepP; zp@WZfHTFl4K9{a-JUEX*uIpDXWo9S}Ef8E2H!8kx2S$~2L?obo!5{5X?O5&+Z&`&d z(pKB~=q_%{ANvulxG(rNi-0XyWu;Ts-9LxwBI();i2(oEWGX);qUEDOOAPVH$V3c!5cmY#1?1xYC6>| zbHrA<@II>P%^cHzHe@~Gj_0(g4EMA)Yso#^o`6h03>SkAl7&E1*xa$br9+1Tla-h> z*phs&CAt7RwG~e;;b8)FXhYCAl=HK85jhHRllSZfc{jz?sW#hY7(=SQz!OCVF6BTL z7ji*d2)T#mrCM?waKv`Gz+xc}u;VG2K6|0G3e+Mu(MyvwNNO=^O!0tKuPf=iE`p8Y#}v zt;kti#`0B4zg`Ce5!{QG(@Ly?5Z(`3Xj@p^yq?}CN$f2oFC7vWd|zH+oi*ZGuktmB z0(9i!Oi9+-L>}C!s9ta96Y|f|ZJss7EGy4b)^+@9ik5IO1J>2){2_#8XY`y2y`Va^ zGpP7Y;6t*0!EUZkb?86?kg?N#Ad#TDNTu<5Kn6I~qu_7xW}548ek&z1ChlK_ii zf5TPo!FX+W8R*i|rrC8JOhhJm$y>p}K+|HCRO+~A+rXb}^>|E^PsSx=$N2vg4@TYS zy&bSa?EHSuRmcZNVDAtdww(pAI1A0zk%=1E3A30MS_95Kks*V}87z25q~k?Do#{qX_%W`JOetW@YunwV}w33w|3zEWt`#F(d|llFT(# zU5Dw9>>KvrRb(7;nuOSe1$B@Zc4k+K)3**CnKsYlY^(H2Akz}$Ean0lnJ}ZRI8Rz^ z-TT&*)s{)=_%GfA9|Ojf+b`XhuV-7*h9CX5yDXxZwAytl#sc~0O^0dXt|AW7bm7W< zCqbl5$>!Sdb#4C`5qF0Z{j+ZZfiCAn`_ZH14b_Q`KMGcz(3^3YzsO^)n_`C5JGV|} z3GMBFWqE6c4OJ!Ate0{F4RmQF#`OCh`%n>!o%(i6OSIG!5YaDuMt9@H^$2+WaY0dk zQX`q0s%i^Vq(1_K6lUx)48y$|hNmP}oNE?ir*|IS{9!Nc#4$vyOvfny6XW{OS@rw> zb(Nm4M_d@8zSO4$!q$z8uRDpvww+25(Hm z)7Avy!hQF-9rz;%8amI&W2`D~b*xa^Q){OF%%f&!N?zlbVO(D|_gz3Gy3+~=^Dq}uSn?p}C1GN{I2T6P)H*427PwnL?4dVoPEoZNiKTfjTt z&0V(}*CsiQP=-(Kk2gKljx#L4>q??Bcs1@0NXe^f<)U%q{Q-(2>edn_AV>G`L#mS6 z;_!SU)2g_n?T9G2No_7<=;(TRH@bzj=TNcW*&O^5t<+}?3-sWfE`%zRy}G4#kk*i7 z8QlS-a9o?HPq2H=T@-6eq(n;5-2mmCyWiXj;NjQScYA;}GCXIIMZnH~=1$`~uy!I> zTd4r(!XjwOTpVThF$lUJlsoG^Fs7UheJAq{9TRzI>Ig)*TT>;O>CVLeUcGu_K<6(j zTs_TNDjnUwNR6n7KM}=QE`%yyv&=llt!+iplS8@Y>G%e75$Tm-P~&7Msp~Z7b;_Di zQA3=4rMWDAxiI<}S|U(PNDqA0B+A>Ca`#{2Mq}EH!owWa-kFPunJ0Xzm8>R2&s}xD zA~y2e+RYzIxNT^uoI5=1OLBBpvTy?~5^SS}dxl)kt8;JUF25pvu7=H`Xl4oJ8|I*KpEaU|wWM}Rds0s7spP?Yk53{P`~_@@$B1+o zQ*f;W&tf4P%Y$S9V=2x@9uV^6!hTEA7K-Vv6tsQV)B=kwx|wMRy*dv0 zc|oc!r;rrIjUJg&wRBAfL+TOle3&jqUZWR@f^JFN|0YKn_-j_T!VIEj|A=JPNm6DD z*g>#Z(mTf*ERn^iwu;q^r*L| zcZiUce(v5-=)0~-t+$J!R3+)IgyoJ}{IF30IM<)TUl!3T>neI-+Z81)FWAacZ*!b* zNBQdtUefsh#y@S~vPj-3nOKM61AEF0D_}=)7@G5Qq*TJ%^kL$M{XEDXM`_@ayd_qj$S0&e7 ziOGJtQ22+@l|NbL8C5DLtifFj0B#;rN6&2S(qGs+N((9mg39+|IW+RL$ zmsfJZ-$PwjkBSKFR`D?OSn|xFW-jF8kyd06%ci);wXJ3p>^(xc{6B=gK@^^Bu@lsHhV2y>tZ0sdj@l-^MWRMFQQ8i!dd5yLSFz}toZ|HdVDR3YQR5(+j7}HV zog(@4Dm8`d(8c&d@dPm?IVJ~+pE7vmrQ$`%OtaPen`n7>le)5PE^qEXO$4Bi9rKCX zzBu|yqpUJ1y=|(6&i)?&KVTBZe~7j)BG}0DgA4)*HpOpT?70PXbsw)S7Ks{W3~&VS z;$_!Ih{=$WFbh3y5UXpW=}bd5WP%Uwl!zG94DmhSDy`L&Ge-6)E`8E}}5m2}34ywTkjURq1L#ztpSMZ1dLR^?#HUbTh3OD_>Fg^lD2Lcq;OldbNzD zFB6U}6#`x>#Ipet(xf6+VSs2^Oz4aydm>t&ht7fKOP78(o+O{%pK!1v4@7wk};1I?SY1U~yG(y+$3<(;7Ys?PZqQIpX<8J0ZjO`Q8eG3#RI7bl-Aatv>n=XVAqhkCE@^oqpJvr<$z>ZUr zY%J1$py=#gWX?I*@e@GxzvAtO(G z__<9(E2kvV9U{ypJ~9&!&gj}m)B6C(h@H4W!-7orwo9Q!I&D#Ls3j3|+Ca7d;b^s1d)5KeWwdwhAlXAy zqWvKgL|2$htB97_tvGiZ#vmGX506y}6q0J(u~&Jn{v~DGzCJwA)hTRH{*x@|F~_?> zYaKK@IoBU_4|G&9c~XLhv}CakFGUdpMCy%g^9j#SWyaKvypuH7-2l%qj@b)qSms5W z4%MQSVJ1ERTo$h~y*omx{n5R+p1R`JuDT*NAb91hFH^1u1uYho&?0>~-JoGllGl82 z2%Yn}OyxeLTUlx#5=ANl2cy$Mi8KahAxmCTbI>arN();fuOmc35uLm(qH_!kQ$bGk zvp=c}0R68qDAf*~9um>VE=q?T_{FYTtT)`cPR5>ASu><0NF4*)2T8sFR_z*-)~hqJ zix^m9v#wi)ymA^DV+^tF#$*im1~}st^pTCjGvL44f;DLrRwGsFkktpnmXhXd$mw`LT$Y zY|u_j`ivRg_Ms}k?Ls2f=V1&(<4rnKGfnS;D0GG-dJ7`oO+0RL-x^_Mz=Y zYQ2C%v;Vm%QTWhmRRIRXS44biNN|Pg@qAu46{o&!|y7}{$!snEZ32((YFbgrdJ6Np4@tcgm z$Az#+s1pBKov!)6d8uM$;8a3&ln);x*#RN%9$oFKP1C9GY_^*l$3{|TdwrE#F#}!$ z!6r(Gjq`5tfeG_O2mUnsT0lz>FWEt8WA zpvys5S9cLZ(u!y3JZ@{rXaa6?(fR5hrMMfgM8PfV&z^v}X$d)Je zB8TL#oE$QD5!8!Q0A`pCI!C!btZ61f-w=e!s17h}&Dnh6j?PrGVfRnmbRPY$f_SCp zf&zEBuE7~C$h{7W%Ebn2z7heQ#RO=ubgd)SYBwUcd1IxXq)(d}OM3M}Pwz;Su9pVBx+ObBfUcT{;8 zsJ{h#*q8VL4S-?0zg^J-9iDRx!B*+&(zvbwyVh3+G_l+2|232|OF*akxT;U>fW0Sk zU|zI3O`?X7{T_`WYg)lD&uL#t5U4Jpz`Nc8Cm%#IAZ1*b_!Gfi2}wBb!%EzJ%{Q{L z?gql>aG@}y-z$;%Ka&myHW;ffD?F&%AT@pOZ8;c9evC`-W0%%_+-E;PSGrda5M`iH zrKal>pNyoT2N$l?@v%(%eZ$+j2V$E9>ljRKGH7c~d#HM~r3{@+`Olfh>AtmVC@b&ZjYoU2<;>vQQ3RU#G2FydXAj0qnL$` z6pF$ITB(ptQO)h*YjZHeYV=vvVaT|~b*wl}>Q(dA{H1c)w|2y0t)~jQe<>$BwlPg> z-q?(m#GhS!vsm4pyFygj-_*mCb!v`5>ec1xYZnqk1!_S(A0>rkGXt@sMEMLhcP>=PCOKW0hq0PSS0zwdo((-coo z=9A1B6I@P64Q9>d|Kf}Zj9OTQO_|4n{u0cMi5~bVGDs4_j@YdXu{~Q?k8s(tC zZ_6~i<9l@&G{8^UpAgkc45EFdeu`Wm^g3X4_QFVWDriPwnorGzD4h4#QAA-J2KB8? zzm9>tf(7_S5$Z(=FzaswN3U_4jU2*-T+#A~A&&gCS8z#P5eGb>CHA&RL1Rw;Q7Qv# zp~4$fhCiDaDT8qLPOg~wk<}{)nZy#n;`_v1-#li z!mfsg^w3)$z8$uyFuYsB5iw?nfvGx_8jqy7n)IzH1~>f8wl0rv)^oEgbIBcDu_#i)Z*?IBVODp$;FdgsXkq27WIyW(dI!o|rV~_iFGp;^J_i(^+{!+NJsF7nr^aPU!(T=nv z=rH2rBzzh)sJWvf3QJ#!pcm6cj6nk$1oYh_@`{Pz*UDOBQ5^93h_k<#1f14QNm4rO zuo<+jIx5YX5xxLBDfJdDc>^P|M20mZz1b?#>n~;gz{Ew64PT6)V%lRfGaC)JQ_Xi*!Z;T#tTOwRsbLz8&yn={e6T^9K~i07tYb56J5) zDgr{+<4+x!NSA3Sle}iofs@u-tXz{+M1s`H`i|uq7HjX>+EBH^8c0oiSS1Dw)MCyR zDie$_&5o!4P@8@#DBH%!GxEAy`jnmj>F@Y8$hxe__9B(3dy^&&7?E83{XnZuzh^?{%eR16Xrh&f3v-&OAWkbI%YfQ! zli3mU>Ce=V77qbaZPh2*VRcZPs}0QuRi zU--5P^9$@8EVz~4PBzr>6#{7O`@4da38xf~0S+6u2pZP64KV+pKd*aAVG{8LK`hO{ zx85qslC}xq4f8G{n9CYqCi`6v3WV+O1qX^H_1M& z)j6!w;_O53ssJr(WBREQg!sf_whcW|Ai9o$G~T%jjopD!JUMThlPum!bAh4cN_J?5Eg5J%=r`j8X6R~`vP2tyDewc(-kdAFN8FZN<OrT9KJA?|6IM{d^+nPQ-F6(!TkJfHPcsljxSZIpJ3N&RYasYfk@vqiIMd3YoL_ zPFCajT{-H1WVxFp?WGIuStZL2-^dI{xJKT4njy_Z(qeC6(xU&Etw1y&k@70h-$ zPscAUu2UZ(vYaw^_i^VYEk$m=Dx{x~lJY*JtNKk{TQTdx?u@Hx>Vvzax&QVwa_Dzq|c+?Y!q#N5$ zl0@|1LXX~bF-pqDV@4i?^pV_so#&22-!(MV3y0R_~X zf}0wZ3CZy5uLYvNCXxIV-0tvHy(h9Zr^&R;Bi)rQFRv>wfxC?iD_45o7fwy_Uq{-n zTpul(LF&G{o~HycyPP5Ge);p==~nWXeaM!h8lPbJqB|q=w0y{J~m?DO@U zh^mIC@Gey1WC$nN*+7>4gB`N1k2?yq<;UyhPLB@YJA}U}8K0p+Vuo_8!0G*+Os;WB z^Y4uFqXzGT7)V zMBPW6#S}gHX34%Y-KauTyTv0sDmYSb0jZR^jMg72f_ZU@A@!`Fw42i<62&}iKhmf=Gn+W1CKky zDrs>_5Ggr4`qqu}c|+I4h5ex=)MZKx`v2G)9Ii$udE<5O_oEf#J!~QrHHTFPRXeYBu@-2Q8@^*_S0#;*Azj#^{OIi`<~?=E5Xz4~hw#U*y{3Y=-2Zs$(S zmyGvMB;BGFjag9%Dr$u}iE6GrO6DQ$uDo#6k9}cUGIah)UMfF9X_gOZ+lT!3QK^uRihpQN&Ut1Zfrl?VP`qDl2)*O_6{qC7c=bD z42Arkqt$Hz@lQZq=+up$9{`8eV#8W`p)ape<#)lDL5hp%gO{v1k>*&|%}+yt3Gc7v*wiktaV8EhszKJT+fwuVMd#mV|_ zr7cDFBGX3>Xj!E<_ucBN3f*2QG$~TcBA-|N?)0B$b#&XP-{`W}a$}L}*`0;w-2*d* zF7lYg1*El+>;OKgWj)uS%KrZj#3H@hDXTh(Q%4A-z6~C++Er1Ym^|#X?RwqHK>cH( ze`1@%9S;XiX5+{|aXoi#*0r+p5N;WiHz z$WwF0aGRU5s}mNd?=8U7oOV~mF$z;|HmK@jA+AZ&9HNPd3A{M*B3bX!{&xZJwGkfq zybZk;(Mx#s-G~kMmuhW|_kQffApe$OkPTm<5x6EM#x6Y#fc_yJ$>AK%SPRVDZn(B9 zJD_dI-uNf9P7b+O)x9TT5+>Vuvu~5_9gkX?8v6Y^+bDtqJy$=f7b%ybU1AL9ChD5p zlAtv<8!LoAfsfa|a}3PEI%P(jx9tF$I9_@l3Kr7e%)3$Ws;NRV@wJj&ytssC##i4q z6=l(e=5wG^&uI1e7jBjF87Z7vYDTf@#m5`BSkuUay%2B6l2-FsWgS21O5KwvZow(=YKfKM*Uyc>FT8hIbWD_^OAU|I#Dtlf3 zbkd6SY^S*Qzv~})f4dx5t}&QJJq~K)7;J9xTs&%=O$$H=mo2?86R>kPZ_E0nG4$hI z+fYmHO=^{{ema4MIK=h&?_~~aw7=3PpBEH|ofBlJ48Oa!DF>}iFNgj4f_i#KN_crU zLeDeq;R>6ZBJ^BQ-nn-RxI?Vn{%vD&Avm>vUY+9&Sjw2Wg-XE;r;@tZhcu}5dB#Hd z7yS&(*^aCiW~2IT)|;qfO@f8WLoZUWmp?pns$R^P5R-VBy+F#UYeSY3n7(&}8%Eq1gF;ZuGddNj{FAgQK4ysxiKOYnV%& zntr38Pv$0T-*6k<&qw-RE<*|w41pm>J#nfyP`-=E43MKHc2X> ztt)NIJ=3Aw&0Owamg0K%ZEKGPy7?)83)L;!^k*j0gE4Gs9b~!AZO$!O-yrmVYVDeb zM#dcomJ-pJ)pADU9?`qQ%TVW4wVo4u7&Ao za&+PZ)rCv`KZMp_am)O=_5i~uv~^|^gTzg;EP1@QiZZ$Z*&SA2l!w`mWb(ZCWnYim zQl_NDTto&Z<8vAZ*@6s$?3L0qBtEv2EbR_h^RIuxYAlL)N*rQ+`Z_=JL8$^|Xl_Y^ z)lyd{pWE83&-E$w9Y+2cdRp`3DNW`;F4MFB!l@_8$pi5~kT5}}*cJ}0*)4a;K7nR*MO!!}t$XT4# zzUVI74l?mW?&}pMO!M&8xN=6Ua^Wy5WZqY?At=Kpt5;0#=wcbJSn1MbwnXimvHb$5 zv%)JHu4!DSgtY|O)?6bl!&tyuHyMFCKqvE^E;T$Mk<%0jdH!~> z*RVo5A~*QY`|AKYF@Z2x3u*h3RuO#d3^&0#NGy%l3*v%K3c_ne+EC+q{Qj6=VD-#h zVT<5Zp`db<)vp~_TCyxXo?z&EKsm7ZvSe6Q0r%A^7!zbuP_ySA#1WOYL@a|bYd8hWWU<@!4?wS zY)4_UhG40pX8#g2AJ}H27={T+NjHTG;AvyI@NxzV-8|3m5?t<3PKHBH!dbrNEM(wg zc--u|vNuR^G0p_CwKxNKeo(v`rHE`1+R?u&kEMiF`^oR7%hoC0{v&la06*P#N)x~Z z|4F5e4{cD82|q3QB-A2758c{M?U35!YB2nj)>On_1yS4X2B<$>-y&-mR9Gc+L;h16 z!v-|zR4{2RfajB2tt|7M=L_-JH-LNY9f!ZMpoP)={T!05zU;Q+6Rx0mQll5XkoItr zen&b&+p1qmgt%%cf)|++=HlvJQ*K3O;FJeqO#N!-^j+J%BOTRC%MdEis?T5=mM@Q^ z*zzxC}PSOm@+W8MTGbzZ-$GlB!7KT3vv<@3ct1VI%2{r zr+{qVZg)y2VJ{D^8ni-|}h7mOYnJ_6r0 zxkMT6DvG|v8NeB)6R!SQw*7F#nj%8-DmPz+h)<4ews*-_2I%Uh`6Dlq>bM_V-#FWLa;xHfl;B$9-lm-V3pnYIg&kwy-1TK;;dA_^xg4Ewb}8 z<9E+?aH{$Q$DF@VSY94UPHCySpkRPLBZbGS*8zY2?Y05}?D@&M*A3kIDkZg`>Df{W zPZ9=~U&u!pPf*RY35WDwQt3h?q!#yRoU)_n2`Ve2WTAs}KLPb1Hz#jNU&; zc5)JvkmqkQ>LevDh#R5BWDE-40_TPn6sL! z??B*-bD_!e{f0rQ8aHe|$eYZkg=HQ#!*h79TB80hyo`2@ODF==LRT$e|M`c;28Alt0bu z{`r{DK15tSn=jY69QlGy&yOy>`;6MNwk@)`RQky4=8T|qsjbz$*H~x(RyO-Bonzj% zSLvWG6(%R-rH_mU0-o!{{S0UrtJi0m94A!Ls@$2%Q%Zw$iEIM+G;I|51mUKtyY3hd{u_%sMj!M)ni8>37D`Pkx)=|?3K zb{uB=ik<7iPt2Jo2m8H_n|3a`@5S_)JRCm;$4Xj+Q8TxY!MY9OPm8|uTV)xXO9h8c zos9kd23$i)Zu6e0I-B^(vw>Z}CeZm3^9(!w+Uz3JzdkxJx<+%@QGeI`a0UUqAX5FE z9KCeegrsr?ps$#I9LDT%12XuQ93q)ThaL3*y0JyBVtw)z2lINZ+~~AMnsKiPm>3{+ zrR4=oes4mvisY*^R{8dS{RH1_&XFc`@NJPDr(Uv|wA{*>Fsdfnl6RAWN`$c^3gpOQ z-YIj0=BOgS=~1VKSWoMbDE>y&XUDmqt_td8k|tSxhM+Hk3Hm|>zTPyqEvJ)b!e+dR zYm}f%ZE+u8g^#?foO%<-457(`$9a%Pd`sV&m|yOm7dnQz42Wme;ck3HH(?CglsuZ* zSPp$2wYDUtGXpY@^?rah^}5W=Q|~97_H`Umk0-`27}t@2LRO$_riPM|lX(J_=(fj= zVZ9G-ok>0qANCEuZ56=8@o4gDIrem2PIo4_2b%*+y=bXp?4D-+7Oz#M7s6XJYibOY z>Plnz1lx!opb3;D9yu@i(K6(^c<=hN2-xFf*x2Y9^#m!VMmO_#j0Rog-(7aSHz0!j zMY_WY%aHFnCC&1TS}VC9{~4HwttD`srHkiOG0|(%#hA<;Jxm-N!oXic=8FjW1f|@jfMoR1qE(tfVVAjJW7&~gS9=aY(Uys zPnJQ6TynGAV2Yh4su-zEf~aIyWi_d6MfT5lKrLv=QsC|Y4>tQHrmHUd;8P8BAgWFl zPZ1;<72X6?I_N2kfxJDQi**&)%tgj9ngT_aJ(sh2@Ry%v9a=%9Mwv*3C2WfsCXbLN z+-LdKB2D-4icaGs=8Z|lDFxqRO*De|yp2%C&qD-3%xXdowK-37dWOTqKk}q)L^GNt zVzOFEv~BmOM)tLlQ`t6b>Ql^fcRWh3`ziWxE46d99JNWgJ~N}+(s3!kBAi?IjtGzWfn$) zVH15NA5;65Cf!;BZH^fkvTMOCRUcBa+HgHu#YIommqkD|Vfhrod;7l)!zw*i~68X-Tr7*r(@oKnyXA1Fw?@PaAb^#u{- zaa|^uv08=8*s;h0>51?79jq(lgmU$raL)a31a_Bto~%VP+C8~tP`5opbzp>F+4P#r z`w2dPR(4&tF~6KEPZJvn&92TRh_^$b#NUd9wnpgU?-e(*yPC=U#r^S~C;o$G3@}z= zpqs0i-Yz$w;}zuu_gu(FxR-E1O8Q<~!ux+lw^>i&325ui+`)P)GgkE5R(uB2XK0@Cv$&JbX?+XgPtg;s2cw(NC@CwYGMkv_ZP_I<{?F&Tv#D z`j^ByVeiXb0ui|=MY!6GK>)vX_d%i~tDeTyuqvCuSXEV@%gURWtVXSa^p z2I%G~&5o6lcD8}qK|xa+Qy@aJpKALpc>l>TzevFHl9<;p^6|Axr;60w0}7Y1ZrnY3 zN!{%d!QivAVldVpu!-`RY21jZO>8JG^;;L=VzGH@Q2XO8c;~2ca1l%=Go57uxBq^; zZ|6!uvsfleaqFjvf`(oT*c}2-7CovnuAlc z5f&h;*if6$XZf-$k%M_O80KD;5668N(lv!pRY8a@1Taa67NzF(<(2^Z42^$tbsk%X zEjk+Rn@|HM+J0GCKvRvxB+-q-vM5*`gdxv zA(tXW(|gxeQcTgElAVSmXvR6L&|?61?Yp+wJ@ZKHcKT2q7~_h~kNJ(K3cqx?MQTp2 z+N?w1m{Y+DdqAtWEIZNwQj*L_BbCx+v=9sSXkw<1mV@iQJso?2hU*^jrd>9={vThC z;L!2MM_KU3HwE>KIm}9?TRXc|bLbh~zZL{iy8QcMDIxS8?I$P$n2J6}1TMN);;Lpq zsAH&5bQ$a{0d!DaK~Ox^P&V>}JYY?-F}ORvP7wbWqvIJ^Ft+6Hki8O9q|rO|V2ryImkX!s zWC@AgIQej4<#QWMhi-U#%wW^a5z&i)aw9{mqz75YSe82Y+*pY(U{gZc(=P;vB za3nmG-bYOSo+LKh5laP-TYbyO=p^jD<8h-Q2R<(H9tWJg0f{&X!zag!iW)Vp@obI< zMbi$>`CgtwcG=1OS?|7u96?gEL8n30nw^vM&@{uZ|D#u8Hh`$syqKUS|q{kZB4_9oF; zigj7f3gMbaE3C?TKW^gKD;K~k9*}XB&~ieOBq0IzO?+NMJ^^>H?P(XS zB28-%zN>(%w#H3D4zbA@eTA489|XESFCpFE>FQm|CiRZWXi+FlPZaZnL00b_bgPONQiVgOH!Sx zt+3l)g@0^~!QF_A+d z=_%&4H{Dz+P>VapE*UkN{cmGbJXG3DbH0yjz8&oQQI%%+vjPGr_F|70ag_a<(~XjN z11cF~D8?4X)4tpsbAfqyW86Wj1}Aj)ejK?DrLib6`%za5L%5E(l--kUkYbCrQ^I0y ztGkj5H9U9+&bvc7~cHi21u zvYA8!Y!;eu8OCd~pCs6dpI=eAak>#g>h~`5bd2&J*WWX}qq}6~lk|!o+G=@-C%GVy zqQfp9$PC_?g-xJ_?kfU|Rw7*1IISEzns@{2E!pX%sD{p`gs(*AYnCkaE;_(8^OWa)!0NFXacS8BL$1CEtL(j~5NuFYy~A zb^Cu7QD2|;j6f+Fe<(eD5IMgaT8mkt@@5SKb@&*BKRvf-<#Qj|X6 ziKc6I$iwawMv@Hf$J(~$U{6FGUr7aUj4>|G4wVfOh3i=2cy?2BuO_fhb@-z^byGNT zCsT)wRg4l2pczJqzy#IL=25mW;QebKH=?7aBej=ZjaT`dAKSbm(55k&$1*grz2Gn? z$edcQh|4Ls%4Et>mKBT73hBB5u3(C%V1a@FPUKM^q>iA5F?iG5r4C~`Fs;Rn<)E^5 zrRX9_@8QvNtpfLO!x1a++zmBzRN?~YP#YO^ny{z8}l`52C1RGsxdn1U03Y{i~_X`kwWd32o5KJUT;uDQ{BP}@z>oK7Wbg@!L zN@-$pKkTdA{gAs#Qhf=Q=DV!ds>892!3TxYuv^V>yk8`|Lo9O<4Urx$?hKp+yPF|b zP^DT$;8o>9M~;NJ#9{8~2v+T7!-R8nU(^ATXR><^u37ou_IG3OU*v3BJel9XjPa}N z#2GHXH(QA=^$}N|Fg;nBQIVaRL(Q_zv^eU_f6_8amB?{O{+a2{*1c!XruK2OEzt8$~loP3O4flBl1s z`>V=>+Bu{SZ4UnK0PH^-@v;(7G(8>TApd2`=t)2^v#)9Ytp##7=d3(IkgfW#UILmn zYD-?=v&sYZkp);Ewz6aSK3tHybANLr@XgEKFF_mIWMp z(P|}$awLRO&}Y>p--0r1?Q`4bk>C#)y<{86(2SAU6HraBsu8e2$7Ctb1TM3-rIkKY z@?wZv$3=L0`LjEqm{HI#RokHJ;2iAc4HglyS>PF8_53FmKahky5^w0Wg=wmmcPDHEKJOM za<>iF@#yfaOQ;)=S4_YGCpmF5I$U!i{ZCF2e0Cz2Ku#5OSj(pa&w>0MfsjZtq>lv(dzWfDGpDK;0vE|O>V6>TJdff#bZ zvbUvhnfgcdZe|0V$}VZHRq=oSvCZkzGK{!CVt*tcVDZ+>z zT)?wwq^=gUQ45~JGo^+quYEaKZH3(%!U7z>Q`fHtd(@8$(zuM^Nsv%hoUBmvN>%7* zr}#fdN41w~G-tSb(#q4ZzQ-$Ez`oEaEdtV&)fSXC4>vxlkUX-%n?zxq?%$IJJn7ar z5X>2wlTbopPS?Z*j3Fc^;+vAc`JrT&C*NpdFOMdsfKV)v*Ws$<9(ZjWrkS7P(yxF$ zSm(sg&-1%?8g~EZ9nai6X8I#KSdv%(71q{l8tYTbS(iGdbPypmcr9O=TK&+gBy&9(3}ZmCC*l`BDgUZcwn}ZsZ`N-rf`clvM|0K|%$4QD zbH>!R+$Z2$G=}dx(GZ&w0@}2vGf6# zgUwi?bUMcsSATR?UWHm`JF549E5UB@O>=!K zWgflyb>kG8*0)<2M>33dJsG?K`#+)YK)=VPCLKOh+d$=gB987WnwmB<_QmtI)n$xwZ}^7?r@TJkY-M@OdRj6mgPQY$!OSD0YJWHy<>wy$_|2 zNi30n^Go@5%;{^jUK3I)x~cKHv2W1w407e(Ywb3=>S*R}QtyV0>2p=Z4>-jA@Ner-HHPnig1kJx#%@Px`vH)5xDCs7neU)@f)?alzcR!jhIp-4A{o_ zv$70(YDN0VVrB8e$fuqgR$*eJXS5dlfG(dQHTGoh(6(S!NJn*bgGn+E!vJs^pNb5 zrmHr*W8Q2EOsOEq%lLAs%q2b&H#lEpv;&$TPctY3*-BcZ6ee(+n=Q9s|2G%A6fLl8 z{iPeuGu8p6Qw&0w&Fomt#~#Y+_t!JA7wp12UMwTvXu{#m;3?KtmekF*&{ldcbV|~i zm{5+9Pd}^JUL;WM5Api|ESNN>%!SI3=A#ydaQpj#2BwpF}!h*)?d8+zpl!eFCg zr@+ZrV2CVcx-^7@YiZc1H}sCmPPmhjdA8C>(BV_&slRRL|5}<4yVTl7ocl>leStoC zU7EY>0)-yHO-i7AOs)+{U^QqCvx4=N^=b(P@1hlI2#dip8-YH{nlgYrcbTpv7ec;? z=ZJm1xJzq3r(4UC56)Ih)frvJ7`$f)nO#+@ZDK~Xmbmal@IIbG;S>S68{4ILAax<~ z@}VvM6^Bz2)VIyoqn2gGRpVWUT23IlK8mMoMy+jDO94qAR*lXFK5hD}_m8Azyib=`)394DR&EM-JFsAJtKiVY95;-UJhzD_)1Sk*2=Orhfzq z3|T?~^T^H2d0;8sNijruso>YMWFPkT*nPZ*RZ{R2_>^Cm9elW zi1xWqp?_|x-k3g)2fhCY#}GK8FBbL$@BgS5Cv$TC=5K3!PEA4HGHTT+S5pNc6Cu}E zN8o#A#)wM=f8a+HONd`mA!f1m7`eJ( zL1($@`uIHc((2lHG@5Rd3CrP(y1?m`3s6-98gK91NazGM1rEx`>>df>i7Gjuedd8gRZiPkwmlW{$Oj9^{{Q zsph1L#d4h>~geWtKNs)gApI|NH{D_KLyWD~TlNrV&=q#zCc%0U>g# zh{9D2+Cg=l|GJp{`@am7Nz!v+lS4PUG)r$8##O513HVcL?&W3{co?7BlF;;CSh`nf z_zYZuCYmq))%~f`{VIGq(!2lo&kGO8M>_XdF&6pWd=^Sq&_!#chtZO+Mv79{U`hV#4w^^A0I9pAV7h7sae7&|>;QfM3Qj5~ zB{(x}3^T~@-uT1_?XNF!M^6i;*mB=llmId>g6(Ek{4S56jN=Ra^ zhqxc)?iN&mG3ng;dUD`>D-o{CH%NoQ)$V1HnBPzO+7|+_$hO#x{Qe@;&wfG>Yiw7& zK98xYy{!840+hxs@!kW53wS{ZyhX{tTM%dydQMeqSm>BP+9)4@57V;?Qb5nUn{`G# z+T)Wc?=t!D*2QyDn2678t9@+pSuMQ_vcHa=!iF}T*l7q$A+^lQrUtKT4%>wu(MpS} zjFpu&Kr=|U+$xrevVD5bAVhIiu+tp0u_t6~Bf=L&wkbRSf}ynVVB@y_<@gqyF#Z@J zN{J(?6C(f4fO`impK&<|SBpk?sGEMbFmHkLL_8lfhYYI1n*OpN-u086+wvh)*R5Iw z`2r7S2idbV|MZZ--y{Gp@ddT?Z_OG0b65g;Wv2}w7y{ui^~s(~Rns{T(JOkdKMmet z-0k;i@4{e7QG^^cL6T%MpW_!lYj++S#Vew?vtf@5fkPXg2~L$wEjGMMNhhr&ZunJ~ zN+XGFccf|E0Ph$(DUInB?5M1mK99PMtz=3e&&l%9QUemOBRi^hZJ{gg#TRw4%!52v zFC~byd)#lqU9-xd^QsPZsSNGnmh!tZHEpaB=t81odK-|sc#0TU z7y0D_$v@$~<4RKNj2hRM`L2IGRo|uTbT|*nB$;Ec#)rqUeMp02%mp2*<)p^ky#XIS z;@6Uczp)2@ArQ)ndD6_GxA&nPJjPwNlq#NgYxA9f-rF*$^aI_2%zOrZ%wyc-jR7^( zq`OT96ScvMv$v?fXRb`YlSW!CMyR8$C1H$Ld``Z8aSWEJ%JgGH{oT%{7~I5n{}b(K-sWX^!Ih8~S)00kUOEbZ(!nhI$d{ zIXzOd(DyyBFnnInyFF8}|6N-xxTG!(9ooVDaiQI@!1acjf6Wx;#je(*wm&D#{9kg< zhkFxq|K#$h-5xQ~F%=raj+`OD$oNE?_r<#zidDhE5`O0FSR6ruw8uKF6&S^RFZ-i) zq*kr5W&;Qyri6U;vzqIKH&>}Y*#-Kvur$QI6g(w`I%xNG9~;!wE$05@gL>tRV=hTP z+Ok2|4IfUZPtdNy{s}pQ22?&slqZmyobbDpL)2?c|4+nHKv7jsT_h2t+buu*7X*+& z{0fuWq?-N5SP7hpu6Y?Ln6`unvqXxG5*0QB!;s!JUV?@gf5A%^t#R!=-zYo-?X${a zfRjdg1Q*P4T*f`QQh^E_Ozv2X`|-&SRWDT7hpXkEZHvS4>%O&6K&+OTB|tizcXkmB z07CC+*=BY7n?`*3DzkUCb=-(94l2!)e8c?HiA@(FRV<}rb`J9UB(q1?4dHoYLK2!b zPLvm53@+#Ql68=4L+CO4INZxn@86CUkm^W#21~)KCMHXnS@yZjr8Cqy|KYMz+xN&0ke1HTiu^Q)cvOvJUh5a>y>o zfDupqD2%U$Zjs5moKX5W-CTwxJc?L(BxD|O?(xzhnk}KPVj1&LYSOiCa1VoY%SEWm z5OIG;e6ff|c8hP<6mF}aY@C3I=ic*82GyX%g23_P&s=Y|LD8R<>{rw-{7~&dAdZmq zGr#s;10{;hnO!Vbwj6wLe4)AW5URlUCI)4E*9K*1b`Z%I1cOb$emy;gWb4! zZ;S@qw6*A_aD;i+sQet{ZXG>!9qyXTKCGX^IxSWo87nhMEqSiS8NumC!9zqeb}Tcd_uuZP7Uc-*5&c%Mrxlht2+dx8)@7EQ)m8_&$%-7s|oo`)-$!tn)RUd zDz(?0LIPD#AAQG7P0GeAyZHA7`{xT@FAk}%&9Q#iQ$W3a{m_|Yv}tyylLq>iC_2!& z2IJB#-Blpk+k_3U%gV&#<5tbVjdb+Nd01+nd7d&yt@a2E zEJc@r$;Nq*V{%;@rg2>Je-h8;tN)^$o;D_7@3M0{_k*2f5^*#kr#&S=Mxo!Y^i;*htS#+EVs;y(o<=BcP97u&P;i>_1%%G( z@R1b3etW)B*hvJb!e=U{I{qR%%}EO87j$DT;_YlB#Lr=BgtqHrY*TPd`P6I-?snD5 zmpp*v(1q315&L}I=rnw2dBlN7hY!uIQ5?!hopwMl4PLc-Y6Z2&q10Ajf?VDNzXUXo z?a8@)<)sT!qx()9sESSIS+zMNc&CER*Iob3{mWmNXGC^&t++bdN*u2|rQkDP{vx6y;6U5KV0(WxVU~Qq` zZ2i@Z>!@VZYP7(Fs0gq6Dm5p}9c|TMWAY;oe?~!kma1Hq(8h77hOKd_o#<$YVkR5b zT#ZSPuZ!}~n>Eg(ER#TuU?G2O{0TYhPhgo%0vG!N332kayQ=Fjw`Xc+w6uOB} z6W-r$5!|Ueb=#ok&bof)|I$5UfJ2==pHc+sv4zH})6 zU2Y{=LvHrkgGj4X=n%h6g}a=laqMr>ob~CL(W;OwVG|gIJ#hyN>Ia6foAg&isdYme z^Yd-tr)PEi&fOi#lr&S%pTK<@#T#u2!2U(gIKI+LYO3P?@~8rKnY~Ato78mtReJY1 zO7E5N(u$wt|M>UjA&s{|)}@H%qnGb?(EA~uzk<_Jf#rxzZWj1`z@Sn3af{;_?=6+6 zTazijh=G-?B|l&i%usA%12*Gog)2&jK$P<%j*%AGv@@GH8Xr~gH*=tDM&v)42yF5j z^O*&?PsQOv6;7p#QpH)QwX&8Cli*e7%3C19N=tB79CUDGk|2%25);<uw(_q(CJxa{ko_y6L9=W@;EB?QKrZ;2#|Ur)STRHRmBvFK>@S+eTr!>cyt1F! zWxOf-^c>TzG!JhDCCW}`A^$;0du+v1;Qmw-TV{mQUgTO*IHbY8lM`X6RPVV`fcdXo zjMG2T)V0do$ju@QXEw#;m~8lj`2)7E6>Y-5(al$KzAT47nx(APqc+o zZ9i%@sl4xK=P|#{x(4n+={g%auP(Dxr=5vg_#xxUzqZG#=ibAoazPR8PoGN${0Ew- zABuCF!E-C%z>~y%e<+x7c4dv$A^{=F{dt>_&})@n!1_9~Qz`o%hi0E1-X4ebr<61^im2M{lYQ^lEHb%P;9(bbP%G06 zzO8bx{loe7;y*`^jcUOa zY>5&ma4UT*f{xHPgo$SjSV910uTy{V_sYE9QFL*9cglI{9gg*ASRG7AJ}-Mj$MpSh z%QgChz}0YNr}^C#GIa>v@m0svB(A!G;D?tYsbN=uM<){fN<~(^!_0;0RNF75za$C- zK4Y(TR9Z~2Pn>$3FG8R2YCCDDcwi+pm&9e>X-!^W_MnWr4JO<#BeEKYAJvlj5-}Md zTEzGvXv&g(mOY7+H~-s})rt5#FA2BIkW{SjQ=Y)=3rV4oc<)_uT^)cE>?w~-ohHie z%nV+e39nFXiU%u7w(WbQbK}#HS)r!eA@3$@4e|})Qf^Vzx5=SifKUf8(s|747YuRz zo#MXY$BnETI7P;2f5n994@cF$RWw7teI*6)065b}A~=*6cG@@r1r#)^QreKib)H}- zZ!xYo4Z-`_Ih4y28h148S-BNc`}er*+A+vC@>0hO5Q2!JHLNO~ek7HFs}0GvG>l-x z3B0o}CxOi8LUTA+4~XajN%C`zZ;?RYm&D#EIfGeTqa5DS4||*nuj)qez1KaK5sAZf z+2Z$DH(}vO#TZ6Jc6X3HEv^i6lh1%yjdxTnG*uSvutj3i$>*K3Mv7G_r8^BZf)VFB zmsw+4?{01cHj@?Z^ZFP549&~hNXa>;c`M{q$?$t|AKLsV(5MGJ4l$EQU43x9eM-sPN~XnHQ{Y1qdDqPW zjh*7hhc5v9NEB6*I8*Mw{8pri7WWc;hDog}bhmTBGpc#;F3|JpXyRP>a9hGB+oJfD z%^@Gg8!?g-EuNchFNj-c9&u>;z*C`8EwP^EkjYF!cI+6OkCTpH0)ql*a}{UE@g3d8 zl0)0q-q|MxB6A9)VgXjV{p8djWr6UK>j@#Nq?;j~OQ8S@@^oT5okg=l7F#eJFF(A*LaJ-Y^mNXJUuyGuH-Zwy zX69f|zTD%MTF?LE0lLS&oJk|6>s5*BvPxpqHc(*fOin?zo}JTNmx{6|Qdy(Crj^cF^V!CFZG3?>! zecWJe+@VKL)s^E-i<~u*{`cJLV9+zL7MH_xnVs;fyFqI0`lI6{k0dK;eG+n;-%}eZ z7l3_%=UJh_x53>Bs~XDAlQR1U3(wgjj9nGD2bxhSupAkOQZ8y<*G9xR#;Pao{mZ(c zRui+T+T=0K-1OW#X8XIbK3XBj`arq5kzoq*lmu?e!d0$)7t&pbjj2kJAC>!$CpZISM;QRCfYQPKRJzL z@?@v=Qlx`b()HH_?B^2x`G#Jc`HBHw@Q#_xYu9}KF{jDYp_ZgR-q;oiA9gKq)vdvU z?b*QH1yEJE3^lz{?^yH96Evc|tS1J>Td6LNU=yRyUWVrB3A)%i@yU zuRIaR&0&ug!O36ds|H8l?PfFbugans1P+dR}&FH5$N zdX&4Le+ryDpV9{#ZonJg5<9owR^KYjZMOr&Ax~ZjW{DLp4AEe0u6Yp+R%qM(!fF-* z6BKKK+5cC|aj;QO;~sOWapDWK_Fj#^FW}!nmU5iJE>3v}e9i0bEy(6SbG<{CA^cjj zeA2owOkRoc2f99QiYgf-Rz_wSb{|FlCZtUh)ArTaj*D2lDk?AJ?M6#`b(-Z(cv6V+K~Q(!-*u!GGrI8CLdy*>-tw<=R^D_84pGiDzE=uc+J zS9iZhZhD)7(@#|zDvb*_MJ=vR*GT-bA`y7ZK~F9XQW0`h+tYE@@VGdJg(RLDqD3b0 z&Abbp*NlXAPf-kV#;Y7{Gx4R7dB^rXgQB0bcpgw_I;?d)bD$~~Is-NmYfeJ>O5?tk zwNG3D?XXqK0Q3EETVl2O-97NwNVQ}3=Z=bE)}O|GpOitTfIW+3Ync^1`scZ&#q6*9xkj}RZRSMaJ*UAFyIu?`~%7d6& zIB9u{fc%bwffg_c+jCQAX>gyJ9H767ksB{9MhHkNUvmF;9_&qlxdrOsMY}eXLoSM^ zo9y$ciwz@(?4H5FiB$&^Kuv44@Bq0{J9`|6r?y}0G9f9HW}a6q=A z#JoP1A-fVu<>v6Y1{GE1zNz)95jw4)4L*6-`-=o7SKYbv6dAmE{zfQo2F@1m+9hD% zq?;=29)K&@ge4fU{7D@#2MGv>%$TC%YAS|->o~@;$F2D}aN<((?qe25dRX~$n8m2D zk&ijhA-3`W_a~FDB=^-Ouz4B6a#K8;71msV^*fX+S@}ia&Q=oVo|t^lr<>B=S$*>8 z0-s9nPHmJRIH1JW{v!49iq|oE)y7V`IHU@rh$HSmjtW0!-9=6SN*g;1<{-<3V1J?swZ4A~WQC z)%MBau8-x>v~HZlSl;_7xJg0Q1Uw?D81_H^g&)f3T0yW=^QQ;r)|l}vtk_!A*0$oo z!KQ5g@ihv@6SAZ`H4oL_g+w;44r85DN<25B!~t3II)dN6A-$uJB<&uReDM?P+8i1m zo&)1|aWh81##u}L3G&3}tB~Ac)68f!#KA^~mUzv}NIy>H5#9%*B086W>k#CL0Uqye zs0p~8BRFihGPqWy{yuuV>K&`+sY9B;&p%i^+hcmQEjxIZap6abY6wuZ96d{kfX!kQ zI*CYnL*VB@ZE)hG%oQy|&WEs~j~kIso|gnVyaNXkN{hwh%Uo79PMY{ld)b1zd($_; zwsOJEF$3U7Jsz`~(lqhEhTXL)AcEaQPXi4MYYP@5C2&GsM}!v`h|7c=(w)jzn@UT- zVWK%=OWVTKSm|dx8JK4k>J{ixI~ZhPefQ3}tVZI*-?unT>(wK0oXhof=rOOT!|+Z` zvl`96n>aE{AAs-Zv$tAMK{EU5jrV`xH#B7vOTc5wvaHBMR^D%pR$TWL`fFJU;<{Ma z+z>~4998upAXttuYHBdz;y(fthj7*L-uf0c?zbqh;)+TA=i|JeEuch^6Z4_d$1A0- z(?}YtJPjSfN&;#mQAJSP2FjB49r7=%LkNsgd>b9U_BPLlcM)zfcJ_*U`9HXfE5NK7 zEPE@axy|Lq>n_uNavo8r!EUsiRg~p0I|Hg*SKlF8q6C=Gs@>$QKwNFP9(c3H=j8HW z75Ll{C5mmJo?Js$5sH17qNfnrI9qt=W*I! zvunhZLJZGcKYi?{;(`BMp?v@z(`LzqJyf#rv~%HX=0)1?s9XNpb-aUs=Gg`%&EoCgp`v=##}vvDpTtvWoyYp=s16iiD=*MV;F; znw`eN_Qi5cRZX5EA3QB9Q=W}3^;(@9_*Gh>Vd<8}kuFDTLG^55w9h|OKhM4MFYCJi z;$&41{B_P>lf%qlwUFme7PGhs4kNjwnv8qo{{kRa2~N*^-znEa)TW7-e>)|KV7kcZ zzvp+U`)tGlPmtU*odl4~K=#p{fes}XdGT0+7}Z6By9tTns*e2ij(}~sMQUr^d&piv zYJag=LI&ZD*0NDZ!@T{sds8C#nljNvETy?r={y2?WJ)P}R+*kVLl+lwu=M!0{{dCd znCHqFEMVm32D)(`uvG!o9GGl`B_ z?R^MFJvB)HxST!>Izt-f6*_;aR6nJpHCE9e`quJ?FDRJ$v-n$o2OTTqOhEz`gFCgo zh>JDuXuT3=b)g-sm_$1F)9)I=)=P7?3Zm!9(W?}U^y~fY5Bm6nrN^7W;UGaT9t@;{ zo0P~;z)AVIj=C1?>BTPJRwlO5daSGRK5|ge8dL_ZkSj96A&Esz+DXkmc7^YoIkoXC zMW$qiRE~JQo&rr!OY%BN+_uyCO(CCCN9ngefh4w)^|SI~JqIRiH4=<;;VN~uajA0d zo_f&kNXPT<;l>78S3QDF6Nbl7048Qz?1xS-6)4xoFsq1XRAf06m=Y%LrID;MTUsxO zlUDOp97~@R(lda$(K`9bhzcsSKh>o_k2JMr-)#VSQz_3fg-#RiJO_9+L_QEO3@beT zsM&U!d0J5rq&E`!JQamVyg0<^#00Q?lH>Q*KqDUH0Ap+MYV7G$cd%e=UIL>uLP)#JtTc3*@Sgy=MgC zDcN%h=`Qb}V9!sunvYApF2uoyUgX@N&@@M^p)sRiZ{oQ%usb(jZZ5}3{63h&50fUf z$Ho!@0iy9DspD##$L3||l!4)EzeZ}#ob(&x0Wa}&_c^rbwn?PUI9%fx;?sAe1)~%8T>3g`zF~v>i zTRH;(3)JdvfZIhms`wLv{aLv{|3l)&ak?D)sTQwCJ3cky$K;Op`0bp~WO6m&D#ji#NpIt5O zsF#pfz1I`pPD7t3Jh$V5o3sJy*teAhhbT!Vucgw1k}Nn`G@l90Ibzw`sjP0l|z zSzxmGu^1p)19G8?)YwMvYGp&Qb=;$GpFx}C*WK8Wke@2p{WXXWYpKInx2W14)aFwWAw~4PQT|{OKv3W;ZV4F6}%{uDan**yFLk7aCk8pOw6sKbtIbQw>TXG`_z5)r1XlW zbMKY7&n(oN4=R;h06)^4OK_a`@xBTv98Z4OxRMJPR#$e;#=!WT+&fypx0eYY@s*pr z55T}Oy)19AIs!`NL<8=dW*W`jXarc$iW3FaKPj3{t|l3Y_vEiGEwB?0yRwE&3Hp|} z6p%MfLLRAcbjZb6fj!F(cjK)>zQWM6La`uNThcKHW{b+?ZjGNTH{fKODTtGOkoALl zm?iy!+pI?S^tk|K^ti0Xh!IN5&pnD1WEjbZxJeK>fj;wTjwXsX-oF=c{%Oe|u?pL| zS4~hC4kT6H-|JOrlHGiG9jA@u}}9_=0Hc3NrR>~#J@7ndDjoXb2oU0 z48$mK*cqo1Zq!nSv@A1~3r=*01N0qZQ?# z_{ZIz4aT>s5O>fnfAkD?dK-2ZG^9Ffawl;0yuT%_h%cYaAH6z8noJ2YM@be2{{ADu z0KNrXc%gVbAs-!W;w#FDP9`hKz+Tyw|5*KyBIr`_MpQ z&!r9^w2iS%s016M<@_R_$907Ylt5NsTuC+nJdrD(Qy{(gY|l9k?*9LHpWbjzt4osyasp?|7p73-=8-(nM_xNy?BLfLTAm!Qf>98z;|w2zIYa>eBwqZ>~I5S*d~)u1~wx*rd1T z53r3O!U)VVBzEld!InuFPtM;~c3D6X5v7%5xYx;pDjk^0;T6L`hj;p`xk&iPs~~-q z0Sb|qEE=yAqnVS0^mq2u7PfHTBFk$z39{?I5@m@O3~x`uy8}earCaI%7RD7=kJ<71k)xEjqgIrr1tWTO-yDWEIvc~UNzQ45q4rdz%3jic8Ln*LlmGI6jmcXCulWxx;t;YY*vONjj z_x~%p^021vtet$*XPz0`=`$0=wt_YnvOo}>T6WatR<;Defe;|2#8dyN>u6q zMN1$ctGNjYgb*le2mwqKPyuUASR?^V2m!-V28)ih_4~db|K}laIp>~p-t)fiap8G? z4sf|tQ>H-B?H_q|13Pmq~7mfVt_=W>IFt$56^uTh~7=&FbLxzJKaDN`PxBkT2e0;o9B3baEVeRXA%drEhW{(3&!ce-F$w*#MJt>q^RIE zE&dHaSyl2zI`sE9VcQe4Xq=@D@DbJWGWiFU6Ev$TJp={7j3&vbCvjNtX}IE63HCT*{Y^n3t(Hx@3cnVI z%-9(~%JKh4GP-wd$V10L-n|NS-v`nksYM`6#Uycm7v%J7Zm=WExEvKiJa!gw ztI_#-gR;n!Wg0D{_D`u+_}%-AVG9#-5-WTEmxquN=*|e3ySI=#nj>pP`0$s=sBWWK zd>3WHMMz>bOt;z=r3~zGBzv2%Rmc60tlrfO89G!SRwHTh5arZq^84|ym*qPK_={Gi z_cS|zufukiZ;HfIrfhxA^Uh`@t~fo4re7Mfwn)jcZL4jE5*_Q39`ODg;6R`3wxq-N zMVGsQ;CI~8!bf!*3L7J5O`di|+j<={pP#R!v6x=gmUn8HfN2FRQFU@IysBmOlmA?UhHAo`w_uU!;@sPS`;u7OS+T#i#e8r%L zRs<8~IROJ^D90v)Zet)$rm_o+y;}tKWewB8(%D>^g=T#A#6=ga@f<59+5zGaUQ`NB zU3l5FYRIFZ-Y)dJkb=~qPyyqb$KM8lYg7EG47R6Y@tRb_sXnGM*fzD5j`@{`Uf_t2iaUN_*FLh11E zlUX6ko_|dLs)BsxdpdkL&}G_gU5hi5r1a-ZWf??W=e}0aDGJiiEJPe=>)5y zQOm(R#}p*lh4WU{sUAN;#kD?$9vL;EOt{%zrZUSEg3o#VZGYO%a$lGKJ0 zRLS?wSJJ^6*J^%@YRJJvbl-z;ZHyo-4Yf>FxlD?Xw2F*xbYLjnkg?F`Cpj;zmB^9W zACys3SiZ1$Z0r)bm4Z1=+L?JpGB|FyC@LmG{qSSFTXBbpv~Xs%DhG}fez6R!6&{FN z#podeXTs1_(0eQtC;CPp4pwXp*2ACNW>akRjpI^Tyo2X@uG=~nCSszxE5@1bd-7ve zR!#0Yj?YzaR%ZMCW& z?fXd^nv2G-lzFAxhV0JEKUIMTWm#K5goX_t9TUnHXGki`P|Iv)L`)uPm7gAyzQc#n zn*`0uu?bQnIO>$wr!9kz#ZyP?N6^n5IpbnrL1UG^VA_hm7{`c{9-?ro zDuO&e&ueU$eQB_!JW&5u^`?=6)3By|+x0@=3oZ0}zK;;Bq-m#`1Vk zEO_l)f_tTdgKA2xu@_B&@d<>L9oS72hMo8;{d`3=b}hzevE?A1buPUrNnA$f7eo-% z!>KI>a_>}{pJ)V1xy$LBzELn27fUBiLAcJ$@@xQ!OQoPREDgE=g6!*mWYH5|kRR?D z$!5!eFrmX1kX6R5wb$WM(e3^UD?DSL`DlrSDr~^ND$T{tpu5ibfKE)lWJE|+Z3k)# zvF)UGDMo4fx}CMuJE-oDJ=DhqKY=C6gpa*u1upTSP`-HhbrzTAkku_W!4#0)jyr>S zN-FG2&DtJQYkV)XRoPffhf0c1nCNig?nvWV5ccx)Oy+SP!-1M~R3qOVXV=Nir&cs; zN8mvF4JSTm586l~V?}lS%f-{!$*6Cn2|sI2SA>!_E^&#C`p1EN9jh%IQmnTti5L%5=~4_B~1rRFuC$kR}4|9$i@1Bz%3bpf~S zhVf_FvG z_p{UL{~PB7b^*O!r-K~6&~qW#CJrGbpZP;8CNI*bW~4%s`@V!D$vZ4i**KKzb95PK zzV9qn|9rQD+;}l~xZJGXU{aRoJ5ra}dL(bxL56KH!g2_0$6O^VvZ3BIu zr7g$a5mVkg120mkNQ9b7O~|g9g&8)%Gjti$l%GXdo+XR_6eC*RIUM6CM@fD@TU9Sb z@3TMIMA$6oVT5?n6BB{^ zlXG$eS4=A#d*2|a=Kpw*bsg#ZJ!Q~774oa-o|Wnw4Fm@jiq9kR$BkSM$)L7;o=K&D z7gQT%v|M)&vE5N63+bqeu8z+>o+V4;DjM%{;e_yw5pWj8cV^kC0mLMyHW4ch`##VP zkk95ji1~>o{L!#a=L$3j%`GDsFv6sYR)L_eDB+`Zwb-6PMV7fui(%e&S*X_P4BRxR z{u>U-+z3!Ynl=UHpVSQls3-nOh;!VUCMdJ`p^aXoTP0aE7k$FIwb7a*&qDh|64Qb8 zGjFQO1v4?3>~4U|InNa#eobT1t$DCNTYPk`xuEha&vv?lZ1AX02TmFf#EauFVd)Qk zN`3)v=qL{9SGU{>y@^?Yl$cvXU}N63A;ZLyy;@_QBe?~MOhNy#`pfq!&_e?%% z)neCDDDAf#`d%sgW+7zM(1{!?F7oLDALv-jVY2K4qsonf(PzrQ+rxsshyYQH897>0 zdh!Gi?BLBb_<7@2kKJia^nB65*}G&Ff7w6sin?8lo0$XrTiqt5uy#)My1`QDoCJS$jzl1 zNBq;CZ&Q#_6^pVrlNtWsuz=bbD1>kloB@)EI!;|q68lo!`^~UzZHt0>%S6y~QWh4B z4R9DS5`D>!ORt(`2-|L!h%^!UZB=Kyt+C zBU~?e)`86#4c^>ypv0Wi{aFZZwbl4&l4Tzb93)(&Rw#15cRPlyUb5ztg$$x`wX8>A zD&cX0lcNBD$q||n*Yhmz&$ra81Am#0V8G88wn+LF)T=qVBObgb<@)Q8ZzM$mSiB)q z1Xsr%zuRV89K@pa(qW1EUzD;@m5*UiD z>~9N%F7BA$MvXsz99FgOI(amnD&YYJUtRQlzMc&lP8#anDT43?4fR8LZC!362?P1noj)XMBo=$g6Ui-!cW}Wdreb+W1DzMYN+$y62u2 zK{dv|#j0aIH)MFdH=`TZI8W_%ut9q|sHnvfdI@yTvBfj~0YuO<`uJw(cgISn4KRSP zq&cv&uisc*B;r=iZ|PP+xD5)?mk*txhvERtqT;kXMk$*7-P>sXm3uda#B(IeoG?jsczLQHHb(;8ev@IDoP!UMfVq=HzqXO=L-S zT3mev;;~#3)Tu*%^DOsK0(jJTGam-0oV-Ie3#QO-eja@xSYD%i70$vAFl)jA%wo2# z0lOA%Z{_L=`ov~Hpgjws9s1`;oQ&yth?KDdN6Yo$#s}yA8dO{lMV#&YvkI624m8WD zk)}LbItehWz*X7vNO)|fL%A7yr!IuZUqOjpPo77ZP*6Wz1rYC6CYy=c_)9*y@`Aci zlzL3m4j*l#chA#|Ta4V{8UR>*aY}`nDjf~I-h>k6_U)~!@%R|CG$qo(7TutW3-T3uZA@;^pX%Tf0HCY`K zkPZB>4W)`ppr~2cB`6{LB(7Y_q}JvrF&l6^CZw&V9PP74@ISw!jS}Wy6`ej6zpRn@ zdpR?cd^EnAF^-XH0+yZ(O@anPE}RADh2{5L8Q6Eb{4Xpl33!#&{=X^7M*1vH24a$> zzY6=+_l=x2a0%~1ywel_wS9fKUZwHfl_%W~jJBNh8muDp(QwJ4hUimt6!Y|yFD7$z zDOE68Pj3ZwVGpuMMeswrwp{xu#53X0s9uM*b-d7 zRIbZ8QUt({@sm9f(dzCoPySHlY!E}iJv@;Rg@8Z(Tzb2@638PU|%%I;q@xZKO z!nNg+CW^}WdZCc%4Sdkr$4zP5U%T391?xj`6<|vXPMw<3p4AlEPk_>=tYnhzc@VB;6Hrr z`Ej&b6yDtia{c^9?k5R)6UFvIDh-hO*ml5^6LTeaUmmtFr&&h3jS|)!f3Wwl$;VtH z27ZI%tW&cE{QS*)`%<#;^tqII0~A!UOfqW)H4!H%bP$tLq=Q^eEbU{{n6bWP8Nu~} zF-Pjq2rKDLq7U#q1oK5qX3}^1YMesHq;B7;+JBS$PIq=#X)(@vWqCXW4MwUynJlF; zN9PkYF~hpXhGZz9^#_GXf$G({9|2`?e4~y}{*iWZwX}ol9NwV#;wsu5(LTSK*%W{|9A0#8LnN diff --git a/agc_2-X/trunk/DTMF_sounds/US_pol_survey_transfer.gsm b/agc_2-X/trunk/DTMF_sounds/US_pol_survey_transfer.gsm deleted file mode 100644 index 897afabbb94391244a7808eaaf48d8150155884c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10461 zcmWMq2Uin_))Xwyx~qZ(0%{r{#flW!^^;C0N{0kc6Ka5n1Q7vQ4Lwv72qgg|jSem? zR98bNp(&7F08;>|c3q#V@7o`6?>YC(nVCBy6r}`ud1~&M^61S#;KI$%{5CL4b(e+0 z_ITOC4$Z7y<_BW65rlLzKu4B#DkvnDbsh6ZZNp`JDQpqtBq(sPzbRojq_#I^!VCr#AEqP7epHUvV?n5`+Q<+}GXbuZ02WMBExjYxQWbaky zk|_Y(nF)d0k$x@Fok7|~1;2G&!46G6eB%4L+ukVX_JL<2!@PO@5m4XHdxMPp31>*p z!=FCyU;x;CV&tE_yuz;Q;+B$%1&o>E=ogq)B%$MC;kaJ-42yW!LLOe&11LNWkZd*| ze1&W&ZH%pRMz+m{6uFrp&z;nZXO%oNo6s(EPLOO?;ui+oMAj*2X5Z;#lj(4EH|z@E zFT(=S=*&VN1&CIz)&vh_Q$APHD*NlY=Oem8LLAOQDjWzbl|x|}){hs6WYQSaOzENE zQ~fkAvsb6nxa=NjcQa&4VSS`PVk8JaX;%)j>twMkhz$AL2W%aukhU|JG!T@9G@vx~ zRZ5#+r{MMW%>c}Q%*!=iktoLM;tW6UH6uoRC=BKLA5BR!nV=ic(06+lWb3!@;MXq~ z&&2QEJg9knlh`2@#tSIEG-{_MnKpDj&F9bFOlE9;|>Lkx^FK&X!AYHrxGG5{Co ztKh^gXayr*Wn~{f_Zm}YG1tGaCT0*H@Ak^x44rGQgF{&t^!q;g?QHHS|E-Vr=6IL) zXB|mIhxi~RYu;DB)X5B6*m^Lry0jW0kANL#LqGL7O2OjBLFU1gusVl`y@6xn2BfGw zYFO@G@*yW>L00Lgle>=Cn5X6{vxV%sy<3go{OSnp%2`JLzDpvXs0_-!16{X-3DMWI zGBnF|4woKZin2W0-2)Ap8kPROJcnxOQ(uGY2)pgPIh1Oz-Ob>4_ zAIkV~j2szOGCWF&YxW);J{^+>mkZBZll2HpSooJYA&PrnTIN(jsFy5z$p#3Sp>Hb~ z)q*%!Bc;Sy?|8mbesS1tU6|<)R#t=8e=q70936OWZ9)7vG@93+Rq+GktV`HlmPfSR z(a-sZMi?3@pz50byNfRS<~ymrIxX}+%LyQEY9?VvMCb0*tjOGsOIFWEd8V;^ z(fk@*`=F0~gX-1u-cEy)(0zSo$mJQ$>&}tItCHo93vKfE*s9&WIm4rLdnxmDiN8Ha z{V-R^gXid$80nIbg9zE#l*-*J5$qUq((brig|>r(*CXy16&41lMfMzm#<+-Tk^?JQ zY#y%NiuX>VCloj4J3)1t9l0z}r~5af#}A5SdD@Z~{cgwk?hv-!W!bQfjG1mB|C@kiU zc!O{z1iiy>>ix8?z-<0N8z$>aM0smh+ypG>s1YM!qDOCT%rUbeDe~GflfNaO4qs)4 zMIRjuPt7rc78#oV={WtV$L1a`!U4H%=*NHGUuMFx2k8G4b92;hZxD@Tk3i)Ei3~=S zZPHiS!aC1Cd8T>Ic4!h zn3Ug7W*`HMru!cB0W(kdvFN-qxDEi03<+>t;oAFprmsmF-G8@{PS4DhuZ7vKoh@i3WSdXtz89{CMu8ya$rS{oA$U;n^^sS=+03NpRg&wzX-8s)bjE1scD4J(=R?Mq&d8wD*tlr`gF>ga;vM zK*q1GektmtDJF4j~R-M?_>7{8o99;dvZYEK3WDUTkD=T9}4CYObGDb7i2fVyih zN5k_q9eJE_Bh!@C#gc1etL^PsAWIM?5wqhxO$K}Esu{qRFP4Qa#;zfdFPY-ez zqBv|RwpIq|xS3=7h--Kr`}bFsWbIhcuUZKLyG_ZfPB-5xs0@ zWIIe(Ai=`{eHz4rML}S+ZSs|!N!n-)s8ymhsOwRVE+z*rBBgjCc(gxPnf+MR}k?SfqUl?zqAnSu6A}0gav4b&c`0DP;!)qkiH-OmNXDp0FDftL`N-95;o&ji5=tP-X|TwB z>n_W3xfxr;oy%bsGd)LcsFQ1-gdVq`FW1O{1u0>Njl559!^;WH=B zC7P=Q$OOc(!c_}-VP91K_Wx3%-3}K*tPe&TV>h6)dYcd#|I}Tmf3br$@k2mJALKfZ zq?|2=X!$(St|}hhrS@G4wRDy$paB-*PB>8$*O^6=s;BU+?xlpxx> zvgI!hGiL9^crlYD!UjZpqyCpTw;s;WX!-m>vMGWSN|9=y*qa6!TG4ol!5dI0z<97X zBsH1p_P)+#P^j)idMg#fJEpr9o@fMblEw}EMtUHG?#te^9>3Lbl;~Dd^&SK@n^4Hn z`%}@PDx_)iK(AMxYcHYLqldHW3I%lU+UCM-RmJnlp=5RgrpB8e%7g);YBsP#2KQfG zHx@;*REsf(1yUZ_5wDOkuaFBYW2YhN- zP8@j#jqcW59(fMFEdsBD#fqF%Fb}QL2~7lDY4#c^Oa|qXnQCbo%}JJdzlK3~Bi;5F z^O`meuBXw!Yem5(X>>ih$B8BG(6i3YQDrKv0@7M95S*4zeR;U{ubtCXwK-?c+BlnM zY>dvX!Gds+Z3FKGJA{$ULv2|tHBEjORQWSjYD~|vw@1j}z zc4{ffUtBy@*Js93{_`&h(gGsx^KSRwQIgS98;#ut0dkT z97bJHb&TtZ192o^1yurwGFtx^&#-R|O-(evibj*)#*wk1-z*mdVl0wEw?zceCq~i9lCv||hgg0SWf#G#dP3X%TO&L0lA3p~aqR&VdM8#_W6u6T#52Y2)>@%*tsM6zuV zymimo5;FBj`-)M5qCm^54_dES_?$9sDv3k6KduHznS@i)aBxW|rv8=!$*RB%9}4H5 z3A73byhXQt|4GD%Bx-%VtjIB&=cu~~iD3hjMl!XY* zqxHSFXrF&{2p8HEuRd48)N{){01U$sk5A#ToEXBp*h*URl!fGk!+ayxE2&>B%||mg zI*dZ{>xU_hhn+>{`O{V8iBHuq>3sg13zbH3C%9QPrQcqO^SP`F!C0thGjr!c=9^a$ zf>BCg&L#F!LvZ2f??D*DU9^?JZwbi{MUAP22E|-!2sZKjsN)A_M~aHz44K=it9)r> zd3OA4}fqZ{w+E>qpDg2XrQaQGM4yCx~ErO4Eps#ktB>{=h}RzUo1C4 zJ8(lsn*)evfsu8kap|EwX>a~_x5!5SW<$kHfxkl9HnHC`vCjT=s}cT*gTVw}I8D<(vt02D0xU_1Z@qIW;is6DKr~BoPJ?Y+h zKB;94#{Y%*3&3OB*J6Ei9zL}f{xdrsFIvKj_u#`AnJiesAhju#UhdaIWelVpjaZ=i zM+F+2@paH}-IAf*`+F{T-cj`KjkE#1Ld{=U2&!&XS*g5@oP^zoLzMjNgbb`$ifJ63 znH$c$!C04KoDUXq518Q%!$la>E@(05sMMWiTMSMn=8Dt=@Fl4E9{s7I7xkn!O7RX`%pH>bnqoUb8p^IZFF6^N-iP_%bW75R*cDDnf1FZOx6E^x_9GgxNyEF8 zce{^NE?t%rD*_}&Fem5}Mssb>0Fp9V7Fy`=^Tk+lbLVC%W%+lr#B!y$$t%xbBK_}! ztv}nJj2cr+XUJ3Fb2#D>?}>dtkQ4N&I2t~2QV4F}&Wa>cX)8L~Jv=GHR{Kj3l$s^e zDuVLGQ3#KE;jsAv@#du`^k?AdHb{RKYCAScO`+?cusdD~UtjhLpBOq){@2)(D!TvS zGB{``)aFvi*WZ;xu20KTBj+lx5G4sXwtT_5^9{{HdcaL@Sh1VXXhCNJp?jMcJpNJa zk*0Z|(VFk2!1mW|)$`*`;Z*W}i!1>?Kw4OmEL>LGFQ)bZ*WP~qU#M4$m0GbTzXkaN z8E@rD94;jp>rrz|p$k-g{{bYP?u%J}Gg8o&IGQ?m4`-Q^%x2e52h(_aTI# z7jH!ovfE=nn--8jV}L@73WeRkz4RWs0GJ15JW=jDeDz! zGNO5^VDZ6`qKx|FVDdNpbcRQe&pe}z^ZYZ<##@x%Jzr#E#)o#!p734bGDuy9!we5V zY8!K_(M1;Z4TRua{8IGYhi^FfxTd%sBH1#p!rFZqVOYv-PP6r8 zI6-v1Y>#LW1vjT(FqW}*TVJsqub=s>C%RGTo0~!n0ROSaWD3`P@NsW&58K%9bg!_6 z>adX#X~yHni(jvT;Gd(dbn@AZSq$SM-M(FqFh(mzev{nBVtE1tUmOao*70BsCxK3f zp#CQ3Bkz@UOO_i!4a=}To`76#G!^6R!)JN#nPCe7Wx;-l7qp|i|dR(m@D6JKP%y%9P=fqRAVu=a}{?+p8Ll8lWXk1 z$Oa4~3o6D%yz_bf2~lZPq9(_ru&`8?KCya$1)H)xdm_{@skcs{eSn=uqr)GI-z2;Jza>Sh1v=dZlM`HZC& zks9`k8_-AT@4}?PBFTj|RlHkkbLgo3P2(aBT5f|0d{iCh zJ6y#-#RInc?BBqJPhgzH;#xxBZ2Zt=8rIxV$~F=tHp&<{*pUn7sK{j}b^PdSaZDfI zD~EG7mgmPrq{~oq;cCY4KvTMt#0$le9k`VxYVG$ugyuAxM!#@U({F}+ciSL=-N61$ z=ho;~C=-$T!gJ||lvUJGZ7;jhcZ$Xn(N+g5vsh1OEg_L(7RujIJfS5@_i+4w;*eM; zX<r7+_@4iij$iXC;Zg*wz$Hq-l2nCm>SJxcQ}v-TtWfPV`&FCdO@9?V zHy$Lo>$wKT)2vl*Juczwy7giY@f&DRhyJE$9PSIH*iuVyCf*p7Mo;p)Z2`$0dcC|b zUYAO9nQt{XoVe3~5-*A5uit@Jjt-}O?uW;`4P_d(!=R}kts^+?8d`eU^3p_=;0d8X znL=ZI`YXVvmtA%X->IL;7Je`q)_cQl2K$S4h^n#Lo;2#eLukkk(_whz28+?K;YS;!@9@1IX68TITjcjDCvflj(_$s)%ge~-+( zl?DsA?FL~3Tg+4HI8W^?fiKa&@pR&~5s@HK=&Q4kS189)6!Wkzj*;)UBlw*HzVP<) z2fiHbPVC`ChCl7Q5o&*BvtTqhWBV@trLLeDWG)0Ixmlq|!o|vay*}pvS z>(~%HHouKng0jaoC;!EhA`4tpp(~O1eh*93+;i?vCo(M^PvSjy zKLgTw+q#(qjrzl%y<%UdyJ%(a7^8sp69^Zd@Za940X`XOc)#ulm>jc`VOT4kw884M zI%??B6C1Q_p1*!erwNylV;0-z(}42+vZtB>iklh%Y5;;iwf(sD19pRL#E>K5KOPSI`EEzfN)aK37y9RJxgjemHgA$mxFWzKca- z>89aCpmH*N-OzQ7cp*guBA0%y#V7lgjmlQXXz*)`Hc5_wpA&yKeE1*j$f+{fe9Yxj z(ya#Vu(`8?TVrL*C^wUI&i`n5xL@~t>n=TuSGzsw$w)B8LBii#A#IuP2m%}ZJFd!>sStOWHKI>?27}W-Gf6YG^eGk zF%9{jO%<;r8!h!qV&mcpY#<3;^4QFKp=6(Ne6&F+EL$duNxSlECzw2B`R*(ui`ZqISw2Y7A&xk{2AqyTgS0` zAO1Je|i0i>|<6Sl#&d^xK z0LbXCAL5u~%^DsQ-n`oVi*op%HwmtiI4Fz$)@oU`vzOyPcG`)!Lz`WE`J@g~JBbxvkf%!E>sh4UgW4erB%B8y1tIJm~FZ!RM7@ ztAjRZHW0k|$Qx>%+<&Qe({4iVUl@@ZKh9WFQGC5<3?NQZ%6RKKA7@*p^n9A|MB^)T zhcQt`J2O}$s^HNXrgLd3C&Y)#!U}5nj_^mR@tTtPB8L)%0pnS;Bbpc4?WvQn%#~rj zL&>U}q#_4)!q9y}wB4;GhRc*QU5mHT6(~+rz93%OjZ5OB)ciNqGKmwQ!8T7wqUDap zXixF649G-9=Dm5WgJN^oE_aaBm`vj<{xm;O$_Ud>Yr^n9q%!l8IZ;h%>_M__w06B6M>c)-x`K$&2n1XxFX>g-`dT}UNKO!gAMCg)6S;yU!_+8n0r7 z@aAUQ2|?lI9fBwS+?t(bI-_S(B0WJplpa2*3b(m~%#w+z_nV|V3?D%`KHd&oXuH2G zPoP!@W3%V0Xk9cyZ>|r`xTVN8mRDOP&ciXRDz|C!{4)-ZT$nZuuyZ@|(?1M8?IQc5 zjwA?YR=Ool!@b*w%Trta9{R~KPu{Q-Z*Xjq7cafe%VQ* z)(2~xzpis-4>ywi=MG#HqO<&JG79#EdbWXUa;>8#Cy`kbUGCa~ec5m1OS4^9g)#p= z$N4R@N6^RT3Y)B8jz^6f+y`PPn4cx?aort1x&<3ViCNoZ+CAYna5=1laOogUZS=^? zfssdUFd&|=phyw@kKsz_WB&dwhq@uzv5y=-^>$&HfeU*Ka-Tovd~;rf4Mrlj@AGau zTv?KJNcW!W4+7|y&7#r%r_1T$dm;Da(rDj`z$_D1j{&EHj!D1d6#Zh9`%?;sPJ>b- z@s1{6pU;^SzB&1hJHFxcOWMwCuk1sterd`m= zvnbf2rq{VDFjH*5usMiuYiPIndhon>i5851jdNWms!u(n`u(6Sdq19kOFj@EMs7s$j-vUpm+WriQa@yqqHC=T z@ird!wqwjykArLnc+EA5Y6ukwJkn?g!*N}pmTGx%C6P-ma-#D|Qii8#tCdo6%~b*} zWe;oZHT>nZ($ag`B7>kPUG4s#UJu8{T!{E73k1y|5^00#X~qZ=yo2Yit_rp7y|eBY zD?&NFX|p~r(aW2faJYt~srk8etg0M{anFHA zh;*^~$Hz5Bo4oH&qBZ#MJ!Vl%&?VsR?{_PKX}^5D?k}eH%e~SSOSb2`&v9{HM}`7G z;iyI*&!h4ls-s?%YqV&A=I-?`{bvcs9Lm@uzvT_la}{ooN3gDWps0GyN-75N+zEw9 z2Of4Gr9lxSO*q%Is%b=yPlEcgp96^(e8r(0&qL+Fo%%_Zi6r)f+6n372XZ`d*jJsa zFs}|jj}YCgga=In$HiKbZYk~?L+BITrLeX^3<~HROGy00W8U$2co2?u6^X6bxJ!N8 zMK-SD;sQ*@rv^xyQL9+4dQyuA<-K(z@u4SFZPeMVK zhpVkkv#AEUh3zKd;5;4R2-sZRU=uFEwPBh9`6)QNi1W)UTU6Mca)(LY5#&6oRkKS6 z57QH*yL>G+QV}$GF-gEtTv(_eI&F+FqYT`^Cib`AgL}} z=*m)2FtLIcYU>ET=bwnd?E&(`=tvD+NbZ{w4k+ljqfL@fnjA<*QRCEK0!a+qzg6%@ zAHKr67vI(`|x?7Kf_sjF*T(ZyS-(8~^I#TieXFyWDA^PV_-I z203JUZ!AQDbYfhwg7?>cGrav-hXnMUyk=h_dYw1JMJcTHi!B45B8^Kj4HsXrg-fnZ z;s9IA!YF~ESc#v9bJ;HSG4iEukfm8sKX|3~b#|z^vU|wt_4%N?B4zr)%0=546P7ov zjd~FXXmK!(x_qdG|FJU2ygm~&E4?n)2q}N+PoqGh?O*|R~rrnA==mWA?ZFYqw{!M zCpBTRMxrRgxZV{A{mGtzp|*AOqM7AsmGxN*XEP)yU~kd6{H)Mi-_RZN0?Ihw%L~|> zde;V!t+WopCYcG-jTdh8cE1OYsvoz5`GCFxSw3x`zQ#GW8ad+Eyt4Z_#ES2?hw)|_SX zo7)w)5*qBPDz?-z=g*zpF+t_IDQjITr{ya83%f+9Tfk&>$WurFGcM0y9#W6)_~qo= zP+>NzXPcbSd1zmJ!HpyFy{hO8M%6*QecMipJa_ZCoA!)3J8ho024CT&rWt=B?mLjD zFu_V-x;0d3X@#`5N8@<#UKT|{`>5^P4FpjvYJ?I{YWLirJgL=6cE9es_uBWcGIN>8 zIL5s#1qN}29Cq<)0FhybuZA0Mw=tH>g5LMOif@F7&@o<56JnWRXy#^>tK0LhXsoL3 z(mc^RI6iNfdhO;z(ME!Yq3SfIxqZeqKKE}oBW+^B8%>YXAqNt6QFPGL>W z9Y~R?KQ5i_N(~6xSQ@i5@wgm-f&R24y($znQ>Jewy!mChdptOCSP}+Fu1TZ^{ODN; zT+Q8QMv?%8E2RfcBn?+=d=@{xx7@4MYT)t~4`<0RNy&{dV01%;5XzX^OpP+%kJjFn zYV?A4y0$$l&WkyYI9zXFdKxiB8Ew+?N;2!OeHnB46TY#zP0Aeo_D^#}4N8qNsx}FF}H( zv^u@S$)GF{YpS`gKu9xKA~bmB41G1JjFt%`9ZO{V5Nv-Y^uQ3+=4h!bCZE}}<3_#q zLruZ)KHmy{h=2soA35^gyI)-lI;$7Yt>~qH)5mkwC7N8pCG+Pz>Zjnjzi_j6vFH{O z)j0mn6UJX`L2&0aG=+9qRa}qYJyC~vhtX^_J*0wa&iHRnCliK-ZZAKNMAPjXl#z68 z{^?IT@^=}{_Fm&A^`oPzuwW7*qmexu_gnLrP=yB0@iCtWv9B3DMt&w~tz3kPz#V%r z>Kl26yXdd}zrp0*O8)yLkInWR>J+vc?48+~_CIUA_Houoo3);&1K*%#ox%S)Is38C zaFpWm_r@ADLS?(M)D0e%77kyYvU~PlORe7ompc8i2-R~J4+m)vqjTd`!^cP4TO<3q zydD~hU`GcC5=)@pZVgY^7Q3kj7-&e5^P&)P(@S91atHL5(XO2I#vxY<=v_pp<0xQVa|Er+_d+np2Ym;n`wzPT= Mz2ejjUbBY$KhL3C&Hw-a diff --git a/agc_2-X/trunk/DTMF_sounds/US_reminder_callback.gsm b/agc_2-X/trunk/DTMF_sounds/US_reminder_callback.gsm deleted file mode 100644 index dfb73f5e259af1fa52cf42d54eaafd9493df69be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5610 zcmWO2i9-^G!T@lst;@FeN^=vi0U~+UawTGI18>j{?*lF6(A3a}rp|gMs95B&5RU|P zT%LI3eN_Wg6irviDOezQlv=B`*WUZS?S0?xPxxt^`D>udR%%t&<6N9r10$bb7Kv8` z5vc-(S>~7po7T9AqS|8j_<+JX0d3&s%)CpE&mc*e>?^HG-o$Rf_nzv_Q1MVCSLELN zn_C^KQ;8XCEDK?cJ|;t}dC{E9bk4mA`gQ{37LSf9AdV!`(QJrHrKcw@)O zbEI3F?yL4J6dp``vhICN1$TF7Ez3Ov@3QUzo#9NLk5y1%O*qG-u= zY}(+(+J;1Z;8Jt&S%`fbVmM_nj%iH3(aE==XkqD%G#0pRjVxQp6LXIFb*2)M@3Qj; zz36CHLzio!&gjPsYesFdmaY;9tr~9Jj&?MoFZM8BHy-xUrK z)Vg!+pgyqj13PHpIpl#MX~h(|2bP$FI~TilA{FhmtHonjCsRzjrw`n{mjsLd-g6j6 zDMdRCV4x%?S%Vk$FKstv-xsF42l(~g>siv>uOT4<)r{P!ru;=RVIEQt@2Osouep>X zEjI)qQVo)3*Hj0VLh^+wOJ64DS#1YO|D)*^JS%;}E3^aKS+*g1+oF!0?UXjoz@rHQ zjgz_UqSAH`#qVL1czzhNWaRZ)AeMH;O3kpMR1sP5g=kfR=E6jw{hr~J7Mqarvw4Q8zcYG zbX7jxQw8-sljTrJgS0i>&3G_m%2D13xMs380P?!?lrJL>O!uW=KrByZCGX&1!MT%9 zB<@Mxu(qm{1;PEYT2&5~T~3gUZRQox7^Y6QqmNtD1qMh?NMg20-D5roQ+-INp_8T4 zO?7%Y2e#jxwBSLOp5MX-t&wTD8_f4~b#BIm1)U@|xVX@VEO@xv|6qqK!1(+_=T7Dg ztq-ea!&jSUCH5lN3SJhr)>XmfOADJk=PC3T-3W1S*;!o%uI3pJ)3J< z?QXQmmW&g>O)%??d{(vclEytFNJU1&-v`dd=y?fQg-2j|QwXeatAz~xvaVYGtGYV@ zTd$@4eY>oItmlo!{vwPaOU6MtmFwA(v!B1i;MEj7wjo=Rc|2rCNS3&thygU|CEpQ! zJ3eaA$cXUyRMoG3>iTT_AwktBY=wUgE_GSc`}tU^Cj)Aw-pX)YnsV14U#F*vX1vf% z*JR>rW{ZUWhw$7Dy4Z4dEec z%07?uMG9EnT;gMS36`0Ak*=?)?WE5ponMN_33)4cfN=EMNllB40N z`s*u}l=`qcdvUPjvyKaUcQtzSjv;}FB@>C$yYp5N?AY?@xTCu91%1M+Am`||7FraFFCKv zODZ}CP(U(hLFWqU(6b%A{!Ru6SbT4Rt;{b;(l?@$E|7gzv_>UvV4?metL^v>WW+u0 z5a4E5tn&1PI#GbWbS&HzxFH^iuf7WJ5GR0&1L$O3vYl)82ZgpcIziHQIoV)(0pMe@m)kE(iq0ltOvnwkP zpB^pC^*d8}*M+b{bD73Zi=SIRtE+lIcp<^q#C~b3>-+zx4Qk!FpFd}sVus{=hro9FW#vSvJ+W+((e#J$h>XN3X?M>-FF!J2r>f@Gf0PEN z9??0fPWt1UC#Vv)tYA=sm4-Nf)?h(B5LTbdZZNLx8zWz*7|jq@7_eAcg7hpsQ=x^qu|4x4Oq(A)el9VcJ^ai- zEEhjgHZ8giNdlI$h&wu1hAHwjYW~CTF@z18OH+%lp~4!;$&g0g;RS{l3OiQ@r!R&U ztj*xkN8`d_lUMp0&}q{M(7?BGWXRHMrgx+Up2&DXFZU4@90ayW z0!7uXXCFf2LD%4Q8&kOK67NI}Fe<{f%=o{1tL8epjnbOWqI+MYoP*W4%$rj}hE?*$ z<@E|)=o4vcbF(MPI|C?`QZtY;?+M}v5%8qdGyxKr=yXu8f0>A zvfLxuUUi3uOsa2iQfv!(HWXC!GHEihhN=U5c?k(?Ar{W3FoD(Qgvy3t#Y3sihQ(DK z=OdjajC$a`U2mFrz|h!W%dqy@=v{GA^h`!a(z)ZjEQBM2hal4B$A^rKwlSHa3Tte} zy!dtSQ zwBI#;`I%Qd;EvUVC1HZEvSdbAELz=N&2edANU$5%%ZYUHBTgR3@{3fa$O!&a>k?5N zTil9ts=fkAmsU=Ef;?Iw9Vbu6yd5dAzn5p&)On7M#SZN6tEXbqWEynEpwrb@V%O>b#DU%VVX}@79oE_`-l_*Guc{ zmwvHp7t-(5uiRVODe3h2Cw6Noe- zU5Y6hk&(uvY-M^Vg1#0DifI3v>ZIs%Hr+I2$n}eBlAdvSzAv;C7VK2LPd|a4-{XwD zt?VgL^Xa^x6>J-fW__lK_2}IbYgpK2xU$qblvKY@zYNQKLHt2Hy>MZyuZ$LCx!CAl z3<+Azoi=xf=bCdG$cof5D6tqtX3Y&>qJby63m;ju+)hwLhk*`Gy3$h>w9L(HtStq* z4aZNe=87LhUOY#y1o8c2=+cQ=45D2PavRfx5T#SFPRK z`?2ed5EY^Gcc&Mo{G5(SJ8gDT)90CJdwn&CX_5GZd9c-m=vmy^u{Z{;t@hH~x*DF@ z0?%86OCcv<*@5R^bqw1~%NVOV)0e!q#2T`HpmvQ)*ey3Boc{_u%H_iqHSU|Ygf~61 zVl2f{r^KJ%b*Xp4B8FLez`tb#wH8Zu{>b{mtynUP8||~XzXtvaGuNbXKYz5lm^TTi z!j{t@XBIE?5oiz>kAo|AH16~BQB8DB7nBdn;MIX##jB;zpp^vFZzYn*r~%!LyWG1D zKJz>3){1!ShP699rqgak{6OE2ZK7Mr-81CyWz?{RJhr38S2|QAbH_nTNZbT9=6Sin zpaVz8jeYre6kPO8*H)i8mBT+;$DM(>h3Rv+G7EElqsEx=r~1U1HSr>_y3L@0iLQi> zap!bdu#Iu>en@sae=6B`TNI*N5qk^n&MmKGEF`ISxepAKF9d{61guIn9R&k1_Q{s< z)-|g6Y>}?5>v+@}dUbSg;j3_~nT#dmm%mD4Bm0+(J>WUMTotOu`zCQ-80UrRu-A{M z6+qAN%v|ayjCtfU3h!H3{`h@0&#IrP*C! zj3ygya~I(0_WgVl22_K)W;Bk7{xP>*WW`CUb6H&m6W@St8Al=gA#Wm+h0nUj>TYsp zkKgiUX;5QHhv4h#<6eWc#gfnna*S6oB>L!kT*`e(q-%7lrI@?4dD^2v{na<8a5U}= zUJ`$m#ye(9<{YNcTnxv1H8BpB~UcwS?kh>u;gI{b|2_^DSztn@NvXnfzY7pn;#n(-MS*yg;J- znxfFCHAkn2Yk6k~m_C4#8wrFLSnU)Aojv?6d1_qosJw++?cjFm_)X)_9Hc!_-5POF zxg>6l#w`%9qM^rn<#rj|PS5@?aaBAw1G$%_%Uw;iqVX_Im_pV%{~a(hW~ypWUE}I> zci!4!+RW@J-3Qgi!Jma`zU4o373|djGu|eOT1SLev{Bhk8-LO#>U0B7b@R_lQ>=PW zKSY=9KkOACiZ^G0>V`9l*2)CfJAc#VOxN#eoEnXy4ZTd0&IvKA%WCON>B?nJ-`;C! zr1(JXLse?YE67C0pPsH|f}kI3NBH#u@1|=fLRU)Wwjx_`+JQ=4$rIWueN2pQkxyD0 z@a~P{Ly0LX>-Ttn{#U&bw!D+8a3rni^Z#4C{f6c`95n9943@i)XMtK%M;K+HKzXXH ziumKyGyOn-r4$NV?_D{>hy3--6P8dRh3mQB0G5Xd@p*X2!xRkMQiYnVA!!_*`FZQJ zkf-iT_JbHh%ge)&aA%ez#FDpIYoH47bf};qB}mYKJ|;rFvT^MYDnFbTt~MBFGsoJ; z$EaJP^ibOd3Brkw1ofe2AUWOw)j;Oo!Z@Ify60ezbK3GQoT$#S>b`TPX8& z<0!XSHAPJD5Mf5P*enR0KIy|}qJ*X!!*(3MWHa>gYev8_ z$K)H;!~y+e-R~4V!Pjp2J8tkGvFK`dXvhy(YLj zQXI20!AOox4tA$CeyS$2bp9n=43<3Vz6n0Bi`r;hwis*h z7WQ1PSGNmRS(nAz0*dTavUto;6%18~9re|&cBm^o!L~)v!z%4xZzX+F?0V7{6BzQKtzZiawMsu{Tuo3MI!ehdB}4F?|){ tMj03II{&pr-62X@-Vn<^R3Yr9#fYO`XO7i#;}o5RsVm~?^_&g;{{iiJOf3Ka diff --git a/agc_2-X/trunk/DTMF_sounds/US_reminder_goodbye.gsm b/agc_2-X/trunk/DTMF_sounds/US_reminder_goodbye.gsm deleted file mode 100644 index 4759fdf8b8df2e4817bfe31542d115547a7a872b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1980 zcmV;t2SfPTXq;i&P+++wW=m#KAvD&hy4-~zs1;1gSgWBr+>Mqi*ygk4p5K6sD*`PM zV}}UiEwvj~!GOy}qEoVkw!_jlB-P?$oZaT432l-|B%ncCD$ZA>%Ar}SUaLM=qFZbm zG@aI|dsc31=1H#Tn$cg(INX-;9AT@p;!ZbkS81lnsHoT0>2lh4U8oeAMKUX0ry0dz z7ZP2>>+fwXX1>!Ak-;%Ru#vE?RXxM34 z9%NO?7~nQ16IZ9u^FlUUR|PIZXv1o($ISvsH7nGiEbSqxq&c{0I-Tet$$JSAIO;*? zZe=j6@L|gyb_83~p>yTS#Nhv2d9+Z!0G%a{Se(MZt6p*})@1;dWs%1-(_d=QNmU@b zA(B@ebs)ytYSks9Ks=+!#O=30$#ZGO?9<@j$rZuSDx_ z;HjH)7cJW_oFS8A0mme@%RFnw*CdU>+gxM8+OD?Re`VU!jkeg^bfOX4w?uB@X-8U; zg5Yc8DH-6x1rI$ZN?AfVC}t&I+cR4k(yGCTlX0g?%|Q)D(5p>R!RcL5TieS)=;A=5 zui2{_j_$YP+jQ}g8)xP=6#~|v*yEDQrkh})WUE-42nq9Q-H|qX}p`&AaapPX+SrIE7s$hfMpV!#N^E&CFB}68{r`6qm9<$ z)#Hz_%iLw%gWYloiRKphq!(ASn;iDdf~%TGbL{z%%P^ z$1{K6$75$km0=(}#D^%sSs_Y;09$5lTdxrZPt8nOoMslXYXCpC)J zG0UADd8f%7k}j)bBs{yeR^y2UOaqok+|uF2PSd?4)aG%T-@3tGV_wwe@Ifyssko%2 zVcTzT6$@9RIVAieWY^|;Qb%RSCY+L75@p2C5H9N-W2y-xZMh_0$GRMKw(QucdX2|l z=Eo>fMx0-XIb?8GW4S0c<*~q|w*>VPmuS)0>T``uwuDF8YiQfV0z;V&TXf1o*%BbR zyw0Lnt!RTK)@3u96=b0~^R}ei(m^=hb)Oo_K&sSL+Fj6qRp~>;G1Z@Im6O1rN2k*^ z3$UQ3-OndvXF$l|a#vidKzW16xysfjqv9HcAk3SNIOE|VHym~`8`%J8W7+K{w!lv< zw#_8hCX1cZ*1)*rjm*ny02ti0vTBC_*4v3$V$VR7qmo9V*QT5v5^+GsES1vSg}t}cv3u67nIzlAibq?KBh)K5FRquV(Q1-7 zk;v5~meHKP1BAOy0Ue3s*JdHN2iL57(e-}=kf9Bz?1jW}3uY!;gG41I-KI>MM5Pc& zsV~1S)|z&BkG|!ld)K|*ll7RTZ16DvQ0^%hoNTlhB;GWpx7d^*&>TzrCTm0B-iVN zC0gY`#fwf86NLcK>UJj6l)wlf$?aqCz}FOtHeJ`Mo8pp%K<1Q=86-)agaUGEI^jq?w<4VzMtPu_jNtbr)S>3B?HqnQ5Ow-;bdR<|F_6`d&40A z-m@8UG98wm_Gxz0q3`CH8(}zBUZP*&E zxG2mVx0-M0Xuo!c0W$qBtdpm!FhB z#!T8+7=^1aOzTaV8|<=f^5y8>ftbl*5PHm060cmyzs&!nNs*tzPE{BO44Y%iPyhai z%}At6T4UmON)q(@l9S8MAi7*81aVw(n%m>la!54UM~iE7iMH@jic=?o^3&-<7T+Fe zPT#R7IJGN0Yr@8?tI{l&9^5n6Tp&)F*q@o3a9Bx{x97Q^|Fc|ka1DC@x1I8kYuc~_ zech+U%)z_u@AOl`V{N*(y!U%d7mgG`dV*IYjuioom+yXJh}H(bVHZxiSlpcaSPb#l zllP~-nD^>@zOB9(>IP$f5DGV`MrS)voQYHn6A!o~p1! z>9{N_S!nh}8w+*SN{4sqc5=-|KNZOUWro4=YAHfB*`5ck-zcADiZ9%yO-dPU{30zb^E+nhzLN&&|Ng@hULewYhwInCu4{Gz=>^=hZ4n zA-I34z@IUnXzaZS)Wb7xPB(0{PM2!w+`ZW z>KkO69U5OdYZqJD%6w>y7H_>VG&NYsvq?xXy}+f(1Dno2Sc05ty(NSzlAg$8F7y0N zA6&B|7#@D{$FycjV@*DJxcn#0nNqKBw2IXQz#I+ii^yb|CmQ~`XxDM70)k}NwPQOC zE0f%>BNQFtMA2pUucA7~s|nCKb?Bt(5uRTrnhWJ>Eo@9#_VSe;EGPw-sypbCTa2nk z1pDZSkTH-~xx;16e7w-fT@u^8kQvIiv;6RTB^uJK8Y&F!hBl_{^F5M9KX22|gG#~O zdslP$RtcPo`fR|%i1SNw){a|5qPImZe(%y$yRl@cdtYWQze|vaR@re!ZjUBkzl z`zg-6jgx}NbEcA`T_pB<=+gQ0Hr;z5Qt&{eEu=>>ZuIWFUTS3qNS36mJLjE?7$Y(J z{Gmmw9953bYZ@VEv%^|hTqcOV>J61y^@Lg#(&_NPkXHQal_$-PX#|!45%lsv*Yf)F z02`KUt-3zBd}a8!!)O;Fu}VqtZmwiP>K=(&s?Yg`jjX(r_V6zv#wV#MyCQY@ahTo_wIsw)`@y}p_s_o2Bdzroh%+l(K^%^wU7?9#HDQ+|zYbiY zs?;a7xyr;kO6?9U!cn^<5S7W{HP^OdO)lDC^IO$RvL$_dsiJJIf14hS%pxdwXREx z>fd{%ttUG)9jai}Z({iT#h^}vWU%wTH+o%Q-RDEiTANliyfA5*i89I_IhMzIV$%=r zksPmtR%8&GlHT9aNhVHE8`7g>+7+SO%vos}#&2TvQI@Hw z!&+kf-6@E>sqf6;RQ$9spzSiI^qr^~+$&kH+BJaFPXD@pRFkZ8J4VhmPt|a8r1HFH zrF)mNC7Ti^Dd_KXL&0a$vCuT&!lhsSTzJm+i7ygZ0(>dtU-JlMV)Ju{ay-tj^x}YyP0v-?5N5}-3nJ{mp7}Do*YlrcXKP?|;=;0qE5& zH(3|uPCA1=5nuZyf?-%;<}?J2;A#JNGLM?-UcxBoP87350iOx8%9KDpBX=dOhy31z zJRK?e)-9fJ+u!`)>25JgwcuQiKq~WnV=BrucG(hDCA~v*?W|RES#*5K^p>bwSF>3S zJHJvIM&Y7Lt(_hhRYPCHf=26zC6k90oM$P{JYgjI ze!VIzjc0?t-6kgRJl*p~6?n)wVZZ$AJ}y5vkZ?hyn;@0pk?Z{ddf_^)5!>LOd$XjW z`%0vKvt+a<-?~W>+bymtjumG#q)=nr1{@PnTWBW~0j^dzCG zM)X!H`=-l9SP3Gd9Xh_6QhChG<<{j{;g^5RQ5CVj) z>YpzdN3t&2J1RxJIVLR?;I&M$^ZGb=cz*->(rwym{O*7_3T+Hivk)Uns6tCBOFHT) z_w=;}vK5jHiwAoPzh9JBmyCe!&9;hPS1)cfafjhJ#owe-bVlMKaIJ>J%*R|K>b{|p znoK0PLQsG0q^q7Jn7Rv?n1IXeNxbzpmm7n*bVm=wjDsYd@Kb6nO*msC+kbOnmk=i~ zCu##NQYV9nJVf+Jk+tM?S;XmazI7e^duDa1%cUQ~Y1ODne|N{BYVC$~#)yS9`KsAK zW$CSXqAame(@MBv8de$S^XdNcmS*6iwV{=z%r01)TZvzb>OaD$rhgGV>T7z3{>Pq7 zsJ2=2Kj&xZ4$^f@qEOG{%KKf+w8&1Ag~u2LQr1H3603o;3?gSkn$m(0M$)FtYrH`! znl~bQv3o0403$~xQetN^vKctZ3U!Ifi*-Dg_`CdOiBDIRHtxB4#w@#S?jkL$y3Ea1 zlKuqJlCJeR)jI-CGH`X#SJpVmJx-OgUvpnc#Q49GYirBFt(uZP`$_@Ri ziDBl&YN17VN(`OLFekZe!>QAMEf3w2b@_!ml+(Rb!T!nkG6E)hT3Mm_12+JqJ_OA4 z_^D(W)IB|_!rgn>&rAO^Z;nn``VSFBh$maGmmAJl+_)4a`^m#r{xe_=oS5a*LIjCZ zHU|{|crnB-muNT-Cd!&*_dU9_M0|p7-tRLJUt#VPtR&*Q&10TWi#4F&yM8s&SMhWx z5jfrEJNL(R0Gvjj8LZYGt8emYuGG3N=cL|}GSZ~q*BaI~SFy}00Xc%xt+)#0dRRIY zlxy9lGF@9F-9gf(a=_%=!kd=~6;NLxu|bHR z^tGsYDkMPS{sy-tikWGL3M+QFJh<1dzd~z{HlBS$<>9 zs3Ox5^p4&hUlbA3Q<`puckOOO9scA#yr@iEqEUw3ty{>`e|7JOT*-R|C1{5&JTFb< zVavNr!%r_Ae_}&ugnBp3+{?VoPf__Vic(<>3)#Cwm^g84fE{G%8Wpj7s8kkK^lh&O zvh#0w)ZcM*%>4ay{dTb&;IL&c>q6(qCCb`BY5Z%XFXxu&E7kB$7Sv57XPhz%m$^DxPejTYlmX^m3v1tnZ ze>N)5U^s+V!TD=g=^G{m+E99-WnsjQZqOi-`~IK;4_i^LWsG6HEl4gY5{Fu-u5`a<&3Ba=}LBu3Xb9leg{*yeO>RdZJlWS+xT&_?NbdDD_u z|29Sxe%A)h#FM}a)fd4mA~n0w)$@JDu~UAbQX@YD&U`hG6%+Ot@? zUCr&$Rg}+4P(_^lWlm7*60-Wj;95!u1Y%w}0@u*SjQ5{rE|t6-c`9gDwl$0HBtu5_ z_W!KR1y*vdC|;#w*?%<}ucrg3F1AhD(y7PL9R#|)R`g$OJAG6T*}k(VE+!yn*BsXU zjuklt$s?IZgy$}k&t>xYGcA27b^ZHY)rJ8ONpi+$F;Xy zwTmSU+gxvn0v=yGIZdtOTD9E!b4hHO-m0tvchzS(f$C@@2gA>tr_kT zY9Uj0&#u!)c{|JYRa!`F_;qw5-`k!ODZHUYDtr$sND~5ZuV8OEHn=O;CQOn+dIb<^ z&vjn+0b<+?B2NLm&y(q(jrK&qE%gokhSZjXp|XLl14$9T5jAJ)hX!Y>d6vqW`Lb%r zyLcR5A*Sct*Vbr89LaMC4)PY=VSqsdD*mSYDHEk92T+Jb0o!hLY$yY2HFDg*+plreYa@wS0<$+)s?6eM2 zt@XCAQR^O{hW&AS^_8WPP5i8`f_EtFbks8$!#u670x2?fbAEjb2w#7Dp3q0@FW?`} ztVH=E1_3kC%dl2uHBz!RHx^Tc_j^(msxLQ~!jR`}xFyVGhj6`+b`{I0<@uW5b+fy| z-H)yJZmR%~?C%QhE=RT`=8u?3l;><)Dv+Fw6CUQ3Jcpx$E`dQPW4g&7nRo#0PFYmR z+kB7OR%j-UO8%&LU|40fFTu7#FNg6)%nLofe%R|9tvG&Tw{tl|HieVKRp?oE!~Z@& zBP1XCcBf^i?0g6$CgD z7?B+{KkP2nxwigjb+CqV8Bd9haUf`QmCwJ!BK^CR$3ZM)Q4g!<$V_*F`=dMSG1 z>(wsEy}gxZ{wH3`o=t_oZ15-$Vy4xD|45#Ju8H*o6Csz@ZgEv= zU&2e7sIoCHMzUEaXF#(wmIa!#Db4IBZ6j)qz7l3KWUxvmJ>9R00| zH|0=zSVe?J!0WIkqSf?9En5@XRPJv@=HHu1m zY+OZS>zYq)Zp2P2adVP*XJ+9_vyN|F6wJKULL7!)U!KPemGnq93Z8Y#1%d?j71i~!KZU6- z@WNU2IkF3^nAr{r_V$!IRL$QEh8I*Po|fF`^tFC81InFpi|fBnxiz6PG7@J=`l@Qj zb3J|y*?K5k>Im1hx-hQl9hWl~9u~ldVAzpNNjJmes{BjkPV^KspYfE{9G)Q7JDHIM z3orQ((EH>j5`Ep&WrM6ZA7M+l+E*ly5Lh>fS+QD_0)Y zr_!fRlg0*%bkp@iJasCx$OP38E2rf&zzFVV?^ie9*7FmMf?fY8_DCyr4%wZ1&QDkO zd~)&i*uj+>?hlN7XH`sy+ng^)sX(!XWWkGf`lIhnwO7h zFXD2>J`oL-*R$PVl@RBp2E{PR@H0HvODj62jas6_d2Nsc^KBaA`g8746o_kA#uI3( zA;Qe|mR6kf*Nn1}7j!49lst>K^r>|1ZG_CkjB`}8Tw1fMyj5bY{EkZ1%(S2AMC1ee z|3y|Jnjp%8piapt`QH|Hu!=l_^)*XF<(eo z)Vecmyb6=fokEJ%J0j<)DIZd*_k{PoLn{RLLUChL1Ov`Q z=AmE_JUt3pY3QXVjl#;gD=oxj#BG{n6Uvbfa^-QY^M|Ck49eVlzL&^Y9)FWNVo~*v z(KHXv8l`Jr5QxeeXT2=-iAHpj``hA`(c+&W`7iQ)wmDOnI6OsFsD9nB@3mIeJ-!~I z(ReaE9Pfu2q7gNJuJa7V`Rj-D*^r@V{*Q68tsw;U0bd@9^ZN$}6*Id9(P;NGCJjLj zERDHY-f*C7V+so2Ld899oo>&i`(I}L?*{=uD}wgyzR5?xzxFcSCg!ZVe*X93FFAG9 z?kw{pwow~?#MI%os413WyzA31Uq4hj}#Lxyhp1)H^nZcna--T}NVpO+H>uSzSio5$I0S~7Bt*ddfC!X_!-*Zan z18Cj(v+)(B^JS;QpGfqR?(voUm^cGPu~Rl#(8o$FL41H}7@wKY=#;`cy~JtPF;J3)EVk;sVL1H3a6crcqZVVN0PhT1x|dE z?~Qu}8L^yjN{ftT!EyxMl1sUg#B%IaYQT)Cj4M_y#z2`|O8iKZZ3S3q@~N$UyDgfT z|5(zcYw#MpMH{LLbcwG(j+m3y=@KrZg=_^EX$Yn*6|vpsgTv;p)lNLo$dOv4OmWL+ zlY~5?}@-K-@ym$2%5jxnu29% zTJ!F|uVKsXOh>;d=D&!;jhGkVZI`JpAZ`4HxS;uAsa4K}vqkQ|#s^wO{iq%Pt2jhR&YD~-uNl;}vaD2rrxz5T^lK9U|9)>DE+NJvZlyBb8c)azBMH;$ zN-NJ7o-$CdKQ()_Lub?%f= zK=JhEmTnM04fV~pKBT)Oe(6k+A~3s$B2dNQq=vXKl#A_$dr<=bTQ9kiag9GodFu9W z`DOzCP&%su5g>qP@PDA?;bWe`&NwuF1ybNUEW!iq#qpTMgsZ5@2?saFmw@l3QY%a$ z?dNVIP);GOEzxLWuQ)N3+>?v-txII<*J7o{IU7cIN=lVsubFRk{yRyoI*DanaBk5y z_9BlFS~RCp0v+H*d~}A1C$)IOOGOS}6~#uOi7!9dZ9za;n3H|y?t?iW_6;qU(d0?bhad_rbMb=mn265AhLnR}r{ShT%emr& z+VCc_dN?%GJ7)W@Uh#7Y5yiL2LyOg;-8DXacy+Tlz|#VccL9-2%`>@ejINPmi|-jV z7DYg;!;Ny-_G0W>t+m%mR@T}$o7YO-ZQgK-7TSsy67sm?1HT`BkVmU$bj~zfLs>2- ztgv!5J}XJXO+x$01-o2c)KcKEO*1}8_w8_^&M?(1=iL1zh~0q?ma4^%E&DQYVE&_8 zw=|i$IW5@AL1}o#rq7v$Y*T|i zUZ&=&a+p{(`1JGsg|Ee*7;$?ZBUwjqZe~HT^5ZXj2sda_+zaPrDr#DH_lCLn5q3$> z;!SMjpc9j53s|Buqmbtt(x3t@se8X!^b$*)Y}aB4yvffd-UmZ59Or}(J6qN zdCuY!3hhs2Qri+m6Rs<=Y?I{qvY1?MgW;WPjueeV`{LmymwT(uEWNc3tgNeyxF~*O zdu&OMa@OaFA5dbc(Z~EW6yy}VcY`>}ZO{uETEzDY8#C&V-SHn2UQCvBnw~ryPoarp z$jxzCJV!<7piZIA4MWuNyp%wv5ry|vPT710$#B#$VIV<{3j0*G8oiWVy(BCGWR-iUFuCK8I~n&VZ`xhu>r;u<7-$W{(yN{h5G=me*Z1(9>XObO zcuLpDMdG&Ou9ikTjV zW@PrRFKGQ#txB{In(_9-g-f!{9`u12!mOTDu$%~?1~zeIWd8Lxfyox{0O^tXRAXuC zVAJ^!NZ9#DBIPDc+u&doT8rI9y~7EjAlvw%yY7iCT8tQE{JG}=E})-~oOKj^O{Y;T zNgy$CrQhqwZdpPtz1cAl_|mHK;QzH7?S;FWJ4#gRZ36Q$b-tH#Lz*m z0Gi0@jzR9;eAGL%q~0Xmom~p%GW9jS=cSg_t&6n=l5RhHRY}RTFgJW-#-O36%8Rwh zJrR}0f-AEhLq))ftBUM%Dzwz41@7DmKox`>_g>Y6uS@6SOy!Wi;frpDMEI*4^d?10pO+}&cDJpLU}qAV!}m+H!STmaf%?@EwyMbRZ`16Hi#N1q zY+GFH3S)miY}>RVS@CPWMu18uh-gqbx1%+G!-EOLZsHzUl=Iv`-G^($v{FpgRgJqM zy=S>R_Pd+Xf<;1CQK0T;vL!_x>@3-bai^Df%G^c?@h z3ImBU!;66j55pRMuocCpo7vr_F`4_O%qn8%k5o1<T+1Nawtpvw(iv;sh|QR|J^bQw3>GHzr#RB z+^>pODp#eu8t^X)^jvf$mn!StY=VbDn2U*RMh{BA*?)f6A{Z!d+WJ>$`h=g-U2Lpa z8*jT57FS^t)b1Su-O+G&I_x_B_qKkoEg1oA{&MW4!dh$^pn+!m^8A0-g4}Hok~ypA zydSdr`f?X}E0O*8=u%kj5xYx({bH4iP-|AVWB3B?6$ojjohVlD*^G7e8gUII$xI485a21471>ynu4OgEEtZvQgQD_XM3SUMlaJrvpHs;xyzn8aafBsa9?gXg|$ z;Dwenw4LO2HBc2wQyTZ%F&Yg#k4Qw+SF|+*+0I;mw26zSA*4O^|B69_2kSC@Fo1#B zEF)5d*1LgHyeJoSk6@X;=91pr=1;$Pj3i3`*qyvQf@tu+fjRfhz%e65Q72o!ZTCvE z?)Z;iFLT?86TtAd$6>^2Wf6m;s==aL7}cgHhV7*%2*N_Vm%t;nOHs^lRpoel-i3BN zfjbI|dBcY_Ut^?MH!t)TvK)1|nWHsYhIY!%q6j*ZA+o~UKuegO$5{J!8c;+L$UV|#WmD!2auN03q z#UZP7LR^!}sYZU+R$}+A-U(#Jp{m=L^)~7JiFbK+2V;X~6OWwFoBv&W2w zx$U-LZTD55d!V}$H7o@2DYa4SQeb!PQ#_#DxfNtwG0}9>x*%Tqs*H3kQzLyg_I5i4 z(d5|}^*NePe@Qhxb?&cfT6cnGbTG4o zUf$mv?)`y3xRcg$y9WIK8xp_=D* z)L0sIQC&}z&-_#kJf)Cb8MPXl1TuP;`10I*Mk6F9)tAkvE%i3Zx%jD16BS~!0NZY+ z2ao%7OA=e$wT9MZR?Kg-{m$7h>1px&z(y7ek{0Y@h|0Gs$q=7e*Ahb&(k`yAxdUD zm1dNzd3-9c|8X&Ik+Q#Iu^j4sfaSEShc~@M>yk^-y7w+5s5!f9I!%A(vPbugZfd#1 zhni2Gdxny1k}yT$cktBYX-40pLmSywW&NB$|rI19(mwTOEUdiKv4#eOfqB0!2P#))& z;qdRyWWML2`cLpw2!}?F=#_8h3)7Q%R{JUrzf4Ar%lT|&JZ~r=&*SN3_j~%NJgAI$ zVtqXsg8A|X-_|+6h%h&kJI7N*UG?gI3@m2`*mER5ooZu*W6eI*ILD2n!dQ8ViPsQs zi{@nXR7u^Nv_cEnQFm=RhE_I|_6!jL@grnW4y9&Wi`e^+h~S79~m51`G;oygwC`{9|Ijh!tx{ zb%XB!G(w`4t!b{t4UK*--~|hVJkI8Fhn*sJQwlxNl8|I69 ztuIWVth$pK4oMfK?%u}lQWVOKI}qv>V0JoR(o#k%hu=CbUFS|d=xiem0nSy~ zkUg?^2GE=Y*vF*`p!d1f4UbN4$UkwNM z;ppC{Q{7>7gajO)rHsc4jKKnjI*l`V>kM4^YMPvWg}*84m;?^6wq2mim>p8&+TkR>96C*= z%6_8k;hI;CdWT99dg#Wo5<$$vvG`T+q$Cpq=W$nCvfV&oV2arzL7b$m#S*g$_O^2p zBqoCA6Z|koo*_q<$?ls{u=D4Bt5edXYK!@KWLV3SA>(%?g{F!gC5aYxl%))QrcNaH zNBBur2F(rtH1z2%!M+f1R7>F8U;&M-&z=gtNDExp=VUHvA5SDlAZ@=`w$l}Ip=~~S z{~Dkv_g9MTB56zobIL@LI<^%03_MH9aSL1FHo+0ELuDQ%N?4APiauTmcbFAbff?jAd(BVZ~tw?rW7}~Xikb{t5W5iZL|(y zK3raioWpuqbT;Bx2BUNRNJR^cbpY3< zs4$pRgv!5=b}Pj#s|M_xZCcP%!qKOB$2~3Sjt-1*iZ7XcLy{hmt_d69iNIN5-kb`H z@<5RN^yT0Mr-qfyUfL+LZDzkTd4N<$1&`$2@_JiF>jX7VnX$mb7J2?Qt0-U4rSMH@ z%2;cCb!>9qcN#^Hx?%am3~UWN21^yRuxM;%FS|^#HgLq~7vyx8XJ-;kP1n_ULgm{V zb&S(0Kr)3H&vjBuW{fC_HmM{D_VBq;`c7i!(-KKSjxQ)RHsZjfRhYD+`;xze8{M4q z3x*gQmhe9E$qn#YaK4+vbv5*JrtsXhec24!Lb@vgX~(W1`Tfz&mtFQK1@eSYgcof?1M3(x)^V0>fLbKSW3^8B6tJ$Wy`RD|a(X!tPp~ ztr8-mB-ul@ETqduCc9IbQg2bmGdTOAA?VUg?pN9xgw=*Y@|n^(k(PFP`Fp1yq?Rqv zy%pSZy6p9~Yh1_W7)(-=!Bhs(b!h`R+nP5h6fRTI)vHKX-Qrm}t|Uc7{`s%Vzi(Rw|QelLbjo%X-(QI%AWGtES^|DmMx3N zPq^5#FTwihhnW|hP7!q8m-kI7L?2uIZW7$-%D&ZW1m@QwQk$@N!UmK}Fng#os@(6n zEOv}ub}nX)s)>%&BKJnnud$2u9_;6y*7`!-==U{kXo*vZ_0oI#qA35^k-L0nwUe?q zFFqR9G-Rp-EqQwqNlE z%swzD?N@K-T>9tyXG^3B#PJO=c&0wb%~)}4!Sv2JcY38CzPSoKWoFxj z9dh0UJ}>`mzDamZXSdhc`_NB}kzKb|Z9~dZJ_mUf znSQZ3PiwQwzKIcVKJzSF8hr&OitGPeGLn|IdR5z;4mp>WUw0hx;tSo?2VLT+FOuHh zz6n$Os!v=TCw$ZWUYDcLd}_%vyvi&k>(3+XR@|MbiC*6Fo{Y}<*GNfD z2Zqaah1sNcZD&FmlEY<+%>ff829l!7p0X>{cm|&QnU%sNB?Wr?>z8S77)kJzvV&>S z5>{R%B(bM*yQYQ2YETNHbQ3!R>Y@7y#W(LOGFm7<%<)G~?Ei6p3FE=x%xTpi-AOX) zU&xEc7$300$0A;4<*5EONR7JGP_Y$!GXOt`w1Jvn>dW*W>24bEI|h>c?Og zXkiolDOUgtBG^NL48!Fhf<{)+jfjgpey-l)^Ec=rJ|D=-hE6uK9lJ;tie+zd69u!4hDS^Wz z*7pX$YYC5@sGgKW*jWMIG9JdwDp7Ac>)!3vSHJxRV8nN5#{ zQp~G`XDjVvc(P;U2;<0-UiN_7k;#%LdLjChtfTJv;u6Xwfatd8B9CM4XWeoQ|8+fT z%Ct^v`8ph~+m3nc+ntKKy%EY*{uE0rE0H}ZL`-_`C&?hQ{hbYnj9 z8kE^hS_oB|>;3s&OOHx=M6(Y?BG&sMpKoHcIbG}@}8a&IlRVu u5Ga>)(A)IO zJQ3S<4ceXJ{?-dFCSkAzs38>bYK_`chu+{e>fvubE<{zV_BEo!8&&+@%0Yr1!Ye_! z?i`3Pmsw3sG}#_>6(}RFNK@RU{evg=VG{XrjOFK9-O1i+?dLeEJhNsbuEf)~^^)6J zX`j%nW~1c#hwVx8a?OBf> zF{xBJqVS%_pQxliAfUkpoQO! z(!6g6SgP)OxuGJdKKDK4$3OZraoo|}iX$MwHeqHoomToW(54?xkMSRLR^UL+dV!Yf zxak8cXCN{`MiUSEptM1b<$FElwACIRX6~A?^ad-YpR${UzWl3_CpY8g8>zgVahMFr zzBeiwg$dzu{S#_x*b_s$ z8Z{sKt%y;Q*t~eWuT_{Ts(|2_6Of!hc@2Z1AS_(1FWX!jX4KS7b!iI^4vJEEhdQp7 zRwi2BZK)}T_aAM}sH8u^2S2l|nm%aLYZ)uT)q91VAR3u$9cS>PjXHq?|fZ ziwsdm%a8Df?1=0v=}{FW#&!u2w4zf4p8x4_7*L|AOVO8X^qH-bI{Y;F zCw&R;T=sVQ2$H&Die(^emRf(8IujvdhzxkIN~=uL|7?+|u6_EMw$hJ15W1xhR@>{OlnIom~Rb}K2R7fsN{bW*FFO-jnY?6ZVMMlYqLim&C*G*4#v{TMI2k4 z`{-hPjSlfvw3X?K^>TSXK5Zg8NObTuRo;VC1T?4 zk@!7sWNAuh@cWNGFBZ+_i8(VC@kIw$GBzd@xiP8N8Pk!A@E@h=ITaQuGw=mJ|05Xs zW80LYhKYN_NzD@O6lM~fi?}374OzCB)9y!wde|rKi&)C_le1|V6Kf8L8BaU6-SAW~ zJ^h84?-|Z~wQco**6?J0(w=XIIr2Mh-!kVp=1fby1RdINKtf&KB}%~4#jk00mz;A- z=0UhlgB*?%bimt8(viF5n{O7`cOwCvPd!loH-uP7MObr=xZU7d(g|)UlFlMw<&Cm~ zLv>8!+cY=Ff7pyZ<)~5MukPNVB6OH%AnN3rAu}oYk8r?c;g;(P2ngXErsji<$>Tpqa zCf@fxZA^pDLkKwPpyNT1`&_t3mLKNY7igM;x@VFXGVj_Vy$S#)!H|$kDD|^N}9_6`nf5K!(Smo2k<(_pz5s7xXJQ7ZcFKxLov^<7?`_2n16rTvIRsg-g|JkY8UOP~ zm7oTPj!kc8a!Sm$qrz70>6<}ysvp*JqLTUCrvkN4_>n(~L zb)ZfqH+h6m%4lS~UjubEWJnw#;P{@bo@nD1&xYcEO;%A^;33BnY3AJ@{30~t5W*Yp zgaeEnhGBlrTeoR@gmo7kn6NzgSdxs2j=ERoS9ZxyE1+G9s3eBZnRz;#3Fy5?O;hxZ zt%xCczVWx#7CLiL$9e3=q=Lp{*~oGAjzFCV1f6qPsgoD>Mo5@u02Az8?hOh#{?zr% zG+NNvh5>^z>Q2CeXQpyz;R$dF&B)-&ucd{2fAk=0f3`&-cyLUP00)8tq)1ubZcoND z2=AXqmhEEt=i`o#VjgTzWblB%_m$V=7d<*$u2Ok zr+kkl^5^$^q`f1_O9Fbqr;(a;8nxH>*y&uc=dKQM1f1r%8urUPL1x2fU1oZTh&kqK zkCUK!{mlnMO0W0&jrM(1vGlO@Z>3KbIzkIMUC4*!1bWhG;uPa|{vI^qibK#8C$+nj zYbDuUT#xNHTf0Sb-W>wDADMLh-0CUDNiS#2b0qxQNekgdnf~fFXZ}{d(0GiRyqcd9 z_v=~(Ip^tnDQ7`;IQFjSY~HssX}ob0g7OHt^iR3v2D+TaVtwPUDF>O^4)|w^oC25q z%FP&bJRW^}+ExBA0@AOmA@rF4b07Iu_QM}S5i9oPeqNG6CT`(z4R<=}GsL7uB{eD7 zMvkLSVKP}z(HJ7Q;=Xd+ygnd*qVz@Rw?Po1YEF!2VY#%+Eu+pmB9`~J-;omeFD}9n z(`&VQqrX9$N<@xWR%mJ>9N>WXMdWM~@rJCs1gLW{SofSzXTu9ys1*W&c}shu3t%wl zmhg#pd`mmWS(5{4YgajI@ROtOB#IoPgB_v z3dcgUuHoWOB$$#*k15hwVPY(zqLV!3D$n7c=9vvXODzp0b6kfAlQp6;dS-z2io_c6 zuTxD^{@_PH*$B!2AYIou@)XOup-!=^4lFyvGLcw${bt|99Y+U^Us(oC+{1Uqef^9+ zeNMZ~rPx*pPl>f&M7yRv#{cH_+P?BOLu2`lO&r)?`QwLPamnD2i+@NkfrNr475eOT zQS91OfF>iD)kyO^9^@lw1Ua=tVz(s;v7)RtdNTMW6tJtip=rz5nl>A3I~Lin?b%~n zfB?vyN`s9nlsxIhpCdk+(G8zB^TNzlbT0k3ti6Qp_;GYV?xZzR-SF&aYj|9zoSoC; z^Af_f?)w^kvkhScIn{PRWPfT1#|FGd+Y%19UA=2?0awi!^10NT5C1;T4+^MTeJ*+H zL5NE1jGa3)*PJvpW5Ml&G)#GBymTp4g3bf3f4?f;y2feG_qw>fQbAOEk187Ez8|=# z=)=-%Y$?Ac%M~KAh~Hz5nc`=u=2i=+&6Ck`(|N9=aqf-$-;|=Qr>#FqHhrd7Q#^0D zzc7q@NqOD6R9i8}>B270gGD7#fHuo;0T9&?_ki-Qh3TkWE}mf8@rKrl-&x@!d)FyE z8g^YS>L`;gZL=Le)=vy}QRY+wOn?#=q`A<99zr7ahQ3ycF*P7#IxJP_JX?^BjBU2^ zNL91vwh69S4wB_Sn$wES>rGdZ*2W=e^ZknAi3Q)M@*#@a%I1;vV!$*qdl zYon`G<}0aepS}<)Kpn*wjrZKrTbY}{agGK+%f2w8w| zbOJPfHm%~68Y(}Z;`DvPHEoejw_{xtx_HekkLPlA1?Ebgh*pc!>WxApC?3fP0oo84 zA{{sOluaRnGkJpNlq%CDfn01=k6A1PvO4Dj1+~S89@qmi?&x>`tGhl+)|?(p4E2cK z5|i|91BVqMt_vYB*RxR9Rl3f|g)CR%ERxrPwLL2C=oL1P7lXPV{3u9eKV%T}1w%UC zR|2Abr~yKf!&xA42czxy#G3QH@z?(o6`vrAX6f~mIn5&@69J_gmA=3ff?^{Mh3Lr1 zFD3Fso$C>U9!C~*u4D}Otd=32%=y;qLQs0h;f3Ohv}_WwonrY}zbpJD#fj52yp)d& zZ?|=5UOAaw&s{I}Jo1P{7y<@`=JROV#nG)7{(CT-o!s(7pc1y{9Ko7`=FyUolqLog{C!u_=Wd|QNNV`EAFD5$Hh1%) zj4V~LwkANCc}arJn*kKbd$$+6nDu2ctKbCEpF_#vt{b0a$-9^-D8{61u<~nl%Wa1;pIs&;MBdh#k4)OL;eY9&gea> zz}Fa%8zegdsOWu`x}f6B8Z5vSk7=8~Hqg`P=@-8sM+w4p3 z5h%vK?>B?WZB?N5N-uN|LtGbJUZOgE& zOhjL^=xrZ!xvO}Q_{>klX1h2Zlda;A-A?&@&|AuQUv@A^Y~J$Y@gbPO2wp$9p*T)d z*IY=1`B^WaKVe~`DZ=6qmTG#Se<1J{=O%_^ zW5nPX>HW*@v8a#fwRn4W+@v@_j#_ksG=!K`F|Qr}=y9rWF~DY^*F@aY%5S;R|CM;Z zT5Wqb5Qdf7-{^U1{OqB+Xyd7xRr{+XtsEcRHm9S2zk?Qaxp_Zo1l+z`iH@96Q0`>{ zg2%z)wDRCfw^QM+)pN@wP#=2T{M$Y#?K32rT*%zu3y{?Imd;$idd?PURsB^3E z(G%02XEMWBT@N|uzmfW_Dy)jAg!NK)yO&Ma5bn;|_JHgJ-KP6Lk7qyDZIutab5vxu zK&vXbF~P$tas>B<^}B_lY_QLN<6X$)y}Kl$>u1I1TWKLF^b5Doh+33W1>5;QrAK)= zq4A%mh+gl!g#mr?A(Ax!tNKfN(=M$B)UfRC<=MOM#Jav{N$d63=@-yWX>aW&o&;)$ z=J^ptszC<&^4pN40lhScvINBI{>C*%m?orFUFE32&2E{m6NBPj@}Uf~U`*X?<_DPH z@Qrr|mnnBa#(W*%;>CTyEo390&MA%rb1*)L&e-6vjgqkyE6bmI zs%n^Kyu$$<@*1x58Zkh?=AeypCKNcX=e3+g;mW9d9(O3GFl!@PiJ0UCVd5zmd>kyC+?QT#DRJl^w7SeU-c-WQxwHXrvYtMUF=<r0u zPmu^N1-4`sTdqF#-Y-rW64gIoAN~F!=usnb96)d$o?s_yG2;jZC6*d979-L!K!Lwf zpx;NFrbklTcTUfCtN;xGxj{cn!Y=mo^FqX_jF{zOc8oUvsUQp}M>n`QgurY7^Lx*? zP@uj>`_bYQdK00zI295VyZs*MZx>Wp{~k8CPMVh|z)m5WWUFHHp({sbDPqTdnJNT1 zuAlC%o?uS_u)O+R3dj7(TS2etF;8Bq#3 zUar)cX5zHQmnqQr)E5!IQbx6pW*K3{vzdg&*FtqEu8K(6uxSY2$}0vOy!nt^gmg!I zI4^7Xy7f9ZS+qrrktvbzlOc0acYxz97iUprFczwcN20I;Jn?jp*t$9*@NV&N6Mncp z0p^eRjtR~{23DF2(mUDi*aCB{IE~l_paNaVmnDe7HNJ6<>+edSZQR9J0R{+L&zwFa zdP|o9UckcpQ~gh(*J40GlOPdj zy~*T*nv0#c{37a~!^}qlyA>P2prQXU{!i5LG?CZ|D}>}q9XUWTD1RJut$6hFpg)Ac z4mL{mJtEqmw}rngPJ^B0$@77b?HYjHfX@C4^XCP>u=knd&ee!hdtbxZ?8z1!-{3w) z4DIpL-hjC)p1F+7Ag?QzJMBg5j8^$GU{K=C*yJi$yw&}8SxokjN&Y0{7q;P^QwM1h zi=z0TR^)J4n(azBrAaSsBEFv8MaKs$&QL@vkIdU87A;U>2Jq*`{li~Mfc*|xb3!R_ zBJSqcN;!~e65JIi>5UCJJ_8dlvOS=8bjnQ!&uy}FQx*9q!V`37pntfoiXrZ8j|xjb zaXIt4X$rmE+7i%N@&|^WRwqkk7}Z`|+f-DUQ+qvG zdQ?6DYZh+(lBE9_*!kAC^Odw;usVbBjI8d_1m-2?{n*8C%r{F?J!^!#(d`o0yIV^i z3(O1>VN9RcgGN-(%DAj<=p8S&J)ubz8A(umUuL89_ny@-WQiqyk+)LjnHWM68LOxf z6F#~91WGCW{)D@P=^6QGNH<3R8zVh6H|pGt;g|wdltIjUk6G$H`C{poG$-kRMHypG z-gs|neDBe4oRwV-Xd|V+tEW6Ed}~?!MluvywLVl@%z=Mp?@5229lSRGq_h#@YjbWx zBegfMvJ+>-zDPmu+2@lNxl=P8XObIGkE0u+unVWByzicy9%2eR5KEnS>Jzop&hpni zy(rIU87V0UP#*!EPV$)=U_pcoG=Jl(($-eMGcPAHObJ1@WKPf!3xR#@sh5(y^@~7D z*Yhu^2W-fmZp zM;YC)+otZBz%DSPcFj%1L8T1|Zk4c3w-UhHF{PXl2r>Nd_+5tL(s-O80T+U)qQn2p zY1U37S@8|s3>9@@DKIAX7S$>)*D7UY`{^EA^3$0g+gwVdj|%bI}IFv^E6TK+5$$k_|-IOjs}nfSooX7Za@x0CDD7 zzer1h&Le&O87nRr7IMA?H%CmM zfFW>5eH=T=^fJFpl1fi}UBh#>g^vIVXmIO%=l{}59%5gQ?Os#)Lr1s%PjdS13>vp<(KZtcfyhog#7m?jC&=_N%N%0nm%1YU|iT<^oXK`kMmlMPSaukd zzr006!vO=)rcb;h^Pnp9X6wv z-k|=7%umc3UvGkq8{?pTlHnI-oZD14aP?#-vn&klS%tpC9S_cW^roF2{A7~z~ zIZ=8QN+-RDx%VQ+Q0XdBvlQ0g*OEKq52$lBO~N3bw?sD_%<1^Wnpk5v+%g37Vw zmh#FeH}u$SwFV)iq$9&k;`@T8S=;?D+ibZ z5p>~)SWy&7)uAB3eaASJEjZp%8#h+o5IfV6cur#Ok|lPyb@XE4+u74uk@86T^Y4#H z6jacQwgW+gN*~j&VP>IZu)h3Kc~`~jf$o^b9v28sdiB`>(z$6S_`a48CN>01&(@SA z5b1x19PX^I*@RoZ;Hk?Y58Bc_?5Z?Bg_9xQNIt|K__NY47|@`Vje`GmZJ(K4nZ`Z! z!-(}Auz3mDgC)(1J&;{e_DPU$xq7FxSumM*rHAR>lEc4qo32pfzQjwgfqs}<>Swlp zHY`)j-pEMN+og$7tK}U{(}{&-!nvE$ZItwth!dC!kB6+UjkMfA>y_wjo1CPrTP4Ptms`DcX5V*T zgeTvk@=*bhCZSoF2>p&NOkVk%Q^1~g?jK&bySBX5Ff3C5$JPsCcSN1v7=z#IG@@$9 zu~?3OSGA2{EPG65AJkY)*`NmU!Q#iGFUsz4BjpWS4@126|1>BF4J-FtA;6(=iGcyw zb-1V_<0ztz6Q9=*u)GT!SKD_&1Qb4`f`?HRkHzPYM~G4wMk@(GBW7}B#12eqS{W$M z170b@M~?KuLcb7x85ehKpAe#oqeuRax01+7$jo*5A!7b0$ZkS@b_xa7Koo}hc-Dt^Z3Eq6A)z_o0GDljL=odnL4N4GFcj$_)i z`i{m`%VLn5sob~u<0j=?#C7KYl)!1~SZ`U00U*?Wy}V>v6M8^UuAH^a^_rOQI&=g( zu`6(xsIw`j!N03l%Gi={(S=oL~&j?kV#$|CHr)QuJ2O22$^pQjAA`hoiOA~r zUFpa}V2C=k4m>8hfz6M|&Xo@8x}fmxrd`F;+e48=VPa84Ae+J)$-j_^1MAvdw~ztkZC!O%Q;KIzZ~@K2wOqVn2zJsmbg)waEF*&kPouCG$Z?=;D};wIXr zD^rRY#{8?1tQ^MqOw)(PIkR)0f9pi$X`VVbdwdr4_Fl2bVSE**9KO~s?7zl82)8Vq zK=|LR@69^Oan-FNY;Tfz5zoIse~fWk zM!uR>lJ2C7x1lu`Ib17TeJIlJ zjxBE^<@R?FAQ{CS`eN(*ZQzt`wJ+*79n(XE`Bw4UTH~+U^Q&BT9d22R4tIPQyIp)r zFP`b71V)8dCNzoG$+F`jN}=@-Jp7K1n{9+gd>LC`y(9ZfXB#n~pboKlP4n?~;32T( zIfWc{=5UB0Z5)<{j((ezhvX?PbjT&cMTzo=uPIE{A!wTCaf^%CL;0LOVaOQxBd|*` z-w`h9E!qrxxYl4g5tOT7cS2<@XLw30d2WE>+L{>MpR5vh)u_TJC<_iDn;j)E!D^GA z>K?@iw6Akm3hSWP1u-QS^+xhrlpkI!djpc#fnoVjL@)AewTRl01~baJ&u5A@YOm-s zVU9Zy;gsh(th4s6>bq^W&Lmr7?0B6EW!^vXH zFGGGPX>sZ`tDbFfa@lJ@B9OZ}z(>y@t|AVK|M3iP($UI$aK_|&0V6*x+ zU1?7!fy?)G@+XQr0S7wd*VY~~vRptSCS4ZxlroF19o4L{M>QCpqF@bz$eIjd>byHb znza_2*EYx2QhcwJA7EmE00Zlb#I<6h4Cm=T@JK_a?0K9RN|!Y^t}SW_{^r>_VpH5R z({T2jqAo)(gEFiU&3tuw`+n4`1m0|Fb{%`BGq;^(XmSHNip~vOx=-oq>-Sq0t=EI} zaw*-2Dz~rkOUFW%rFM+cpukOQCSeYcx+(Lo_CnLbCgrCz+c7C}?EcP(iMott zdq$;AclW}~KkaeRPXl%X>?Q${ldUl!&q~Gtxu;2Cp60PRV@v`kT5-pA9ZiiQ-Jb!7 zET5SM-hjQciS*H~z@msa>6xM89`$uWek+CjWCA-Z1l5Mb7s2NEP8T-RT0R8JGQ^Zt zhCP18jiXQM5fFz;e5BO~m zl{n;2kbHD29~=ik_D9drCQAs$zoe%pc#Z`+UD=A~#JO3)<0X%czXiu9`di}(17n;E zpKri|Cv|I1L|O|Gx(9kkN3MvFF-f~IW&&>2LgaI^ztn+7`w~6J-K&QHC^IL-fKVn= zPu*)>@q|Ng5!XiYq&T{h`ky0&48}4FgXAq;ha@u`OU?Djour! z{#fZ;f?&lEVSmjV?dG`Iw~i$aP67;?64uarzqi{7iDd zs?eg$=*vy@FQK7MpgW0w>u<)=2+HWhtS`=WN<{9xvnm;_OlbVt3=So{nH=UiLP9RA zf1nx)2=nAh>Md1>Kq%j=>2BTvg_+b@s7pDC;hzp&DDoUSPYr0&dImf=+ZnCsEu#{d ziR=B>2cR)#LO|8M&3rG{@CR~@H*6cS-Q{8mH<*KrE zgKclZzIy|8j>GdUl%>W{vdT!@mGO=Ex^l~8^Wf@6DIf{Y`sV|8@1N!1m57sfR+mfPC^go)RVzPZhH|EqiwQb7%`t#dIY zEBi3v*>>dT28@1XiBiN=2#%C9QX>IeYXE{x6 z|J@0xDz+o8hpx&vX;nc3JWY5S(>e^iD2?8u8BaV)@_7&}jYeweBRUw-FXT*)ZzY4! zYD%V>r|?_7-s?);^VpGctHOPaw*en)aE{j5)Cz~6*gIv30nn*Sl=Hri^gQoL4g0so z*lz3-4d4QjB=k=SFFx5()}-MbOD^yaESJLdn&k9&n^@}U=kwo5!iCD_R}Y%Yb%MDq z-cm8m$q&^Xp-yqG>bx@oHgh>qnzJ<|B|pG86#zfPKWam%_`{g?U_;Hrn(Rd_HwqIz z>+{4hYq;wkD5q7+9o{oJV?B=_YkF0kR3RyM1(jL#v(xM=CAb@Empfh=*KyQXAc+B2 zx9(7+#hxOem(A?(5Ow~@IyGGr^?vvuH$!mqji~cu+Qd)t3&`najDMgk^?~LZt!K{b z?&h8(qhmwiIUR-+|7Pb7KD0N4mEBZ8USHCnnm6QYSaE1}rBpg6uFHA-{g(=->_QG}wzg`i1S;H% z2Wu7i-Pp~AOu$d;AVwhrW{Jdn;Rft%AUZz(P;t~!J{+gW$JI~@nckX!s=wNn2y9tB zp@iOdJEbhYgpS@>KhUMf!%W4MlsQ5h<&2U=F-QAXaw+q3U7onSwER%$^Rv5aY;hKpL z4~pnHaP*73108IKc@5LtW&nA}Ul9%cRb{P@J@Jy%ijnaQ`158tvUV%IgXIgQ!0M_N ztvW)Xx?$fvC!zcxfxoAjGnXNYDO4^*`K7gWjT&*F{{VAF-5v=K(kjmwbTr7vN^gTY z0k_XSHE9%-at&84vT{5XRvKBZ>gbC*5zx^y#89 zK=74A8Sh7mvjllj$JDmG){*@e5(0n;o_u1VKF+}k4u=h^_FV&~TOIi*_GK4J>0a~8}z>A@=D z_qYcw%}8w4>mB@6tpjcXimjBPAB3$^KqKAHf{x8QoY05XPt!Mpp7D*IuVG=vTGs!B zcKjNBxR>3X;c8%?{ilmj#|8_;gmKMV=2&Nw03pw8-(lo3;f>-TTW-Kv!@8i3%Q&p| z8%13n>9dIB(Bv!CL7BWak}OTJyO@nS)b_ivV>A$yWqGV))NE%M$xZRP7{|Ld=3|TG zk9C%tZ_7IZV*8ceLhicIWoiY^mpCY#i+29}78>?1KQM_0QdxZ2qv{vI`qaIEdu0tR zL9!)Tb5RRo-b7XR$D0pr)ZVBX`uh8YH75V~N~iC>Z+ zrb`5;oPcYR7W$1P!wc*r@#^=n%t8!_LFt%NECk!Qw9>uyM>=WQ{t=)m?-eF!n4J3L zj?6E1veq_B$%(CUFZFxq89n-4=jOtMydkXutkegwo=`V`UI-fJD-I^%qv^@9@u^2o z(i!i7&XcQm=p@%m2UT~j7f8`lE^^`C^gq!98O+F5C;Vakdq z`meNvgd*yLqHu?c>adp$0fSL>bf_lc@CoUBF{AcA;N<+kOSc9FM4J_(drEWsP$b3> zv8|~kUtMH(lbdH|zjgl9z_lVRY(YP;nlBfU-|@;rNL1qWiaxOPZju(E*R4bbaZZxx zN9=hkM~K3!%LLV4A~1`x+nX-aOKX;hY={PFI;~-ld~I;ab#GXaPMoF7m0)IW;Q`sQ zbjq=gBUZh-ubvB-E8u&ctYr&|e(`dsy?EXoRgaUkN%6efZI=zGek1;d(a1mYi|EGc zHh$^jYPL5e|5s1hk3(UGndPTzw}99iOHZn+oGE3d9onExGyTlsnD_sHr5{Bzt|cQq zf!VS93pu$Cd9W8XOZjS|ap?mXI#LS@mU#?H824e0#)gmr`Hh6HYE8<*_^D|8giYF} zqDiFVjQj_xRKicJx!~68s!MDnXZ?iM3-`aQPSWK7ykDImEXq~reS`tu=*$}hhH2sO zh3}^TM8N(B>>zNYFxGlyX#a}_%$$w*E)J9~z>oSuG_erFkZ?bo=AZdY*m_YeagcLj ziKtZSiF}f)-3w8uHi89D7=x&9T~0*|#hLT<4)TOZAnGcO69hk;Se7h_&x4AdF%LgL z#g$}?fIn=yuU5SDJ7>&u82p$8ugNX{bQL|?oXr}sn3hE4n2tuF>?f6UUqbgEBm5U# z{dZrQE<@z7cR6$}DEp9mZgSi#-YQxJ^pz(qY}%HT$h6nfu@;f-6WTH}TPs%e45nrF zz|yn=krNG=6NXj)3h4Qh2E42wm|=u5wLG!S3e6Xo+m6qz2zzG0?-ztCDj{9&Ni- zmT=IYM8iHA0>wv&?vIQ1Zi0Fw-%0wWLgHC3PYl|Apg4&QL{%S15Scq%Z>_5w@=W%6 zsH+lvHfBLIa%z43T&M5o9&G<~@(|~)y*)NppZ-@Ba4V(_yiw$Zma}>z97{STzKAwVOw!2YOU6@NwzW-=1{@f_?f4u$HN?}T^tq(Ox1REc4lp=CwUWC zB16(ASD$XNM?}JAi5FjXzBQ(bhZ8#2$6t^b;Bo+zD&z8HuF~Yu3}^d@Ca|TC3uH+- z?5;yu)ied{K%kw#G9B4Y+o*e4hxblu0Vw$6ul|n;I7_coVw)F#&A2t-F4GiQBU=(j z_oa))lBB}=T8^G|w{J^L_ft0TjJgJ3{-QpKYP0A!0IHKPFJVT3z~%T6lhC$2$jtmg zTUjkcr9RJ%u#^FV2|+(b^oPYnj(QVI(=Ws29C< zrFvJ&>BqLYLIPxZN3AO}L1DPB^+0Zlb3Z4pehl@rKn~4^FDt-E0TlQ8lN(BMK;e=+<3Vhd*x?!1Nw2Z`EaN({BLO7{ zG(=WT7zS6?6z*j+hwk9^;DP|bhLQ4bk>mQ7bOH_xB^v^;HbGy#6z$d1Y$~h5Cg;E( zkpVqDF2DavPdx_C#P2p-gfY;?o(e9yHihk97V?`!DNXqW|Ew^tUGD_!a)jS|)vwRr zIH8~;$vda98=jHF&DUt)PZu3QTAekn(sE`_2>CH{IYnWU7#e{w0V3K-<~RWKfO+4n zS_oa_9kY06GLA3~HmiXAmT+9+89i^>nniWlTb`n!W75`mNAVNB?29$WqGWq>>UFas zL6!4kk318uwqpt$O$Adg`|QwRmM(f6*`<6lSTDWf+oSu5;nz1N(B$4oKz#c*l+1wE zmu;<0wy0GsqIV`dr%KJX#%34Md|u^CGPJrl&_`+4hcXT^>+3c}TU70GY8zaWLpx5~ z6q&aE&!5$8J|KUNrlY*&mpkxOrTf*ez135KtN1?9w5#`*svygz_THsngodzs-j)E- zDBW&`eb>b9pm?Qd$dW5{L`E%TtGM1R&R{To`S?*trs8~Ii!J|KMZ&tb_C3&ni`mJKJ{JGp)`ZexWjE*56$46>zT|vF&6(iY5l76r^p@BNN&mEN;t3auEvG^rweP zB!_Ph9eMH4;=D_uMiLxA$q_8-{HK-(uolh_;2ATFd|IBqsf#06BuGw-vs&-x zBi1^oFXl4uS1ORX5k1}DQ_!0Y&m-w^pv_w-eg4p!k@B7Ta@Mw~*h6yHBHWuk4ysqM z;T{f>c|~2O_d*%Z9e^(5~ZU%tm=zPP{Z~0qS>gA zUwdRLgBFHf`tYycLnv2icfD{BkwDl`W#XRJPi>sWNK$817-gJ58To?QEcM9@fxwvc|7zO-@&Et; diff --git a/agc_2-X/trunk/DTMF_sounds/auth-thankyou.gsm b/agc_2-X/trunk/DTMF_sounds/auth-thankyou.gsm deleted file mode 100644 index 45e7104e2b058fada26d91741d0e67f78cc6c065..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1947 zcmV;M2W0r!z6K+^t zyx?e|l0_qS;7Z$u+S8)IHsn#eBiZJ=;nMDaCfu#X3SgjE)pn%YVt`FklEl;n#K+|AjfrKPgfgaFNYZMe-P;4FJ=*A!R$9)3!m0Hl?qO#}>T+ELRHX;pk-;a9 zr%D`CHp|*3lA4;pq(uRMb9fFxLpJm6}jmU1-pnGN;<;FY|j>TMa zh_xiM2wd^VI~0_t_qDUeleR_&)}wT`L}61&ksi4cVG$24g)bdp5u+Dxr4L^dIn!pR zo7UxwdBkB+s-=z(9F;F7hnm!amXNJ-K-+W3&jF^i!%b3FIgEK+f!#TuBC0O zBbiO6j<#fgna#X2kXI(y;+ro5XH6tEeYD$|O}!d}N1Mw~!7H*ftY@faoyZd=*O#Mz;AGQrJkEn^xxt<9>*Ob&V)&x}@N zUOcC1%1Fgqn3LJvUFiXxOWlZaOJJQy&1ujV=buc-#g4lX(`&_EtcI)A8J-Q5)U107 zW=SLHNYQqz40O_`$FRZ6ENwISfk-;nmCho;jhqiSa;NeS7A^&Cy^se#9}J- z+^oBiprO#l+D*SIR*+)LbE^}Au7_-?(B!%*e&a2RX5KQxU0RGtD$!~u-PS~PiDfH0 z)`!;$+PWH6h}RtLw;kQ|tDWJ~ugK$Z_S;}+f1*mX;*P3IS|)tk+($5)o-Oj-^`l*3 z&8G;iOA#*bNhY1vFj`Qi{qa&LR#U}P9F`IL++6~ys_>^fKT!hY#ff>XKo%^_rS~dTQQ^uy=JVoWDC_)O4EVZL+w%R>h9qZ89aQO%{tC)9=|6i#)a)7ym~B5OrR;gQ6b*rMB2@i1N4 zBZA+@OJUt38Y@Qo6x7_4&vKZAsZ%L3SlY@K}0FlACiM)>ZG|JlBHzo#WtgjwYs2#X3T8R z((yxBHyOtq)ghuoTXuyuoF26uh~u`cX@uJD!$rQDITLi^1xblduhSf>M%vbb7c;R6 z6n4TY{EZnE>cWW|&AID+L6;$p3T@J1y8~3};R*LuxYh81VB}QSWa7Y@v~-0GfWbp2 zt;L$sD4|P~dZ9LKHbbPKfq2wWv@Cvrxajj_o2CHBk#WgV(kQWm)PjLonu=Ckf}pic zs#%nvfSB7}FnPrW*+tVhg1Kr@jwBmxdrt2Wtk8&6kg21elv#XS#pr}*{$79lI zaMu%Zz9NM5r+l|KK*`k`*;oKleB#p@%@IXl8az^B607)E@NhElnMYajuRUuip)`{$~$W{oKuI`oQiRh+GmAkGUn%7Z$u4PzJM@UA&TqlSf{(aPOXqXBS~ze`buV&xgNaM|dU zCgh{&Nfm86;8BJ6oo%;cqvPakNz6N=j_x7{v2YIeKxtecL#pX%{g%Cn%!a5sPKkUQ%qBzg*T=?>0L1^x1mF`_b_wwK?P4Y z^Vn;)Z!{M*FSL2RDSU43fs0&fGP}bU+|E9=3aD;MfXkvQ*X&LMtzftwH_77hVFk6- z*IuT+TTtBVJ44~UgT$Q3)Htvk-Y1yN%G@e@=z+!KN$xT`9=J>ASv-2z5Ghk+@%WnE zZpEmZ2P|$E9*+%guzFnRDxJH)?Qx&go7@E+PXgVg!EOjY;I7$;AxjD!tofVBrc0UI6`ksTu$P diff --git a/agc_2-X/trunk/DTMF_sounds/enter.gsm b/agc_2-X/trunk/DTMF_sounds/enter.gsm deleted file mode 100644 index aa4dafb6bc2c83c6927c27d67a3e2754660aa39d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 231 zcmcaA+Y>Jx5Y*3A%DJ1^uc)7vGJo?J3Lvs5tDcLMX8rj(!- zN5!M|rVE_6%=u)w@11hC{_oiTm&_kOjVx)(w*9xe{BYWORWoRdO`I(qEBQ8MQ-3qh;DP zT!i+XjVQ==gBT(%Nfe|4E~2fxY|>(@Wm3AqoEWn{^tQsw9KPGCaKpzo^2T6&#mn(6 z&_2~8V(%MyDmL<^Dd&~UMHxOr6nRdPD=IdTddq0cjR7^-9Xs<=xXh^9B3k2pEJQ|a z)meK>4I{F+G<%2rGxn7G*xVd;TYF48n6kL+eJHW*aY~YXDA^-Y!sL5Jl&g0akG?5zh8{J63 zOs+ zwdSHLlqweA=)$_+a=A;}?8I3SgXT3Faers0v2@O{CftgQMK94LBdiHf5h#Zo+je?Y)t$v=H8_EycAY1rpFmpNlnCF^q8EM(5PWA58`&o9gU zZdJ`}%S-ih*3#K4LDu_m%ceU{M%&?WB#|PdN_5a7ifJN{;}G`Ra#=Rnu0fYOa*^94 zepcJ(FWF>~Br0-?ph1o(n{&)bM7m0?+3qo)GwCRJ?`e^Js7ezpvAa<1Dky%bwdHv# z&3%$p?bxOow<~(cd35f&$neWHGqOo5eJM99CNW)k#|ISZ>+{#*Ebm%-$9V>?#HxD7 z=#)&5GOCLE6#dI2daNeU(l+MSqfBz@e5|)4jW&g?4C`Z`r>s>^B$5@@n|#Z6eQ~yl z)vG-2JAX@fn{r8GeMm^+Xl9Ci1cg8PZBBg*qt=o*^xw;y=9WPs+&TyZo@=&IFH zg+|unQhB7h%x=?-q}zyQHZ}I9(xRsz8fGRV*{QnN!g*&XjXf4Oyz4mYeoHN=$H8p? zVpodDC7M%2!`W!mSi#t-S8=wd>%gZ>ZLhxb%xT@=93*-sKTcTnKGcpK?Cy7Nv6=`OP!H0gHcRO z)RCr#(=xKsb7+lpW0lC;VkecOj&mWlrVuQ#OVwKCFh{8=Y|`+w9rCwC+Y%nmURy=k zVu*OMx5fD`POFVwXPn~2F!9svZ4$b(X(*>wHkn%~9^F|g=H{cS(0! zDx&9l5aPsV5*5Gw64azh`V+iF5(raCweDlK(h17txnxg+l zH(4+!>qE%X*P458*S0vfy zd6PV0QRgFV4C7(UwlvYgQejP6F z=+xpl66!5&Ig-a4+h42M(%?uVEBk2N+9lUO1lnzw#m6kM$1l~=Na}0Eo7kbE+pAKr zD`MZr8GV$IZBE$bWi+;t>B}5rc1IgarzF=UqT}mhkA>Rp!h~S5Hzo7?X~ocAwOX~w zW3eECDHR&mD59&QWfNwqC#d9Q&Y6nHTDiw^NaT`6m}QaoEUn2L*e0r@n`Q8)Luxr% zWzjg@i?$k}FsW24IuFB-B(B+HOFCr(!zWl-4KBUqNnan~eG zp!V7%X{VcD?gyuO#=*%;%WtknCD>y-T7K(W)Yf{{Te3mBt@Wg2-z43WZ7>>Yq$ddSMB0Cdt+GN;eT<1CYBuD7 zDY#^ecU#)vDt?osXU`|@rdWY0rY&;Iu7?QSERrl=t_I#zwcA_UVKRD@iD#CYLR(V8 zWxo7!7J-fD#U4p_-G+r-^LR+(+nq9Lm7FKg)Yi*%;6$lp53qTRh8tet$1-~5!m3bY l726;>sMF@dd+ID!;*}%lwtTBCzJtiyh2aoc$+IeMPUN$Wb7cSk diff --git a/agc_2-X/trunk/DTMF_sounds/generic_hold.gsm b/agc_2-X/trunk/DTMF_sounds/generic_hold.gsm deleted file mode 100644 index c76eccd8821133550fab91c5b151f41e997c91c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8250 zcmeI0c~n#Py7vnX#i_RfdXz*Dkc1hn7(g6a!(<{-1!PKy5W*B7AVHwuNC1&h34<~z znV3RQ8N#HNBuoK8$vj~o2@z!~wa}y1_V)C&_dTxFbKdv;@2++4U(bH_@3X(p_j&ej zueH}tP!qRp%Ne~iWBZ-eNf^&PhGJ?~*gOOC6rF{Ezi#x3;7hUF%QC|T4IMq}vS3<3 zF`_(b#`~DB=VFrSAia_^D<>b~H;rlGi-f>gS$3rH>BLPwg%*ee;5A zv;Fv#Hgj#Y z6wOT8>ScF%ME(-t99INAa;;(Oneqjaux;g>C>d^kGy%Gxf}gg-D=sGHQN0vfCE$yMQLq6 zc2wR)AA0mq+#;H(ysZdT&n&LEXt3PJn?u63M0z0hbk6@gLRTDP;qhYA%$xFP?Zx-) z;gonPCvVhruaveP3E93iPMuZe(-`FSPqE8*6-tPHavY01Z!#!IyF6lJE zj`Q&Cmsz1-PeHzP()6|rhr>p^BzC?_S37SyDG>T#}5tw3%}j-UUQQrIDPa+Lr(F~PjR3I-r8(uP?hAs(WuLQ!%o6GViUS`AwV)__)P~Y;=pP(QsG0Nf#!;ZK3cPt0^{dC zv>|Bnp?R4-vb4#ECUwZ`0{aY|Hp(Ug$#c(uoh<$e50Lfn$db6;FM#4>J->R}5%^t} z-=S^FV--NM8`y6Al#*(0)4{usrn`3U?D#gai5TqvJp?QW zO(BH`!iL>Ohrz9xX1*JHyjko!5g48wpKWJ_ccAhC$(7Xu(~=p8^3BuCAVY$ahH*`C zw{5uG2j*;4YP(mc3O6*OoBm8s>2K1)x{dJADnA%lp5qj9oBj=DrH3}D_B~UGb5#s{ z34xAd+l?|QzT;rM@K~=sL7Kov;y^n=5^=mO#cYE43~d+5LuyHfRFT|v3*JN-Hs|2? zCx^EQRdz!^kS7k3~%zVj(V+~#|x zdYZETpnMo~#nl?KL18$dCl;AC7go-6I(p}##pd}%erL(u3~x55<{F*WZ1qsbhJ14W zs75y}*Ou>QPO58mE7*E2SnDd<%<(DE@+<#ht|a27xJJS5exJ0!=ZDbtRx|X#-~)|i zWY~~`e$g03-lg-gHw}diQJd%s{P1=)a3NDzo8Y*v$LxuSV5P*sT%wcU5s}Ax_sP7@ z3TrQ!DRD3tpabNEw!dA^&lqz*jCZQzQPn&qNORr|BvHBg=tsif+JrJce`3$sR0m_+ zNFW3?SRJ1Ajk*P%FSGB3p@^KiNXS5CC6#W70}m>wP1eEX1O9^zUParm(tRZyWIz@P znu}CkBQL}w-tAX&YW?y}jmKR1Yi)tYL{Z778CS@xt%${WUZbbhZA2MekAh6H4ioA1 zRMPT&k!}7nMpEw7m-4arB=@08Q-n#9TN9`V4AV4RC&yY)g)0OABaM1Tf$7?k9*$u8 z4u78R`a@ox_Yao`(BPZ(tHL+oFV*MOl7u4n>8lhl&|m=`qvL~sUZ~nJ|Ec+vS>lx$;-s?gPWXD8DwE0@%ZYLYnw8UwdWb}MRO{SA;qc3 z*JZi&hHQpxPx1)L5~EOy=JwI$a%LHYB}l#dMof;$emYI{Hpu2xYdFjCqYXO>DUQDJ z?m_D80Btc0D4pdz^}q}Q)XN(d9 zQbuN6qe+s;K1`z$SGQWr4h8oxYQ+|Wt);nUz&T%k^gXsvdDb>=*0gj%jItm9q$1@T zFZ0Q}v0|W(eUcW|-SVn#5-Di_-ZXQkdO`=Dv$p}yvIKloxJbD~J}&>-8B}tud+Hly z4uuD)qn%EqGdc*o%eEA0eVzVx@ogHTub5 zUgBdmay5Tss@AO2D9LFng9s6zTq^|U!nYd*!pez`mL@5BvxOV1ArEE{(bc06^);ST z!&emoTKYM`Gqd1|^gzNQ8RsbAF%sBTL9xbXdK#QaUL6qBtb-O@prggW zHU6_I<81FpKOIy3u-ZbZa-}Ni4IY;WR`WjV$5(gEM69^oduMBKcscUO>qKX$R0T*@ z-g84GnLF-S-XMz)=K+?od5Y`Dz*POKON%|DezMxhYPw4gQsBv8d0bykT?FS8=6Rt* zEpg4K=!@@qTzfpu?Ss7pN&J`5AX#%;QDytOF5B%;^(<_EOy189_uT(tP=E-DqNc~T zf&BP2xG4oo?Sa`a45%X_jxxvgT_Z=tz8jgEzD7T=vyTa5|3jjtzd zXTpfp_?>49cte_`2^)znLo)Acxh5PK!qHwQg*b?|t1&L+%Gkcg)>aWB@g3<)4&IrL| z%V(EH{J4f1HdLKZIFjhAb(XxS`Qb;<}_fo~N?(d1F39SY%r<|$g*u%o=# z8l2{y4#F1->fIb7`*`T(DA9rd!4xD>cc3m)FXP)}MrE8wDuD~|lJ?N0uia~}uA`B_ z6nFlcs&Z->@fOO$y&w}-U$qB1e<{N%Zpa9-YeGszKz6^X!&_Ar!N2Cpbdw+=c)*@C5OASC!d~{m8$^Y z>-%I7Qfcrb?s$nxsh>H2NWL-#zPhn5t#d$dg+k9byQ52pD%gj*2pZyU3(>w-m(3>J zQIW!V=T46SX2N;gHQ?qte>#VO<9q@1_@RWCbdhk|Wax)m>nPXH25 z92QZDrO0CHjq>~;cnar>?&3b%6b-A&0~q!o3#I!71s1$2@hf?$!%bC;;dL~bUHRXH zTF!{#M%gYMk!i34S}QnzLuK-cO$xHO15B9-SioD!<}o|Hd}?&b`nKS!XeWMaX1Q`! z|J9dmvV>xe)9UzJ6K&?(&>{=XYqGl!23pMrUM%;!;p#!@CAF5$zjD@hI!X=b*UZfO}3(<9N~NUF|!@1do{ zIcE_3J^<$#`nYONj*s|q^8w)#i3!v>OSVC-y$9DOa{9uHPsoe8$M%z+lBbAsZ}V#= zBsE9U3TH3_d5MlU36#XoD(ZrD6kBsKWTTL1II^|>f!GYS&5+h#hFom29q51Z=AajS zE^{|9rQVm=FBJq=9}&%vo@TK!tx6xT;#HfIKwck`?fl2G&W z67BttMyC-`m>xW&2}B{q95ZaD{6M|!;nz*(L0;*8Y9Y^mCd{aoenF_jml7KbEXHR; zmptY0wFS)6o(PshMzRfB-nld>eUKs2Vn>gDm_XPK<~a@Dj9tJE$(4@#kQf{IY!P`% zW|v_&!?m2F`E=YGsL#`;K9LSKFsATQCinWLoqJLC(w8^^lDi%`w(gsGHbmTmO)?z!S@EZR+&+;MkW5LQLs+sy9PCIp)1kh$2>G5bWb z$k~7+d*!;Uij$J*M`-^$Q8Scm+hQs@PkU0!J3K(wKLK2b3sgY-G6B?VGoZd8%nu^l zBZ9xDM!x%S?KpQLpzd5Fj?)nVU&hiT?H>zSj*54a7F3pbuBrqmC5)SHP_ z@Nxa6%$#+f^Y&}>>lqncrYYvFE6gs#Dz%rrz1Nb2hM6p#BX8MQbXKS%KZOz)MxC&S zMzLVpJ=f#3zz;^^c4*1!<(44@?t(Iu7qnPJj=TohovQi(!do3!NE%Uy9|CtmWl=QQ z-kuZ%eSRMw6&Mo!pfzc1vkL3d4Un{?diHOyN%nU3TZm)&M6dZRuLm-CVm+!8z1kz<2$x3{Q^KGT0_q zLMJvQ)3mC}3mi7R2yr`N!$sjGG=hPL!ylM?d$cgZ5F zHWPhjS#s|#%k+jV;GaBRogwCg;13Ja&D)VznqNrd*iz&Yn^Nen8&OKvwtaf{#2yRODRG%pg~Md`G2)aoC~d2vZ*KZ2O%eKQ!F!Zzy4b8=@!RcgD0 zp7*REnccqS9aNRX#RKq<-zE)IC`I*WRE2B5?og1_hKL$VYVPJQ!fO&6Wdy|b+Gs1} zj+<*fiM&!Y3!Ny9O$Lw>uP;8n*>E9o@X}gd$YIYq3TkOON}-a}aQd{XHTeGHOE_2p3~VJARe8yfh~jP<~j5`RXQ z|7B}zcvfGG{h*^nlT`#QB-foxO*X?fI+c2j=z_-@wfJ|foH3fo$X+zFHyqPjg4Q`Mf+@3sVHcyarq-2dTLiXoKv{{mj#`<~Zwhmr;{lnQv zo?TiKTwq^>Me3w2*5-PWh=RbRm1e|`zx?tfqX{3Ew3m+@hDYO}dKYhi9T4ubqF2>_ ziAcBUF~J`|wQMk`={#g|k>35N6_t{1Ap_uyM8a3xzd&w*T*`mBG`|e?Jjx$kTz3EU zkOHEr0By4D)m92#zWEQxin~R8nWrYr)!9D*A*7kp&%Ga=Ss(Cp3E#z|z4#n-4aDeRpCJr5ys6pONa75+7B z+>t-H%)du70SYh)3thoBN_J-mri>cYKN{{FXHs%JkGY$+Pl&l#={KEubf&PA6bG}Y z7ju2_GZm%Yt&5mhuZRkGpfF~oxF)CRf^xzoBD&u55y@Q}4e7{V=Rk_)8drkJzCy-| zFCFJ*HQ>{6Biel%Fi8d)$99}xAt2G3VbqDHeWI9mTdE_eJZ1^)D8{}2_5G7_Y<8=< zDmVm7bNnnR@SdopQiH|PQ6SsiX6*G7K-_I1X3)j1$l-SMMtxOkvq1bRT@`|%rm-K* zT4C}mYRHF3p*)s?Fs29pv^Ud{VbQDpo`;uFPTKODD1yHYpHcc#p6e>D z=uHEnzgEsoH4ToEVvd;0?jltDKr2Q3_s`-Vf`74YtyXpn+@=&qM=yo{tZKEv2~cr9 zMgwLeckp#%6K3#fTbJ|V%)|Z@y&)BKA_CLDbSj4Evx!CN)>wA{UJjbp2(|%|K;6t^ z#`6q!gkAaWu&Lzc=Y@Wt`wo7+ENXr8Q2d%Qw=r@nj>hfrOr74~zgH1<{P|N6!uE0B z3GAg|M>IU9oWjk&McHB0IB=5l!#1qUqTn;ekfsZ9;ES^ts2-NT$Z?_@p3+}`ZR17` z$*qc&(wM4Y(5>N^vfD%QOgH!3+<>ZF^Lnzs?{u!_+lIEdRf(Fw3CPQeZSwuP;1YYn zxZ-I`Zukf~kH{X zB{76_Q{&l}iU3TQ1}Cs&_W7nq@NGQ2^7wDzc^G8|IZ}uC^}H0U{saL|K!5^%4ZmjB z{}FxzI{tBe=Fh@!z@M)Ce)I2u$-f0mfA#QhfxnylFTmyR?!x|Ih4W7){|ord{>RyG zCVy}2D)Fb<|GI?lM+5z54`)AG`9lHSMn+cr*~%Y4XtmiNCO_8x z1Ni?N^}lNKPqqIj@zKlr6NO3RU%U7n{!^iUp2P3l$Kn49@OOcyOg?_*<4V%M&*9(g hhu?sY6+X`Xdjr3B``_E-?*si`lmGal|A)-sKLKatbu$0} diff --git a/agc_2-X/trunk/DTMF_sounds/hash.gsm b/agc_2-X/trunk/DTMF_sounds/hash.gsm deleted file mode 100644 index 0d0a8ecf..00000000 --- a/agc_2-X/trunk/DTMF_sounds/hash.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õø\}PcÈ£P tÛ†§¬D#E)¤™î#àÑi(*ÕøEÿ3yÂBãF:W£Ì×2›w¢ÓÔWâåÔ¢6èÕøTþéyÁªu–ÃÆW¢I+‘sdWÁ󣩿øy¢®su»Õ÷k¿2yƒ©©áËc„tä9,,WÂÌk|UTWãu#’.1Õøcÿ}yQÒÅã(î é¬d£Úº\2Åï!• ‚£QÕø\?;wÁÃaÔòñW‚nfy¢.–7©FW‚•š©ó)Õ÷{?úYW!àíµQë nµSíB*ÜqU—U¡ºy˜×Õö²³>ÓÇX¦ŸWQŽDâ¿íÇmÈÊ!ï÷ûýö \ No newline at end of file diff --git a/agc_2-X/trunk/DTMF_sounds/hash.wav b/agc_2-X/trunk/DTMF_sounds/hash.wav deleted file mode 100644 index a079f449e699ac983d00127df782709af3c4b290..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3990 zcmWNSS6Gt=1BLTtPcq1cBoH91K*A7k)rD3?TC3GMs^Vy^T2WhCZNELJ~;Gfb1_j`F+madCt{)ao$Dq=FB-tgg`!vLR9N1V+Ee;%sIm6(I(Bc zcS@Cs)F}Ka#^XI`Y4i6XxA;1=6?!~ATYNw5pTM(rbSKkih?&nG1-62j@Jf;zGB)Vz zwz<*-H}ig`-O?$$UKw{_uahoErh4yVW^itjPmf+`p4X2c{+F{SSs0i<_?h7@q!?KY z?i~LB{zGDY((&-B&JUVfoy>%@X&QWi^@5cLpy3kh@u84&fGf{g%LH|hrnPDsenI?d zve7r>-GJSK*Eyi_Ce=C|CHLcuK{ z&UF3Mn&i~6uk(%~3*3tET0$30IecAq(>f40ntv!}qk+_6*BwB2Mz4ZD@*IP+StZd^ z#v`q_dI!+-?770fA#PPzV+n@PJAyD94wA}yB4~$QlTB=rkCpKP88pfv+euSl=mes~ zJy-XUZ8CFf_5f$A(bZU`e1}R)sAc>ceB<`PEAgcsZXbQ%D56x{Ar8ZO1pEAM1pbxe!pni67pfG{K9xz9M?;2$Nmvb)AKO%<~3h+5%~ z0wORzy3i(t$^f@TF(QTRN)BYIQ7e0HNc0vt^KHUm+O{8P8%_H+i4LhirFx3-n2_ zQtUT@24@ZGRs0r?*d=cfcCLtgm;P(|9^|~yB2!ev2K&O%q8|x#^N}JdVTm%S@twY$ zCKr4~-UjmAn-Ntgw5>xq+km7gCh!HVju&mk3VGyXR)qLnz#BM5TtNl=+j^>`w}J?TF!Q?4NgiR@R4wnZGpcF4S_5gncT1OO-#O-`-oJoqPNZ&4G;%ehfq#W6%h)UNi@UG* z8(6K>xX63T7=HAQaBW|GS1lNuvN!J`Wtr}&?84XqY!FxIZ}a#GjQBO=nIpU=<-le# zDMy_!;CrcgU^x#Z!@RaPmQPWsDe1|$;JWsqmSXUE{5gRJ{lpe_QIJH~T9akqg*%=< zWx`4Nh(;zsYfs=m+bO>j6z&vL0 z<4|k;pJ)&06ljeoCLkC<)(kZKN0!Vyv4m8Q4)6Q%XKBN!u0bZKBA@jX3GX^3iBR!5o#V- z98pAFM?~rAGSJNCR^>0@{$<|XS)lzE0gtx9Dc%h*ID3e;$?k6JmD%BU#SIxxU?KG# z4LZ02-5Ho??FjL>k5e#cRPXXewrNW2vy4deXO5ZX!q7&<8}}n^-grJ;lD#WVVwoku z^sa?B#e)n?cnSC`;s#-(?{VL#@)U43^H??pJxBSi^tk;W(kW6&_%Gjdf}UN5Ua97^ zTr@yplk$qV)i!tEesd=LKcvz9#IYR55fpQ)Y1*5FLT&Q_ZC5&d=EjKqG|7NvgV4p4;c@IQ0>fz0P;$1U^l+VJfu zfwa`tbUwyp{LOqjJQ-f@7##V?HxO4O2FQwm{SEcHe<;5T=1_j})VNO~7?^|h70PSF z#bnL|Pl^B>?)Y7v6I#UZ6BB|(fyu<3^l)IhysPt#_h9P1+^HnG?vkR)-iawh4!NBk zAbM$%g9K=oH2yg_BRVlFHZIFsH_Ua2;a4M@%;Tn0STOz5WTg++Mr^0}D&r^fb%>dc zIsQV-Tj1GR5Rhr)G;4L zF{loOvIvtQ6qgss<#flr3cl&O*Ana2C3!?oqE4GO>R0*c$SiNu=p*+#_AHT-en~5A zIH%G^eUMVZJmCA=z5>#P{vHHW546*8`0RVaqF`S#|D3;?${DS0k|^^DsafA7O$}CQb1X)H4O?yN zH}%0sldDn}Md+Qco5@ZJ&nRfbcH94O_aIcTxn|k`%E9MN%By3Y9?>?RSNCCxVo8K= zeXfv~c!3zPy_Wj>qOf^6qZtn(e<_~#o$-$ml8}=?ZOFkWjw^>I$gfE1#|!y0b3D{X zmL^RyC_oy5e)ArukGekNK0A8!bi*`79p*~vM6M|G{djbMiT)}e(84vP2yy08(LvbZ z?(Vh5M~VT?t4L-L|EJ zS>y4n*ST&U*&LP>^*u(QczY<114#c{>>lD3@T?rE?1h~ZU&*?U2q_72&_yDmaRq)_ zpn@Xj9z&J&zm=>pVz~BPDSNkd_h6LmTf|4uPTMK_WMXaFM_ktU<|a@Ih3BTmB@_UE zTcW{o1SWFCFhlbfq$$-Uo`mts6IxbVMrm8Qd(qh*T{wfNL@^8-rTwFu*~9t!;>X7K zcI_NG4x>`U@9p;x>S0wfD_!r}*GrLrCF8yIQAOJ2+9Q4?>fb=+xG#{v`7UiCu2k9B zz}4?!wPlRcAg+AN=3oqR5jdo&H}8wylFdnsve!3TWk$$D9+P=Id>UjUUq%J|p}vCN zs?aGREf<4t>)#>WZ(Ty9lXAi{d`$c=vCDBiLq9j;hC7-52@P=>&dCEt(<&Ghi2}>) z)fi*ai?|w>yBX6l5}K2;DvW^f>^p`dPdRTM}Ulb+q z^!rAz)tDJ$k9)2S&!;-_ZVRTlnmc>?(j(`oMcB2zb>T-;7xS!7*bV8t;QuK-CTA9* zQny{zsHU_fgE}p z5qSS&Q;EA7$HIUD+97r&B>y_$$LMIiMX}6w70p8)ai0Mnk^@O|skOti8_)IsNVJM3 z^AGqF^{EagEGqJad6!XxqNLN(CWp3l+->c1b9giOWR%U(>L+3ApjY)(ifrdpz9&z} z4CuaTB@WkPFEJmZioK(NmMS8}j;-%l*nbLtIX5=_c!<+iu5Jz%;FXc%&Wn(rVjuBK zAsf2s%_VjZ|DgCJIbiulPw7B-1aRD6_75I3!N3xCdC@$vh0N92SqnQQF-i}q$5 z;P5RA8vpEhiFlYC;;xB=t@i?@Xjt%(mZ&a*{wvJMBBG%3BW?d$MKl)s3|#N2hSx^B zkrg^a2hP+MYs){(8y(A)Wse9Dn5fdoG?0d>=Pqa6w3oELk;cPhnPlNYc$@B>J`hSn ztOG5k=Fp$o9%Ra?iPO8`2Lns1qeM9 z`;M|NxXh2i!O00;n|!Z)I%H|)Xto4XKk$v5>HM0&#_je2{?lYmTom?*>TnZwB$-{5 hyO&erc%uH=Iv2hHsIyMA#Sj*!{T83(&`M}s{|AvU%eepm diff --git a/agc_2-X/trunk/DTMF_sounds/hold_tone.gsm b/agc_2-X/trunk/DTMF_sounds/hold_tone.gsm deleted file mode 100644 index 8f9686cd994d56fcd326c203dbc0ec95147f49fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 759 zcmY+BZ%7ky7{|4u0+TQuAuiH(NNGugH)ldjqPcS*{-!2tS^gc`T;&wks28Wg#AJ(` z+tfMhrp?r8=t!r{;EY&KNGxv(ZqVkARakml0z=Dd#9wx6z_L#B?TFK8TvS*s768xUmS`p5*?b;&OE-;24T{-Ff~G zmt50h0hu?k0yqj~L{o81wH~0_tg2}W;9+E&pq?Dit6{ORk#df?ZG5>0K`%&FUE#cwjTuJSa!W9xQni;P&TQ?zXs&k;X?DK>^zY#HvB*h?1kNkTioK zM~^_Yw#4^!NBUo8Ksy(b0J_!5=emr=R)%z*W@GCumsuJLeL+_-H^{!0h!ub{$=Z}8 zdAi6g;B*J@--~jNL4$Akn3+rDN_VuMDo#CF^=er*d0#QAAZ4K<{jlB85KAuig(WX| z?#xmIF{M$ryJpye8l9k0K*~w3<7UJFx!#5KfclG1hI-az z-gBo+yaa8iu52VO;a;qpUn2_-mZc0(#!Q!XoY#rJDTm7%fM;e-F>xFa1LCZ56FHz( z!vNQD&{JJVhldDWa&i5zV+3?pXiTuQJ1Kbgb^->^?N%dVB+7SZJ@aSVB)&zhe2dnHI?QhdXlCuRA z{)4Wx(#d|cGXU@oNX4Q6VP!mU(Z8|H&GPA|24Y2cy)VxRnWO#RiBS`uR=RuuDXl&H t2s0MZ#^VP+7wXEetEmgPFv>SY3_|>gHA`WI#3Ga^*t`oCLFN1|{sQ$YdGG)L diff --git a/agc_2-X/trunk/DTMF_sounds/ld_invalid_pin_number.gsm b/agc_2-X/trunk/DTMF_sounds/ld_invalid_pin_number.gsm deleted file mode 100644 index a733207e502c997c1147b5bf3ca05a6209433470..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2772 zcmV;_3M=)~8EP35P(V1`ak%7JU`XV0NhX1V2_$XC+*;v@o6)%?)0kRaNqpfqR8B;M zvf#DdMy9fgp-AMFlb%|lHt2S_EY(IMc1YObp!jTZ zIH%a3Sf6#2qNvkBGNNI~TcwgT8C{6;$X{S_ zM&WgdrxN-o>vib0Tb0+C*Q#O}FO(?yg!RgicPOw#dD`voNL?IZ5yzOw{B5zskkzAd zows=;q68J1DtpOEBu-1*?CB`yO<7`nNf!@j#humTlG$&4h&8im=ud{Jw%om)qkYIb zBpSzMe93h7X{3nOql2BVf6I2`ap@z0%S#zR#apncJ=vbO0)y?j)KXa8)@Xc6eS=I` z+-WAeg2*)_p32*U>$cjWsTzFCFC~sfn$@a%())wy4C78k5`_mx6J^2OxJ8*K?e^J) zDyEBGNiEeTl3t^UC{HDg#O;YEypVOd3yCPUT!7Ya*#MO(@ zBi3Pp;yzHs$dzH3!EB|0qOQv;e<{|ZX%YNpsLiiiqTJW%lTp5V?G$xQxjuigIV5qm zdYH{NU7pC&f6zHw?b{mIE1OZgeeGoQBoNky&|_|IcYJ*i+hb3)8+y^XT&=W_*R7(? zJ9$!fBW=dy@v4vvQ9o&QPdi<)v__;2nKe!4eb+65it6JnHi+%Wn%ynX^G{h^*z0uN zPQVe@32|g|B^uP>Oq$|w$(C0)M`O+gxZ-U3vH&n_(I4ddJBeEen8E7(7+G>0a(!RsC+G&sxQlx~OZKe!nq5xDy+!NLA z$s~@cr`q(&rBq=M2V0I&WMqfqt~LryANe%b0?Ysxs0@I0=Oc z2N)}_oN){!sEqtxRN5+tqCK*63-ME^{JCqpAGcgXE%;Q3^LytH~v? z^yFtP5<8KnEZ3xZPW^Q(w`55k>$=S~Cvry7c@8wYamh4$scOn`E!ZBaOH$pytOz=k^)b zs&U6LeQh?pan{{^$=M=hG`f2yirsTdVtdL+*Gjmf*D6XAVtGl|BvB^)s;C>~%G=0y zrS`28JY98Y$7^h(@z*O!lVPT4y5!Di5p{%L#k|uR>1JkukzH|$=ecfrAW+v{OPVa{ z1n@1ry4&c*HDCry^VsQG6xJw0#Fa>XPW^)%{mg{a$U*mvNn@p)u>6%?%w1`WDtCrdjrvG4k*EQL>^F@q}G1olp0BtBGuYqRvpsgS6$hL z%i1Hy?Y+$>oWs`pS;=FSNH*Y6ITYF;icHO7`S(?G(m6FCFE(xBysKQY@_LJ*6M?j`*ly(B$c+1bId41 zvKbq7@HraoOB!{_tjtz9IM*wK&wGX}U@ng9D(T2nBptTx>8e?ER;E3MN`r9cx@uw8ltg{+>b#PZ2NcQC5?6oqz$dc_a z9_5ldW$i6F6GZdX)or5}8*nj$9X|#pvtT!8LwPNn*zGkYV0o5zg(<66? z4&&xJs&{EP;$FEc@TgAbX_7$htNA3Z$t=_?$(LI2##BNwD6;V6b1QN*qVR=wo33Re z@y91Dy+s_=c$L zcdJV*CHoe6DtBvbMAL$YbHh%{5!IV~Myr+rHV6Uh0@5PMW|)G?(jhLYj@M#{LFF1j zI~>#C=@#$0Kqf0<3|i!*V+$jKNr?p{Bc+sL11!)gITYct9&qj9GGCI-FdnG!ZQWP@1R( zLt`k-T%&%w_`BiQ<%tO^(CF@DpEt5%$yoKYFD!{kJ0o`|+G$5f>>eiP*rS47Vv5AR z=Zn@&e&n#N*8k#NEk=@QwEtI+H!ZCukJ#vnP5XBb@?(`N8f_6IdREq)Yfs4%C&wgf zPPt@~BzxH>n#n!YM?K1UzgTOjnE=*Go@vObXM)8SO&BY0(6v>=qq*y000EmsoWq1gj*@)6)-R}$2c z0MsF5q8sM|G{b@tV|Kzs(I?#@?1AcIjj)*R!Jq7}IOEe`T;>~o<22Gw#~XNpKOT~% zn|nf!8%{Xne`3cYYIv&Cp;V@1qJigBmq>(x0hS%gjirOZ+S}#9Vx)odoNu|Z*5#{} zTaSgd+G*WT>^zBk2<Rj1 zLWEGDIMpLt+?TF`?9&c9>yttj>rtw`u7Skfc3jYvVI;C66^CHr#_C>6)XVNEGSxFJB{hI6#@lVSh`@(+B97gZ zkf^rXX*1)rWIJwq_axPH9c3<;r8^UebsV2U-5mall9$6jt+8t@c4XOawpkt3wjEtI znFJK$8b;ikVacbO$JU!dRNlAP+m513^>QT|)%8MY-J@bAXH~T(q`})HEhiYTf;$>s zy4>smSqvtn7S?Bqk|V6aPE~e%99rRa)~z^dZlOx*rwUYFfz?xOphMK7a7)M_OtjYB>uG+*;WZO%a3?MoO8UXXP!d$g*j5*V!<{LHwM7R&M4 z=be!vt8n;uI9G6IU8nHMo!*AdxQ@g*j583KsE)BjN26W$Dr!isCva3#6H2QdHzc6_ zDWXRoLIQC|rg58gnDdf-6)%h7E()%9BmuBpQ4JrvARkf)1K5w&oCsTL9nM#dD(V>L zzT!kHuRps;aoeETA;)wI;?_b~(Pjla(*`d`Dym3^A93gFB9r=bN|6yV1hJ^)T6g+1 zWh}z~4M}W&DlPQ_GqvTVg*FHfdE>jv0aDO14rG`a>H zO{#}6UahilrH96^AcL|6m+y*Y;ndGdO6bL%?~@?lk(w*o`N|8CIKJb2FLumc zy=K7@VE9$#rfkGy&n_Vh4RQSMi7YkiTZ+khxC4LLGUDD0jBc}VTWNQ;c!gSV&$1&L zkZvs`e{j?g=FrA8hez-FL;wq9pkmp<;@*QEmKumqCF?7!km`Z78SmLbV{xLn^lmK{}VjFZk}pK~|zHTb|GN;5{~y0MSPKglwMP>p+s z5pUh0%K-(WRP&b`8(Wxsv!Mr=^~+KqgTkt2AXYxh|C;UoJW|Ok$Skv_dtW~wD1$QN zZ_UU;=+Ed^O8GH2%LOmX0G5)VF@9R0csq!mGX?!V?Cc;ZA@4^M_-pma9>GL2O-Mj5 zol&}6SpgM2Icu%M_M1sV@^i(1l(w0#K5~gIrA-dq-ZR~`a-`OIf5XF~v8UxMc`0Tm z`pGrXmiksCdrh0!9p~b)9PdIJTub0IT*Mems=%18Befe0*IJI0#j;U>_mM^ITv5=f zmG;h~u@hOC-74<0^@+s(7N_IKO(R5C{%ZEvKrFYJIX@6M$(@4~W)~|$vEZ-r+28g; zoDN2NB7t#WA79V!D~(RZD7$=}_pMq57Bv^!S%v8CJKPk$sVS6u{a!a@hotg1qpM4; zTAH(|;(EMkTqlY0OT4>9Fn)^(6`}92hYIil-5*@=Gov>kDI+2(ze}J9gj?TlWadnC*v#-;FsOv zako>=KL14g5Ex7~qp_Rds+zJe4Y&>aCxst1_$xR&$#rs^W^1gRZp?l6o&|iLQ`(X` zganwM`j`S~AAdbNl0ajsXwVYH+@N7nT6L>5zW#eD<+;(3;AfBC9ld<;(|*EW+jxb8 zudKQuADCs0kIr}n@7JeW?l zYaPR}QiVuh0qqMz#+If7$hJ^TOgX5_sw3osBaOVC_cq-FL^rLD%=jRO{$srta zORkCO@tLWzXC?Xf@tcZ;v=L=1V=l%caQe?aBqR>r z^{OX=zm<3ME~|;fv0PR{inr$XF;3&V)V;Z^V@qNE(OrZZ<*Jn#k-1sy4$~`H@m?2) z+5Wq;5gVw?Es6E2XcEKy<)^jmVT;kI3h_G?ra`ugR3>g7-|<2NLTxK3jixdkP}_nO zwHYq&E?EDg#E>>g9$Q=khM&mFoD)tJ{VY#_Y3_|Kxm3>~Y8*&f6}E#lCf2{|s5tdY z>`df1iJUfNg~*4%O7U!_Vf^(vMOeEwKbJKWN)1>)49_yj^8ir!izVIXgO%(4#^=A@ zDqUi#mRtG)S6(tUKd8=k!K=cr4yyL9@&;3~_tFU|+htg-w_|Pvah_L~n^JXo*ZoMl zm4Pkj8dwyuve_?Ao+jgd_rj!jfii6bORIl+Sk@wEQn%Z$Xwa6a-pF5Tg-lu0M`T&5 z7f*xZeIX4NYIrVVsh$laE+{S4kg?Wm*H1Fw_YGyCTYlC--0f05-A!giK`FMEO-RtU ze+oN}m!QLCW#35_D_EGK+&MUjI1@pI^(R?!8hxUs7Jh0tu&ma}u72NaF_%t#e_wwx zzTC5FD-AV6MD1^Re@Zw1jn_W=>Hh_XI0TQ0v)CTXF)KJsESo~o&S5x=IF?*}{>&#? z*b=3hB;0nySs+Tdc?dv*>vin#bo1JqI$})p-{<^gC4xO4m$Q~P(w|f%Y;+L)m9SA? zUZ9Qyb;Ps(-c}D~j{zGe0w1m+rCm@Zj)bD22hBds8+>cdKgND%-m)$pWhvFtgZ&6y za#jTi5o0h{+}s~lR0dPwr*;dv`u^hiF3U{rjH7vFpK3=rtmLyW&2eOS>y&_=Owa2inJQ&lQ*`g5wSf_3_X*vdZ@9 zrczSo_rL14>V}SG7K(rg+%HMEv$1*+@>Gg*wjA4_aZIXq?yeV^B;}}VaY@W1WWPy$ z6Jp^_LUCS`L}A0+;gYaq&q;X=Nyt%YMbOFk{=?<+PDWC-_0Z0O75N-_N9r5|z@fsS z#fa%Saa8f#%|O`~qorkc#(s*?YpE{XG*-Fcf6vGKBmP|5SNZjjiQdh9pO1ll(cFup zyO=AtB3x>}2eK}txt~m`K!PYtT~zPd*E@Q4CM-AWXh;+J9BsfQNrcc)K3z=7EYUPq z+9e?mIpV%D??ygFm{+l-v)BVlR_K?vq&*h*%^R`!%fO~J{U%;8AAYyl7{w)DVw!Hw z$SFf;+R}F4V4VBdfV9J=p%UQ7WXe*`$`fnm*zaUiVD7^LMO2?WqqN-DQ@(WVVU}e> zs_o-7$iTd!jq?3>?JaV|(zOKf$)!wnn@97Noq+&smKZz1~5X$>0h<#f>F@lVrYkDhfE!+V3^d z_EoH~?-74^P{R>N{%e1^9-+m&D7f+F=#giq5%!Cdn9fHbr$yo zKgPcFiyj+3fbc23q!y%_C{Db>rz@}zpzKM4@oc=Kxy|bx zV8(f32@1|Bi_q`v2vS5}F)mIxE7Z^?hAz1($Dr#>VyD{)6omLCV~zar?Ypuv%!{2w zzA8Mgbr1L20`9nT$oyHvbdHnd@)>b(Wh-9JWbCoH)!qLy-cb_K{VSk(JeX7#>BPH` zjO$^894j`dqsjX&{>~yye0%VB?)v|#d0mW5i`$_8b!w~XpoSuWyP;qt8Mur8%7nL!FwitqIB6C!o1b2pM+Q;)(i32}i{B{1Xc?-}q&ELpW}N<% zXpc&DSTZ^+Fyi{lwb!P_>>@#LLAr7W4P~FfRz=kL@0Gkc5`F2lHArgMekpNX!htk} zL(#fh%MHlzKi&3+dn^VjgPmhk4g7_GnpC?do33bIsI{T%|H;qm6ccAO*V#jX>WUlr zNvWcpA6LPYEU^NBfjR_{7srdP-ppEjPk&Knu;4<58S`VHTDUKQaSy+pSDt(wwr z@_3_ISBX#zg8$Jq51HhFxpc2>5%R!G{{e)3s>u6S=y_||w#NbnhuuUceH}e=dkZof z+(C*7mli;trGI$t;r#pv(;AOxhZh`S6-D%O;re+3rqoP1?Rtd%1b&8uG%9({-)GPC z?XhWeUnbBsFaQS$Ns~>m8 z!!C*uH8HAiQ9N^H6RCWsl@AbRF27Yr1tN<1$P+Erx?%$runC2iq5S+eOU<2Uu=0Xi z1n4M11-iob3cgup`>=cHfkJPOH}FcU%I8uw(I8$FFW9)c%aTq!xG z9tp`WK_{C-nKuijJz76O;eXwZ2cH}A3(t=pF zEr{w2;GaPn=e26&W(aMZQ2)*#K%dudG7?-lWg(bEf@nx!?86^hEdmlAI{zS0*bn*< F{|7!-Rxz|NE)r8-q`w!86)oOH0Dlk740oQGji_nP^){Jlcrvo3^c@2 zrcT%SlHnBOiyjIRG)t*V#Dj|z)vatw#V@TKS!%uKa_hL)d9u}+S!&~?(YU_5NxIx_ zR?v~Cq~0ip4wq?&B24BH*7@SuTB}M*s1QnOXz8RRaoFRfCq>`4jb~9y=%SllAJ%s2 zqHL`zpH_F@TzzUwzV*jt;HWCzOaO&qsx*rR8j{vA>s{V|tOAl~#_NlzG72@!WMfJu zY?500RLD%dey-ovF5F?(c_~}wvuW>F$w}tg;@x?uPj<353ySC?1dY&|)@^U9)RG^a&HzTo9`CNYE8n`zb7_-(+@|xoyCzBXb@;xg vPwF%&$9?=;2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+0D( diff --git a/agc_2-X/trunk/DTMF_sounds/star.gsm b/agc_2-X/trunk/DTMF_sounds/star.gsm deleted file mode 100644 index 5ec8908e..00000000 --- a/agc_2-X/trunk/DTMF_sounds/star.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õ:“nôPSaÌtÖªj*PÕR6ÛžD IÁ‰àDCtbëÕnK$|2Z~bE+M?ENEuwWI zIBKg^)G83d3SlP%LIw#*$WCtd*Yo~-&Ut=3=e*1E=FJNv0l=!6g>$#<+8;py008#i zW-tNZ*faou1OGu_>!$siCWrvg=vx?-nY}%-%D%0;rOT)5BE?1ArXBaW^-`nIs|3q@ zDDxeCtw$SpD1u5+8%_#u2o2_K%yH)Fcm9aC6;qCM2Oh;^?m(x9| zsYY5tIGmIdkMcXNdMc_>r^2t0&fUi&jI97n;Q_B>E|hIbi2%7%no&M16nz|zzu zcH(%cuQCQGK}vnwy@A8-c_A&48;OtYcWYG3EmHl zAXg`JaXaZ%s#Uy(j%(K05oc2y!$8LZ312eZLig(?GcXe8az_W8i(i1&o2QNr%Zq$z z%vp&K7;h$Kv@LIYWyoMkvg%_7-P+z?+J7Ev!mnWM4+W7G`pG)L(Tek%SZo+YRdhh1OU6Q?iNs0Rs{RwZ>zJXljAHGZEyTm+LG*sZ; zgwFMQEXG|x_uFWS*@`vpL!mno)WLU5J37|3KG$szb!Jt?TL5%_c-sc~ zx474=$xI*0qW^ci#&!!)38uQ9ngSj5evQG>K!h_-{EskRV-NJt5GB3=d-~rsUKCZM zcO+m^CXvr*diqz&+C6--k&HzC0jdA11>wqJ-8!61t@GgOICEkGu_uRT^3wYkBV>tB zv(^VSXbf#3-Idlaf~H2lq0VsH)vdbM?qt*k_}})kmO`L1;K$$zY^LUH_chT5?-9-f z_usH7`cl55rEEeF5|oZ%mwT;}%>$6G3bUN5@JD!kwsy}R3=hq4NX9-ZD9*V-?zp$1 zYU>t32|r|<8FV}AePRR>9Q?>nk>WAzC|l$j>=c7rRcHPIei1drE3`D)L2MfXpz_^I zhjY6N)JAe=>PYemY^%ur`CR{6@APn3j+7!W3%UkKATw9epqn8#9*Lfq>K)?RXtfV$$1ZT1o_5+ zv>x!*lhT4-`OTS_*{2+Q=hU)D+>gw8=Jd9Id5biKLC4Z(#B71T9saeiKvRMCP*;#j zeGhGDR|^=9ak^fN&s6r>{b=Q}rD1QN;_fuQQh9{>Q)XET3zI8O;A@7af-j=Zv2Ww2 z8?j@fh8Wl`3=THi_QGC@T1Z<&J?eWUZRqwW>j-mFLQ`z`F-c+L!=9(Winx90d+9Vo zeczs;eCR7OK(E4PI#1ia_6?(D2$tot^0+o1G(@mtGKf=^5BX<>v)#q9!`X`?c*eW! zj`mRf1XU0d8~W0VS3gxX*d1UsO6-1UUF*sB-%T&}KWw)O+f zxvDj^1L-g00zt{h+8(0n7Wf_AM>!97T00;sVigAMZPkKfnKlvSD-N4^-QChVpZ}#C zPC;=`q^6x^uakg-eCokqk#>9fY!F*S`@k>y_~(>$rm&k)YjKJ_UQYYVdZfC@Af zxTeogSu9(LLD5f`zxjR{c*y@=x}8v*eky$#v1Vj|7tkNz3uiryJxsZ6{?9g^>$!^U z1h2VJ_EOkIQfJ@?#M?1%-+cLF^wRjK5^ella(kA zh7%9EYs>-8mqK`PqPichOCaB9dJl@t7E6&rPZJHAp3Ikzfh&%8GpVCPFWRq zCGsvZMGeV*Gc84y^V{(JsDj6C2G;V=6QN$%h}b50O9t(Nn<=ZvtdF-j^SW~Ygh zH{c)1-ga$~;$cJdy^MY6bGH9kjGj)^44B&VN!@7X;R&n-5l7$^;sL%~g7GUzWpI6z z$FgI*ZQbWwwGmMKU(_#b;j%x+KD)MK4H%l&XqS6$`kxNi2$D4A1JGy{@?gxt)W_6j z)nr~$M}cjEwL7ySvK0EYuc42|0tva?X+d zIC$7_oO&!}Z_FWBLGS9usS+*zcq%gO0uip9*L77AG4jI5sx6d-=x#ofhM4D}% zW|`?n>=3hwX+zcxhqk2;;nCU2ewhihcS-gTvau`ojW1dj@PLQMx| zn0~e70CQ3Myn75fZHH?TRn1DKAuLj1P3IT-$WVP&T|5JDb^q2}FD<~6;wLy&II8CQ zaGX{Mi}y!jI$SHEMesgCGhu`Kr2K?E=-9Dk?YZ|qkOWy zCu}0~V~oIiXP{CbRPk}B@KnY>@Ft_j80m3=X}~sf&_uk`N>)TnqR+EW>%HCy)4J)2 znU@o%AWQlVH+?Os!(NIjjbr#{YI`KD>N&uD{|W3fPcXy=a{Nyb9(%tSdm_G~y-i${ zfQtW&4iR5#Eb6}oUQ89C-qO0Wd+vvu1A$yZ=F{gRZqYFmXnUgVXgjm!vXTEbi7(hf| z4d(WdC(=Auez-8XFf7tMtDW1@p^*e*vgGm4VT!@y9X5F{W+rn+h#1T>o!9SoiIL0T z<+cL-R)|5|#>6n*IF1ZdbS_uF4eZG{kerN;8T{0EMKl{_id7{nB1KFr8HygWd!`V) z_)~xp!g-5vB*HkbV?0iBQp3TYiTf-5ksp8fR#QgrM;JTdMrM0ZiLRpaT~Cj76OA4D zo|5UxnW#5)`@EprlWS@;p=RNIvaS)RoCgmnH!VL z;C69g`>1p#YA#bAHW!m@x~zjib_50a87eXCv)lYuh5sy4cSs z);1#gafr*Yi<7?zxTPnEKg!m+XoMkR6yg>%?7EJw@ZSc1tqUIEj<3Pq;9QSiMlg&X zY2Mtu(Yr40Q`UvBUc*#DvGAU0EU=Dshbnhp)!j5Scv`?)z-J5B^vt)O`aaC+KV9b( zUg+aEr$yywVOftX;4o!91K_PXj9A_ zO|}OzE++~ja-5)$#XG7v7Ffb1r${g~$yjTpqze(ntd6*ebDD}YV#{~%O7Na5#?)u) z!ZZXAF+{%VVYA?@d;#HL>WQ=p!p33$rrABuePJ=8lzh6w$QF4=*p5^}J$Vaw$f0&D zLE`cG$O6Mxqi59P;MS;`_!iP$CA=lGtJDdL`7wJzgxZYj@)sP`?+;+I1&m~0kG4ej zrz;F~4KA{Q=JTFN%Cyi$#F>T%J)AzZ?P0`Frh#1yo$OfJY*w}gY)t(%)&j1Ts|HSu zL&z7D`Gh;ZJ@(U{4Hy~rhU>a&hKyvzQc>|!SX(^Ny=!h}Gy2nd@bg9@S|h~) zuvtuEl-9r4^1Hg*^b!`2y6HV-;n;peIp|`>O!(O7K-b0544g2jCha~MkO55(x|A+h z^pdpK!9Q87gZm^IwpoPx0R@f8^5YE)qa%y zA)Cq0wSVYpYd@+%P)5oePU&c5wT6Ti(?l*dR!mHUgNq4QKDv=)H`vNTmIJTEo3UWR538NDU zDZ;u-q($hOgoEk-1kP6`H|KVKh89LqGeluB+wkBHQGwZl&!ffqy>fYMFy9Ic1J!LU zQXWuIfz0r-xGrj#uDPwMCK(G?oSxXXs<=eVefwo`L9jcl_bR*lz;S6P X*EOaLjpJq~uTBvVb5x3+h0^~6Ae{?P diff --git a/agc_2-X/trunk/DTMF_sounds/vm-goodbye.gsm b/agc_2-X/trunk/DTMF_sounds/vm-goodbye.gsm deleted file mode 100644 index 33adce9035db5309391db18d3eea3994d2765616..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1419 zcmV;61$6q^A)6SQPyiVtjz<(&;5h8D#@kSUHsn%S6Oy1P)0Q^l*yfX+S$e=o<90~n zj=(oEY1Gr&pw}#gw=7=ZSd3A&wjE`8&E_}SEUvCkI zm2&3NWX+;tn|+$p;!4)>SjdnFfk~~dr#`M6y6dNE%WR{b=21*U?)n04Yc~MA} z6(HYroovjZBI%=-EIQgD{i2l(IMXl76x3XN*Wiyz#R2ZaT8(DXd#K?kiD{nhHKw1- zE2(0M!`#&ybQ5udNn;{o_|?HpM+UAp8+*%&)oM9$cLn#01ldgZ+pt>V)*53cJZbO9#c{aWX^eF;bkgpe>p?KQ>0o-Nu9v2y z&(;=u>ax@%SE&$bdgwwTx;oOI#39F@RkmdCqN!w%V=LI6OC{w}Vk0BAMhv|qPh3e! zXul(~Q@pgKnt`cOxp3jt-GkZUW`Sp`Q8#Itf;S|Vh-J>e>WZ;do1!3h<4~Zc=CP(z&CO3J3Y#6&=8@OoQY%dw zVF~x1tu~8K%VmddIFsqesg)2m)a}_B)vBpaS(ncNeMi(6|c3a{1Lw9QDPEk9k=X3*BiwG1a!iZbW4>Bws75+hwL^<#0x6J046>dG}@ z)h5v%h`j6;{duU}zbv-fwjLc`tE$^f&t_pLxScW%HPxf((uiS3$W~SsM7Il_-cdOu z$x0eNt|t`92&WpSb!pY)*^W_TN=GAYQLS{Q;2TyH1!#z$b#T>U+{>2_y{6mM=&2FW z&E+Qxlx;|7X)4@JNYC!;`r=A7lF=w}by}*O)?>>KfX^u@1{Q1E&uJ%IMj2Oa2z1+a z7FXL$uQgGr8`fj95(r~!BFn4E9BpbkoH)L{bg72Rl@=)1i&pa)JlxkJg3d{7>a^v) zIxE!(wS-PJ-FBy=1(*~uZA;fUv`FLEA!F7EZ7CX@dHADX=-iSJtAF0e#?q7~9c=}V zt)jId*d0UCOVWs@BeKq=)T*~psMh*|$kdUPhLyspSL~JZm_Um@xA_#F$=h&YCr<>&AyOZ%EF4n=9EwtJ6=-{Cars+@UAuFn+qT|`40c%_0 z;bo$gZj|bPg7Xd6qHdtK& Z8g{@m+j1t{Pyk0Hk;x=b07)d0NhCfx+n)dc diff --git a/agc_2-X/trunk/DTMF_sounds/vm-msgsaved.gsm b/agc_2-X/trunk/DTMF_sounds/vm-msgsaved.gsm deleted file mode 100644 index cbf4e6536827fc5302fc28e03ee628280b6ca73b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3168 zcmV-m44?DZ=XsdZP(VpzWyvgDphX;Q*CeFCM&oVeEaIS4oJq@N+N;8pqgG1ASpU0Sj1SMMwwaYs@pJ%nG%A)TB_(mjer zMIxHOHH>P;;)b9$?UiL~(qX+J@?AhT8d6H)b3i8Ax;AtVVsAZ*>^;PI% z-ITRYRcUBdwUT<%qJ%nmRqV-ZP0G+!Yr8FNq@Ps@4{UPAVW+A2VQy%7(bUDw zEkxQ~S7X&CR3WsfrpFB7q;gfJ*l0i58&$>%YN`(ARfdOUjz?nDXj`GRscBb)hH~nu zN?Pc3MxRuvt7R$_F}jGw-DRkR(Wrze`@Sc;z5YaztmIcge$>?LWLfG@+?le3Cq1p6 z@zH6dY5G|M7G6EMXIUaPQ0qqYSpxKu6G;VD5d;g4aVGYx)xs$cGIy)T-fDegE3vs&KI$`(_2m>JJL5PSuG;e z>d73jZ!}x#S0mTqTN7DVZAhAZ*&J1j7UPbI8&gfW8E>g%p)JQLPp2%`pKDJVo68CC zR+D6vOes+H%Hoe~I4+h(h>LK!B#pM;*W`&yo5yP#t*BC7e{5@zu)AEk%&{X{x`ufy zMyzzp#nz^QpHu5eMaq23B5?_XE7r8srz%gAX2+v#Nu%4frn=Q2lOoffC>@LwR^Xc` zm8h*%)t3h5_WVuyXiFy5+Jjo{#O6@#RO20Dq|*y=cF)q~%aj>S73#xO#cxH4 z*r00>YMi6mqIt@|(&am{Y7DYyq%%*JWSO?4vhH3z3fSLTRP0crir)GtliuS+mUgsX za|As!f(-O%q)1?DUn|*Ws}!2cM6{#Fwad{X6>oAjadN~sxwMqukmO3)H8bVa-fCjA zz`{Cp8CRT!!Q5p^jq>in7IR`>wDDy|n7h>x(&d};34x`sKH8T9f`=;nu11K+$;(@k zBqrHu)})cLc++03BhgbScAauJ4YO!ujggkns;T*8c1WCE1_J!;%GA`|gs0JANyQ5C z#@l5{M;lFdutk*4m|-ec$DZ{|xUYG>X}KgxF6P3hrK4@?fpmr= zeey<=)SZ1R+2drq8Z%sGZpOCLlC+q1q<8FYCa2*=M5bQG+|$~P=a_2)DCvj~E7GEz z@`b2?)WdzWZKT-bg0}~~()H1wt!on6LBRxNr!2-G^&U1vQox|qKc-sl?f{~i&R_7; z(7YvMlAwar0XFLDp<8u~!j)}e#@lVl%+$d(Xo;Gd+-F!MT$SWYXR-uBQzbW3>9*aI zt2rdDIR;e79;UKKBiwFy7$bJ&2V*+fkkneEixUDatHl zi5Ejjvn9yM!4|BwTWH8jWNVn1%BQtHT0Mi;+Bws!TB)MjG5H(J$as`a$1~ul(Jf{N z6kSJG(Xxn+)?G>#?7c{vpKW%Vxhts*=Er1isx)I?JYKa5M-a|loz|LDlM+^jjY&mo z_^PN!6C_>USt)epL9^XoP1fUa9G}-Bg4Y3B?Hv?~R2f>(KO~Me;$4gfWR1AxVQ$8o z?Z)HQC5mSO$4#i>vA&~Y$I|2HHr>_;jT4DViN)rD>@LS%)?1Ai3CBvN(elSC$4JK# zOltGTY{uk`wx`gl9+qZW64jz&pV4Cpp?ZC-`;=T0|c zaA2gHm+G6=pkj)<;K8<$AR{$hh+AZmQBzjwsV(AHT3)I)Q}afp*Pb+&I$=vj(nrkI zz02yUP@d~w4H;x@#*bM_Zdc4@DcD^tA8KJs`(k>v8@&pKG}XG=yDdhT(pcnSNtq%e zy%g43O`l<3McE8Ull8x8$lHym=f>wwPskccVMMMjwzneD<*eqAzQ&f2ciP;%BR5Mj z-qgHANZTyUJG`SABut{c(Cy5fl3zh%ZB8`}UqZJ-t;U>PfvMF}NhDn%#-Dm8W6<)% zm6BcH)T3!fn7Khl%SWk|xnW64XzaGRAt@xGu{zM|)n$-fVP!0^h=#Z2$0Cu&;9jD8 zW~SF5V8T-EUO80Jo6Rn(yuv2hFTIkyg12mL7A}s$zEiQLq>SQMU5z=0*&~V-BEO|5 z!?$f?T&6(Vk~K`7X*U;3CYjvhG`o`L8QJKo7#fsDsHJW?`oiMmnmBScTBO~=McCu6 zgbOBaM@!nP#NA`m#W{M%Sk)Nb5q{ z(^coSWKDLaSE$rpO}~*?)g6sy zQ&|R$_mZ`%u?oU`k;vp(#+OEp%F?r?qzPf#`wF*ev zjkbMV=SJm;$6(XiwV|82<|`AihhMj)1|n}lZCxj*e3iLNxkp6WzQrum*lul;x#cA@ zqgGeDrNfxk%#vS5I_oMldtW2mB+7=`)fiqi%e_PG@=r*UzeKk-@j05o0~TUEdR1X1 zITUISuGX0@I)h^asO?C{24w_%l(96M#X^Suq1fPO!_^OUH)GY;Hoihxb#YXO9t!_TVKB0A_wIHul$zXS3z9BpDay{$PV z*O~@8!r5Y`+-douZDGd@Z8c7FA?KKtwv%sS$lCE&B-T|PHVfZkB;-vo;!wfl{fM>- zcOyAGjX4{3p%kKWJN4Kb1vUfP;)QETM%(U!NhbQFqjf>FQ&Nd`@WC=$jTD;Mp#$^7 zeL**N+gjm&fg;*TG`fi)_FSnH+kpWny=^J=v8&?13TG9F^3NoPns?4Q85qA;se5yA;)#L(?;a!Y31v z$)|+DGA+>r)MUZ29=b^FfWau$O)E^-A8ClIkfALziKg3%p*cC?DCMC+Dx1o{&AOn5 z_4iB3+VF8)l+U8X+mFkOP@N34wUciCiOq|{aes>6}A+jK!2 zq>|R#%0V-Xj#!zlfTr!5*x=ght+EntA*9=GP4;IYyukpp-Dp9742Zck@99Y#jy}8D z>bni7y^5wKj2mNagr|LvS52BD#+9v``|1Ly`+zkg*55)<($B@)(ym})S&F&S1T%pzz1&?Xw}(ca#fq^ zAQvoF){O4JMwOM=^m3pUqH0NAh`=i%X++}Lq?=U{(7-y|n%gttAUh&$w<~&pHj%i#>{2+)sK7epmbqQ(z!wrq$tJwONhD@FE7_*2*&v)CM$?hh zzW6OE|kggG%sjFc-k|03Kt&`)L=(lPrX8y{kIK}r05KJ< zAA|R%VDYDfk*A_*lKNi-~ILd_xbmEzA7lAe(_v_mt`4(fzR{Ql%bt* zaC;4@6&5aVlu?mZvv^T5v?ec*LE>9J&kNL)jn8$>2Z4w|(0sTTKI4R5Y1j8VBwv8E zEDPaag`IJkqxuIxpyaT=i*95~4cC~?HV!2-8S^|%20Ej5gQrQq?0l}sB!mUjh^(3ODN_lQo7aOMyD%5Wc#mAw#VE{ zuIufzYoTUF8lxw0w9G)Nysf2K7@c;Coyn86+a3IoJidWmb-zk)wnDRnp?g-l!qxh*c(aq{9WE$x4cDAQXEp^AHpxb(n97*eB9(ab^7!VTchYH{ua)Xx)S?v#OyH_85VY@OZIl; zM=6NodK6v1CpasOh4HI1tW|GzLSGh^erJh+5*I>k?@Jj3Q#5z6v^@OyUS7V&X-}}0 zEp%#}lZQ!|_L^tcXcEgD$M>n=Wl(rf#Z=yMTqkCiLLjuXalgiKcnWB7h?*BSQr_{>gY$unL2;BZ^v#2(3F&Jjtx@2}wlZQ21m za&L5`(_lfQ&i{;-Cp^%@AXZBcMt>hSyTy#gh=z{CJ*&>X)6T$S&y)n5mkA=;+lTd% zIZli9%>;ym#s_5^A=dBKTV0rs($jl1e51g%mJpblUD{STAmr*5Zv6Na`Cx{@GAC)m za#3KMGfWDLTD`5wD2>A<4p!^(hLj7CKaRR0q$9pTuD5?$oWPqU691COWBgV!#Rb-; zNrWZFRxz_GxmGvKvn&&xL9u5|OJyT61qlLS-A4E|{wAp%^JkPc$1)~(^*^>pJ~Z^2 z|2nIdKPEC_7!xfRgT|uS*`B?LG&hX9o{oL-%}O!s$o|?0xxu$9pWy`iO81m5HSUXV zo;55XPxWWHPd>ck+#lYzQ=Xbggwu<@FtT73b0fczF94@#I$I)%eNv-`N{T(2Wd_{l zpk{~1-ZTw{GCcmFpk-YN`)15zZ0G&0W~~FVJn1?vvrz8KYs>)`+~2knN^a2I*H3`T zj#|l$S0e21{VrVsocxu#@T#~;j(k`}^iihW_Zz+%8(bszr5C<)7fIHxCO15n=LCJOi=Mwe6h^+? zzk5W|3>-6ASg`RLZOYL3+&)%?m}5XpH95Ud1CxUZx6(`Pfg`?QOfPafzbiuMDIW!4 zP}Yddp31g^jahrte2)Au1$0o|j(iX&cas)V;Rul7;0;N_nqgc~EdhFyyQ0Ih z^OlJjX_4X-n!9y|z}~dk?9xS`A4}q!so>SiEyG$BxEXYII#Qh4OF#~`Y1c>H-f@k@OlXK#R zw7+MyfWuzm$w+dZ$y|qfbtV|Lc$V1pJkR?(LN8S8*q>$5ZiH^MdFV9&_Ae}B6xzCjaSwsoElgd1o-U>V!)Bun&{wn>wLGVmZ>Y+vpMD7)y zwU_fJhN%Afq&$SdJ&C0;T+v2K0EG6MTSW)J2bK9*L<`dUu&xntfFJfhUt=|m7ZR*; z=F5|4!O}zkA3Nb!(F@<0FLRJb!+HATXh&^IpIPh+_zJqL(eyt6=X;`;MbkXru`y!XHRcI?K&KMrqSdm$3KE|uG{=2!<@gjIUE zIl*pcdOq-1h?mvPg|9pB$7aMY4qy5-9IPB=Yy|rTNS2r0>@IFvx2URsk(=U4!6r7v zjUFJpM`Dq^|9l5=U7Gl)>sArlIl1NK(AW+TrW^c$cl)eOLc}I#8|m98F&lCf%2s`I z_|a*fwbZ_bKL*=BI9=Ugvv&=_c(=Vd=`Pn>HcK$HKPmWb*T~1N96$BR+^U$I!YeRh zb^Xd#ls+H0QUeS4~xs}gy>Uvf(oy=E!q%J15Z27~`40*fHr75dv z>58@RY=zrs&H~>F4}!EW_{%d?V1>oW-m}?*t9lY^qkYg;cPi>$_99A4LL_Goj#&Qu znI@~jlCyN(#Giw6c@sJhOU=a~V=e&Amc@ z2eWPy2O@vD^~szAIxlIv{%Q7xUl2N_um0I0_5Nk|f_y!9ox(X#$lk3fUa^#Hp3MRm z`UUMQZFU+OB%EuB-5l9csXuXYW~{)$s>1V*q&?{`>oI2Q9O)#!2#=s%A4?kX9X+&H z11W^=)KW)>B%4WBp|@ERFp99e@YeFi&j|L&9W=Z2Nmo{_(*4XBARk`biQ?ybJG#pY)nVMt(KCRlR7Mg;6yJdCCsJOozWHHLbtcAKQ z>5Y8NA}^M92*&kCgEew}X)7cZ9?v=)4W)r&C5n?%zY3z0BAeT0=3`h{XIhoc&F8z= zK#*1V0n5&WNKHp0`kBD3l{$`j0(h{ZJga9`HHOyg@jAGJC_N66R#mUkKlQ112{pGX z$+s%4C?A?x8){yRhi`I11H~^Ekm<|4kvKsWn6Hb(!H0IA`@#|v>pGkSf=1d-*o_zP zwYe_4T{yw>zk*|=7n%MYHKv#3to+0o)T+CtR)ix=xN9k=Y6z2D9fiAcslmjQ#EMX|<;#ZgQsJRfiTXr0su9fQ~x zRdGcV1<7@1Vi>YR!~04ILVwor>OXOH*V>N+zMmNS&L+zPiXZXX))54iF{{_|32dJB zUJi76YZUto_mp}Fkrw_mb^>xpamQ^r6+Y^jK9;0fx+aV3_R0Quv>jia@2aPHvUm%Dx~$pNMZu_kuUEEu zy-@2|1y&fS{)SX=ABdEimJJ?V+`K~{Gx}QF$y2M>WjIK!(C%=BIGqhwRH1U4aauFkRB!pa2#icHOYGt~x|5)lM({o`VnT8xL~6 zyNz@XqJ$;5GyrvcOv?|ypohj_8TLO(7UYbb(SzQRO<(P?`Tf5U8~XXo^6UJA(t)}k zEwJM<$^0AC-;;TI`N8|kaKa$ZqWYEwUpT5G zeZml++;tN7>*PWwQeNjPLq9%mE=v48F|*fd!WR-<;ein?*zJjGJxK6HXh?4Fq*aez zTc>WxC4}12CUAUx7eX^Gw6nR1OnjZEXJo2cX7n4Jgf(j{hy>Fs;HTzNgQ-39#}BnU ztDOMzL7D5OGmU@Q&!-rncGHg^&JrAjhDMdY5_n_6lrE`&o36wEjciZ)z$$5;D?O{? z$`{N*Bu-q4;Ed!L>NY|9W2ql9^5l(R8r8@HZV)6 z8*(_(@t{ft#a_p4CTh%)e{g!O5l$tK_v?jRXYv7;xA~|o951tOCLdZnTckkc++=nZ z?9-1o;*;SIU2=mgUxMA^DxwngMs{WyOVuiLR&LgR;XxsxC)5hS3(`4eIW_OTM(G3H z79e3|p4vHVmHkJ0f=61z3Ei*&CM!ca<>tkzN#2fynbJEJBdr(wj}vGjrhfAZGZx4W z58H!Y`kZ{cpQcEPeH_z0`dv5$1?K2cE{kzB*!sP9|Jb#_9g8~Wl%bc^`9Z_F*z#Mc z8tD_L`qzwD-G#dDz3FCjwC?;Llpd-$nf+EGC=|7QnxyfBrIhJrF>it6H0k5kE3}X7 zMsJ&08|Exxw-9N&CLDXg0|WWIKl|X6OYO8oEci2#;f|hJ6K$&ctdXo@g{p6!)AcL6 zI^Jjmq)ey90|8Onm8&!BS{GHk!1H}N-zFZO^@(HbKOn%9M9FF#V55KVY-46!jstMO ziEbh;Q3#JdSfQ~Of)(pO^VT0DPH z3K#v1Ve?p5F*|r8-j*5L2BDiG~aE26!UGA7lvog z)o;I|xzK(jZ2WSei*_+~DBuAyHR9=@G;=|1uWap?iTmr3)fw7bY<(zA+?zgU%uE?^ zgc_1obp*FUS^bG*BF=B=@0YfW8kT4OrlYR8pvv@$g)Ws~p0+BfQ;<%iTA;=qYi~3{ zQH>3;j4>;8V}SM1kFDrC?fZg*V--0#^$yZpYN|7`!N~k zW8;K%xTLlfRkjXTd+%dLgyR;R2pyeW7@tVVZ)RF7e6lAksb1aGT7y|;I($QXvh?4UyET zv`AHCo>oJ3fBkg6*Eu!t_1k&XzRm;m^MDgZs3NIt`^>ARjgsEC?rK#DJ0KO~(qbR) z$Z!y>6X(?m?;}c)nxSpVANdKd<}i@0{aMapLqN2cFLZ?dw#?B)DNSIyY_-=u(ltrajGz zaB)6*LGpcDto6%zq)RF%>9Ua*iqZ<36!_~pM_}myLPrTPQzfR^M6N7DD7U_sn;xnqD6%V-Hb^e?b*jjH;T^&@(%<)STi&@>XsFns+>P4$?^kO((ka8Q6fTLM2TSi16RN-Qezi1V1&dM^Z$GGmdi^rJ z&C`eedQQF(er0ev#Wab|oq1*RvYo`MB;PJ7&+LUsSs$C*dn;ruSwBpYVV>FxIRyFE z@fuSvj6A@7_N~fN$#Oc7g}}=U54wz%h2vgSK2)_hh9_5Eqzv+9=_6lM>`6AEZ&a2Z z^Tq%E!YABw`?32_JF{#KQR&Ck8)kJ%2;NXl13^cuQQax?+?*Cv_#fM5PZBc7KQSeIJGHhPS2Cx))@afQs9Txl#(C!j(AZ zsOC2?KUpy;%xsIR=Wq`86bX@a^ZS3A~e)~1)*kruSPsz({I55z=ia~+L|#$NM}q|L9qCYz~g zKCv6cJCf#r53LBUUhFJ$sG|c_Ee@)^H1G?3z!&Q`Mz4HBQzG6NZB+dfJUz4i2DYFx zQdnf2u$c#1Fd4&d0f8{7EWlZl0C+Y>Hz*$YyyV~qVHDe&oG`uT=Z6RD&j}ayh6OIM z1;1}iXsVMQEIsV>8mwVu+SW|L1Cl5_)FRlO{ZFo4%d=-uMIhy)=BjEG7^2C2*BvI< z80jYffbgHt-tP(j$d`xrf4ZK{zr636->L? za(>Uf!uflYNy*zGqB_EJq>b6y@4OU6!F8sS&WPr+MGEwo-@~Nuq7P@Ysv`FCni$6a zL*Y309zqU%B|=@b>D6qNjCK3~#b4U9sGdy@u9gmB%3VK35*K4;Awlj61?VQ|c|l0V z)E!1M#QuHRJ^jOlS8USMcz0dUb#mppR2lT2T`1#kmO3Z!O$#=M=%*c8g^k!u?w`@t z=f1xdSSzhe`QnSVj`BZ3Aa)9a)yb9|jCF`BuJUWQPw>*n9gH;Q@_=tVutLfhER6?7 zm1VyFeF1QeUX|~8l?blo6427h%Q>YY;B{n#_g=iw3p80q9q~amJ{`LxhBv)Ne?dvj zD>&t;@V;=Dpa#_z#AeHOmN>6m-!%b|1H1+5n3=Sqh;vUPsGH*V;WNRmhe!UclQ3;^ zIzupTz`T~=&jy(+rE{1J=3{mu=s9^Sv1i9X27$qf>MqTMr|0dQk;zagnbNC36OHOt zV*vQDa71}Fpt8sqmHso~U87Q&SuS7p4laU`tC9=}Txss{jJE>UzuKq=Z@@!RnqI8S z>4*Ooz5}5B2#7Wx3?YykZSv>c<>8R!D}pHBX;{5t|KZcdg@Pz#HH?rC*otCDlkx>I zrCB6%a$fX`eKb^7o88-l${1avtH9HZ-WqtM|eR&TGd`iyLXZM-(*`=hyqMZmGc z6@ijsfmua`y{s7UNN;yrZ#D8bPVJ}4=|8>yrWx=s3%89U&U-`8ifo6BVARX8S`<90 zl(f%TsoK^X$@?cT{o@)>fIu5udjsC1W+Y&UCfDTZr&}J?Jf3&3xKL4h6aEt{ z)tAi!d+O*-G6CR)Zy(fX+~Evo6*ve)pVXw!`yI=5a;yg27?fUECE#C24S{No{UGh^ zhueWj+_~0y_f5)9TAHATk%hL55x8q|9V|6ZeIg(gK$NBg<&-`jr6aMIn&1d6HBdVx zKuAbqFm-)MD($TR2_+%);Ry&WWn5bZ_xJ}{^HPA&mwD>d_P%qhyKpZMnX3~dAT7xg Tunf4nrVOE3Gy3OpLBjqIF%MGH diff --git a/agc_2-X/trunk/DTMF_sounds/vm-review.gsm b/agc_2-X/trunk/DTMF_sounds/vm-review.gsm deleted file mode 100644 index e49768d62512af700e7fbd6946a333a179a845a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14487 zcmeI3S5#B^`|eS36m=Y>s5A{JbaX6q9Vr145T%6{P$0BWq69$^kzN84ArzGWh7>v| z2%%X5p@lZ2k_JKwNORPg(HUpv_dER8I_KitoVCvVTJ zfVD2hRU$G}LR+g0l zYpsh1z(IJJWZc13j)5bEw2CO;D8p5eYO5PavIJvbl2=(a6oM;J0N6QYMH4oX>jFtx z7o@2INifL-SUyF$OR^$YyMa0x&@H^NLP#M-A>U+K>JVJ&ycjTEqfO`CEL&~#(@UKs z*XQs-xsXO)K~+0kkm1lke3pG^+Gy}cMo3MHz1b5|ntqXuLa3++s_|l&X}X9dQw)C} zdRr}N*_fH+Vu&TdQQfgp;jsbTr&3DDF1h7*H@L&|M#RW!-Z(S8z(-sd>8Mlz2rM( zWY_Hyf@mrFqqv#chR(W^+y`8Mgans&v_?M1TN07RtE_@M=spvruIKTs8|y7PEwBDq z2#X5d&uFoCNpd(8e&{k7JuXGT>2Fi|w4#im$%K1)3pXN<%}=YvMw$6a#Oowk*D*=F z(O(6}AOsH1l~~`RD-84X(22z%w3Ey(zRw4174POsOkU@=pbX;HN2S-{z5+SASR!17 z@hsZ!%T#~km1vGA8qaUHf8PAC*3*ie9Tk%Ajj)q*i=%%yF_YRnFxWocDtq4}qTeHu zb9=JFUNkKjq)nVy&Cg_)MYbxG%yWMSo6Glf%_K%O-XAaEV=NEy-=Tkw5Gt+zP6=#_ zR?=&KLg>dS5xQ4UzpakaFCbo23Iak7#z)IktS$jdR{`#Qu6WR&6$MPguetgLSdUE3^*JRkiAtR;?nXrlXaHBj#9k=9RfRXct0 z+xXaq?3m8BA62_{9F!+EpP|LSp~j(uVJE2aX@08Ty<0K{X0TfJX4H8zagHZ8TkJ^i zq3-)3QBF)?F6^rDZ>a)a+02J5NtwXBIfhc)G4qM$NB**cS@WzNX?c)T&*Sbs5LSr1 zf^z=#3c)5$oG|;@LO}Lih1uo{hs6rQZCwA#fK6~v<^7ys&|{uVw5gO?bdJRK7ki)s zhXpP8NvKb@NbYnwJbLAlrT0FhIDXM&t0r3jPWC9?$j0eK*wVuq219(TCMJhN_i4TI z5Xa4)O$Zwf{0(c&naK{kTP@^%91b{v6@jZ6qGF6|wYZ%xs^1v4*2GD?BS=m0rn6dc z41eOt!vu!Pbb7I2l{lIyiVFb*`E#s5?J6c3-E_&6%1)zkt>^(<*un&X#cOSqvhFNH zV)+DUYNxd%PJot{;ixWKWQdBDg5WL}8*{7Bw*an^QkE{=!Ag#?4e@fY2H~wi#Q-ZM z)&neV9a6*v0&Mk4$E6Afn4DlE*~+rj!%l$109HGvz?_xV7MT~oo>o4-Ud}M_L$h?^ z!)zhNeW8evegy$~gxy$aND0nA-IGcu2Quxc$Hrwnc~(uSCb~!vn3%DUFuzr4sSMq< zT7$h69^TLjx)XHxwbNMf6zIVJc6h1R zX}V&Wf&I*(MU$4ev+^lkTxy0-Tht_@TY z+dhU}PiTB>rdrZHVY8AzJBfW`!TXh=PF}pyd@+NsR^C>KV)FnCGYb~B$I?n$`Li~D zbG)q=hB)?>lp6DR^Aa=D;A_)hcD&|9b-$!!s^8qw1I%0RKMiM_es4jzKq&Ee9bfvy zzO;G2tZGhDVrnNdzmv>UyfDSFJzTl^VhZ2m!niVn4XdjXNDV?V+?3$X> zC?c$Qx;{|BTO5vH)tQ=dGhpORW4KO8=TnNIVE(n|p{D3bM{(*hU$5&ryJcLmw<8%G zus=v0UN?u#*Hv#7pAH3oYeyUYz`Ic-*B)$4`J>YcIAp|n!gd3`g~BIRTc4u#HZI0o zujAG}k+WvTdWh!`e@*6Unf~B|nWDJark>ZI+npQxc$318s`;xpI>%7z@dIhcate@bNWAA0%a|#MBNK0tehEQ0k1uDta{6M4%ggjOn}dn$*xL`B zwz5{mr7nIOjQn~JfqN0LZg6*8tmO9#N2Ds;uY$@-63T8AEiD|ZAx;T~j#Zfend zvKT!Q{Cb2}mU%^zx^EVPm0W5gW?gs6^=Uo|LCY-1o9}PL>k~(H65riVI4dK2R7I zU@8tIH#*y<&+QXZc3>Fl;0kYh4c2^gru&R4yn8u&sN`)?oNCg+IU}s&v5Yc9yN~ zRXB>jZi7M7VX|71tzI=U@{I#blEeaK?FjI$3Q>Dh!;IJev;sI70f0vmJQ9)3 zJ8fd}TVlR)5xB8i)KhU-;x%z&cK{rj3Jpc!%@*33RI`plyaf5B@H90$q3P}$Z4^V) z{y8}~j5@M$)Ali8ba2w-#x?><3|7nRT*fy;dISgr^dGkhWA13A=A-L3#t%;%piRf3@Qg3jWRuH3Tg+T-_;`6gq6ZtzZ-u&5Q&-ME2!-4_=dN8cP?&LqO~1`Q>9QsZjjoIIrVfT0Zai9_WDV>; z`KxcA-cS_o*|li7U|I8*uAx|~7=P>Tp~fWL_$G}TN)uCehwU3K2kY~JR3TXPX3`Dl zy_s&sp|?gR&r2bTwHn%|8r7k1Vz>1M%CZ=+`o#7+Aa{ihW5GOxO1EfWU0yYsdR zMEHRkq)<@CHIUBgWz@-U_)W8J#nrDr4zQ)<5%hRgiKw$mU2iGpz-{=1jxhVLM~iNl z(cu9(b{XU+v(&qG<)kR_b`@{Fp?(6R0`Au z!-OTz{UH%KzPpo}4$?>ZYU};ByjFg#(GqY(U6u7A1uKoiKdzqK8kscXFBtkXd_6m4 ztmHK`u9UshAzjuqvfJJHJHLlSE(}#$-KxwH# zZ+Y>gvh-}^W23b$^x^A7*A5SAY61_P(%`uU6KO`q$9umYl)F)Dy{BxbHybyfHQUfS z!v5l!j|Js;$Fg+xz0>jC&j&f)Y4t8V2u^j=^B%?4;fpyuGk%rRvwi*w^PrHrXqOX7 zo2NEidymw9Q>?l8O-{2w+?F2PL%HFAYLb8ZJ7aeW*-dvba>y9tul5K`JbjEY%Qdd8 zb`&Z@^KnLg%iz0I?`DP2(U9}9MSBv^xEVTK%x&YVt4me7KRuXHQXPhTyRAVzfGZ_+ zG>`%SlXj^}xGS>)?>ZF_3Qd=8Ff75|3sEGJcH;JITul}{^o3L+Y!0apsb`45xGTkZ zjGi_Cy)NE>21;bvdaWFiV4)Q}8SVQ1T9qa;(O)?SNKg`{qc}q7*H2<9LWFM3>r%V_b z8*dH4^}@_-HtK~G#Ur>Xw;9NeD# zjOuepoSeMnjgidmnP@lo3dVtgRL;$8?+CEFW}V9Hez`bbIN2|0wFTfPk#Q~k-)1T1 zt++R}9Lnp}J+pEI`J!L}r)tOeyl}q|dKCM(2sg3&A!c0`&WWgt^BG^A_RC&~$_F;w zExEKOFZbSwm;TCe`B|;r>2QJmMKWSuQL~1x7Ji`24&i88_ea)FQ!Gt5!^LrFTn}L* zN^8bH`*T&X3vD?9OsSX%ni=k2tP|AChC5$K^nEJY&i%e(a`=bDA0_&^yRYf1|I|M1 z1Tv|4z5AgI{P{kwLi8EyU6*dyUt8yP;Ses>*b-t`*ke{?kJiBeX??24T-*Gb^ZuT0gU432TJEFc@uaqt}ECW0KK*D*&$ zH64d^^%QWM6R*c*x=Ij}MIG6Yq2yg1bTC?tDq z0t{*c4UgIE!%oa+GDpXr_m%MtJb^DVRYla^qqMgmHFVsRKZEH2)L%R~3Rcg169nQ# zc%C8&c9p$Lwu~$=Fan|ApmB#kpxxHJA61&#(7_eFh)9_+HOqf-o}&I>*;?bQErde~ zP^Ax%r*_86V>yc7+gqc_W6+iCeq79iEeLyECmi}V82#o^1hp}NzlYE7X%~RAn7d9l z3q-9<{q*uq@tSdrZ|)tBuzhb2U|sb1HYJWvi$A&5r z8eh^B^oHrCUs@>7bRGyX8_?%k`hd`x%+@gs5|~Nd1Nx%yNr&{&y3{l?B4!w$5GmZ- zX-l7nz{PSEzN>xO%JWAUhzmi<&cge^47`7l$zFVtpF(4-u1epf8{+;A{cnb^V$qHh(BHBVk#s^}e6l>5DHY;$1 zGVz;LuR0I-r~ZuElo0e5mrX1-M{EhcTk`pBpE zJ^W{$pVd=J3~C91C29Mg*A?YkWx#_cD<&|RiJ$~LY+eAc{B|(c{I0yJ5nG5hyRCM+ zep+oBoe2HLDf&;5`k6=k>#kT;5iC!TI^43{a_r~wfd<9o_ytT`@cR~jL-z>^AL;U0 z)pxJI-!+;=v(mwJYT#0Us*Ay4XL;9NOO5aaQ+}=fXVvbp`$Y8j6(RY;zkJTs1Xr&Qba#8M3O zQf8DKgDNke%WaT~^kt zev@THDv2(^rz$!DE(R{t8g?u}BvE8#3JREhH^T<09`J~p0DELqwWklsv+1VsGCL-H zMV>=C;IsC7=v{{Xc)p9~Ez+Vs-gP5q*|j!!Ld;$(sR}M)^qF}-k;G+9M6$;zw@7|K z+e;WJ2^CTfIl(c^WgC<+Sm(Q4CHEOlq&UmX{IJN{q<&cr2@+2as^mb5MY8t*=ch%+ z(k+tzubmS*wIrL!ig?3~We;7?MmYyq5e~Y|u=m5Tf|p2ODF(JZzr(t4jl9)mYlE)- zMb1jLcGtZueU7iHU|8?iMfvIu085y9t-Nmm9oP&ZD@d(r|}p)Vh=0YiCdpj9I@d$2Ioa)JS4qnS!deY!veE+ua$E`X&_WHsxozoLZi|UxW+J3xNql|ABmwdkewS7GdyD&@FPfver%vZf zu>4T+(#&8TTaD=78dvTSuFYfhE?x;Rc+-MFmD1mB zyoYfzAZM1h#^olLU-KWkU@2ZR0*3>cP<*S~|<);WnC@*z;J>aY`2t?%^&cy!0+NI+=i@B}yRW<`%ZnswmD>Ethv%c8{4*oUArElp18qkn`Qk4u>dxC?SzwV2cE;pGpZ( zA3#kFcJ<3Sk*xtAhk#>RmnLgb&eYned!AvhoZyBIUQqb9MsI!)_A9pteiqCC;EyvfFg1Yyo&n2IdBcJb5D?zDYg09E(mYF72kPYaqK z7~_6vz}gQaDeb3LUyk{R%q&|)?Blzgmboji*-KcH>*yx!MCcYb*lb4i_i+-swYMHS zy6b!IJz2B^1&jZR=xp$tw}2^d4*e$yEg>9C85dRHsL9{i$`KehM;`I~@XJx9iQXrx zNfUZKePB*}3nvmsYF3>61%Y#znKqPCm8Cfvw zD#d)0OlYu8x|Z6DNX{T{GtCkQYbPz%`8>vXKa1ISqggJ-=;qe> z4Z<0DQI@qS=e2Gl0E8}^*_G`-T`$?vJ%mj#UjPq{GB3;XD{3?iB zuM>ay(DTsbJxzy}#*Vg*bp+3!`%(fH;+o^%j*SiYr0a933Xd%H$XC>qrW*1RK6aIeup(Nk#!ne}cYN+ZBQl_ly>U+-&$R>{ zsfI(w^8w96B0Uc16)0q!mTQgiH_4*8`}Ws&<~tuJ-3SSZp!pw0TFKe#?J{Z}^-%j& zSRvDq_Go&)Zw|T1+)1A|k`oWZD^GHoqA=dMdmxBG-pDZ3<}VuUST?lR%%}sJIUXH= zHwoi|BHP^4;D?l{PI|qCzwl{luTsXun;zBdWL)YZdIHQ}_BAR=-naTxho#Z>{?rtX z`CHOnTO?|_ttr|$vRZSH2Z+S-X_U809WnPMmOnO!LI^s!k*F_H z^uFVo1ghhe$s-ba5KGJB5_{OD-E(8RgTJ^G9*dBFAWw`>y6Aqkm?F^QNly9u6Q?HVdA1H z%>E74iYh7_nP`h2iYbt%`$_n;(_%vPiL!pFA}Vqvsf zgUF(UKm7@8qmG?x#Ve*Senx2{BbA$-jSgOUYu_HS`~>ej$kayW*@UiE#hVDjlw_B% zo)P|WA3B=_?X$d%TjP*R<22%36b!5cmAbcCiT5+_QNlV<6Y80&*XL))Uvo@qG0s`c z3M5_xXl0IWeW4r7j9ht+&q2)RATCwr(b#9F8-Qgi@6MWBtPl@>^~PfBD;rwNvE#4h zyC!}5jO^KGMj<-N@N*}zkD}@v0ftsTL~k3A>wTU+^IB2Y$T;dkIN#tP8_nUMQ{kLLkhK$(YpRX76)YWy2lqZ)ZV>XXxwwA);k8qF;_G4V*WyL+@t8G>GwDo zSp~S-Uc#NI;ns)VVRl6Y#gz7H_Arg5i<*_)OgZw-?aG&V2gSYiKu%P~S107|5x$On z)C;*`{)pfM5_O^0}X;`FM z%0kqP49NXm**s~&+U}I_4wDb=O)E||#5nHfcLq!RQbYfx9F**--3DJ8as#^J$a(BD z5tlUFFG)P@UpLu3mF&WbZZ|U2Z&xWTK5IR@?=_HFh^1uMf4(Fs3uHA)T%(G7!m6BvYTGV zf*GA*C&$|A@q}^8n!64#ZZS+U?_dp1?3YkgY;_a+bR&0iAQ&q-_X)P{Y2MD_c4u~k zF#Hue>!sTyR|&yd*U!OC57P%08b<*ShBMi|{(e^;|oBWnZU0{ zbZ3O4xolvkzz38rt@uk1n;pnCfMc+d?dFDop0uC+L|k4o5}hA z$>fO5l`WB84t?M*hYIhopS!)m)_%jWlqBQNc?}VgYD+)y_UjhC?C{5i4Pz0x+1E{e zYcdESn)Xo;~|ob9pCayDHa=6@Z-wX?2SA76@IyGf$<)}+mS8= zpZh;@6ljjo98?rh5+0XDv*jVI&lFP$4=(i=M&?WRyzS<);#oRa!3}XN5)t{lUH8Zb z|Ld5Nh1mPE5Lmra+Z42hOsk+O|Z_RoW@yqI`H>Qfgdty4&jTve%k zEnsTJ<-71r7H|bZTk`9Nao3UO%opR~=6I_GQ45ooG%hXQCzU21U07(e)QbIek&m|f zVpd9P3W5JqS~_XP%lL#S&F>yq=dG7)G|IYd78Z=`kK2_rYcF?PxKz@XT8lFh|9p_< z3%=7{f;RSgzGf&?sGi$k!-2s6ny#}q>NngcrKJaAHW9ok?g8ZYX|&_Ql|w^8rN%Cy z(1s6>_HC4zox07B?Jk@9CKtKoTpO~Ji3|?)Rf^n!<^p?Q#rToR&J@ilp~Q?_s!6i1EH8d0m8+-4=CYOyS$@TYcc!&*n)jm z7Y;$ct{QhA9qYUE9~f7pzxVRwIuIk+Jk^vKrB8`?ghh-c-$PO+-R|`5K8viNs^rq+UozH@XQNhmBtDs@KQ&s z|Hz${=z{JO2vMl&7v3-7PKWSio|_SizhddN8QI@zQWkWRojijMPZkMl_GV^fIC>_d z$IR2ih8nLJU0xcok8pRN%nqA)@JByasQumLUAG&4jKm#@!R-o$c7W;mDg}s_p}-tQ zKMqX=iuCs0Bjzv9W_0zyG8@zhu9j9fQqRj>8^f7dMRI&UaYt|(l@`|Hu-9f+#)=7$ z=wF^`U<7{qUYg`EB?735h1#kQYBK?1c^BCIBZ+nzANt$7ut~8CZ2o50bd8!VL>RPZ z2q^+A#>E+PX911e(t%5yENX=dT#**GsC^YG76$LJ<|-X7E3xCmCmp3t6308A9J8L^<+YdedlC!v3V3*fZbP1Pf)P@t(nUAn#kFrEj^AvZF#H74)!FEM z)TLU5ObUG8YY5bMyQwA!-NlowpxC^1rM3Y76>61G^GV(Y>8>fM1$=_);sg zVT3Cg`x&m|ZD@6_+D`h+xyMX&oAwE8_v4321V7Z(Nc<_vP_uVaA3>fhFMG4u!t?-r zZ}(S++}2{H{~2c)PXQu95G~sN&~941e%Ap-AFxEDhHM!cF&6#Eric^OA^sy2C{I|j z*$8!fa=(17ZouhC^9T4T0zh&H{9bZjLR2-!Ui?Ol$~<9cLf=IG;!kl{Y_ z@)xu0&f1#hPy3s7B6W$SEauH_F4dSygXaL7G zZkzSp*OtB$PdD5WuEHKYHa*^+L_aDr-w`~5zeC}{b)~KTi-}*TCCw%p*O6wkYla!! zYd$*y3Mu!Xh9+mSAk&1{k#s2Kb=<0ON~D+WeqO5=Rw#^BeU|j{fI(XClf@LbHsRDp z^z#E%pGdp$WGR4@(8nm)yB2ES_9{ z(>ED68Yut;-hrcY+V9*>F)<3{yboB|053>>nW>=_tmb80eSNIs&{p=LiMBm$=40On zI!@c71Qd&B+`%oITh|-uE@H+kD!mD5UqPJ^3ds?;7Gas zS$E;W427k;t&Qj(V+9w%)_kbbYB2k^985NQ>!Dmz7=GtdCDqn1e&CRp(!ZWD7+(=_ z?p>z|nq$#jZ7QZT_R!%+%0}u!38QhfAg8)L+Z4z9(UV={G<0+2u*ux(tBUMGR|M} zEaslVzj59hvT1l6EabH#!@HkR-J8yIPkFOafW7@3V(YiMYqr{TCMSNaaxLVUBTY@~ zq6c_W=kBc=+4ANt#669rWabB253bN zwe2IXQxlHVu@h(}ab9H4zOpJaLXOs*Qo~R6!;g|35yTJVQwc6EM7DV^q{Z7QCep$q z&^tWcBySz)>lo7ti}I)K>g-7vl(Nm*J7awv&6X_c&1eSBZLJ2S2!md5x8@MSG5TiD zIT`PrN0Ua-nEwYlba#N^P-HiB9?|p#OE+}%?zl_4Y9$c>?Khl#4@j+jT<0mc_J5MB zR=i`sreI(r4Y6N-KQ~p(qlC0Le~Ln1@|i07Wv|*vtjoc=*vYN({>N)>zUfcKnS7A> zX^+au7U@h+(o*wt{d`)Dbo>t1C033fy9tZ@*`Eiz(!HnDD4L4?BZX~r{KNxdP(fq+ z$?nyi7Wg=I_Jkf!?$J9nyT1u_rb>}T6T6zGo850ZG~4ZWzQ3SP+V1|07n5g^lLlS@ z&{(w}^N;G#Cw0<5_1pQ*Lw6$XmYn>=<%cEL7x$tX|5Ka~yhq7A20XsmLpGnv`LpEJ z2*%<}{bx~o`Yf-+**k*zC;s;sZ@y@PLVYDwnFGBX};Ug%p&sqD&$w>F1G=j@{L% zE5aD(W8kpdH{0%R6cliB2yaArPoAS}ghF^Xz0Unfe^lp7j#1@e8VNkr4&Vd`V}9?$jz?;qz798}dlAl_%i>^ShW{ zWB5hZ{FIe&;EbVp=$@i8gN#8{@UgVW({uvH(zYyQ^ zJ_fjcDcLA&hwQy{o*%cW{A?S~1rasc;RFmNK$2<%mjK5Vol}1^* zha?uYYeMff$;9_6j8ep~Qk3=+w-_cN_yFX5i!!`Cl>t-0S>}wLm<|>u`9K2KRk6Si z7%+L9v4U;zx`j*43PA4cEsII#4XXVW_m{0BlO{CBvjWUhCb#$@=R^5;hMP9{X*6nh zQj+T7QW!?`!NRuhhMiGGYaS3t&4P(@i~-Aqph_|2hC%c^g6b@4fTTUfWM-gF6S*c z=?CRF*n<=4lJOnrSEWKco8#vWU!4sqEh=W->KNVVo{%`jAzpMWRiT2lM diff --git a/agc_2-X/trunk/LANG_admin/astguiclient/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_admin/astguiclient/AST_inboundEXTstats.php deleted file mode 100644 index 28c5b20d..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient/AST_inboundEXTstats.php +++ /dev/null @@ -1,400 +0,0 @@ - LICENSE: GPLv2 -# -# CHANGES -# 60421-1450 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1322 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.11.20';} - -$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='" . mysql_real_escape_string($server_ip) . "';"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$inbound_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $inbound_to_print) - { - $row=mysql_fetch_row($rslt); - $inbound[$i] =$row[0]; - $fullnum[$i] =$row[1]; - $inbname[$i] =$row[2]; - $i++; - } -?> - - - - - -\n"; -#echo"\n"; -echo "ASTERISK: Inbound Calls Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A NUMBER AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "ASTERISK: Inbound Calls Stats                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$extenSQL = "and extension='" . mysql_real_escape_string($group) . "'";
    -if (eregi("\*",$group))
    -	{$extenSQL = "and extension LIKE \"%$group\"";}
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls That came into this number:       $TOTALcalls\n";
    -echo "Average Call Length(seconds) for all Calls:   $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -if ($row[0])
    -	{
    -	$average_hold_seconds = ($row[1] / $row[0]);
    -	$average_hold_seconds = round($average_hold_seconds, 0);
    -	$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -	}
    -else {$DROPpercent=0;   $average_hold_seconds=0;}
    -echo "Total DROP Calls:   (less than 10 seconds)    $DROPcalls  $DROPpercent%\n";
    -echo "Average Call Length(seconds) for DROP Calls:  $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  CALLS STATS
    -
    -echo "\n";
    -echo "---------- CALL LISTINGS\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -echo "| CALLERID             | CALLERIDNAME         | LENGTH | DATE TIME           |\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -$stmt="select number_dialed,caller_code,length_in_sec,start_time from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$CID =			sprintf("%-20s", $row[0]);
    -	$CIDname =		sprintf("%-20s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$datetime =		sprintf("%-19s", $row[3]);
    -	$USERavgTALK =	$row[2];
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -if ($output == 'FULL')
    -	{
    -
    -	echo "\n";
    -	echo "---------- TIME STATS\n";
    -
    -	echo "\n";
    -
    -	$hi_hour_count=0;
    -	$last_full_record=0;
    -	$i=0;
    -	$h=0;
    -	while ($i <= 96)
    -		{
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -		$h++;
    -		}
    -
    -	$hour_multiplier = (100 / $hi_hour_count);
    -	#$hour_multiplier = round($hour_multiplier, 0);
    -
    -	echo "\n";
    -	echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS\n";
    -
    -	$k=1;
    -	$Mk=0;
    -	$call_scale = '0';
    -	while ($k <= 102) 
    -		{
    -		if ($Mk >= 5) 
    -			{
    -			$Mk=0;
    -			$scale_num=($k / $hour_multiplier);
    -			$scale_num = round($scale_num, 0);
    -			$LENscale_num = (strlen($scale_num));
    -			$k = ($k + $LENscale_num);
    -			$call_scale .= "$scale_num";
    -			}
    -		else
    -			{
    -			$call_scale .= " ";
    -			$k++;   $Mk++;
    -			}
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -	#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -	echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -	$ZZ = '00';
    -	$i=0;
    -	$h=4;
    -	$hour= -1;
    -	$no_lines_yet=1;
    -
    -	while ($i <= 96)
    -		{
    -		$char_counter=0;
    -		$time = '      ';
    -		if ($h >= 4) 
    -			{
    -			$hour++;
    -			$h=0;
    -			if ($hour < 10) {$hour = "0$hour";}
    -			$time = "+$hour$ZZ+";
    -			}
    -		if ($h == 1) {$time = "   15 ";}
    -		if ($h == 2) {$time = "   30 ";}
    -		if ($h == 3) {$time = "   45 ";}
    -		$Ghour_count = $hour_count[$i];
    -		if ($Ghour_count < 1) 
    -			{
    -			if ( ($no_lines_yet) or ($i > $last_full_record) )
    -				{
    -				$do_nothing=1;
    -				}
    -			else
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				echo "|$time|";
    -				$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -				echo "| $hour_count[$i] |\n";
    -				}
    -			}
    -		else
    -			{
    -			$no_lines_yet=0;
    -			$Xhour_count = ($Ghour_count * $hour_multiplier);
    -			$Yhour_count = (99 - $Xhour_count);
    -
    -			$Gdrop_count = $drop_count[$i];
    -			if ($Gdrop_count < 1) 
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "*X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -				echo "| 0     | $hour_count[$i] |\n";
    -
    -				}
    -			else
    -				{
    -				$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -			#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -				$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -				echo "D";   $char_counter++;
    -				$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -				echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -				}
    -			}
    -		
    -		
    -		$i++;
    -		$h++;
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -	}
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/astguiclient/admin.php b/agc_2-X/trunk/LANG_admin/astguiclient/admin.php deleted file mode 100644 index 75f407c7..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient/admin.php +++ /dev/null @@ -1,1824 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI database administration -# -# CHANGES -# 50913-1118 - Added outbound_cid for web-client calls -# 50926-1356 - Modified to allow for language translation -# 50926-1613 - Added WeBRooTWritablE write controls -# 51128-1254 - Modified to allow PHP global vars off -# 51208-2120 - Added option to login with vicidial_user login if allowed -# 51213-1650 - Added option to delete phones if allowed by vicidial_users -# 60421-1430 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1137 - Fixed phone search bug -# 60620-1243 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '1.1.12'; -$build = '60620-1243'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} - elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} - elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} -if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} - elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} -if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} - elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} -if (isset($_GET["login"])) {$login=$_GET["login"];} - elseif (isset($_POST["login"])) {$login=$_POST["login"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} - elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} -if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} - elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} -if (isset($_GET["company"])) {$company=$_GET["company"];} - elseif (isset($_POST["company"])) {$company=$_POST["company"];} -if (isset($_GET["picture"])) {$picture=$_GET["picture"];} - elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} - elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} -if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} - elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} -if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} - elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} -if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} - elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} -if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} - elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} -if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} - elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} -if (isset($_GET["park_on_extension"])) {$park_on_extension=$_GET["park_on_extension"];} - elseif (isset($_POST["park_on_extension"])) {$park_on_extension=$_POST["park_on_extension"];} -if (isset($_GET["conf_on_extension"])) {$conf_on_extension=$_GET["conf_on_extension"];} - elseif (isset($_POST["conf_on_extension"])) {$conf_on_extension=$_POST["conf_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"];} - elseif (isset($_POST["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"];} - elseif (isset($_POST["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];} -if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} - elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} -if (isset($_GET["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} - elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} -if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} - elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["dtmf_send_extension"])) {$dtmf_send_extension=$_GET["dtmf_send_extension"];} - elseif (isset($_POST["dtmf_send_extension"])) {$dtmf_send_extension=$_POST["dtmf_send_extension"];} -if (isset($_GET["call_out_number_group"])) {$call_out_number_group=$_GET["call_out_number_group"];} - elseif (isset($_POST["call_out_number_group"])) {$call_out_number_group=$_POST["call_out_number_group"];} -if (isset($_GET["client_browser"])) {$client_browser=$_GET["client_browser"];} - elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} -if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} - elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} -if (isset($_GET["local_web_callerID_URL"])) {$local_web_callerID_URL=$_GET["local_web_callerID_URL"];} - elseif (isset($_POST["local_web_callerID_URL"])) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];} -if (isset($_GET["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"];} - elseif (isset($_POST["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];} -if (isset($_GET["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"];} - elseif (isset($_POST["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];} -if (isset($_GET["user_switching_enabled"])) {$user_switching_enabled=$_GET["user_switching_enabled"];} - elseif (isset($_POST["user_switching_enabled"])) {$user_switching_enabled=$_POST["user_switching_enabled"];} -if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} - elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} -if (isset($_GET["admin_hangup_enabled"])) {$admin_hangup_enabled=$_GET["admin_hangup_enabled"];} - elseif (isset($_POST["admin_hangup_enabled"])) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];} -if (isset($_GET["admin_hijack_enabled"])) {$admin_hijack_enabled=$_GET["admin_hijack_enabled"];} - elseif (isset($_POST["admin_hijack_enabled"])) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];} -if (isset($_GET["admin_monitor_enabled"])) {$admin_monitor_enabled=$_GET["admin_monitor_enabled"];} - elseif (isset($_POST["admin_monitor_enabled"])) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];} -if (isset($_GET["call_parking_enabled"])) {$call_parking_enabled=$_GET["call_parking_enabled"];} - elseif (isset($_POST["call_parking_enabled"])) {$call_parking_enabled=$_POST["call_parking_enabled"];} -if (isset($_GET["updater_check_enabled"])) {$updater_check_enabled=$_GET["updater_check_enabled"];} - elseif (isset($_POST["updater_check_enabled"])) {$updater_check_enabled=$_POST["updater_check_enabled"];} -if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} - elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} -if (isset($_GET["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"];} - elseif (isset($_POST["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];} -if (isset($_GET["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"];} - elseif (isset($_POST["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];} -if (isset($_GET["voicemail_button_enabled"])) {$voicemail_button_enabled=$_GET["voicemail_button_enabled"];} - elseif (isset($_POST["voicemail_button_enabled"])) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];} -if (isset($_GET["enable_fast_refresh"])) {$enable_fast_refresh=$_GET["enable_fast_refresh"];} - elseif (isset($_POST["enable_fast_refresh"])) {$enable_fast_refresh=$_POST["enable_fast_refresh"];} -if (isset($_GET["fast_refresh_rate"])) {$fast_refresh_rate=$_GET["fast_refresh_rate"];} - elseif (isset($_POST["fast_refresh_rate"])) {$fast_refresh_rate=$_POST["fast_refresh_rate"];} -if (isset($_GET["enable_persistant_mysql"])) {$enable_persistant_mysql=$_GET["enable_persistant_mysql"];} - elseif (isset($_POST["enable_persistant_mysql"])) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];} -if (isset($_GET["auto_dial_next_number"])) {$auto_dial_next_number=$_GET["auto_dial_next_number"];} - elseif (isset($_POST["auto_dial_next_number"])) {$auto_dial_next_number=$_POST["auto_dial_next_number"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} - elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} -if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} - elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} -if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} - elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} -if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];} - elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];} -if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];} - elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];} -if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} - elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} -if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} - elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} -if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} - elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} -if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];} - elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];} -if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];} - elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];} - elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} -if (isset($_GET["old_server_ip"])) {$old_server_ip=$_GET["old_server_ip"];} - elseif (isset($_POST["old_server_ip"])) {$old_server_ip=$_POST["old_server_ip"];} -if (isset($_GET["old_server_id"])) {$old_server_id=$_GET["old_server_id"];} - elseif (isset($_POST["old_server_id"])) {$old_server_id=$_POST["old_server_id"];} -if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} - elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} -if (isset($_GET["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} - elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} -if (isset($_GET["max_vicidial_trunks"])) {$max_vicidial_trunks=$_GET["max_vicidial_trunks"];} - elseif (isset($_POST["max_vicidial_trunks"])) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];} -if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];} - elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];} -if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];} - elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];} -if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} - elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} -if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];} - elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];} -if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];} - elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];} -if (isset($_GET["answer_transfer_agent"])) {$answer_transfer_agent=$_GET["answer_transfer_agent"];} - elseif (isset($_POST["answer_transfer_agent"])) {$answer_transfer_agent=$_POST["answer_transfer_agent"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["old_conf_exten"])) {$old_conf_exten=$_GET["old_conf_exten"];} - elseif (isset($_POST["old_conf_exten"])) {$old_conf_exten=$_POST["old_conf_exten"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS and Dots -$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); -$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); - -### DIGITS ONLY ### -$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); -$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); -$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); -$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); -$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); -$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); -$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); -$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); -$recording_exten = ereg_replace("[^0-9]","",$recording_exten); -$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); -$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); -$DBX_port = ereg_replace("[^0-9]","",$DBX_port); -$DBY_port = ereg_replace("[^0-9]","",$DBY_port); -$telnet_port = ereg_replace("[^0-9]","",$telnet_port); -$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); -$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); -$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); -$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); -$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); -$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); -$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); -$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); -$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); -$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); -$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); -$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); -$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); -$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); -$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); -$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); -$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); -$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); -$ADD = ereg_replace("[^0-9]","",$ADD); - -### ALPHA-NUMERIC and underscore and dash and slash and at and dot -$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); -$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); -$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); -$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); -$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); -$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); -$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); -$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); -$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); - -### ALPHA-NUMERIC (and underscore and dash) -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); -$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); -$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); -$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); -$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); -$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); -$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); -$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); -$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); -$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); -$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); -$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); -$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); -$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); -$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); -$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); -$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); -$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); -$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); -$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); -$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); -$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); -$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); -$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); -$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); -$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); -$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); -$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); - -### VARIABLES TO BE mysql_real_escape_string ### -# $VICIDIAL_web_URL = -# $local_web_callerID_URL = - -##### END VARIABLE FILTERING FOR SECURITY ##### - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -if (!isset($ADD)) {$ADD=0;} - -$STARTtime = date("U"); -$STARTdate = date("Y-m-d H:i:s"); - -if ($ADD==1) {$process = 'ADD NEW PHONE';} -if ($ADD==11) {$process = 'ADD NEW SERVER';} -if ($ADD==111) {$process = 'ADD NEW CONFERENCE';} -if ($ADD==2) {$process = 'ADDING NEW PHONE';} -if ($ADD==21) {$process = 'ADDING NEW SERVER';} -if ($ADD==211) {$process = 'ADDING NEW CONFERENCE';} -if ($ADD==3) {$process = 'MODIFY PHONE';} -if ($ADD==31) {$process = 'MODIFY SERVER';} -if ($ADD==311) {$process = 'MODIFY CONFERENCE';} -if ($ADD==4) {$process = 'MODIFYING PHONE';} -if ($ADD==41) {$process = 'MODIFYING SERVER';} -if ($ADD==411) {$process = 'MODIFYING CONFERENCE';} -if ($ADD==5) {$process = 'DELETE PHONE';} -if ($ADD==6) {$process = 'DELETE PHONE';} -if ($ADD==55) {$process = 'SEARCH PHONES';} -if ($ADD==66) {$process = 'SEARCH PHONES RESULTS';} -if ($ADD==0) {$process = 'PHONE LIST';} -if ($ADD==10) {$process = 'SERVER LIST';} -if ($ADD==100) {$process = 'CONFERENCE LIST';} -if ($ADD==99999) {$process = 'HELP';} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if ($auth<1) - { - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > '6' and ast_admin_access='1';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGdelete_phones =$row[17]; - } - } - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - echo "|$stmt|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - if (strlen($LOGfullname) < 1) - { - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - } - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rsltx=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rsltx); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $servers_list .= "\n"; - $o++; - } - - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); - -$NWB = "  
    \"HELP\""; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "ASTERISK ADMIN: Administration - $process \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    ASTERISK ADMIN: HELP


    \n"; - -?> -PHONES TABLE

    - -
    -Phone extension - This field is where you put the phones name as it appears to Asterisk not including the protocol or slash at the beginning. For Example: for the SIP phone SIP/test101 the Phone extension would be test101. Also, for IAX2 phones make sure you use the full phones name: IAX2/IAXphone1@IAXphone1 would be IAXphone1@IAXphone1. For Zap phones make sure you put the full channel: Zap/25-1 would be 25-1. Another note, make sure you set the Protocol below correctly for your type of phone. - -
    -
    -
    -Dialplan number - This field is for the number you dial to have the phone ring. This number is defined in the extensions.conf file of your Asterisk server - -
    -
    -
    -Voicemail Box - This field is for the voicemail box that the messages go to for the user of this phone. We use this to check for voicemail messages and for the user to be able to use the VOICEMAIL button on astGUIclient app. - -
    -
    -
    -Outbound CallerID - This field is where you would enter the callerID number that you would like to appear on outbound calls placed form the astguiclient web-client. This does not work on RBS, non-PRI, T1/E1s. - -
    -
    -
    -Phone IP address - This field is for the phone's IP address if it is a VOIP phone. This is an optional field - -
    -
    -
    -Computer IP address - This field is for the user's computer IP address. This is an optional field - -
    -
    -
    -Server IP - This menu is where you select which server the phone is active on. - -
    -
    -
    -Login - The login used for the phone user to login to the client applications. - -
    -
    -
    -Password - The password used for the phone user to login to the client applications. - -
    -
    -
    -Status - The status of the phone in the system, ACTIVE and ADMIN allow for GUI clients to work. ADMIN allows access to this administrative web site. All other statuses do not allow GUI or Admin web access. - -
    -
    -
    -Active Account - Whether the phone is active to put it in the list in the GUI client. - -
    -
    -
    -Phone Type - Purely for administrative notes. - -
    -
    -
    -Full Name - Used by the GUIclient in the list of active phones. - -
    -
    -
    -Company - Purely for administrative notes. - -
    -
    -
    -Picture - Not yet Implemented. - -
    -
    -
    -New Messages - Number of new voicemail messages for this phone on the Asterisk server. - -
    -
    -
    -Old Messages - Number of old voicemail messages for this phone on the Asterisk server. - -
    -
    -
    -Client Protocol - The protocol that the phone uses to connect to the Asterisk server: SIP, IAX2, Zap . Also, there is EXTERNAL for remote dial numbers or speed dial numbers that you want to list as phones. - -
    -
    -
    -Local GMT - The difference from Greenwich Mean time, or ZULU time where the phone is located. DO NOT ADJUST FOR DAYLIGHT SAVINGS TIME. This is used by the VICIDIAL campaign to accurately display the time and customer time. - -
    -
    -
    -Manager Login - This is the login that the GUI clients for this phone will use to access the Database where the server data resides. - -
    -
    -
    -Manager Secret - This is the password that the GUI clients for this phone will use to access the Database where the server data resides. - -
    -
    -
    -VICIDIAL Default User - This is to place a default value in the VICIDIAL user field whenever this phone user opens the astVICIDIAL client app. Leave blank for no user. - -
    -
    -
    -VICIDIAL Default Pass - This is to place a default value in the VICIDIAL password field whenever this phone user opens the astVICIDIAL client app. Leave blank for no pass. - -
    -
    -
    -VICIDIAL Default Campaign - This is to place a default value in the VICIDIAL campaign field whenever this phone user opens the astVICIDIAL client app. Leave blank for no campaign. - -
    -
    -
    -Park Exten - This is the default Parking extension for the client apps. Verify that a different one works before you change this. - -
    -
    -
    -Conf Exten - This is the default Conference park extension for the client apps. Verify that a different one works before you change this. - -
    -
    -
    -VICIDIAL Park Exten - This is the default Parking extension for VICIDIAL client app. Verify that a different one works before you change this. - -
    -
    -
    -VICIDIAL Park File - This is the default VICIDIAL park extension file name for the client apps. Verify that a different one works before you change this. limited to 10 characters. - -
    -
    -
    -Monitor Prefix - This is the dialplan prefix for monitoring of Zap channels automatically within the astGUIclient app. Only change according to the extensions.conf ZapBarge extensions records. - -
    -
    -
    -Recording Exten - This is the dialplan extension for the recording extension that is used to drop into meetme conferences to record them. It usually lasts upto one hour if not stopped. verify with extensions.conf file before changing. - -
    -
    -
    -VMAIL Main Exten - This is the dialplan extension going to check your voicemail. verify with extensions.conf file before changing. - -
    -
    -
    -VMAIL Dump Exten - This is the dialplan prefix used to send calls directly to a user's voicemail from a live call in the astGUIclient app. verify with extensions.conf file before changing. - -
    -
    -
    -Exten Context - This is the dialplan context that this phone primarily uses. It is assumed that all numbers dialed by the client apps are using this context so it is a good idea to make sure this is the most wide context possible. verify with extensions.conf file before changing. - -
    -
    -
    -DTMF send Channel - This is the channel string used to send DTMF sounds into meetme conferences from the client apps. Verify the exten and context with the extensions.conf file. - -
    -
    -
    -Outbound Call Group - This is the channel group that outbound calls from this phone are placed out of. There are a couple routines in the client apps that use this. For Zap channels you want to use something like Zap/g2 , for IAX2 trunks you would want to use the full IAX prefix like IAX2/VICItest1:secret@10.10.10.15:4569. Verify the trunks with the extensions.conf file, it is usually what you have defined as the TRUNK global variable at the top of the file. - -
    -
    -
    -Browser Location - This is applicable to only UNIX/LINUX clients, the absolute path to Mozilla or Firefox browser on the machine. verify this by launching it manually. - -
    -
    -
    -Install Directory - This is the place where the astGUIclient and astVICIDIAL scripts are located on your machine. For Win32 it should be something like C:\AST_VICI and for UNIX it should be something like /usr/local/perl_TK. verify this manually. - -
    -
    -
    -CallerID URL - This is the web address of the page used to do custom callerID lookups. default testing address is: http://astguiclient.sf.net/test_callerid_output.php - -
    -
    -
    -VICIDIAL Default URL - This is the web address of the page used to do custom VICIDIAL Web Form queries. default testing address is: http://astguiclient.sf.net/test_VICIDIAL_output.php - -
    -
    -
    -Call Logging - This is set to true if the call_log.agi file is in place in the extensions.conf file for all outbound and hangup 'h' extensions to log all calls. This should always be 1 because it is manditory for many astGUIclient and VICIDIAL features to work properly. - -
    -
    -
    -User Switching - Set to true to allow user to switch to another user account. NOTE: If user switches they can initiate recording on the new user's phone conversation - -
    -
    -
    -Conferencing - Set to true to allow user to start conference calls with upto six external lines. - -
    -
    -
    -Admin Hangup - Set to true to allow user to be able to hangup any line at will through astGUIclient. Good idea only to enable this for Admin users. - -
    -
    -
    -Admin Hijack - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers. - -
    -
    -
    -Admin Monitor - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers and as a training tool. - -
    -
    -
    -Call Park - Set to true to allow user to be able to park calls on astGUIclient hold to be picked up by any other astGUIclient user on the system. Calls stay on hold for upto a half hour then hangup. Usually enabled for all. - -
    -
    -
    -Updater Check - Set to true to display a popup warning that the updater time has not changed in 20 seconds. Useful for Admin users. - -
    -
    -
    -AF Logging - Set to true to log many actions of astGUIclient usage to a text file on the user's computer. - -
    -
    -
    -Queue Enabled - Set to true to have client apps use the Asterisk Central Queue system. Required for VICIDIAL and recommended for all users. - -
    -
    -
    -CallerID Popup - Set to true to allow for numbers defined in the extensions.conf file to send CallerID popup screens to astGUIclient users. - -
    -
    -
    -VMail Button - Set to true to display the VOICEMAIL button and the messages count display on astGUIclient. - -
    -
    -
    -Fast Refresh - Set to true to enable a new rate of refresh of call information for the astGUIclient. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. - -
    -
    -
    -Fast Refresh Rate - in milliseconds. Only used if Fast Refresh is enabled. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. - -
    -
    -
    -Persistant MySQL - If enabled the astGUIclient connection will remain connected instead of connecting every second. Useful if you have a fast refresh rate set. It will increase the number of connections on your MySQL machine. - -
    -
    -
    -Auto Dial Next Number - If enabled the VICIDIAL client will dial the next number on the list automatically upon disposition of a call unless they selected to "Stop Dialing" on the disposition screen. - -
    -
    -
    -Stop Rec after each call - If enabled the VICIDIAL client will stop whatever recording is going on after each call has been dispositioned. Useful if you are doing a lot of recording or you are using a web form to trigger recording. - -
    -
    -
    -DBX Server - The MySQL database server that this user should be connecting to. - -
    -
    -
    -DBX Database - The MySQL database that this user should be connecting to. Default is asterisk. - -
    -
    -
    -DBX User - The MySQL user login that this user should be using when connecting. Default is cron. - -
    -
    -
    -DBX Pass - The MySQL user password that this user should be using when connecting. Default is 1234. - -
    -
    -
    -DBX Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. - -
    -
    -
    -DBY Server - The MySQL database server that this user should be connecting to. Secondary server, not used currently. - -
    -
    -
    -DBY Database - The MySQL database that this user should be connecting to. Default is asterisk. Secondary server, not used currently. - -
    -
    -
    -DBY User - The MySQL user login that this user should be using when connecting. Default is cron. Secondary server, not used currently. - -
    -
    -
    -DBY Pass - The MySQL user password that this user should be using when connecting. Default is 1234. Secondary server, not used currently. - -
    -
    -
    -DBY Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. Secondary server, not used currently. - - -



    - -SERVERS TABLE

    -
    -
    -Server ID - This field is where you put the Asterisk servers name, doesnt have to be an official domain sub, just a nickname to identify the server to Admin users. - -
    -
    -
    -Server Description - The field where you use a small phrase to describe the Asterisk server. - -
    -
    -
    -Server IP Address - The field where you put the Network IP address of the Asterisk server. - -
    -
    -
    -Active - Set whether the Asterisk server is active or inactive. - -
    -
    -
    -Asterisk Version - Set the version of Asterisk that you have installed on this server. Examples: '1.2', '1.0.8', '1.0.7', 'CVS_HEAD', 'REALLY OLD', etc... This is used because versions 1.0.8 and 1.0.9 have a different method of dealing with Local/ channels, a bug that has been fixed in CVS v1.0, and need to be treated differently when handling their Local/ channels. Also, current CVS_HEAD and the 1.2 release tree uses different manager and command output so it must be treated differently as well. - -
    -
    -
    -Max VICIDIAL Trunks - This field will determine the maximum number of lines that the VICIDIAL auto-dialer will attempt to call on this server. If you want to dedicate two full PRI T1s to VICIDIALing on a server then you would set this to 46. Default is 96. - -
    -
    -
    -Telnet Host - This is the address or name of the Asterisk server and is how the manager applications connect to it from where they are running. If they are running on the Asterisk server, then the default of 'localhost' is fine. - -
    -
    -
    -Telnet Port - This is the port of the Asterisk server Manager connection and is how the manager applications connect to it from where they are running. The default of '5038' is fine for a standard install. - -
    -
    -
    -Manager User - The username or login used to connect genericly to the Asterisk server manager. Default is 'cron' - -
    -
    -
    -Manager Secret - The secret or password used to connect genericly to the Asterisk server manager. Default is '1234' - -
    -
    -
    -Manager Update User - The username or login used to connect to the Asterisk server manager optimized for the Update scripts. Default is 'updatecron' and assumes the same secret as the generic user. - -
    -
    -
    -Manager Listen User - The username or login used to connect to the Asterisk server manager optimized for scripts that only listen for output. Default is 'listencron' and assumes the same secret as the generic user. - -
    -
    -
    -Manager Send User - The username or login used to connect to the Asterisk server manager optimized for scripts that only send Actions to the manager. Default is 'sendcron' and assumes the same secret as the generic user. - -
    -
    -
    -Server GMT offset - The difference in hours from GMT time not adjusted for Daylight-Savings-Time of the server. Default is '-5' - -
    -
    -
    -VMail Dump Exten - The extension prefix used on this server to send calls directly through agc to a specific voicemail box. Default is '85026666666666' - -
    -
    -
    -VICIDIAL AD extension - The default extension if none is present in the campaign to send calls to for VICIDIAL auto dialing. Default is '8365' - -
    -
    -
    -Default Context - The default dialplan context used for scripts that operate for this server. Default is 'default' - - -



    - -CONFERENCES TABLE

    -
    -
    -Conference Number - This field is where you put the meetme conference dialpna number. It is also recommended that the meetme number in meetme.conf matches this number for each entry. This is for the conferences in astGUIclient and is used for leave-3way-call functionality in VICIDIAL. - -
    -
    -
    -Server IP - The menu where you select the Asterisk server that this conference will be on. - - - - - - -







    -







    -THE END -
    - - - -ASTERISK ADMIN: Administration - <? echo $process ?> - - - -
    - - - - - - -
      ASTERISK ADMIN - Logout  
      LIST ALL PHONES | ADD A NEW PHONE | SEARCH FOR A PHONE | ADD A SERVER | LIST ALL SERVERS
      SHOW ALL CONFERENCES | ADD A NEW CONFERENCE
    -"; - -echo "
    ADD A NEW PHONE
    \n"; -echo "\n"; -echo "
    \n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW SERVERS FORM SCREEN -###################### - -if ($ADD==11) -{ -echo ""; - -echo "
    ADD A NEW SERVER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW CONFERENCES FORM SCREEN -###################### - -if ($ADD==111) -{ -echo ""; - -echo "
    ADD A NEW CONFERENCE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference Number: (digits only)$NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    \n"; - -} - - -###################### -# ADD=2 adds the new phone to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    PHONE NOT ADDED - there is already a Phone in the system with this extension/server\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    PHONE NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    PHONE ADDED\n"; - - $stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new server to the system -###################### - -if ($ADD==21) -{ - echo ""; - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    SERVER NOT ADDED - there is already a server in the system with this ID\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    SERVER NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    SERVER ADDED\n"; - - $stmt="INSERT INTO servers (server_id,server_description,server_ip,active,asterisk_version) values('$server_id','$server_description','$server_ip','$active','$asterisk_version');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new conference to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CONFERENCE NOT ADDED - there is already a conference in the system with this ID and server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    CONFERENCE ADDED\n"; - - $stmt="INSERT INTO conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=100; -} - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of phone -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGdelete_phones < 1) ) - { - echo "
    PHONE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    Server IP be at least 7 characters in length\n"; - } - else - { - echo "
    PHONE DELETION CONFIRMATION: $extension - $server_ip\n"; - echo "

    Click here to delete phone $extension - $server_ip


    \n"; - } - -$ADD='3'; # go to phone modification below -} - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete phone record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGdelete_phones < 1) ) - { - echo "
    PHONE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from phones where extension='$extension' and server_ip='$server_ip' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING PHONE!!!|$PHP_AUTH_USER|$ip|extension='$extension'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
    PHONE DELETION COMPLETED: $extension - $server_ip\n"; - echo "

    \n"; - } - -$ADD='0'; # go to phone list -} - - - - - - -###################### -# ADD=3 modify phone info in the system -###################### - -if ($ADD==3) -{ - echo ""; - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A PHONE RECORD: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    New Messages: $row[14]$NWB#phones-messages$NWE
    Old Messages: $row[15]$NWB#phones-old_messages$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL Default User: $NWB#phones-login_user$NWE
    VICIDIAL Default Pass: $NWB#phones-login_pass$NWE
    VICIDIAL Default Campaign: $NWB#phones-login_campaign$NWE
    Park Exten: $NWB#phones-park_on_extension$NWE
    Conf Exten: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL Park File: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Monitor Prefix: $NWB#phones-monitor_prefix$NWE
    Recording Exten: $NWB#phones-recording_exten$NWE
    VMailMain Exten: $NWB#phones-voicemail_exten$NWE
    VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
    Exten Context: $NWB#phones-ext_context$NWE
    DTMFSend Channel: $NWB#phones-dtmf_send_extension$NWE
    Outbound Call Group: $NWB#phones-call_out_number_group$NWE
    Browser Location: $NWB#phones-client_browser$NWE
    Install Directory: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL Default URL: $NWB#phones-VICIDIAL_web_URL$NWE
    Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
    User Switching: $NWB#phones-user_switching_enabled$NWE
    Conferencing: $NWB#phones-conferencing_enabled$NWE
    Admin Hangup: $NWB#phones-admin_hangup_enabled$NWE
    Admin Hijack: $NWB#phones-admin_hijack_enabled$NWE
    Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
    Call Park: $NWB#phones-call_parking_enabled$NWE
    Updater Check: $NWB#phones-updater_check_enabled$NWE
    AF Logging: $NWB#phones-AFLogging_enabled$NWE
    Queue Enabled: $NWB#phones-QUEUE_ACTION_enabled$NWE
    CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
    VMail Button: $NWB#phones-voicemail_button_enabled$NWE
    Fast Refresh: $NWB#phones-enable_fast_refresh$NWE
    Fast Refresh Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Auto Dial Next Number: $NWB#phones-auto_dial_next_number$NWE
    Stop Rec after each call: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Server: (Primary DB Server)$NWB#phones-DBX_server$NWE
    DBX Database: (Primary Server Database)$NWB#phones-DBX_database$NWE
    DBX User: (Primary DB Login)$NWB#phones-DBX_user$NWE
    DBX Pass: (Primary DB Secret)$NWB#phones-DBX_pass$NWE
    DBX Port: (Primary DB Port)$NWB#phones-DBX_port$NWE
    DBY Server: (Secondary DB Server)$NWB#phones-DBY_server$NWE
    DBY Database: (Secondary Server Database)$NWB#phones-DBY_database$NWE
    DBY User: (Secondary DB Login)$NWB#phones-DBY_user$NWE
    DBY Pass: (Secondary DB Secret)$NWB#phones-DBY_pass$NWE
    DBY Port: (Secondary DB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Click here for phone stats\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    DELETE THIS PHONE\n"; - } - -} - - -###################### -# ADD=31 modify server info in the system -###################### - -if ($ADD==31) -{ - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A SERVER RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    Max VICIDIAL Trunks: $NWB#servers-max_vicidial_trunks$NWE
    Telnet Host: $NWB#servers-telnet_host$NWE
    Telnet Port: $NWB#servers-telnet_port$NWE
    Manager User: $NWB#servers-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#servers-ASTmgrSECRET$NWE
    Manager Update User: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Manager Listen User: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Manager Send User: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#servers-local_gmt$NWE
    VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
    VICIDIAL AD extension: $NWB#servers-answer_transfer_agent$NWE
    Default Context: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    PHONES WITHIN THIS SERVER:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    EXTENSIONNAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This server has $active_lists active phones and $inactive_lists inactive phones

    \n"; -echo "
    \n"; -} - - -###################### -# ADD=311 modify conference info in the system -###################### - -if ($ADD==311) -{ - echo ""; - - $stmt="SELECT * from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A CONFERENCE RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference: $NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    Current Extension:
    \n"; - -echo "
    \n"; - -} - - - -###################### -# ADD=4 submit phone modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) - {echo "
    PHONE NOT MODIFIED - there is already a Phone in the system with this extension/server\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    PHONE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    PHONE MODIFIED: $extension\n"; - - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid' where extension='$old_extension' and server_ip='$old_server_ip';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A PHONE RECORD: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    New Messages: $row[14]$NWB#phones-messages$NWE
    Old Messages: $row[15]$NWB#phones-old_messages$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL Default User: $NWB#phones-login_user$NWE
    VICIDIAL Default Pass: $NWB#phones-login_pass$NWE
    VICIDIAL Default Campaign: $NWB#phones-login_campaign$NWE
    Park Exten: $NWB#phones-park_on_extension$NWE
    Conf Exten: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL Park File: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Monitor Prefix: $NWB#phones-monitor_prefix$NWE
    Recording Exten: $NWB#phones-recording_exten$NWE
    VMailMain Exten: $NWB#phones-voicemail_exten$NWE
    VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
    Exten Context: $NWB#phones-ext_context$NWE
    DTMFSend Channel: $NWB#phones-dtmf_send_extension$NWE
    Outbound Call Group: $NWB#phones-call_out_number_group$NWE
    Browser Location: $NWB#phones-client_browser$NWE
    Install Directory: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL Default URL: $NWB#phones-VICIDIAL_web_URL$NWE
    Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
    User Switching: $NWB#phones-user_switching_enabled$NWE
    Conferencing: $NWB#phones-conferencing_enabled$NWE
    Admin Hangup: $NWB#phones-admin_hangup_enabled$NWE
    Admin Hijack: $NWB#phones-admin_hijack_enabled$NWE
    Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
    Call Park: $NWB#phones-call_parking_enabled$NWE
    Updater Check: $NWB#phones-updater_check_enabled$NWE
    AF Logging: $NWB#phones-AFLogging_enabled$NWE
    Queue Enabled: $NWB#phones-QUEUE_ACTION_enabled$NWE
    CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
    VMail Button: $NWB#phones-voicemail_button_enabled$NWE
    Fast Refresh: $NWB#phones-enable_fast_refresh$NWE
    Fast Refresh Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Auto Dial Next Number: $NWB#phones-auto_dial_next_number$NWE
    Stop Rec after each call: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Server: (Primary DB Server)$NWB#phones-DBX_server$NWE
    DBX Database: (Primary Server Database)$NWB#phones-DBX_database$NWE
    DBX User: (Primary DB Login)$NWB#phones-DBX_user$NWE
    DBX Pass: (Primary DB Secret)$NWB#phones-DBX_pass$NWE
    DBX Port: (Primary DB Port)$NWB#phones-DBX_port$NWE
    DBY Server: (Secondary DB Server)$NWB#phones-DBY_server$NWE
    DBY Database: (Secondary Server Database)$NWB#phones-DBY_database$NWE
    DBY User: (Secondary DB Login)$NWB#phones-DBY_user$NWE
    DBY Pass: (Secondary DB Secret)$NWB#phones-DBY_pass$NWE
    DBY Port: (Secondary DB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Click here for phone stats\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    DELETE THIS PHONE\n"; - } - -} - -###################### -# ADD=41 submit server modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_id != $old_server_id) ) - {echo "
    SERVER NOT MODIFIED - there is already a server in the system with this server_id\n";} - else - { - $stmt="SELECT count(*) from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_ip != $old_server_ip) ) - {echo "
    SERVER NOT MODIFIED - there is already a server in the system with this server_ip\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    SERVER NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    SERVER MODIFIED: $server_ip\n"; - - $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A SERVER RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    Max VICIDIAL Trunks: $NWB#servers-max_vicidial_trunks$NWE
    Telnet Host: $NWB#servers-telnet_host$NWE
    Telnet Port: $NWB#servers-telnet_port$NWE
    Manager User: $NWB#servers-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#servers-ASTmgrSECRET$NWE
    Manager Update User: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Manager Listen User: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Manager Send User: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#servers-local_gmt$NWE
    VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
    VICIDIAL AD extension: $NWB#servers-answer_transfer_agent$NWE
    Default Context: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    PHONES WITHIN THIS SERVER:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    EXTENSIONNAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This server has $active_lists active phones and $inactive_lists inactive phones

    \n"; -echo "
    \n"; - -} - -###################### -# ADD=411 submit conference modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) - {echo "
    CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    CONFERENCE MODIFIED: $conf_exten\n"; - - $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from conferences where conf_exten='$conf_exten';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A CONFERENCE RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference: $NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    Current Extension:
    \n"; - -echo "
    \n"; - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo ""; - -echo "
    SEARCH FOR A PHONE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    extension:
    Full Name:
    Phone type:
    \n"; - -} - -###################### -# ADD=66 phone search results -###################### - -if ($ADD==66) -{ - echo ""; - - $SQL = ''; - if ($extension) {$SQL .= "extension LIKE \"%$extension%\" and";} - if ($fullname) {$SQL .= "fullname LIKE \"%$fullname%\" and";} - if ($phone_type) {$SQL .= "phone_type LIKE \"%$phone_type%\" and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from phones $SQL order by extension,server_ip;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    SEARCH RESULTS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
    \n"; - -} - - - -###################### -# ADD=0 display all active phones -###################### -if ($ADD==0) -{ - echo ""; - - $stmt="SELECT * from phones order by extension,server_ip"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    PHONE LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
    \n"; -} - -###################### -# ADD=10 display all servers -###################### -if ($ADD==10) -{ - echo ""; - - $stmt="SELECT * from servers order by server_id"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    SERVER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[1] $row[2] $row[4] $row[3]  MODIFY
    \n"; -} - - -###################### -# ADD=100 display all conferences -###################### -if ($ADD==100) -{ - echo ""; - - $stmt="SELECT * from conferences order by conf_exten"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    CONFERENCE LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]  MODIFY
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; -echo "             VERSION: $version"; -echo "             BUILD: $build
    \n"; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient/dbconnect.php b/agc_2-X/trunk/LANG_admin/astguiclient/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient/help.gif b/agc_2-X/trunk/LANG_admin/astguiclient/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/astguiclient/inbound_popup.php b/agc_2-X/trunk/LANG_admin/astguiclient/inbound_popup.php deleted file mode 100644 index 6f451656..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient/inbound_popup.php +++ /dev/null @@ -1,228 +0,0 @@ - LICENSE: GPLv2 -### -# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system. -# -# changes: -# 60620-1329 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK REMOTE INBOUND: Popup - - -
    - - 0) -{ - - $stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='" . mysql_real_escape_string($parked_time) . "' and channel='" . mysql_real_escape_string($channel) . "' LIMIT 1"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: " . mysql_real_escape_string($channel) . "','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for channel $channel       $NOW_TIME\n

    \n"; - - - $url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&'; - $Suser = 'username='; - $Spass = '&passwd='; - $Sphone = '&phone='; - - $newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone"; - if ( ($phone == 'unknown') or (strlen($phone)<9) ) - {$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";} - - echo "Look up this customer in Customer Service System\n

    \n"; - - echo "Close this window\n

    \n"; -} -else -{ - echo "Redirect command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "Close this window\n

    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient/phone_stats.php b/agc_2-X/trunk/LANG_admin/astguiclient/phone_stats.php deleted file mode 100644 index 8498746a..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient/phone_stats.php +++ /dev/null @@ -1,244 +0,0 @@ - LICENSE: GPLv2 -# -# -# changes: -# 60620-1333 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$admin_page = './admin.php'; - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $row[0]; - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK ADMIN: Phone Stats - - -
    -
    - - - - - - -\n"; -echo "
      ASTERISK ADMIN: Administration  
      LIST ALL PHONES | ADD A NEW PHONE | SEARCH FOR A PHONE | ADD A SERVER | LIST ALL SERVERS
      SHOW ALL CONFERENCES | ADD A NEW CONFERENCE
      \n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - -echo "
    \n"; - -echo "CALL TIME AND CHANNELS:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} -# echo "|$stmt|\n"; - -echo "\n"; -echo "
    CHANNEL GROUP COUNT HOURS:MINUTES
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    TOTAL CALLS $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "LAST 1000 CALLS FOR DATE RANGE:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - - - $call_seconds=0; - $o++; - } - - -echo "
    NUMBER CHANNEL GROUP DATE LENGTH(MIN.)
    $row[0] $row[1] $row[2] $row[3]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient/remote_inbound.php b/agc_2-X/trunk/LANG_admin/astguiclient/remote_inbound.php deleted file mode 100644 index 06642677..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient/remote_inbound.php +++ /dev/null @@ -1,162 +0,0 @@ - LICENSE: GPLv2 -### -# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available) - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - echo"\n"; - echo"ASTERISK REMOTE INBOUND: Main\n"; - echo"\n"; - echo"\n"; - echo"\n"; - -?> - - -
    - -
    \n"; - -echo "Click on the channel below that you would like to have directed to your phone

    \n"; - -echo "
    \n";
    -echo "CHANNEL    SERVER        CHANNEL_GROUP   EXTENSION    PARKED_BY            PARKED_TIME        \n";
    -echo "----------------------------------------------------------------------------------------------\n";
    -
    -
    -
    -
    -
    -$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		$channel =			sprintf("%-11s", $row[0]);
    -		$server =			sprintf("%-14s", $row[1]);
    -		$channel_group =	sprintf("%-16s", $row[2]);
    -		$extension =		sprintf("%-13s", $row[3]);
    -		$parked_by =		sprintf("%-21s", $row[4]);
    -		$parked_time =		sprintf("%-19s", $row[5]);
    -
    -		echo "$channel$server$channel_group$extension$parked_by$parked_time\n";
    -
    -		$i++;
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "*************************************** NO PARKED CALLS **************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	}
    -
    -
    -$ENDtime = date("U");
    -
    -$RUNtime = ($ENDtime - $STARTtime);
    -
    -echo "
    \n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient/test.php b/agc_2-X/trunk/LANG_admin/astguiclient/test.php deleted file mode 100644 index 62f8277b..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient/test.php +++ /dev/null @@ -1,30 +0,0 @@ - LICENSE: GPLv2 -### - -$STARTtime = date("U"); -$STARTdate = date("Y-m-d H:i:s"); - - -$link=mysql_connect("localhost", "cron", "1234"); -mysql_select_db("asterisk"); - - $stmt="SELECT * from phones;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - print "|$auth|\n"; - -exit; - - - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_de/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_admin/astguiclient_de/AST_inboundEXTstats.php deleted file mode 100644 index 3a70336a..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_de/AST_inboundEXTstats.php +++ /dev/null @@ -1,400 +0,0 @@ - LICENSE: GPLv2 -# -# CHANGES -# 60421-1450 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1322 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.11.20';} - -$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='" . mysql_real_escape_string($server_ip) . "';"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$inbound_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $inbound_to_print) - { - $row=mysql_fetch_row($rslt); - $inbound[$i] =$row[0]; - $fullnum[$i] =$row[1]; - $inbname[$i] =$row[2]; - $i++; - } -?> - - - - - -\n"; -#echo"\n"; -echo "ASTERISK: Inbound Anruf-Notfall\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "WÄHLEN Sie BITTE Eine ZAHL Vor UND DATUM OBEN UND KLICKEN REICHT Ein\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "ASTERISK: Inbound Anruf-Notfall                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$extenSQL = "and extension='" . mysql_real_escape_string($group) . "'";
    -if (eregi("\*",$group))
    -	{$extenSQL = "and extension LIKE \"%$group\"";}
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Gesamtanrufe, die in diese Zahl kamen:       $TOTALcalls\n";
    -echo "Average Call Length(seconds) for all Calls:   $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -if ($row[0])
    -	{
    -	$average_hold_seconds = ($row[1] / $row[0]);
    -	$average_hold_seconds = round($average_hold_seconds, 0);
    -	$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -	}
    -else {$DROPpercent=0;   $average_hold_seconds=0;}
    -echo "Total DROP Calls:   (less than 10 seconds)    $DROPcalls  $DROPpercent%\n";
    -echo "Average Call Length(seconds) for DROP Calls:  $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  CALLS STATS
    -
    -echo "\n";
    -echo "---------- CALL LISTINGS\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -echo "| CALLERID             | CALLERIDNAME         | LENGTH | DATE TIME           |\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -$stmt="select number_dialed,caller_code,length_in_sec,start_time from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$CID =			sprintf("%-20s", $row[0]);
    -	$CIDname =		sprintf("%-20s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$datetime =		sprintf("%-19s", $row[3]);
    -	$USERavgTALK =	$row[2];
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -if ($output == 'FULL')
    -	{
    -
    -	echo "\n";
    -	echo "---------- TIME STATS\n";
    -
    -	echo "\n";
    -
    -	$hi_hour_count=0;
    -	$last_full_record=0;
    -	$i=0;
    -	$h=0;
    -	while ($i <= 96)
    -		{
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -		$h++;
    -		}
    -
    -	$hour_multiplier = (100 / $hi_hour_count);
    -	#$hour_multiplier = round($hour_multiplier, 0);
    -
    -	echo "\n";
    -	echo "DIAGRAMM IN 15 MINUZIÖSEN STUFENSPRÜNGEN VON GESAMTANRUFEN\n";
    -
    -	$k=1;
    -	$Mk=0;
    -	$call_scale = '0';
    -	while ($k <= 102) 
    -		{
    -		if ($Mk >= 5) 
    -			{
    -			$Mk=0;
    -			$scale_num=($k / $hour_multiplier);
    -			$scale_num = round($scale_num, 0);
    -			$LENscale_num = (strlen($scale_num));
    -			$k = ($k + $LENscale_num);
    -			$call_scale .= "$scale_num";
    -			}
    -		else
    -			{
    -			$call_scale .= " ";
    -			$k++;   $Mk++;
    -			}
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -	#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -	echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -	$ZZ = '00';
    -	$i=0;
    -	$h=4;
    -	$hour= -1;
    -	$no_lines_yet=1;
    -
    -	while ($i <= 96)
    -		{
    -		$char_counter=0;
    -		$time = '      ';
    -		if ($h >= 4) 
    -			{
    -			$hour++;
    -			$h=0;
    -			if ($hour < 10) {$hour = "0$hour";}
    -			$time = "+$hour$ZZ+";
    -			}
    -		if ($h == 1) {$time = "   15 ";}
    -		if ($h == 2) {$time = "   30 ";}
    -		if ($h == 3) {$time = "   45 ";}
    -		$Ghour_count = $hour_count[$i];
    -		if ($Ghour_count < 1) 
    -			{
    -			if ( ($no_lines_yet) or ($i > $last_full_record) )
    -				{
    -				$do_nothing=1;
    -				}
    -			else
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				echo "|$time|";
    -				$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -				echo "| $hour_count[$i] |\n";
    -				}
    -			}
    -		else
    -			{
    -			$no_lines_yet=0;
    -			$Xhour_count = ($Ghour_count * $hour_multiplier);
    -			$Yhour_count = (99 - $Xhour_count);
    -
    -			$Gdrop_count = $drop_count[$i];
    -			if ($Gdrop_count < 1) 
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "*X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -				echo "| 0     | $hour_count[$i] |\n";
    -
    -				}
    -			else
    -				{
    -				$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -			#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -				$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -				echo "D";   $char_counter++;
    -				$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -				echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -				}
    -			}
    -		
    -		
    -		$i++;
    -		$h++;
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -	}
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_de/admin.php b/agc_2-X/trunk/LANG_admin/astguiclient_de/admin.php deleted file mode 100644 index 1a98ea49..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_de/admin.php +++ /dev/null @@ -1,1824 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI database administration -# -# CHANGES -# 50913-1118 - Added outbound_cid for web-client calls -# 50926-1356 - Modified to allow for language translation -# 50926-1613 - Added WeBRooTWritablE write controls -# 51128-1254 - Modified to allow PHP global vars off -# 51208-2120 - Added option to login with vicidial_user login if allowed -# 51213-1650 - Added option to delete phones if allowed by vicidial_users -# 60421-1430 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1137 - Fixed phone search bug -# 60620-1243 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '1.1.12'; -$build = '60620-1243'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} - elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} - elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} -if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} - elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} -if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} - elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} -if (isset($_GET["login"])) {$login=$_GET["login"];} - elseif (isset($_POST["login"])) {$login=$_POST["login"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} - elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} -if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} - elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} -if (isset($_GET["company"])) {$company=$_GET["company"];} - elseif (isset($_POST["company"])) {$company=$_POST["company"];} -if (isset($_GET["picture"])) {$picture=$_GET["picture"];} - elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} - elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} -if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} - elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} -if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} - elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} -if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} - elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} -if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} - elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} -if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} - elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} -if (isset($_GET["park_on_extension"])) {$park_on_extension=$_GET["park_on_extension"];} - elseif (isset($_POST["park_on_extension"])) {$park_on_extension=$_POST["park_on_extension"];} -if (isset($_GET["conf_on_extension"])) {$conf_on_extension=$_GET["conf_on_extension"];} - elseif (isset($_POST["conf_on_extension"])) {$conf_on_extension=$_POST["conf_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"];} - elseif (isset($_POST["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"];} - elseif (isset($_POST["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];} -if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} - elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} -if (isset($_GET["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} - elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} -if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} - elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["dtmf_send_extension"])) {$dtmf_send_extension=$_GET["dtmf_send_extension"];} - elseif (isset($_POST["dtmf_send_extension"])) {$dtmf_send_extension=$_POST["dtmf_send_extension"];} -if (isset($_GET["call_out_number_group"])) {$call_out_number_group=$_GET["call_out_number_group"];} - elseif (isset($_POST["call_out_number_group"])) {$call_out_number_group=$_POST["call_out_number_group"];} -if (isset($_GET["client_browser"])) {$client_browser=$_GET["client_browser"];} - elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} -if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} - elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} -if (isset($_GET["local_web_callerID_URL"])) {$local_web_callerID_URL=$_GET["local_web_callerID_URL"];} - elseif (isset($_POST["local_web_callerID_URL"])) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];} -if (isset($_GET["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"];} - elseif (isset($_POST["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];} -if (isset($_GET["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"];} - elseif (isset($_POST["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];} -if (isset($_GET["user_switching_enabled"])) {$user_switching_enabled=$_GET["user_switching_enabled"];} - elseif (isset($_POST["user_switching_enabled"])) {$user_switching_enabled=$_POST["user_switching_enabled"];} -if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} - elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} -if (isset($_GET["admin_hangup_enabled"])) {$admin_hangup_enabled=$_GET["admin_hangup_enabled"];} - elseif (isset($_POST["admin_hangup_enabled"])) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];} -if (isset($_GET["admin_hijack_enabled"])) {$admin_hijack_enabled=$_GET["admin_hijack_enabled"];} - elseif (isset($_POST["admin_hijack_enabled"])) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];} -if (isset($_GET["admin_monitor_enabled"])) {$admin_monitor_enabled=$_GET["admin_monitor_enabled"];} - elseif (isset($_POST["admin_monitor_enabled"])) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];} -if (isset($_GET["call_parking_enabled"])) {$call_parking_enabled=$_GET["call_parking_enabled"];} - elseif (isset($_POST["call_parking_enabled"])) {$call_parking_enabled=$_POST["call_parking_enabled"];} -if (isset($_GET["updater_check_enabled"])) {$updater_check_enabled=$_GET["updater_check_enabled"];} - elseif (isset($_POST["updater_check_enabled"])) {$updater_check_enabled=$_POST["updater_check_enabled"];} -if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} - elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} -if (isset($_GET["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"];} - elseif (isset($_POST["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];} -if (isset($_GET["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"];} - elseif (isset($_POST["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];} -if (isset($_GET["voicemail_button_enabled"])) {$voicemail_button_enabled=$_GET["voicemail_button_enabled"];} - elseif (isset($_POST["voicemail_button_enabled"])) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];} -if (isset($_GET["enable_fast_refresh"])) {$enable_fast_refresh=$_GET["enable_fast_refresh"];} - elseif (isset($_POST["enable_fast_refresh"])) {$enable_fast_refresh=$_POST["enable_fast_refresh"];} -if (isset($_GET["fast_refresh_rate"])) {$fast_refresh_rate=$_GET["fast_refresh_rate"];} - elseif (isset($_POST["fast_refresh_rate"])) {$fast_refresh_rate=$_POST["fast_refresh_rate"];} -if (isset($_GET["enable_persistant_mysql"])) {$enable_persistant_mysql=$_GET["enable_persistant_mysql"];} - elseif (isset($_POST["enable_persistant_mysql"])) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];} -if (isset($_GET["auto_dial_next_number"])) {$auto_dial_next_number=$_GET["auto_dial_next_number"];} - elseif (isset($_POST["auto_dial_next_number"])) {$auto_dial_next_number=$_POST["auto_dial_next_number"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} - elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} -if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} - elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} -if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} - elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} -if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];} - elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];} -if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];} - elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];} -if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} - elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} -if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} - elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} -if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} - elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} -if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];} - elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];} -if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];} - elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];} - elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} -if (isset($_GET["old_server_ip"])) {$old_server_ip=$_GET["old_server_ip"];} - elseif (isset($_POST["old_server_ip"])) {$old_server_ip=$_POST["old_server_ip"];} -if (isset($_GET["old_server_id"])) {$old_server_id=$_GET["old_server_id"];} - elseif (isset($_POST["old_server_id"])) {$old_server_id=$_POST["old_server_id"];} -if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} - elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} -if (isset($_GET["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} - elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} -if (isset($_GET["max_vicidial_trunks"])) {$max_vicidial_trunks=$_GET["max_vicidial_trunks"];} - elseif (isset($_POST["max_vicidial_trunks"])) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];} -if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];} - elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];} -if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];} - elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];} -if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} - elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} -if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];} - elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];} -if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];} - elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];} -if (isset($_GET["answer_transfer_agent"])) {$answer_transfer_agent=$_GET["answer_transfer_agent"];} - elseif (isset($_POST["answer_transfer_agent"])) {$answer_transfer_agent=$_POST["answer_transfer_agent"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["old_conf_exten"])) {$old_conf_exten=$_GET["old_conf_exten"];} - elseif (isset($_POST["old_conf_exten"])) {$old_conf_exten=$_POST["old_conf_exten"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS and Dots -$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); -$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); - -### DIGITS ONLY ### -$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); -$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); -$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); -$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); -$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); -$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); -$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); -$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); -$recording_exten = ereg_replace("[^0-9]","",$recording_exten); -$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); -$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); -$DBX_port = ereg_replace("[^0-9]","",$DBX_port); -$DBY_port = ereg_replace("[^0-9]","",$DBY_port); -$telnet_port = ereg_replace("[^0-9]","",$telnet_port); -$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); -$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); -$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); -$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); -$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); -$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); -$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); -$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); -$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); -$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); -$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); -$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); -$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); -$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); -$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); -$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); -$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); -$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); -$ADD = ereg_replace("[^0-9]","",$ADD); - -### ALPHA-NUMERIC and underscore and dash and slash and at and dot -$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); -$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); -$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); -$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); -$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); -$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); -$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); -$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); -$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); - -### ALPHA-NUMERIC (and underscore and dash) -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); -$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); -$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); -$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); -$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); -$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); -$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); -$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); -$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); -$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); -$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); -$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); -$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); -$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); -$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); -$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); -$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); -$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); -$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); -$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); -$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); -$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); -$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); -$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); -$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); -$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); -$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); -$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); - -### VARIABLES TO BE mysql_real_escape_string ### -# $VICIDIAL_web_URL = -# $local_web_callerID_URL = - -##### END VARIABLE FILTERING FOR SECURITY ##### - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Sie haben jetzt heraus geloggt. Danke\n"; - exit; -} - -if (!isset($ADD)) {$ADD=0;} - -$STARTtime = date("U"); -$STARTdate = date("Y-m-d H:i:s"); - -if ($ADD==1) {$process = 'ADDIEREN SIE NEUES TELEFON';} -if ($ADD==11) {$process = 'ADDIEREN SIE NEUEN BEDIENER';} -if ($ADD==111) {$process = 'ADDIEREN SIE NEUE KONFERENZ';} -if ($ADD==2) {$process = 'ADDIEREN DES NEUEN TELEFONS';} -if ($ADD==21) {$process = 'ADDIEREN DES NEUEN BEDIENERS';} -if ($ADD==211) {$process = 'ADDIEREN DER NEUEN KONFERENZ';} -if ($ADD==3) {$process = 'ÄNDERN SIE TELEFON';} -if ($ADD==31) {$process = 'ÄNDERN SIE BEDIENER';} -if ($ADD==311) {$process = 'ÄNDERN SIE KONFERENZ';} -if ($ADD==4) {$process = 'ÄNDERNDES TELEFON';} -if ($ADD==41) {$process = 'ÄNDERNDER BEDIENER';} -if ($ADD==411) {$process = 'ÄNDERNDE KONFERENZ';} -if ($ADD==5) {$process = 'DELETE PHONE';} -if ($ADD==6) {$process = 'DELETE PHONE';} -if ($ADD==55) {$process = 'SUCHTELEFONE';} -if ($ADD==66) {$process = 'SUCHE RUFT RESULTATE AN';} -if ($ADD==0) {$process = 'TELEFON-LISTE';} -if ($ADD==10) {$process = 'BEDIENER-LISTE';} -if ($ADD==100) {$process = 'KONFERENZ-LISTE';} -if ($ADD==99999) {$process = 'HILFE';} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if ($auth<1) - { - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > '6' and ast_admin_access='1';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGdelete_phones =$row[17]; - } - } - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - echo "|$stmt|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - if (strlen($LOGfullname) < 1) - { - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - } - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rsltx=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rsltx); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $servers_list .= "\n"; - $o++; - } - - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); - -$NWB = "   \"HILFE\""; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "STERNCHEN ADMIN: Leitung - $process \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    ASTERISK ADMIN: HILFE


    \n"; - -?> -TELEFON-TABELLE

    - -
    -Telefonverlängerung - Dieses fangen ist auf, wohin Sieden Telefonnamen setzen, während er scheint, nicht einschließlichdas Protokoll oder den Schrägstrich am Anfang mit einem Sternchenzuversehen. Z.B.: für das SIP Telefon SIP\/test101 würde dieTelefonverlängerung test101 sein. Auch denn Telefone IAX2 stellen Siesicher, daß Sie den vollen Telefonnamen verwenden:IAX2\/IAXphone1@IAXphone1 würde IAXphone1@IAXphone1 sein. Für ZapTelefone sicherstellen, daß Sie die volle Führung setzen: Zap/25-1würde 25-1 sein. Eine andere Anmerkung, stellen sicher, daß Sie dasProtokoll unten richtig für Ihre Art des Telefons einstellen. - -
    -
    -
    -Dialplan number - This field is for the number you dial to have the phone ring. This number is defined in the extensions.conf file of your Asterisk server - -
    -
    -
    -Voicemail Kasten - Dieses fangen ist für den voicemailKasten auf, daß die Anzeigen für zum Benutzer dieses Telefons gehen.Wir verwenden dieses, um auf voicemail Anzeigen und auf den Benutzerzu überprüfen, zum in der Lage zuSEIN, die VOICEMAIL Taste aufastGUIclient APP zu benutzen. - -
    -
    -
    -Outbound CallerID - Dieses fangen ist auf, wo Sie diecallerID Zahl eintragen würden, die Sie möchten, daß auf outboundAnrufe gesetzter Form der astguiclient Netz-Klient aussieht. Diesesarbeitet nicht auf RBS, non-PRI, T1/Eß. - -
    -
    -
    -Telefon-IP address - Dieses fangen ist für IP addressdes Telefons auf, wenn es ein VOIP Telefon ist. Dieses istauffangen ein wahlweise freigestelltes - -
    -
    -
    -Computer-IP address - Dieses fangen ist für IP addressComputer des Benutzers auf. Dieses ist auffangen einwahlweise freigestelltes - -
    -
    -
    -Bediener IP - Dieses Menü ist, wo Sie vorwählen, dem Bedienerdas Telefon auf aktiv ist. - -
    -
    -
    -LOGON - Der LOGON gewöhnt ge$$$WESEN für den Telefonbenutzer anLOGON zu den Klient Anwendungen. - -
    -
    -
    -Kennwort - Das Kennwort gewöhnt ge$$$WESEN für denTelefonbenutzer an LOGON zu den Klient Anwendungen. - -
    -
    -
    -Status - Der Status des Telefons im System, die AKTIVEN und ADMINdürfen, damit GUI Klienten arbeiten. Admin erlaubt Zugang zu dieseradministrativen Web site. Alle weiteren Status erlauben nicht GUI oderAdmin Netzzugang. - -
    -
    -
    -Aktives Konto - Ob das Telefon aktiv ist, es in die Liste im GUIKlienten einzusetzen. - -
    -
    -
    -Telefon-Art - Lediglich für administrative Anmerkungen. - -
    -
    -
    -Voller Name - Verwendet durch das GUIclient in der Liste deraktiven Telefone. - -
    -
    -
    -Firma - Lediglich für administrative Anmerkungen. - -
    -
    -
    -Abbildung - Nicht schon eingeführt. - -
    -
    -
    -Neue Anzeigen - Zahl der neuen voicemail Anzeigen für diesesTelefon auf dem Sternchenbediener. - -
    -
    -
    -Alte Anzeigen - Zahl der alten voicemail Anzeigen für diesesTelefon auf dem Sternchenbediener. - -
    -
    -
    -Klient Protokoll - Das Protokoll, das das Telefon verwendet, anden Sternchenbediener anzuschließen: Sip, IAX2, Zap. Auch, es gibtexternal für Remotevorwahlknopfzahlen oder GeschwindigkeitVorwahlknopfzahlen, die Sie als Telefone verzeichnen möchten. - -
    -
    -
    -Lokales GMT - Der Unterschied Greenwich-Zeit von oder VON DERZULU-Zeit, in der das Telefon lokalisiert wird. STELLEN SIE NICHT AUFTAGESLICHT-SPARUNGEN ZEIT EIN. Dieses wird durch die VICIDIAL Kampagneverwendet, um die Zeit und Kunde Zeit genau anzuzeigen. - -
    -
    -
    -Manager-LOGON - Dieses ist der LOGON, dem die GUI Klienten fürdieses Telefon pflegen, die Datenbank zugänglich zu machen, in derdie Bedienerdaten liegen. - -
    -
    -
    -Manager-Geheimnis - Dieses ist das Kennwort, dem die GUI Klientenfür dieses Telefon pflegen, die Datenbank zugänglich zu machen, inder die Bedienerdaten liegen. - -
    -
    -
    -VICIDIAL Rückstellung Benutzer - Dieses soll einen Default-Wertin den VICIDIAL Benutzer legen auffangen, wann immer dieserTelefonbenutzer die astVICIDIAL Klient APP öffnet. Lassen Sie freienRaum für keinen Benutzer. - -
    -
    -
    -VICIDIAL Rückstellung Durchlauf - Dieses soll einen Default-Wertin das VICIDIAL Kennwort legen auffangen, wann immer dieserTelefonbenutzer die astVICIDIAL Klient APP öffnet. Lassen Sie freienRaum für keinen Durchlauf. - -
    -
    -
    -VICIDIAL Rückstellung Kampagne - Dieses soll einen Default-Wertin die VICIDIAL Kampagne legen auffangen, wann immer dieserTelefonbenutzer die astVICIDIAL Klient APP öffnet. Lassen Sie freienRaum für keine Kampagne. - -
    -
    -
    -Park Exten - Dieses ist die Rückstellung Parkenverlängerung fürdie Klient apps. Überprüfen Sie, daß ein unterschiedliches manarbeitet, bevor Sie dieses ändern. - -
    -
    -
    -Conf Exten - This is the default Conference park extension for the client apps. Verify that a different one works before you change this. - -
    -
    -
    -VICIDIAL Park Exten - Dieses ist die RückstellungParkenverlängerung für VICIDIAL Klient APP. Überprüfen Sie, daßein unterschiedliches man arbeitet, bevor Sie dieses ändern. - -
    -
    -
    -VICIDIAL Park-Akte - Dieses ist der Rückstellung VICIDIALPark-Verlängerung Dateiname für die Klient apps. Überprüfen Sie,daß ein unterschiedliches man arbeitet, bevor Sie dieses ändern, daszu 10 Buchstaben begrenzt wird. - -
    -
    -
    -Überwachen Sie Präfix - This is the dialplan prefix for monitoring of Zap channels automatically within the astGUIclient app. Only change according to the extensions.conf ZapBarge extensions records. - -
    -
    -
    -Aufnahme Exten - Dieses ist die dialplan Verlängerung für dieAufnahmeverlängerung, die verwendet wird, um in meetme Konferenzen zufallen, um sie zu notieren. Es dauert normalerweise bis zu einerStunde, wenn es nicht gestoppt wird, überprüft mit extensions.confAkte, bevor es ändert. - -
    -
    -
    -VMAIL Hauptexten - Dieses ist die dialplan Verlängerung, diegeht, Ihr voicemail. zu überprüfen, überprüfen mit extensions.confAkte, bevor es ändert. - -
    -
    -
    -VMAIL Dump Exten - Dieses ist das dialplan Präfix, das verwendetwird, um Anrufe direkt zum voicemail eines Benutzers von einemPhasenanruf in der astGUIclient APP zu schicken, überprüfen mitextensions.conf Akte, bevor es ändert. - -
    -
    -
    -Exten Kontext - Dieses ist der dialplan Kontext, den diesesTelefon hauptsächlich verwendet. Es wird angenommen, daß alleNummern, die durch die Klient apps gewählt werden, diesen Kontextverwenden, also es eine gute Idee ist sicherzustellen, daß dieses derbreiteste Kontext ist, der möglich ist, überprüfen mitextensions.conf Akte, bevor es ändert. - -
    -
    -
    -DTMF senden Führung - Dieses ist die Führung Zeichenkette, diebenutzt wird, um DTMF Töne in meetme Konferenzen von den Klient appszu senden. Überprüfen Sie, daß und Kontext mit der extensions.confAkte exten. - -
    -
    -
    -Outbound Anruf-Gruppe - Dieses ist die Kanalgruppe, daß outboundAnrufe von diesem Telefon aus gesetzt werden. Es gibt Programme einesPaares in den Klient apps, die dieses verwenden. Für Zap Führungen,die Sie etwas wie Zap/g2 verwenden möchten, denn Stämme IAX2 Siedas volle IAX Präfix wie IAX2/VICItest1:secret@10.10.10.15:4569würden verwenden wollen. Überprüfen Sie die Stämme mit derextensions.conf Akte, es ist normalerweise, was Sie als die globaleVariable des STAMMES an der Oberseite der Akte definiert haben. - -
    -
    -
    -Datenbanksuchroutine-Position - Dieses ist auf nur UNIX/LINUXKlienten, der absolute Weg zu Mozilla anwendbar, oder FirefoxDatenbanksuchroutine auf der Maschine überprüfen dieses, indem siemanuell es ausstößt. - -
    -
    -
    -Anbringen Sie Verzeichnis - Dieses ist der Platz, in dem dieastGUIclient und astVICIDIAL Indexe auf Ihrer Maschine sind. FürWin32 sollte es etwas wie C:\\AST_VICI sein und für UNIX sollte esetwas wie /usr/local/perl_TK. sein überprüft dieses manuell. - -
    -
    -
    -CallerID URL - Dieses ist die Netzadresse der Seite, die benutztwird, um kundenspezifische callerID Nachschlagen zu tun, Rückstellungprüfen, dieadresse ist:http://astguiclient.sf.net/test_callerid_output.php - -
    -
    -
    -VICIDIAL Rückstellung URL - Dieses ist die Netzadresse der Seite,die benutzt wird, um kundenspezifische VICIDIAL Netz-Formfragen zutun, Rückstellung prüfen, dieadresse ist:http://astguiclient.sf.net/test_VICIDIAL_output.php - -
    -
    -
    -Anruf-Protokollierung - Dieses wird eingestellt, um auszurichten,wenn die call_log.agi Akte im Platz in der extensions.conf Akte füralles outbound ist und die Verlängerungen des Hängezustands ' h ',zum alle zu loggen benennt. Diese sollte 1, weil es für vieleastGUIclient und DIE VICIDIAL manditory ist Eigenschaften immer sein,zum richtig zu arbeiten. - -
    -
    -
    -Benutzer-Schaltung - Set to true to allow user to switch to another user account. NOTE: If user switches they can initiate recording on the new user's phone conversation - -
    -
    -
    -Conferencing - Stellen Sie ein, um auszurichten, um Benutzer zuerlauben, Konferenzanrufe mit bis zu sechs externen Linien zubeginnen. - -
    -
    -
    -Admin Hängezustand - um Benutzer zu erlauben auszurichten Satz,zum Hängezustand irgendeine Linie am Willen durch astGUIclient in derLage zuSEIN. Gute Idee, diesem für Admin Benutzer nur zuermöglichen. - -
    -
    -
    -Admin Straßenräuber - Stellen Sie ein, um auszurichten, umBenutzer zu erlauben, in der Lage zuSEIN, zu ihrer Verlängerung jedemögliche Linie zu ergreifen und umzuadressieren am Willen durchastGUIclient. Gute Idee, diesem für Admin Benutzer nur zuermöglichen. Aber ist für Manager sehr nützlich. - -
    -
    -
    -Admin Monitor - Stellen Sie ein, um auszurichten, um Benutzer zuerlauben, in der Lage zuSEIN, zu ihrer Verlängerung jede möglicheLinie zu ergreifen und umzuadressieren am Willen durch astGUIclient.Gute Idee, diesem für Admin Benutzer nur zu ermöglichen. Aber istfür Manager und als Training Werkzeug sehr nützlich. - -
    -
    -
    -Parkschaltung - um Benutzer zu erlauben auszurichten der Satz, inder Lage zuSEIN zu parken ersucht um astGUIclient Einfluß, von jedemanderen astGUIclient Benutzer auf dem System aufgehoben zu werden.Anrufe bleiben auf Einfluß für bis zu einen halbe Stunde dannHängezustand. Normalerweise ermöglicht für alle. - -
    -
    -
    -Updater Überprüfung - Stellen Sie ein, um auszurichten, um einepopup Warnung anzuzeigen, die die updater Zeit nicht in 20 Sekundengeändert hat. Nützlich für Admin Benutzer. - -
    -
    -
    -Af Protokollierung - Stellen Sie ein, um auszurichten, um vieleTätigkeiten des astGUIclient Verbrauches in einer Textakte auf demComputer des Benutzers zu protokollieren. - -
    -
    -
    -Warteschlange ermöglichte - um Klient apps auszurichten Satz dasSternchen-zentrale Warteschlange System benutzen zu lassen. Erfordertfür VICIDIAL und für alle Benutzer empfohlen. - -
    -
    -
    -CallerID Popup - Stellen Sie ein, um auszurichten, um die Zahlenzuzulassen, die in der extensions.conf Akte definiert werden, umCallerID popup Schirme zu schicken den astGUIclient Benutzern. - -
    -
    -
    -VMail Taste - Stellen Sie ein, um auszurichten, um die VOICEMAILTaste anzuzeigen und die Anzeigen zählen Anzeige auf astGUIclient. - -
    -
    -
    -Schnell erneuern Sie - Stellen Sie ein, um auszurichten, um einerneuen Rate von zu ermöglichen erneuern von den Anrufinformationenfür das astGUIclient. Rückstellung arbeitsunfähige Rate ist 1000zweite des Ms.1. Kann Anlagen-Belastung erhöhen, wenn Sie diese Zahlsenken. - -
    -
    -
    -Schnell erneuern Sie Rate - in den Millisekunden. Nur verwendet,wenn schnell, erneuern Sie wird ermöglicht. Rückstellungarbeitsunfähige Rate ist 1000 zweite des Ms.1. Kann Anlagen-Belastungerhöhen, wenn Sie diese Zahl senken. - -
    -
    -
    -Persistant MySQL - Wenn er ermöglicht wird, bleibt derastGUIclient Anschluß angeschlossen, anstatt, jede Sekundeanzuschließen. Nützlich, wenn Sie ein schnelles die eingestellteRate erneuern lassen. Sie erhöht die Zahl Anschlüssen auf IhrerMySQL Maschine. - -
    -
    -
    -Selbstvorwahlknopf-folgende Zahl - wenn er ermöglicht wird,wählt der VICIDIAL Klient die folgende Nummer auf der Listeautomatisch nach Einteilung eines Anrufs, es sei denn sie vorwählten"auf, dem Einteilung Schirm zu wählen zu stoppen". - -
    -
    -
    -Stoppen Sie Rec nach jedem Anruf - wenn er ermöglicht wird,stoppt der VICIDIAL Klient, was Aufnahme weitergeht, nachdem jederAnruf dispositioned gewesen ist. Nützlich, wenn Sie eine MengeAufnahme tun oder Sie benutzen eine Netzform, um Aufnahme auszulösen. - -
    -
    -
    -DBX Bediener - Der MySQL Datenbankbediener, den dieser Benutzeranschließen sollte an. - -
    -
    -
    -DBX Datenbank - Die MySQL Datenbank, die dieser Benutzeranschließen sollte an. Rückstellung ist Sternchen. - -
    -
    -
    -DBX Benutzer - Der MySQL Benutzer-LOGON, den dieser Benutzer beimAnschließen verwenden sollte. Rückstellung ist cron. - -
    -
    -
    -DBX Durchlauf - Das MySQL Benutzerkennwort, das dieser Benutzerbeim Anschließen verwenden sollte. Rückstellung ist 1234. - -
    -
    -
    -DBX Tor - Das MySQL TCP Tor, das dieser Benutzer beim Anschließenbenutzen sollte. Rückstellung ist 3306. - -
    -
    -
    -DBY Bediener - Der MySQL Datenbankbediener, den dieser Benutzeranschließen sollte an. Zweitensserver, nicht z.Z. verwendet. - -
    -
    -
    -DBY Datenbank - Die MySQL Datenbank, die dieser Benutzeranschließen sollte an. Rückstellung ist Sternchen. Zweitensserver, nicht z.Z. verwendet. - -
    -
    -
    -DBY Benutzer - Der MySQL Benutzer-LOGON, den dieser Benutzer beimAnschließen verwenden sollte. Rückstellung ist cron. Zweitensserver, nicht z.Z. verwendet. - -
    -
    -
    -DBY Durchlauf - Das MySQL Benutzerkennwort, das dieser Benutzerbeim Anschließen verwenden sollte. Rückstellung ist 1234. Zweitensserver, nicht z.Z. verwendet. - -
    -
    -
    -DBY Tor - Das MySQL TCP Tor, das dieser Benutzer beim Anschließenbenutzen sollte. Rückstellung ist 3306. Zweitensserver, nicht z.Z. verwendet. - - -



    - -BEDIENER-TABELLE

    -
    -
    -Bediener Identifikation - Dieses fangen ist, wohin Sieden Sternchenbedienernamen setzen, doesnt müssen ein amtliches GebietUnterseeboot, gerade ein Spitzname sein auf, um den Bediener zu denAdmin Benutzern zu kennzeichnen. - -
    -
    -
    -Bediener-Beschreibung - auffangen, wo Sie eine kleine Phraseverwenden, um den Sternchenbediener zu beschreiben. - -
    -
    -
    -Bediener-IP address - auffangen, wo Sie das Netz-IP addressdes Sternchenbedieners setzten. - -
    -
    -
    -Aktiv - Stellen Sie ein, ob der Sternchenbediener aktiv oderunaktiviert ist. - -
    -
    -
    -Sternchen-Version - Stellen Sie die Version des Sternchens ein,die Sie auf diesen Bediener angebracht haben. Beispiele: ' 1.2 ', '1.0.8 ', ' 1.0.7 ', ' CVS_HEAD ', ' WIRKLICH ALTES ', usw.... Dieseswird verwendet, weil Versionen 1.0.8 und 1.0.9 eine andere Methode desBeschäftigens Local/ Führungen, eine Wanze, die in CVS v1.0geregelt worden ist, und Notwendigkeit, anders als behandelt zu werdenhaben, wenn die Behandlung ihres Local/ lenkt. Auch gegenwärtigesCVS_HEAD und der 1.2 Freigabebaumgebrauch unterschiedlicher Managerund Befehl gaben aus, also muß es anders als außerdem behandeltwerden. - -
    -
    -
    -Maximale VICIDIAL Stämme - Dieses fangen feststellt diemaximale Zeilenzahl auf, um denen der VICIDIAL Auto-dialer versucht,diesen Bediener zu ersuchen. Wenn Sie zwei volle PRI Tß VICIDIALingauf einem Bediener einweihen möchten dann, würden Sie dieses bis 46einstellen. Rückstellung ist 96. - -
    -
    -
    -Telnet Wirt - Dieses ist die Adresse oder der Name desSternchenbedieners und ist, wie die Manageranwendungen an ihnanschließen von, wo sie laufen. Wenn sie auf den Sternchenbedienerlaufen, dann ist die Rückstellung von ' localhost ' fein. - -
    -
    -
    -Telnet Tor - Dieses ist das Tor des SternchenbedienerManageranschlußes und ist, wie die Manageranwendungen an ihnanschließen von, wo sie laufen. Die Rückstellung von ' 5038 ' istfein für einen Standard anbringen. - -
    -
    -
    -Manager-Benutzer - Das username oder der LOGON verwendeten, an denSternchenbedienermanager genericly anzuschließen. Rückstellung ist 'cron ' - -
    -
    -
    -Manager-Geheimnis - Das Geheimnis oder das Kennwort verwendeten,an den Sternchenbedienermanager genericly anzuschließen.Rückstellung ist ' 1234 ' - -
    -
    -
    -Manager-Update-Benutzer - Das username oder der LOGON verwendeten,an den Sternchenbedienermanager anzuschließen, der für dieUpdateindexe optimiert wurde. Fallen Sie ist ' updatecron ' undannimmt das gleiche Geheimnis wie der generische Benutzer zurück. - -
    -
    -
    -Manager hören Benutzer - Das username oder der LOGON verwendeten,an den Sternchenbedienermanager anzuschließen, der für Indexeoptimiert wurde, die nur auf Ausgang hören. Fallen Sie ist 'listencron ' und annimmt das gleiche Geheimnis wie der generischeBenutzer zurück. - -
    -
    -
    -Manager senden Benutzer - Das username oder der LOGON verwendeten,an den Sternchenbedienermanager anzuschließen, der für Indexeoptimiert wurde, die dem Manager nur Tätigkeiten schicken. Fallen Sieist ' sendcron ' und annimmt das gleiche Geheimnis wie der generischeBenutzer zurück. - -
    -
    -
    -Bediener GMT versetzt - Der Unterschied bezüglich der Stunden vonder GMT Zeit eingestellt nicht auf Tageslicht-Sparung-Zeit desBedieners. Rückstellung ist ' - 5 ' - -
    -
    -
    -VMail Dump Exten - Das Verlängerung Präfix verwendet auf diesemBediener, um Anrufe direkt durch agc zu einem spezifischen voicemailKasten zu schicken. Rückstellung ist ' 85026666666666 ' - -
    -
    -
    -VICIDIAL ANZEIGE Verlängerung - Die Rückstellung Verlängerung,wenn keines in der Kampagne anwesend ist, Anrufe für VICIDIAL zumSelbstwählen zu schicken. Rückstellung ist ' 8365 ' - -
    -
    -
    -Rückstellung Kontext - Der Rückstellung dialplan Kontextverwendet für Indexe, die für diesen Bediener funktionieren.Rückstellung ist ' Rückstellung ' - - -



    - -KONFERENZTISCH

    -
    -
    -Konferenz-Zahl - Dieses fangen ist auf, wohin Sie diemeetme Konferenz dialpna Zahl setzen. Es wird auch empfohlen, daß diemeetme Zahl in meetme.conf diese Zahl für jede Eintragungzusammenbringt. Dieses ist für die Konferenzen in astGUIclient undwird für leave-3way-call Funktionalität in VICIDIAL verwendet. - -
    -
    -
    -Bediener IP - Das Menü, wo Sie den Sternchenbediener vorwählen,daß diese Konferenz eingeschaltet ist. - - - - - - -







    -







    -DAS ENDE -
    - - - -STERNCHEN ADMIN: Leitung - <? echo $process ?> - - - -
    - - - - - - -
      ASTERISK ADMIN - Logout  
      VERZEICHNEN SIE ALLE TELEFONE | ADDIEREN Sie Ein NEUES TELEFON | SUCHE NACH Einem TELEFON | ADDIEREN Sie Einen BEDIENER | VERZEICHNEN SIE ALLE BEDIENER
      ZEIGEN SIE ALLE KONFERENZEN | ADDIEREN Sie Eine NEUE KONFERENZ
    -"; - -echo "
    ADDIEREN Sie Ein NEUES TELEFON
    \n"; -echo "\n"; -echo "
    \n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Telefonverlängerung: $NWB#phones-extension$NWE
    Dialplan Zahl: (nur Stellen)$NWB#phones-dialplan_number$NWE
    Voicemail Kasten: (nur Stellen)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (nur Stellen)$NWB#phones-outbound_cid$NWE
    Telefon-IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer-IP address: (optional)$NWB#phones-computer_ip$NWE
    Bediener IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Kennwort:$NWB#phones-pass$NWE
    Status:$NWB#phones-status$NWE
    Aktives Konto: $NWB#phones-active$NWE
    Telefon-Art: $NWB#phones-phone_type$NWE
    Voller Name: $NWB#phones-fullname$NWE
    Firma:$NWB#phones-company$NWE
    Abbildung:$NWB#phones-picture$NWE
    Klient Protokoll: $NWB#phones-protocol$NWE
    Lokales GMT: (Stellen Sie NICHT auf DST ein)$NWB#phones-local_gmt$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW SERVERS FORM SCREEN -###################### - -if ($ADD==11) -{ -echo ""; - -echo "
    ADDIEREN Sie Einen NEUEN BEDIENER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Bediener Identifikation: $NWB#servers-server_id$NWE
    Bediener-Beschreibung: $NWB#servers-server_description$NWE
    Bediener-IP address: $NWB#servers-server_ip$NWE
    Aktiv:$NWB#servers-active$NWE
    Sternchen-Version: $NWB#servers-asterisk_version$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW CONFERENCES FORM SCREEN -###################### - -if ($ADD==111) -{ -echo ""; - -echo "
    ADDIEREN Sie Eine NEUE KONFERENZ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Konferenz-Zahl: (nur Stellen)$NWB#conferences-conf_exten$NWE
    Bediener IP: $NWB#conferences-server_ip$NWE
    \n"; - -} - - -###################### -# ADD=2 adds the new phone to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    TELEFON NICHT ADDIERT - es gibt bereits ein Telefon im System mitdiesem extension/server\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    TELEFON NICHT ADDIERT - gehen Sie bitte zurück und betrachten Sie dieDaten, die Sie eingaben\n";} - else - { - echo "
    TELEFON FÜGTE HINZU\n"; - - $stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new server to the system -###################### - -if ($ADD==21) -{ - echo ""; - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    BEDIENERNOT ADDED - there is already a server in the system with this ID\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    BEDIENERNOT ADDED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n";} - else - { - echo "
    BEDIENERADDED\n"; - - $stmt="INSERT INTO servers (server_id,server_description,server_ip,active,asterisk_version) values('$server_id','$server_description','$server_ip','$active','$asterisk_version');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new conference to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    KONFERENZ NICHT ADDIERT - es gibt bereits eine Konferenz im System mitdieser Identifikation und Bediener\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    KONFERENZ NICHT ADDIERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n";} - else - { - echo "
    KONFERENZ FÜGTE HINZU\n"; - - $stmt="INSERT INTO conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=100; -} - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of phone -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGdelete_phones < 1) ) - { - echo "
    TELEFON NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    Bediener IP be at least 7 characters in length\n"; - } - else - { - echo "
    TELEFON-AUSLASSUNG BESTÄTIGUNG: $extension - $server_ip\n"; - echo "

    Klicken Sie hier, um Telefon zu löschen $extension - $server_ip


    \n"; - } - -$ADD='3'; # go to phone modification below -} - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete phone record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGdelete_phones < 1) ) - { - echo "
    TELEFON NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    Bediener IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from phones where extension='$extension' and server_ip='$server_ip' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING PHONE!!!|$PHP_AUTH_USER|$ip|extension='$extension'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
    TELEFON-AUSLASSUNG DURCHGEFÜHRT: $extension - $server_ip\n"; - echo "

    \n"; - } - -$ADD='0'; # go to phone list -} - - - - - - -###################### -# ADD=3 modify phone info in the system -###################### - -if ($ADD==3) -{ - echo ""; - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ÄNDERN Sie Einen TELEFON-SATZ: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Telefonverlängerung: $NWB#phones-extension$NWE
    Dialplan Zahl: (nur Stellen)$NWB#phones-dialplan_number$NWE
    Voicemail Kasten: (nur Stellen)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (nur Stellen)$NWB#phones-outbound_cid$NWE
    Telefon-IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer-IP address: (optional)$NWB#phones-computer_ip$NWE
    Bediener IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Kennwort:$NWB#phones-pass$NWE
    Status:$NWB#phones-status$NWE
    Aktives Konto: $NWB#phones-active$NWE
    Telefon-Art: $NWB#phones-phone_type$NWE
    Voller Name: $NWB#phones-fullname$NWE
    Firma:$NWB#phones-company$NWE
    Abbildung:$NWB#phones-picture$NWE
    Neue Anzeigen: $row[14]$NWB#phones-messages$NWE
    Alte Anzeigen: $row[15]$NWB#phones-old_messages$NWE
    Klient Protokoll: $NWB#phones-protocol$NWE
    Lokales GMT: (Stellen Sie NICHT auf DST ein)$NWB#phones-local_gmt$NWE
    Manager-LOGON: $NWB#phones-ASTmgrUSERNAME$NWE
    Manager-Geheimnis: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL Rückstellung Benutzer: $NWB#phones-login_user$NWE
    VICIDIAL Rückstellung Durchlauf: $NWB#phones-login_pass$NWE
    VICIDIAL Rückstellung Kampagne: $NWB#phones-login_campaign$NWE
    Park Exten: $NWB#phones-park_on_extension$NWE
    Conf Exten: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL Park-Akte: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Überwachen Sie Präfix: $NWB#phones-monitor_prefix$NWE
    Aufnahme Exten: $NWB#phones-recording_exten$NWE
    VMailMain Exten: $NWB#phones-voicemail_exten$NWE
    VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
    Exten Kontext: $NWB#phones-ext_context$NWE
    DTMFSend Führung: $NWB#phones-dtmf_send_extension$NWE
    Outbound Anruf-Gruppe: $NWB#phones-call_out_number_group$NWE
    Datenbanksuchroutine-Position: $NWB#phones-client_browser$NWE
    Bringen Sie Verzeichnis An: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL Rückstellung URL: $NWB#phones-VICIDIAL_web_URL$NWE
    Anruf-Protokollierung: $NWB#phones-AGI_call_logging_enabled$NWE
    Benutzer-Schaltung: $NWB#phones-user_switching_enabled$NWE
    Conferencing: $NWB#phones-conferencing_enabled$NWE
    Admin Hängezustand: $NWB#phones-admin_hangup_enabled$NWE
    Admin Straßenräuber: $NWB#phones-admin_hijack_enabled$NWE
    Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
    Parkschaltung: $NWB#phones-call_parking_enabled$NWE
    Updater Überprüfung: $NWB#phones-updater_check_enabled$NWE
    Af Protokollierung: $NWB#phones-AFLogging_enabled$NWE
    Warteschlange Ermöglicht: $NWB#phones-QUEUE_ACTION_enabled$NWE
    CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
    VMail Taste: $NWB#phones-voicemail_button_enabled$NWE
    Schnell Erneuern Sie: $NWB#phones-enable_fast_refresh$NWE
    Schnell Erneuern Sie Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Selbstvorwahlknopf-Folgende Zahl: $NWB#phones-auto_dial_next_number$NWE
    Stoppen Sie Rec nach jedem Anruf: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Bediener: (HauptsächlichDB Server)$NWB#phones-DBX_server$NWE
    DBX Datenbank: (HauptsächlichServer Database)$NWB#phones-DBX_database$NWE
    DBX Benutzer: (HauptsächlichDB Login)$NWB#phones-DBX_user$NWE
    DBX Durchlauf: (HauptsächlichDB Secret)$NWB#phones-DBX_pass$NWE
    DBX Tor: (HauptsächlichDB Port)$NWB#phones-DBX_port$NWE
    DBY Bediener: (ZweitensDB Server)$NWB#phones-DBY_server$NWE
    DBY Datenbank: (ZweitensServer Database)$NWB#phones-DBY_database$NWE
    DBY Benutzer: (ZweitensDB Login)$NWB#phones-DBY_user$NWE
    DBY Durchlauf: (ZweitensDB Secret)$NWB#phones-DBY_pass$NWE
    DBY Tor: (ZweitensDB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Klicken Sie hier für Telefonnotfall\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    LÖSCHEN SIE DIESES TELEFON\n"; - } - -} - - -###################### -# ADD=31 modify server info in the system -###################### - -if ($ADD==31) -{ - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ÄNDERN Sie Einen BEDIENER-SATZ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Bediener Identifikation: $NWB#servers-server_id$NWE
    Bediener-Beschreibung: $NWB#servers-server_description$NWE
    Bediener-IP address: $NWB#servers-server_ip$NWE
    Aktiv:$NWB#servers-active$NWE
    Sternchen-Version: $NWB#servers-asterisk_version$NWE
    Maximale VICIDIAL Stämme: $NWB#servers-max_vicidial_trunks$NWE
    Telnet Wirt: $NWB#servers-telnet_host$NWE
    Telnet Tor: $NWB#servers-telnet_port$NWE
    Manager-Benutzer: $NWB#servers-ASTmgrUSERNAME$NWE
    Manager-Geheimnis: $NWB#servers-ASTmgrSECRET$NWE
    Manager-Update-Benutzer: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Manager Hören Benutzer: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Manager Senden Benutzer: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Lokales GMT: (Stellen Sie NICHT auf DST ein)$NWB#servers-local_gmt$NWE
    VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
    VICIDIAL ANZEIGE Verlängerung: $NWB#servers-answer_transfer_agent$NWE
    Rückstellung Kontext: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    TELEFONE INNERHALB DIESES BEDIENERS:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    VERLÄNGERUNGNAMEAKTIV
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Dieser Bediener hat $active_lists aktive Telefone und $inactive_lists unaktivierte Telefone

    \n"; -echo "
    \n"; -} - - -###################### -# ADD=311 modify conference info in the system -###################### - -if ($ADD==311) -{ - echo ""; - - $stmt="SELECT * from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ÄNDERN Sie Einen KONFERENZ-SATZ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Konferenz:$NWB#conferences-conf_exten$NWE
    Bediener IP: $NWB#conferences-server_ip$NWE
    Gegenwärtige Verlängerung:
    \n"; - -echo "
    \n"; - -} - - - -###################### -# ADD=4 submit phone modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) - {echo "
    TELEFON NICHT GEÄNDERT - es gibt bereits ein Telefon im System mitdiesem extension/server\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    TELEFON NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n";} - else - { - echo "
    TELEFON GEÄNDERT: $extension\n"; - - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid' where extension='$old_extension' and server_ip='$old_server_ip';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ÄNDERN Sie Einen TELEFON-SATZ: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Telefonverlängerung: $NWB#phones-extension$NWE
    Dialplan Zahl: (nur Stellen)$NWB#phones-dialplan_number$NWE
    Voicemail Kasten: (nur Stellen)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (nur Stellen)$NWB#phones-outbound_cid$NWE
    Telefon-IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer-IP address: (optional)$NWB#phones-computer_ip$NWE
    Bediener IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Kennwort:$NWB#phones-pass$NWE
    Status:$NWB#phones-status$NWE
    Aktives Konto: $NWB#phones-active$NWE
    Telefon-Art: $NWB#phones-phone_type$NWE
    Voller Name: $NWB#phones-fullname$NWE
    Firma:$NWB#phones-company$NWE
    Abbildung:$NWB#phones-picture$NWE
    Neue Anzeigen: $row[14]$NWB#phones-messages$NWE
    Alte Anzeigen: $row[15]$NWB#phones-old_messages$NWE
    Klient Protokoll: $NWB#phones-protocol$NWE
    Lokales GMT: (Stellen Sie NICHT auf DST ein)$NWB#phones-local_gmt$NWE
    Manager-LOGON: $NWB#phones-ASTmgrUSERNAME$NWE
    Manager-Geheimnis: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL Rückstellung Benutzer: $NWB#phones-login_user$NWE
    VICIDIAL Rückstellung Durchlauf: $NWB#phones-login_pass$NWE
    VICIDIAL Rückstellung Kampagne: $NWB#phones-login_campaign$NWE
    Park Exten: $NWB#phones-park_on_extension$NWE
    Conf Exten: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL Park-Akte: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Überwachen Sie Präfix: $NWB#phones-monitor_prefix$NWE
    Aufnahme Exten: $NWB#phones-recording_exten$NWE
    VMailMain Exten: $NWB#phones-voicemail_exten$NWE
    VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
    Exten Kontext: $NWB#phones-ext_context$NWE
    DTMFSend Führung: $NWB#phones-dtmf_send_extension$NWE
    Outbound Anruf-Gruppe: $NWB#phones-call_out_number_group$NWE
    Datenbanksuchroutine-Position: $NWB#phones-client_browser$NWE
    Bringen Sie Verzeichnis An: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL Rückstellung URL: $NWB#phones-VICIDIAL_web_URL$NWE
    Anruf-Protokollierung: $NWB#phones-AGI_call_logging_enabled$NWE
    Benutzer-Schaltung: $NWB#phones-user_switching_enabled$NWE
    Conferencing: $NWB#phones-conferencing_enabled$NWE
    Admin Hängezustand: $NWB#phones-admin_hangup_enabled$NWE
    Admin Straßenräuber: $NWB#phones-admin_hijack_enabled$NWE
    Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
    Parkschaltung: $NWB#phones-call_parking_enabled$NWE
    Updater Überprüfung: $NWB#phones-updater_check_enabled$NWE
    Af Protokollierung: $NWB#phones-AFLogging_enabled$NWE
    Warteschlange Ermöglicht: $NWB#phones-QUEUE_ACTION_enabled$NWE
    CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
    VMail Taste: $NWB#phones-voicemail_button_enabled$NWE
    Schnell Erneuern Sie: $NWB#phones-enable_fast_refresh$NWE
    Schnell Erneuern Sie Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Selbstvorwahlknopf-Folgende Zahl: $NWB#phones-auto_dial_next_number$NWE
    Stoppen Sie Rec nach jedem Anruf: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Bediener: (HauptsächlichDB Server)$NWB#phones-DBX_server$NWE
    DBX Datenbank: (HauptsächlichServer Database)$NWB#phones-DBX_database$NWE
    DBX Benutzer: (HauptsächlichDB Login)$NWB#phones-DBX_user$NWE
    DBX Durchlauf: (HauptsächlichDB Secret)$NWB#phones-DBX_pass$NWE
    DBX Tor: (HauptsächlichDB Port)$NWB#phones-DBX_port$NWE
    DBY Bediener: (ZweitensDB Server)$NWB#phones-DBY_server$NWE
    DBY Datenbank: (ZweitensServer Database)$NWB#phones-DBY_database$NWE
    DBY Benutzer: (ZweitensDB Login)$NWB#phones-DBY_user$NWE
    DBY Durchlauf: (ZweitensDB Secret)$NWB#phones-DBY_pass$NWE
    DBY Tor: (ZweitensDB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Klicken Sie hier für Telefonnotfall\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    LÖSCHEN SIE DIESES TELEFON\n"; - } - -} - -###################### -# ADD=41 submit server modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_id != $old_server_id) ) - {echo "
    BEDIENERNOT MODIFIED - there is already a server in the system with this server_id\n";} - else - { - $stmt="SELECT count(*) from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_ip != $old_server_ip) ) - {echo "
    BEDIENER NICHT GEÄNDERT - es gibt bereits einen Bediener im Systemmit diesem server_ip\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    BEDIENER NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n";} - else - { - echo "
    BEDIENER GEÄNDERT: $server_ip\n"; - - $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ÄNDERN Sie Einen BEDIENER-SATZ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Bediener Identifikation: $NWB#servers-server_id$NWE
    Bediener-Beschreibung: $NWB#servers-server_description$NWE
    Bediener-IP address: $NWB#servers-server_ip$NWE
    Aktiv:$NWB#servers-active$NWE
    Sternchen-Version: $NWB#servers-asterisk_version$NWE
    Maximale VICIDIAL Stämme: $NWB#servers-max_vicidial_trunks$NWE
    Telnet Wirt: $NWB#servers-telnet_host$NWE
    Telnet Tor: $NWB#servers-telnet_port$NWE
    Manager-Benutzer: $NWB#servers-ASTmgrUSERNAME$NWE
    Manager-Geheimnis: $NWB#servers-ASTmgrSECRET$NWE
    Manager-Update-Benutzer: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Manager Hören Benutzer: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Manager Senden Benutzer: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Lokales GMT: (Stellen Sie NICHT auf DST ein)$NWB#servers-local_gmt$NWE
    VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
    VICIDIAL ANZEIGE Verlängerung: $NWB#servers-answer_transfer_agent$NWE
    Rückstellung Kontext: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    TELEFONE INNERHALB DIESES BEDIENERS:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    VERLÄNGERUNGNAMEAKTIV
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Dieser Bediener hat $active_lists aktive Telefone und $inactive_lists unaktivierte Telefone

    \n"; -echo "
    \n"; - -} - -###################### -# ADD=411 submit conference modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) - {echo "
    KONFERENZ NICHT GEÄNDERT - es gibt bereits eine Konferenz im Systemmit diesem Verlängerung-Bediener\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    KONFERENZ NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n";} - else - { - echo "
    KONFERENZ ÄNDERTE: $conf_exten\n"; - - $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from conferences where conf_exten='$conf_exten';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ÄNDERN Sie Einen KONFERENZ-SATZ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Konferenz:$NWB#conferences-conf_exten$NWE
    Bediener IP: $NWB#conferences-server_ip$NWE
    Gegenwärtige Verlängerung:
    \n"; - -echo "
    \n"; - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo ""; - -echo "
    SUCHE NACH Einem TELEFON\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Verlängerung:
    Voller Name:
    Phone type:
    \n"; - -} - -###################### -# ADD=66 phone search results -###################### - -if ($ADD==66) -{ - echo ""; - - $SQL = ''; - if ($extension) {$SQL .= "extension LIKE \"%$extension%\" and";} - if ($fullname) {$SQL .= "fullname LIKE \"%$fullname%\" and";} - if ($phone_type) {$SQL .= "phone_type LIKE \"%$phone_type%\" and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from phones $SQL order by extension,server_ip;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    SUCHRESULTATE:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]ÄNDERN Sie | Notfall
    \n"; - -} - - - -###################### -# ADD=0 display all active phones -###################### -if ($ADD==0) -{ - echo ""; - - $stmt="SELECT * from phones order by extension,server_ip"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    TELEFON-AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]ÄNDERN Sie | Notfall
    \n"; -} - -###################### -# ADD=10 display all servers -###################### -if ($ADD==10) -{ - echo ""; - - $stmt="SELECT * from servers order by server_id"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    BEDIENER-AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[1] $row[2] $row[4] $row[3]  Ã„NDERN Sie
    \n"; -} - - -###################### -# ADD=100 display all conferences -###################### -if ($ADD==100) -{ - echo ""; - - $stmt="SELECT * from conferences order by conf_exten"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    KONFERENZ-AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]  Ã„NDERN Sie
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds"; -echo "             VERSION: $version"; -echo "             BAU: $build
    \n"; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_de/dbconnect.php b/agc_2-X/trunk/LANG_admin/astguiclient_de/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_de/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_de/help.gif b/agc_2-X/trunk/LANG_admin/astguiclient_de/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_de/inbound_popup.php b/agc_2-X/trunk/LANG_admin/astguiclient_de/inbound_popup.php deleted file mode 100644 index e75f7a74..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_de/inbound_popup.php +++ /dev/null @@ -1,228 +0,0 @@ - LICENSE: GPLv2 -### -# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system. -# -# changes: -# 60620-1329 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK ENTFERNTINBOUND: Popup - - -
    - - 0) -{ - - $stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='" . mysql_real_escape_string($parked_time) . "' and channel='" . mysql_real_escape_string($channel) . "' LIMIT 1"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: " . mysql_real_escape_string($channel) . "','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Adressieren Sie den Befehl um, der für Führung gesendet wird $channel       $NOW_TIME\n

    \n"; - - - $url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&'; - $Suser = 'username='; - $Spass = '&passwd='; - $Sphone = '&phone='; - - $newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone"; - if ( ($phone == 'unknown') or (strlen($phone)<9) ) - {$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";} - - echo "Schauen Sie oben diesen Kunden im Kundendienst-System\n

    \n"; - - echo "Schließen Sie dieses Fenster\n

    \n"; -} -else -{ - echo "Adressieren Sie den Befehl um, der für Führung VERLASSEN wird $channel       $NOW_TIME\n

    \n"; - echo "Schließen Sie dieses Fenster\n

    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_de/phone_stats.php b/agc_2-X/trunk/LANG_admin/astguiclient_de/phone_stats.php deleted file mode 100644 index 59855fcb..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_de/phone_stats.php +++ /dev/null @@ -1,244 +0,0 @@ - LICENSE: GPLv2 -# -# -# changes: -# 60620-1333 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$admin_page = './admin.php'; - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $row[0]; - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK ADMIN: Telefon-Notfall - - -
    -
    - - - - - - -\n"; -echo "
      STERNCHEN ADMIN: Leitung  
      VERZEICHNEN SIE ALLE TELEFONE | ADDIEREN Sie Ein NEUES TELEFON | SUCHE NACH Einem TELEFON | ADDIEREN Sie Einen BEDIENER | VERZEICHNEN SIE ALLE BEDIENER
      ZEIGEN SIE ALLE KONFERENZEN | ADDIEREN Sie Eine NEUE KONFERENZ
      \n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - -echo "
    \n"; - -echo "ANRUF-ZEIT UND FÜHRUNGEN:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} -# echo "|$stmt|\n"; - -echo "\n"; -echo "
    KANALGRUPPE ZÄHLIMPULS HOURS:MINUTES
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    GESAMTANRUFE $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "ANRUFE DES LETZT-1000 FÜR DATUM-STRECKE:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - - - $call_seconds=0; - $o++; - } - - -echo "
    ZAHL KANALGRUPPE DATUM LENGTH(MIN.)
    $row[0] $row[1] $row[2] $row[3]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_de/remote_inbound.php b/agc_2-X/trunk/LANG_admin/astguiclient_de/remote_inbound.php deleted file mode 100644 index df7b50d4..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_de/remote_inbound.php +++ /dev/null @@ -1,162 +0,0 @@ - LICENSE: GPLv2 -### -# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available) - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - echo"\n"; - echo"ASTERISK ENTFERNTINBOUND: Hauptsächlich\n"; - echo"\n"; - echo"\n"; - echo"\n"; - -?> - - -
    - -
    \n"; - -echo "Klicken Sie an die Führung unter der, die Sie auf Ihr Telefonverwiesen haben möchten

    \n"; - -echo "
    \n";
    -echo "CHANNEL    BEDIENER       CHANNEL_GROUP   EXTENSION    PARKED_BY            PARKED_TIME        \n";
    -echo "----------------------------------------------------------------------------------------------\n";
    -
    -
    -
    -
    -
    -$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		$channel =			sprintf("%-11s", $row[0]);
    -		$server =			sprintf("%-14s", $row[1]);
    -		$channel_group =	sprintf("%-16s", $row[2]);
    -		$extension =		sprintf("%-13s", $row[3]);
    -		$parked_by =		sprintf("%-21s", $row[4]);
    -		$parked_time =		sprintf("%-19s", $row[5]);
    -
    -		echo "$channel$server$channel_group$extension$parked_by$parked_time\n";
    -
    -		$i++;
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "*************************************** NO PARKED CALLS **************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	}
    -
    -
    -$ENDtime = date("U");
    -
    -$RUNtime = ($ENDtime - $STARTtime);
    -
    -echo "
    \n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_el/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_admin/astguiclient_el/AST_inboundEXTstats.php deleted file mode 100644 index f8436560..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_el/AST_inboundEXTstats.php +++ /dev/null @@ -1,400 +0,0 @@ - LICENSE: GPLv2 -# -# CHANGES -# 60421-1450 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1322 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.11.20';} - -$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='" . mysql_real_escape_string($server_ip) . "';"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$inbound_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $inbound_to_print) - { - $row=mysql_fetch_row($rslt); - $inbound[$i] =$row[0]; - $fullnum[$i] =$row[1]; - $inbname[$i] =$row[2]; - $i++; - } -?> - - - - - -\n"; -#echo"\n"; -echo "ASTERISK: Στατιστικά ΕισεÏχομένων Κλησεων\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "ΠΑΡΑΚΑΛΩ ΕΠΙΛΕΞΤΕ ΕÎΑΠΑΡΙΘΜΟ ΚΑΙ ΗΜΕΡΟΜΗÎΙΑ ΑÎΩΤΕΡΩ, ΚΑΙ ΠΑΤΗΣΤΕ ΕΠΙΒΕΒΑΙΩΣΗ\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "ASTERISK: Στατιστικά ΕισεÏχομένων Κλησεων                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$extenSQL = "and extension='" . mysql_real_escape_string($group) . "'";
    -if (eregi("\*",$group))
    -	{$extenSQL = "and extension LIKE \"%$group\"";}
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Συνολικές κλήσεις που ήÏθαν σε αυτό τον αÏιθμό:       $TOTALcalls\n";
    -echo "Average Call Length(seconds) for all Calls:   $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- ΕΓΚΑΤΑΛ\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -if ($row[0])
    -	{
    -	$average_hold_seconds = ($row[1] / $row[0]);
    -	$average_hold_seconds = round($average_hold_seconds, 0);
    -	$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -	}
    -else {$DROPpercent=0;   $average_hold_seconds=0;}
    -echo "Total DROP Calls:   (less than 10 seconds)    $DROPcalls  $DROPpercent%\n";
    -echo "Average Call Length(seconds) for DROP Calls:  $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  CALLS STATS
    -
    -echo "\n";
    -echo "---------- CALL LISTINGS\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -echo "| CALLERID             | CALLERIDNAME         | LENGTH | DATE TIME           |\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -$stmt="select number_dialed,caller_code,length_in_sec,start_time from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$CID =			sprintf("%-20s", $row[0]);
    -	$CIDname =		sprintf("%-20s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$datetime =		sprintf("%-19s", $row[3]);
    -	$USERavgTALK =	$row[2];
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -if ($output == 'FULL')
    -	{
    -
    -	echo "\n";
    -	echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΟÎΟΥ\n";
    -
    -	echo "\n";
    -
    -	$hi_hour_count=0;
    -	$last_full_record=0;
    -	$i=0;
    -	$h=0;
    -	while ($i <= 96)
    -		{
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -		$h++;
    -		}
    -
    -	$hour_multiplier = (100 / $hi_hour_count);
    -	#$hour_multiplier = round($hour_multiplier, 0);
    -
    -	echo "\n";
    -	echo "ΓΡΑΦΙΚΗ ΠΑΡΑΣΤΑΣΗ ΜΕ 15ΛΕΠΤΕΣ ΑΥΞΗΣΕΙΣ ΤΩΠΣΥÎΟΛΙΚΩΠΚΛΗΣΕΩÎ\n";
    -
    -	$k=1;
    -	$Mk=0;
    -	$call_scale = '0';
    -	while ($k <= 102) 
    -		{
    -		if ($Mk >= 5) 
    -			{
    -			$Mk=0;
    -			$scale_num=($k / $hour_multiplier);
    -			$scale_num = round($scale_num, 0);
    -			$LENscale_num = (strlen($scale_num));
    -			$k = ($k + $LENscale_num);
    -			$call_scale .= "$scale_num";
    -			}
    -		else
    -			{
    -			$call_scale .= " ";
    -			$k++;   $Mk++;
    -			}
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -	#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -	echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -	$ZZ = '00';
    -	$i=0;
    -	$h=4;
    -	$hour= -1;
    -	$no_lines_yet=1;
    -
    -	while ($i <= 96)
    -		{
    -		$char_counter=0;
    -		$time = '      ';
    -		if ($h >= 4) 
    -			{
    -			$hour++;
    -			$h=0;
    -			if ($hour < 10) {$hour = "0$hour";}
    -			$time = "+$hour$ZZ+";
    -			}
    -		if ($h == 1) {$time = "   15 ";}
    -		if ($h == 2) {$time = "   30 ";}
    -		if ($h == 3) {$time = "   45 ";}
    -		$Ghour_count = $hour_count[$i];
    -		if ($Ghour_count < 1) 
    -			{
    -			if ( ($no_lines_yet) or ($i > $last_full_record) )
    -				{
    -				$do_nothing=1;
    -				}
    -			else
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				echo "|$time|";
    -				$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -				echo "| $hour_count[$i] |\n";
    -				}
    -			}
    -		else
    -			{
    -			$no_lines_yet=0;
    -			$Xhour_count = ($Ghour_count * $hour_multiplier);
    -			$Yhour_count = (99 - $Xhour_count);
    -
    -			$Gdrop_count = $drop_count[$i];
    -			if ($Gdrop_count < 1) 
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "*X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -				echo "| 0     | $hour_count[$i] |\n";
    -
    -				}
    -			else
    -				{
    -				$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -			#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -				$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -				echo "D";   $char_counter++;
    -				$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -				echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -				}
    -			}
    -		
    -		
    -		$i++;
    -		$h++;
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -	}
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_el/admin.php b/agc_2-X/trunk/LANG_admin/astguiclient_el/admin.php deleted file mode 100644 index d332d0f6..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_el/admin.php +++ /dev/null @@ -1,1824 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI database administration -# -# CHANGES -# 50913-1118 - Added outbound_cid for web-client calls -# 50926-1356 - Modified to allow for language translation -# 50926-1613 - Added WeBRooTWritablE write controls -# 51128-1254 - Modified to allow PHP global vars off -# 51208-2120 - Added option to login with vicidial_user login if allowed -# 51213-1650 - Added option to delete phones if allowed by vicidial_users -# 60421-1430 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1137 - Fixed phone search bug -# 60620-1243 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '1.1.12'; -$build = '60620-1243'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} - elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} - elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} -if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} - elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} -if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} - elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} -if (isset($_GET["login"])) {$login=$_GET["login"];} - elseif (isset($_POST["login"])) {$login=$_POST["login"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} - elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} -if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} - elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} -if (isset($_GET["company"])) {$company=$_GET["company"];} - elseif (isset($_POST["company"])) {$company=$_POST["company"];} -if (isset($_GET["picture"])) {$picture=$_GET["picture"];} - elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} - elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} -if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} - elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} -if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} - elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} -if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} - elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} -if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} - elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} -if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} - elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} -if (isset($_GET["park_on_extension"])) {$park_on_extension=$_GET["park_on_extension"];} - elseif (isset($_POST["park_on_extension"])) {$park_on_extension=$_POST["park_on_extension"];} -if (isset($_GET["conf_on_extension"])) {$conf_on_extension=$_GET["conf_on_extension"];} - elseif (isset($_POST["conf_on_extension"])) {$conf_on_extension=$_POST["conf_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"];} - elseif (isset($_POST["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"];} - elseif (isset($_POST["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];} -if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} - elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} -if (isset($_GET["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} - elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} -if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} - elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["dtmf_send_extension"])) {$dtmf_send_extension=$_GET["dtmf_send_extension"];} - elseif (isset($_POST["dtmf_send_extension"])) {$dtmf_send_extension=$_POST["dtmf_send_extension"];} -if (isset($_GET["call_out_number_group"])) {$call_out_number_group=$_GET["call_out_number_group"];} - elseif (isset($_POST["call_out_number_group"])) {$call_out_number_group=$_POST["call_out_number_group"];} -if (isset($_GET["client_browser"])) {$client_browser=$_GET["client_browser"];} - elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} -if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} - elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} -if (isset($_GET["local_web_callerID_URL"])) {$local_web_callerID_URL=$_GET["local_web_callerID_URL"];} - elseif (isset($_POST["local_web_callerID_URL"])) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];} -if (isset($_GET["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"];} - elseif (isset($_POST["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];} -if (isset($_GET["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"];} - elseif (isset($_POST["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];} -if (isset($_GET["user_switching_enabled"])) {$user_switching_enabled=$_GET["user_switching_enabled"];} - elseif (isset($_POST["user_switching_enabled"])) {$user_switching_enabled=$_POST["user_switching_enabled"];} -if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} - elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} -if (isset($_GET["admin_hangup_enabled"])) {$admin_hangup_enabled=$_GET["admin_hangup_enabled"];} - elseif (isset($_POST["admin_hangup_enabled"])) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];} -if (isset($_GET["admin_hijack_enabled"])) {$admin_hijack_enabled=$_GET["admin_hijack_enabled"];} - elseif (isset($_POST["admin_hijack_enabled"])) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];} -if (isset($_GET["admin_monitor_enabled"])) {$admin_monitor_enabled=$_GET["admin_monitor_enabled"];} - elseif (isset($_POST["admin_monitor_enabled"])) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];} -if (isset($_GET["call_parking_enabled"])) {$call_parking_enabled=$_GET["call_parking_enabled"];} - elseif (isset($_POST["call_parking_enabled"])) {$call_parking_enabled=$_POST["call_parking_enabled"];} -if (isset($_GET["updater_check_enabled"])) {$updater_check_enabled=$_GET["updater_check_enabled"];} - elseif (isset($_POST["updater_check_enabled"])) {$updater_check_enabled=$_POST["updater_check_enabled"];} -if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} - elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} -if (isset($_GET["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"];} - elseif (isset($_POST["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];} -if (isset($_GET["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"];} - elseif (isset($_POST["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];} -if (isset($_GET["voicemail_button_enabled"])) {$voicemail_button_enabled=$_GET["voicemail_button_enabled"];} - elseif (isset($_POST["voicemail_button_enabled"])) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];} -if (isset($_GET["enable_fast_refresh"])) {$enable_fast_refresh=$_GET["enable_fast_refresh"];} - elseif (isset($_POST["enable_fast_refresh"])) {$enable_fast_refresh=$_POST["enable_fast_refresh"];} -if (isset($_GET["fast_refresh_rate"])) {$fast_refresh_rate=$_GET["fast_refresh_rate"];} - elseif (isset($_POST["fast_refresh_rate"])) {$fast_refresh_rate=$_POST["fast_refresh_rate"];} -if (isset($_GET["enable_persistant_mysql"])) {$enable_persistant_mysql=$_GET["enable_persistant_mysql"];} - elseif (isset($_POST["enable_persistant_mysql"])) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];} -if (isset($_GET["auto_dial_next_number"])) {$auto_dial_next_number=$_GET["auto_dial_next_number"];} - elseif (isset($_POST["auto_dial_next_number"])) {$auto_dial_next_number=$_POST["auto_dial_next_number"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} - elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} -if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} - elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} -if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} - elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} -if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];} - elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];} -if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];} - elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];} -if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} - elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} -if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} - elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} -if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} - elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} -if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];} - elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];} -if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];} - elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];} - elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} -if (isset($_GET["old_server_ip"])) {$old_server_ip=$_GET["old_server_ip"];} - elseif (isset($_POST["old_server_ip"])) {$old_server_ip=$_POST["old_server_ip"];} -if (isset($_GET["old_server_id"])) {$old_server_id=$_GET["old_server_id"];} - elseif (isset($_POST["old_server_id"])) {$old_server_id=$_POST["old_server_id"];} -if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} - elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} -if (isset($_GET["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} - elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} -if (isset($_GET["max_vicidial_trunks"])) {$max_vicidial_trunks=$_GET["max_vicidial_trunks"];} - elseif (isset($_POST["max_vicidial_trunks"])) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];} -if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];} - elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];} -if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];} - elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];} -if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} - elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} -if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];} - elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];} -if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];} - elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];} -if (isset($_GET["answer_transfer_agent"])) {$answer_transfer_agent=$_GET["answer_transfer_agent"];} - elseif (isset($_POST["answer_transfer_agent"])) {$answer_transfer_agent=$_POST["answer_transfer_agent"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["old_conf_exten"])) {$old_conf_exten=$_GET["old_conf_exten"];} - elseif (isset($_POST["old_conf_exten"])) {$old_conf_exten=$_POST["old_conf_exten"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS and Dots -$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); -$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); - -### DIGITS ONLY ### -$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); -$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); -$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); -$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); -$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); -$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); -$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); -$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); -$recording_exten = ereg_replace("[^0-9]","",$recording_exten); -$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); -$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); -$DBX_port = ereg_replace("[^0-9]","",$DBX_port); -$DBY_port = ereg_replace("[^0-9]","",$DBY_port); -$telnet_port = ereg_replace("[^0-9]","",$telnet_port); -$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); -$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); -$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); -$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); -$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); -$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); -$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); -$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); -$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); -$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); -$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); -$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); -$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); -$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); -$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); -$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); -$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); -$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); -$ADD = ereg_replace("[^0-9]","",$ADD); - -### ALPHA-NUMERIC and underscore and dash and slash and at and dot -$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); -$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); -$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); -$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); -$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); -$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); -$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); -$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); -$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); - -### ALPHA-NUMERIC (and underscore and dash) -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); -$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); -$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); -$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); -$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); -$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); -$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); -$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); -$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); -$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); -$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); -$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); -$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); -$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); -$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); -$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); -$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); -$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); -$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); -$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); -$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); -$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); -$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); -$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); -$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); -$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); -$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); -$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); - -### VARIABLES TO BE mysql_real_escape_string ### -# $VICIDIAL_web_URL = -# $local_web_callerID_URL = - -##### END VARIABLE FILTERING FOR SECURITY ##### - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Έχετε αποσυνδεθεί. Σας ευχαÏιστοÏμε\n"; - exit; -} - -if (!isset($ADD)) {$ADD=0;} - -$STARTtime = date("U"); -$STARTdate = date("Y-m-d H:i:s"); - -if ($ADD==1) {$process = 'ΠΡΟΣΘΕΣΕ ÎΕΟ ΤΗΛΕΦΩÎΟ';} -if ($ADD==11) {$process = 'ΠΡΟΣΘΕΣΕ ÎΕΟ ΔΙΑΚΟΜΙΣΤΗ';} -if ($ADD==111) {$process = 'ΠΡΟΣΘΕΣΕ ÎΕΑ ΣΥÎΔΙΑΛΕΞΗ';} -if ($ADD==2) {$process = 'ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΤΗΛΕΦΩÎΟΥ';} -if ($ADD==21) {$process = 'ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΔΙΑΚΟΜΙΣΤΗ';} -if ($ADD==211) {$process = 'ΠΡΟΣΘΗΚΗ ÎΕΑΣ ΣΥÎΔΙΑΛΕΞΗΣ';} -if ($ADD==3) {$process = 'ΤΡΟΠΟΠΟΙΗΣΕ ΤΗΛΕΦΩÎΟ';} -if ($ADD==31) {$process = 'ΤΡΟΠΟΠΟΙΗΣΕ ΔΙΑΚΟΜΙΣΤΗ';} -if ($ADD==311) {$process = 'ΤΡΟΠΟΠΟΙΗΣΕ ΣΥÎΔΙΑΛΕΞΗ';} -if ($ADD==4) {$process = 'ΤΡΟΠΟΠΟΙΗΣΗ ΤΗΛΕΦΩÎΟΥ';} -if ($ADD==41) {$process = 'ΤΡΟΠΟΠΟΙΗΣΗ ΔΙΑΚΟΜΙΣΤΗ';} -if ($ADD==411) {$process = 'ΤΡΟΠΟΠΟΙΗΣΗ ΣΥÎΔΙΑΛΕΞΗΣ';} -if ($ADD==5) {$process = 'DELETE PHONE';} -if ($ADD==6) {$process = 'DELETE PHONE';} -if ($ADD==55) {$process = 'ΑÎΑΖΗΤΗΣΗ ΤΗΛΕΦΩÎΩÎ';} -if ($ADD==66) {$process = 'ΑÎΑΖΗΤΗΣΗ ΑΠΟΤΕΛΕΣΜΑΤΩΠΤΗΛΕΦΩÎΩÎ';} -if ($ADD==0) {$process = 'ΛΙΣΤΑ ΤΗΛΕΦΩÎΟΥ';} -if ($ADD==10) {$process = 'ΛΙΣΤΑ ΔΙΑΚΟΜΙΣΤΗ';} -if ($ADD==100) {$process = 'ΛΙΣΤΑ ΣΥÎΔΙΑΛΕΞΕΩÎ';} -if ($ADD==99999) {$process = 'ΒΟΗΘΕΙΑ';} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if ($auth<1) - { - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > '6' and ast_admin_access='1';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGdelete_phones =$row[17]; - } - } - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - echo "|$stmt|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - if (strlen($LOGfullname) < 1) - { - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - } - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rsltx=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rsltx); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $servers_list .= "\n"; - $o++; - } - - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); - -$NWB = "   \"ΒΟΗΘΕΙΑ\""; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "ΣΥΣΤΗΜΑ ΚΛΗΣΕΩÎ: ΔιαχείÏιση - $process \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    ASTERISK ADMIN: ΒΟΗΘΕΙΑ


    \n"; - -?> -ΠΙÎΑΚΑΣ ΤΗΛΕΦΩÎΩÎ

    - -
    -Εσωτ.ΣÏνδεση Τηλεφώνου - Αυτό το πεδίο είναι για την καταχώÏηση του ονόματος του τηλεφώνου, όπως αυτό εμφανίζεται στο Asterisk, χωÏίς να συμπεÏιλαμβάνει το Ï€Ïωτόκολλο ή slash στην αÏχή. Για παÏάδειγμα: για SIP τηλέφωνο SIPVtest101 η Εσω.ΓÏαμμή Τηλεφώνου θα είναι test101. Επίσης, για IAX2 τηλέφωνα χÏησιμοποιείστε τα πλήÏης ονόματα: IAX2/IAXphone1@IAXphone1 θα είναι IAXphone1@IAXphone1. Για Zap τηλέφωνα καταχωÏήστε το πλήÏες κανάλι: Zap/25-1 θα είναι 25-1. Αλλη σημείωση, οÏίστε το Ï€Ïωτόκολλο παÏακάτω σωστά για τον Ï„Ïπο του τηλεφώνου. - -
    -
    -
    -ΑÏιθμός Σχεδίου Κλήσεων - Αυτό το πεδίο είναι για τον αÏιθμό που καλείται για να κουδουνίζει το τηλέφωνο. Αυτός ο αÏιθμός οÏίζεται στο αÏχείο extensions.conf του διακομιστή Asterisk - -
    -
    -
    -ΠεÏιεχόμενο Î¦Ï‰Î½Î·Ï„Î¹ÎºÎ¿Ï Î¤Î±Ï‡Ï…Î´Ïομείου - Αυτό το πεδίο είναι για το πεÏιεχόμενο του Ï†Ï‰Î½Î·Ï„Î¹ÎºÎ¿Ï Ï„Î±Ï‡Ï…Î´Ïομείου, όπου πηγαίνουν τα μηνÏματα του τηλεφώνου του χÏήστη. Το χÏησιμοποιοÏμαι για να ελέγξουμε τα φωνητικά μηνÏματα και για να μποÏεί ο χÏήστης να χÏησιμοποιήσει το πλήκτÏο VOICEMAIL. - -
    -
    -
    -CallerID ΕξεÏχομένων - Αυτό το πεδίο είναι για την καταχώÏιση του αÏÎ¹Î¸Î¼Î¿Ï callerID που θα θέλατε να εμφανίζεται στις εξεÏχόμενες κλήσεις. - -
    -
    -
    -Δνση IP Τηλεφώνου - Αυτό το πεδίο είναι για την δνση IP του τηλέφωνου εάν είναι ένα VOIP τηλέφωνο. Αυτό είναι ένα Ï€ÏοαιÏετικό πεδίο - -
    -
    -
    -Δνση IP Î¥Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î¿Ï - Αυτό το πεδίο είναι για την δνση IP του υπολογιστή του χÏήστη. Αυτό είναι ένα Ï€ÏοαιÏετικό πεδίο - -
    -
    -
    -IP Διακομιστή - Αυτός ο κατάλογος επιλογών είναι που επιλέγετε σε ποιον διακομιστή το τηλέφωνο είναι ενεÏγό. - -
    -
    -
    -ΣÏνδεση - η σÏνδεση που χÏησιμοποιείται για τον τηλεφωνικό χÏήστηστη σÏνδεση στις εφαÏμογές πελατών. - -
    -
    -
    -Κωδικός Ï€Ïόσβασης - ο κωδικός Ï€Ïόσβασης που χÏησιμοποιείται γιατον τηλεφωνικό χÏήστη στη σÏνδεση στις εφαÏμογές πελατών. - -
    -
    -
    -Κατάσταση - Η κατάσταση του τηλεφώνου στο σÏστημα, ΕÎΕΡΓΗ και ΔΙΑΧ επιτÏέπουν στους GUI πελάτες να δουλέψουν. Η ΔΙΑΧ επιτÏέπει την Ï€Ïόσβαση στην ιστοσελίδα διαχείÏισης. - -
    -
    -
    -ΕνεÏγός ΛογαÏιασμός - Κατά πόσο το τηλέφωνο είναι ενεÏγό για να τοποθετηθεί στην λίστα στο GUI. - -
    -
    -
    -ΤÏπος Τηλεφώνου - Απλά για σημειώσεις διαχείÏισης. - -
    -
    -
    -ΠλήÏες Ονομα - ΧÏησιμοποιείται από τον χÏήστη GUI στην λίστα ενεÏγών τηλεφώνων. - -
    -
    -
    -ΕταιÏία - Απλά για σημειώσεις διαχείÏισης. - -
    -
    -
    -Εικόνα - Δεν έχει υλοποιηθεί ακόμα. - -
    -
    -
    -Îέα ΜηνÏματα - ΑÏιθμός νέων φωνητικών μηνυμάτων για αυτό το τηλέφωνο στον διακομιστή Asterisk. - -
    -
    -
    -Παλαιά ΜηνÏματα - ΑÏιθμός παλαιών φωνητικών μηνυμάτων για αυτό το τηλέφωνο στον διακομιστή Asterisk. - -
    -
    -
    -ΠÏωτόκολλο Πελάτη - Το Ï€Ïωτόκολλο που χÏησιμοποιεί το τηλέφωνο για συνδεθεί στον διακομιστή Asterisk: SIP, IAX2, Zap. - -
    -
    -
    -οπική GMT - Η διαφοÏά από την GMT όπου το τηλέφωνο βÏίσκεται. Μην το Ïυθμίσετε για DAYLIGHT SAVINGS ΩΡΑ. Αυτή χÏησιμοποιείται από την VICIDIAL εκστÏατεία για την επακÏιβή εμφάνιση της ÏŽÏας. - -
    -
    -
    -ΣÏνδεση ΔιαχειÏιστή - Αυτή είναι η σÏνδεση που χÏησιμοποιοÏν οι GUI χÏήστες του τηλεφώνου, για Ï€Ïόσβαση στην Βάση Δεδομένων όπου ο διακομιστής δεδομένων βÏίσκεται. - -
    -
    -
    -Μυστικό ΔιαχειÏιστή - Αυτός είναι ο κωδικός που χÏησιμοποιοÏν οι GUI χÏήστες του τηλεφώνου, για Ï€Ïόσβαση στην Βάση Δεδομένων όπου ο διακομιστής δεδομένων βÏίσκεται. - -
    -
    -
    -ΠÏοκαθοÏισμένος VICIDIAL ΧÏήστης - Εδώ οÏίζεται μία Ï€ÏοκαθοÏισμένη τιμή χÏήστη, οπουδήποτε αυτός ο χÏήστης τηλεφώνου ανοίξει την εφαÏμογή VICIDIAL. Αφήστε κενό για κανένα χÏήστη. - -
    -
    -
    -ΠÏοκαθοÏισμένος VICIDIAL Κωδικός - Εδώ οÏίζεται μία Ï€ÏοκαθοÏισμένη τιμή κωδικοÏ, οπουδήποτε αυτός ο χÏήστης τηλεφώνου ανοίξει την εφαÏμογή VICIDIAL. Αφήστε κενό για κανένα κωδικό. - -
    -
    -
    -VICIDIAL ΠÏοκαθοÏισμένη ΕκστÏατεία - Εδώ οÏίζεται μα Ï€ÏοκαθοÏισμένη τιμή εκστÏατείας, οπουδήποτε αυτός ο χÏήστης τηλεφώνου ανοίξει την εφαÏμογή VICIDIAL. Αφήστε κενό για καμία εκστÏατεία. - -
    -
    -
    -Εσ.ΣÏνδ. Στάθμευσης - Αυτή είναι η Ï€ÏοκαθοÏισμένη εσωτ.σÏνδεση Στάθμευσης για τις εφαÏμογές του χÏήστη. - -
    -
    -
    -Εσ.ΣÏνδ. Συνδιάλεξης - Αυτή είναι η Ï€ÏοκαθοÏισμένη εσωτ.σÏνδεση Συνδιάλεξης για τις εφαÏμογές του χÏήστη. - -
    -
    -
    -Εσωτ.ΣÏνδεση Στάθμευσης VICIDIAL - Η Ï€ÏοκαθοÏισμένη εσωτ.σÏνδεση στάθμευσης. ΕξακÏιβώστε ότι κάποια διαφοÏετική δουλεÏει Ï€Ïιν την αλλάξετε. - -
    -
    -
    - ΑÏχείο Στάθμευσης VICIDIAL - Το Ï€ÏοκαθοÏισμένο αÏχείο στάθμευσης. ΜέχÏι 10 χαÏακτήÏες. - -
    -
    -
    -ΠÏόθεμα παÏακολοÏθησης - Αυτό είναι το Ï€Ïόθεμα παÏακολοÏθησης των καναλιών ZAP. - -
    -
    -
    -Εσωτ.ΣÏνδεση ΗχογÏάφησης - Αυτή είναι η εσωτ.σÏνδεση του πλάνου κλήσεων για την εσωτ.σÏνδεση ηχογÏάφησης που χÏησιμοποιείται για μεταφοÏά στις συνδιαλέξεις, ώστε να ηχογÏαφηθοÏν.Extensions.conf . - -
    -
    -
    -Βασική Εσωτ.ΣÏνδεση VMAIL - Αυτή είναι η εσωτ.σÏνδεση του πλάνου κλήσεων που ελέγχει την θυÏίδα ηχητικών μηνυμάτων. - -
    -
    -
    -Εσωτ.ΣÏνδεση απόÏÏιψης VMAIL - Αυτο είναι το Ï€Ïόθεμα του πλάνου κλήσεων που χÏησιμοποιείται στο να στέλνει κλήσεις κατευθείαν στη θυÏίδα του χÏήστη από μία κλήση. - -
    -
    -
    -ΠεÏιεχόμενο Εσωτ.ΣÏνδεσης - Αυτό είναι το πεÏιεχόμενο του πλάνου κλήσεων όπου το τηλέφωνο χÏησιμοποιεί. - -
    -
    -
    -Κανάλι αποστολής DTMF - Αυτό είναι το κανάλι του χÏησιμοποιείται για την αποστολή DTMF ήχων στις συνδιαλέξεις. - -
    -
    -
    -ΕξεÏχόμεη ομάδα κλήσης - αυτή είναι η ομάδα ÎºÎ±Î½Î±Î»Î¹Î¿Ï ÏŒÏ€Î¿Ï… οι εξεÏχόμενες κλήσεις από αυτό το τηλέφωνο τοποθετοÏνται. ΥπάÏχουν Ïουτίνες που την χÏησιμοποιοÏν. Για τα κανάλια Zap θέλετε να χÏησιμοποιήσετε κάτι σαν Zap/g2, για IAX2 trunks θα θέλετε να χÏησιμοποιήσετε το πλήÏες Ï€Ïόθεμα IAX όπως IAX2/VICItest1:secret@10.10.10.15:4569. Ελέγξτε τα trunks με το αÏχείο extensions.conf. - -
    -
    -
    -ΠεÏιοχή Ιστο-Î Î»Î¿Î·Î³Î¿Ï - Αυτό χÏειάζεται μόνο σε Linux συστήματα. - -
    -
    -
    -Κατάλογος Εγκατάστασης - . - -
    -
    -
    -CallerID URL - Αυτή είναι η Δνση της ιστοσελίδας που χÏησιμοποιείται για αναζήτηση με callerID - -
    -
    -
    -ΠÏοκαθοÏισμένο VICIDIAL URL - Αυτή είναι η δνση ιστοσελίδας που χÏησιμοποιείται για Ï€ÏοσαÏμοσμένα VICIDIAL εÏωτήματα ιστοσελίδας - -
    -
    -
    -ΚαταγÏαφή Γεγονότων Κλήσης - Αυτό τοποθετείται σε αληθές εάν το αÏχείο call_log.agi βÏίσκεται στο αÏχείο extensions.conf για τις εξεÏχόμενες κλήσεις και για τις εσωτ.συνδέσεις 'h' που κλείνουν. Αυτό Ï€Ïέπει πάντα να είναι 1 για να δουλεÏουν σωστά πολλά χαÏακτηÏιστικά των εφαÏμογών. - -
    -
    -
    -Μεταγωγή ΧÏήστη - Εάν το θέσετε σε αληθές θα επιτÏέπετε στους χÏήστες να μεταβοÏν σε άλλον λογαÏιασμό χÏήστη - -
    -
    -
    -Σε συνδιάλεξη - Εάν το θέσετε σε αληθές θα επιτÏέπετε στους χÏήστες να ξεκινοÏν συνδιαλέξεις μέχÏι 6 εξωτεÏικές γÏαμμές. - -
    -
    -
    -ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï ÎšÎ»ÎµÎ¯ÏƒÎ¹Î¼Î¿- Εάν το θέσετε σε αληθές θα επιτÏέπετε στους χÏήστες να κλείνουν κάθε γÏαμμή. - -
    -
    -
    -ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï ÎšÎ»Î­ÏˆÎ¹Î¼Î¿ - Εάν το θέσετε σε αληθές θα επιτÏέπετε στους χÏήστες να λαμβάνουν και να ανακατευθÏνουν στην εσωτ.σÏνδεσή τους οποιαδήποτε γÏαμμή. - -
    -
    -
    -ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï Î Î±ÏακολοÏθηση - Εάν το θέσετε σε αληθές θα επιτÏέπετε στους χÏήστες να λαμβάνουν και να ανακατευθÏνουν στην εσωτ.σÏνδεσή τους οποιαδήποτε γÏαμμή. - -
    -
    -
    -Στάθμευση Κλήσης - Εάν το θέσετε σε αληθές θα επιτÏέπετε σε χÏήστες να σταθμεÏουν κλήσεις και κλήσεις σε αναμονή να διαχειÏίζονται από οποιοδήποτε άλλο χÏήστη. Οι κλήσεις μένουν σε αναμονή για 30 δευτεÏόλεπτα και μετά κλείνουν. Συνήθως ενεÏγοποιημένη για όλους. - -
    -
    -
    -ΕνεÏγοποιημένη ΟυÏά - Εάν το θέσετε σε αληθές θα εμφανίζεται ένα παÏάθυÏο ειδοποίησης, ότι η ÏŽÏα ενημέÏωσης δεν έχει αλλάξει σε 20 δευτεÏόλεπτα. - -
    -
    -
    -AF ΚαταγÏαφή Γεγονότος - Εάν το θέσετε σε αληθές θα καταγÏάφονται οι ενέÏγειες χÏήσης του astGUIclient σε ένα αÏχείο στον υπολογιστή του χÏήστη. - -
    -
    -
    -ΕνεÏγοποιημένη ΟυÏά - Εάν το θέσετε σε αληθές οι εφαÏμογές θα χÏησιμοποιοÏν το ACQS. - -
    -
    -
    -ΥπεÏεμφανιζόμενο παÏαθÏÏο CallerID - Εάν το θέσετε σε αληθές θα επιτÏέψετε σε αÏιθμοÏÏ‚ οÏισμένους στο αÏχείο extensions.conf, να στέλνουν οθόνες με CallerID στους astGUIclient χÏήστες. - -
    -
    -
    -VMail ΠλήκτÏο - Εάν το θέσετε σε αληθές θα εμφανιστεί το πλήκτÏο VOICEMAIL και τα μηνÏματα μποÏοÏν να εμφανίζονται στο astGUIclient. - -
    -
    -
    -ΤαχÏτητα Ανανέωσης - Εάν το θέσετε σε αληθές ενεÏγοποιείται ένα νέο Ïυθμό ανανέωσης πληÏοφοÏιών κλήσης για το astGUIclient. ΠÏοκαθοÏισμένος απενεÏγοποιημένος Ïυθμός είναι 1000 ms (1 δευτεÏόλεπτο). - -
    -
    -
    -Ρυθμός Ανανέωσης ΤαχÏτητας - σε χιλιοστά δευτεÏολέπτου. ΧÏημοποιείται μόνο εάν η ΤαχÏτητα Ανανέωσης είναι ενεÏγοποιημένη. ΠÏοκαθοÏισμένος απενεÏγοποιημένος Ïυθμός είναι 1000 ms (1 δευτεÏόλεπτο). - -
    -
    -
    -Συνεχής MySQL - Εάν είναι ενεÏγοποιημένο, το astGUIclient θα παÏαμένει συνδεμένο αντί να συνδέεται κάθε δευτεÏόλεπτο. - -
    -
    -
    -Αυτόματη Κλήση Επόμενου ΑÏÎ¹Î¸Î¼Î¿Ï - Εάν είναι ενεÏγοποιημένο, μετά από τον τεÏματισμό θα γίνει κλήση του επόμενου αÏιθμοÏ, εκτός εάν επιλέξουμε "Μη κάνεις κλήσεις". - -
    -
    -
    -Σταμάτα την ηχογÏάφηση μετά από κάθε κλήση - Εάν είναι ενεÏγοποιημένο η ηχογÏάφηση θα σταματήσει μετά τον τεÏματισμό. - -
    -
    -
    -DBΧ Διακομιστής - Ο διακομιστής της Βάσης Δεδομένων MySQL που ο χÏήστης θα συνδεθεί. - -
    -
    -
    -DBΧ Βάση Δεδομένων - Η βάση δεδομένων MySQL στην οποία ο χÏήστης θα συνδεθεί. Η Ï€ÏοκαθοÏισμένη είναι asterisk. - -
    -
    -
    -DBΧ ΧÏήστης - Ο χÏήστης MySQL για την σÏνδεση. Ο Ï€ÏοκαθοÏισμένος είναι cron. - -
    -
    -
    -DBΧ Κωδικός - Ο κωδικός χÏήστη MySQL που ο χÏήστης χÏησιμοποιεί όταν συνδέεται. Ο Ï€ÏοκαθοÏισμένος είναι 1234. - -
    -
    -
    -DBΧ ΠόÏτα - Η MySQL TCP πόÏτα που ο χÏήστης χÏησιμοποιεί όταν συνδέεται. Η Ï€ÏοκαθοÏισμένη είναι 3306. - -
    -
    -
    -DBY Διακομιστής - Ο διακομιστής της Βάσης Δεδομένων MySQL που ο χÏήστης θα συνδεθεί. ΔευτεÏεÏονserver, μην χÏησιμοποιημένος αυτήν την πεÏίοδο. - -
    -
    -
    -DBY Βάση Δεδομένων - Η βάση δεδομένων MySQL στην οποία ο χÏήστης θα συνδεθεί. Η Ï€ÏοκαθοÏισμένη είναι asterisk. ΔευτεÏεÏονserver, μην χÏησιμοποιημένος αυτήν την πεÏίοδο. - -
    -
    -
    -DBY ΧÏήστης - Ο χÏήστης MySQL για την σÏνδεση. Ο Ï€ÏοκαθοÏισμένος είναι cron. ΔευτεÏεÏονserver, μην χÏησιμοποιημένος αυτήν την πεÏίοδο. - -
    -
    -
    -DBY Κωδικός - Ο κωδικός χÏήστη MySQL που ο χÏήστης χÏησιμοποιεί όταν συνδέεται. Ο Ï€ÏοκαθοÏισμένος είναι 1234. ΔευτεÏεÏονserver, μην χÏησιμοποιημένος αυτήν την πεÏίοδο. - -
    -
    -
    -DBY ΠόÏτα - Η MySQL TCP πόÏτα που ο χÏήστης χÏησιμοποιεί όταν συνδέεται. Η Ï€ÏοκαθοÏισμένη είναι 3306. ΔευτεÏεÏονserver, μην χÏησιμοποιημένος αυτήν την πεÏίοδο. - - -



    - -ΠΙÎΑΚΑΣ ΔΙΑΚΟΜΙΣΤΩÎ

    -
    -
    -ID Διακομιστή - Σε αυτό το πεδίο οÏίζεται το όνομα του διακομιστή Asterisk, είναι μόνο μία επωνυμία ώστε να αναγνωÏίζεται από τους διαχειÏιστές. - -
    -
    -
    -ΠεÏιγÏαφή Διακομιστή - Το πεδίο στο οποίο πεÏιγÏάφεται με μία φÏάση τον διακομιστή Asterisk. - -
    -
    -
    -Δνση IP Διακομιστή - Το πεδίο που οÏίζεται η δνση IP του δικτÏου του διακομιστή Asterisk. - -
    -
    -
    -ΕνεÏγός - ΟÏίζει κατά πόσον ο διακομιστής Asterisk είναι ενεÏγός ή μη ενεÏγός. - -
    -
    -
    -Εκδοση Asterisk. - -
    -
    -
    -Μέγιστος ΑÏιθμός Trunk του VICIDIAL - Αυτό το πεδίο θα Ï€ÏοσδιοÏίσει τον μέγιστο αÏιθμό γÏαμμών, τις οποίες θα χÏησιμοποιήσει η διεÏγασία αυτόματης κλήσης. Εάν θέλετε να αφιεÏώσετε δÏο PRI σε ένα διακομιστή τότε θα Ï€Ïέπει να το οÏίσετε σε 46. Το Ï€ÏοκαθοÏισμένο είναι 96. - -
    -
    -
    -Telnet Πελάτης - Αυτή είναι η δνση ή το όνομα του διακομιστή Asterisk και το πώς οι εφαÏμογές διαχείÏισης συνδέονται σε αυτόν, όπου Ï„Ïέχουν. Το Ï€ÏοκαθοÏισμένο είναι 'localhost'. - -
    -
    -
    -ΠόÏτα Telnet - Αυτή είναι η πόÏτα της σÏνδεσης με τον διαχειÏιστή του διακομιστή Asterisk και το πώς οι εφαÏμογές διαχείÏισης συνδέονται σε αυτόν, όπου Ï„Ïέχουν. Το Ï€ÏοκαθοÏισμένο είναι '5038'. - -
    -
    -
    - ΔιαχειÏιστής ΧÏήστης - Το όνομα χÏήστη που χÏησιμοποιείτε γενικά για τον διαχειÏιστή του διακομιστή Asterisk. Το Ï€ÏοκαθοÏισμένο είναι 'cron' - -
    -
    -
    -Μυστικό ΔιαχειÏιστή - Το μυστικό ή κωδικός που χÏησιμοποιείτε γενικά για τον διαχειÏιστή του διακομιστή Asterisk. Το Ï€ÏοκαθοÏισμένο είναι '1111' - -
    -
    -
    -ΕνημέÏωση ΧÏήστη ΔιαχειÏιστή - Το όνομα χÏήστη που χÏησιμοποιείτε για σÏνδεση στον διακομιστή Asterisk, βελτιστοποιημένο για διεÏγασίες ενημέÏωσης. Το Ï€ÏοκαθοÏισμένο είναι 'updatecron'. - -
    -
    -
    -Ακουσμα ΧÏήστη ΔιαχειÏιστή- Το όνομα χÏήστη που χÏησιμοποιείτε για σÏνδεση στον διακομιστή Asterisk, βελτιστοποιημένο για διεÏγασίες που μόνο ακοÏν για έξοδο. Το Ï€ÏοκαθοÏισμένο είναι 'listencron'. - -
    -
    -
    -Αποστολή Διακομιστή ΔιαχειÏιστή- Το όνομα χÏήστη που χÏησιμοποιείτε για σÏνδεση στον διακομιστή Asterisk, βελτιστοποιημένο για διεÏγασίες που μόνο στέλνουν ΕνέÏγειες στον διαχειÏιστή.Το Ï€ÏοκαθοÏισμένο είναι 'sendcron'. - -
    -
    -
    -GMT offset Διακομιστής - Η διαφοÏά σε ÏŽÏες από την GMT ÏŽÏα που δεν έχει Ïυθμιστεί με Daylight-Savings-Time. Το Ï€ÏοκαθοÏισμένο είναι '-5' - -
    -
    -
    -Εσωτ.σÏνδεση απόÏÏιψης VMail - Το Ï€Ïόθεμα εσωτ.σÏνδεσης που χÏησιμοποιείται στον διακομιστή για να στείλει τις κλήσεις κατευθείαν μέσω agc σε ένα συγκεκÏιμένο φωνητικό ταχυδÏομείο. Το Ï€ÏοκαθοÏισμένο είναι '85026666666666' - -
    -
    -
    -VICIDIAL AD εσωτ.σÏνδεση - Η Ï€ÏοκαθοÏισμένη εσωτ.σÏνδεση εάν δεν έχει οÏιστεί στην εκστÏατεία για να στείλει τις κλήσεις στην διεÏγασία αυτόματης κλήσης. Η Ï€ÏοκαθοÏισμένη είναι '8365' - -
    -
    -
    -ΠÏοκαθοÏισμένο ΠεÏιεχόμενο - Το Ï€ÏοκαθοÏισμένο πεÏιεχόμενο του πλάνου κλήσεων για διεÏγασίες του διακομιστή. Το Ï€ÏοκαθοÏισμένο είναι 'Ï€ÏοκαθοÏισμένο' - - -



    - -ΠΙÎΑΚΑΣ ΣΥÎΔΙΑΛΕΞΕΩÎ

    -
    -
    -ΑÏιθμός Συνδιάλεξης - Αυτό το πεδίο είναι για τον αÏιθμό συνδιάλεξης meetme στο σχέδιο κλήσεων. Επίσης, συνιστοÏμε ο αÏιθμός meetme στο meetme.conf να ταιÏιάζει με αυτό τον αÏιθμό για κάθε καταχώÏηση. Αυτό είναι για τις συνδιαλέξε στο astGUIclient και χÏησιμοποιείται για την λειτουÏγία αποχώÏησης από κλήση με 3 γÏαμμές στο VICIDIAL. - -
    -
    -
    -IP Διακομιστή- Ο κατάλογος που επιλέξατε τον διακομιστή ASTERISK όπου η συνδιάλεξη θα είναι. - - - - - - -







    -







    -ΤΕΛΟΣ -
    - - - -ΣΥΣΤΗΜΑ ΚΛΗΣΕΩÎ: ΔιαχείÏιση - <? echo $process ?> - - - -
    - - - - - - -
      ASTERISK ADMIN - ΑποσÏνδεση  
      ΛΙΣΤΑ ΤΗΛΕΦΩÎΩΠ| ΠΡΟΣΘΗΚΗ ΤΗΛΕΦΩÎΟΥ | ΑÎΑΖΗΤΗΣΗ ΤΗΛΕΦΩÎΟΥ | ΠΡΟΣΘΗΚΗ ΔΙΑΚΟΜΙΣΤΗ | ΛΙΣΤΑ ΔΙΑΚΟΜΙΣΤΩÎ
      ΕΜΦΑÎΙΣΗ ΣΥÎΔΙΑΛΕΞΕΩΠ| ΠΡΟΣΘΗΚΗ ΣΥÎΔΙΑΛΕΞΗΣ
    -"; - -echo "
    ΠΡΟΣΘΗΚΗ ΤΗΛΕΦΩÎΟΥ
    \n"; -echo "\n"; -echo "
    \n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Τηλ.σÏνδεσης τηλεφώνου: $NWB#phones-extension$NWE
    ΑÏιθμός Σχεδίου Κλήσεων: (μόνο αÏιθμοί)$NWB#phones-dialplan_number$NWE
    ΠεÏιεχόμενο Î¦Ï‰Î½Î·Ï„Î¹ÎºÎ¿Ï Î¤Î±Ï‡Ï…Î´Ïομείου: (μόνο αÏιθμοί)$NWB#phones-voicemail_id$NWE
    ΕξεÏχόμενο CallerID: (μόνο αÏιθμοί)$NWB#phones-outbound_cid$NWE
    Δνση IP Τηλεφώνου: (optional)$NWB#phones-phone_ip$NWE
    Δνση IP Υπολογιστή: (optional)$NWB#phones-computer_ip$NWE
    IP Διακομιστή: $NWB#phones-server_ip$NWE
    ΣÏνδεση:$NWB#phones-login$NWE
    Κωδικός:$NWB#phones-pass$NWE
    Κατάσταση:$NWB#phones-status$NWE
    ΕνεÏγός ΛογαÏιασμός: $NWB#phones-active$NWE
    ΤÏπος τηλεφώνου: $NWB#phones-phone_type$NWE
    ΠλήÏες Ονομα: $NWB#phones-fullname$NWE
    ΕταιÏία:$NWB#phones-company$NWE
    Εικόνα:$NWB#phones-picture$NWE
    ΠÏοτόκολο Πελάτη: $NWB#phones-protocol$NWE
    Τοπικό GMT: (Μην Ïυθμίσεις για DST)$NWB#phones-local_gmt$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW SERVERS FORM SCREEN -###################### - -if ($ADD==11) -{ -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ΔΙΑΚΟΜΙΣΤΗ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Διακομιστή: $NWB#servers-server_id$NWE
    ΠεÏιγÏαφή Διακομιστή: $NWB#servers-server_description$NWE
    Δνση IP Διακομιστή: $NWB#servers-server_ip$NWE
    ΕνεÏγή:$NWB#servers-active$NWE
    Εκδοση Asterisk: $NWB#servers-asterisk_version$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW CONFERENCES FORM SCREEN -###################### - -if ($ADD==111) -{ -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ΣΥÎΔΙΑΛΕΞΗΣ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ΑÏιθμός Συνδιάλεξης: (μόνο αÏιθμοί)$NWB#conferences-conf_exten$NWE
    IP Διακομιστή: $NWB#conferences-server_ip$NWE
    \n"; - -} - - -###################### -# ADD=2 adds the new phone to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ΤΟ ΤΗΛΕΦΩÎΟ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη ένα τηλέφωνο με αυτή την εσωτ.σÏνδεση/διακομιστή\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    ΤΟ ΤΗΛΕΦΩÎΟ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n";} - else - { - echo "
    ΤΟ ΤΗΛΕΦΩÎΟ ΠΡΟΣΤΕΘΗΚΕ\n"; - - $stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new server to the system -###################### - -if ($ADD==21) -{ - echo ""; - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Ο ΔΙΑΚΟΜΙΣΤΗΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη ένας διακομιστής με αυτό το ID\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    Ο ΔΙΑΚΟΜΙΣΤΗΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n";} - else - { - echo "
    Ο ΔΙΑΚΟΜΙΣΤΗΣ ΠΡΟΣΤΕΘΗΚΕ\n"; - - $stmt="INSERT INTO servers (server_id,server_description,server_ip,active,asterisk_version) values('$server_id','$server_description','$server_ip','$active','$asterisk_version');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new conference to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Η ΣΥÎΔΙΑΛΕΞΗ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη μία συνδιάλεξη με αυτό το ID και διακομιστή\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    Η ΣΥÎΔΙΑΛΕΞΗ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n";} - else - { - echo "
    Η ΣΥÎΔΙΑΛΕΞΗ ΠΡΟΣΤΕΘΗΚΕ\n"; - - $stmt="INSERT INTO conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=100; -} - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of phone -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGdelete_phones < 1) ) - { - echo "
    ΤΟ ΤΗΛΕΦΩÎΟ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    IP Διακομιστή be at least 7 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΤΗΛΕΦΩÎΟΥ: $extension - $server_ip\n"; - echo "

    Χτυπήστε εδώ για να διαγÏάψετε το τηλέφωνο $extension - $server_ip


    \n"; - } - -$ADD='3'; # go to phone modification below -} - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete phone record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGdelete_phones < 1) ) - { - echo "
    ΤΟ ΤΗΛΕΦΩÎΟ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    IP Διακομιστή be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from phones where extension='$extension' and server_ip='$server_ip' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING PHONE!!!|$PHP_AUTH_USER|$ip|extension='$extension'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
    Η ΔΙΑΓΡΑΦΗ ΤΟΥ ΤΗΛΕΦΩÎΟΥ ΟΛΟΚΛΗΡΩΘΗΚΕ: $extension - $server_ip\n"; - echo "

    \n"; - } - -$ADD='0'; # go to phone list -} - - - - - - -###################### -# ADD=3 modify phone info in the system -###################### - -if ($ADD==3) -{ - echo ""; - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΤΗΛΕΦΩÎΟΥ: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Τηλ.σÏνδεσης τηλεφώνου: $NWB#phones-extension$NWE
    ΑÏιθμός Σχεδίου Κλήσεων: (μόνο αÏιθμοί)$NWB#phones-dialplan_number$NWE
    ΠεÏιεχόμενο Î¦Ï‰Î½Î·Ï„Î¹ÎºÎ¿Ï Î¤Î±Ï‡Ï…Î´Ïομείου: (μόνο αÏιθμοί)$NWB#phones-voicemail_id$NWE
    ΕξεÏχόμενο CallerID: (μόνο αÏιθμοί)$NWB#phones-outbound_cid$NWE
    Δνση IP Τηλεφώνου: (optional)$NWB#phones-phone_ip$NWE
    Δνση IP Υπολογιστή: (optional)$NWB#phones-computer_ip$NWE
    IP Διακομιστή: $NWB#phones-server_ip$NWE
    ΣÏνδεση:$NWB#phones-login$NWE
    Κωδικός:$NWB#phones-pass$NWE
    Κατάσταση:$NWB#phones-status$NWE
    ΕνεÏγός ΛογαÏιασμός: $NWB#phones-active$NWE
    ΤÏπος τηλεφώνου: $NWB#phones-phone_type$NWE
    ΠλήÏες Ονομα: $NWB#phones-fullname$NWE
    ΕταιÏία:$NWB#phones-company$NWE
    Εικόνα:$NWB#phones-picture$NWE
    Îέα ΜηνÏματα: $row[14]$NWB#phones-messages$NWE
    Παλαιά ΜηνÏματα: $row[15]$NWB#phones-old_messages$NWE
    ΠÏοτόκολο Πελάτη: $NWB#phones-protocol$NWE
    Τοπικό GMT: (Μην Ïυθμίσεις για DST)$NWB#phones-local_gmt$NWE
    ΔιαχειÏιστή ΣÏνδεση: $NWB#phones-ASTmgrUSERNAME$NWE
    Κωδικός ΔιαχειÏιστή: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL ΠÏοκαθοÏισμένος ΧÏήστης: $NWB#phones-login_user$NWE
    VICIDIAL ΠÏοκαθοÏισμένος Κωδικός: $NWB#phones-login_pass$NWE
    VICIDIAL ΠÏοκαθοÏισμένη εκστÏατεία: $NWB#phones-login_campaign$NWE
    Τηλ.σÏνδ. Στάθμευσης: $NWB#phones-park_on_extension$NWE
    Τηλ.σÏνδ. Συνδ.: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Τηλ.σÏνδ. Στάθμευσης: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL ΑÏχείο Στάθμευσης: $NWB#phones-VICIDIAL_park_on_filename$NWE
    ΠÏόθεμα ΠαÏακολοÏθησης: $NWB#phones-monitor_prefix$NWE
    ΗχογÏάφηση εσωτ.σÏνδ.: $NWB#phones-recording_exten$NWE
    VMailMain Τηλ.σÏνδ.: $NWB#phones-voicemail_exten$NWE
    VMailDump Τηλ.σÏνδ.: $NWB#phones-voicemail_dump_exten$NWE
    ΠεÏιεχόμενο Τηλ.σÏνδ: $NWB#phones-ext_context$NWE
    DTMFSend Κανάλι: $NWB#phones-dtmf_send_extension$NWE
    Ομάδα ΕξεÏχομένων Κλήσεων: $NWB#phones-call_out_number_group$NWE
    Θέση ΦυλλομετÏητή: $NWB#phones-client_browser$NWE
    Κατάλογος εγκατάστασης: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL ΠÏοκαθοÏισμένο URL: $NWB#phones-VICIDIAL_web_URL$NWE
    ΚαταγÏαφή Γεγονότος Κλήσης: $NWB#phones-AGI_call_logging_enabled$NWE
    Μεταγωγή ΧÏήστη: $NWB#phones-user_switching_enabled$NWE
    Σε συνδιαλέξη: $NWB#phones-conferencing_enabled$NWE
    ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï ÎšÎ»ÎµÎ¯ÏƒÎ¹Î¼Î¿: $NWB#phones-admin_hangup_enabled$NWE
    ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï ÎšÎ»Î­ÏˆÎ¹Î¼Î¿: $NWB#phones-admin_hijack_enabled$NWE
    ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï Î Î±ÏακολοÏθηση: $NWB#phones-admin_monitor_enabled$NWE
    Στάθμευση Κλήσης: $NWB#phones-call_parking_enabled$NWE
    Ελεγχος ενημεÏωτή: $NWB#phones-updater_check_enabled$NWE
    AF ΚαταγÏαφή Γεγονότος: $NWB#phones-AFLogging_enabled$NWE
    ΕνεÏγή ΟυÏά: $NWB#phones-QUEUE_ACTION_enabled$NWE
    ΥπεÏεμφανιζόμενο παÏαθÏÏο CallerID: $NWB#phones-CallerID_popup_enabled$NWE
    ΠλήκτÏο VMail: $NWB#phones-voicemail_button_enabled$NWE
    ΤαχÏτητα Ανανέωσης: $NWB#phones-enable_fast_refresh$NWE
    Ρυθμός Ανανέωσης ΤαχÏτητας: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Συνεχής MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Αυτόματη Κλήση Επόμενου ΑÏιθμοÏ: $NWB#phones-auto_dial_next_number$NWE
    Σταμάτα την ηχογÏάφηση μετά από κάθε κλήση: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Διακομιστής: (ΠÏωταÏχικό DB Server)$NWB#phones-DBX_server$NWE
    DBX Βάση Δεδομένων: (ΠÏωταÏχικό Server Database)$NWB#phones-DBX_database$NWE
    DBX ΧÏήστης: (ΠÏωταÏχικό DB Login)$NWB#phones-DBX_user$NWE
    DBX Κωδικός: (ΠÏωταÏχικό DB Secret)$NWB#phones-DBX_pass$NWE
    DBX ΠόÏτα: (ΠÏωταÏχικό DB Port)$NWB#phones-DBX_port$NWE
    DBY Διακομιστής: (ΔευτεÏεÏονDB Server)$NWB#phones-DBY_server$NWE
    DBY Βάση Δεδομένων: (ΔευτεÏεÏονServer Database)$NWB#phones-DBY_database$NWE
    DBY ΧÏήστης: (ΔευτεÏεÏονDB Login)$NWB#phones-DBY_user$NWE
    DBY Κωδικός: (ΔευτεÏεÏονDB Secret)$NWB#phones-DBY_pass$NWE
    DBY ΠόÏτα: (ΔευτεÏεÏονDB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Επιλέξτε εδώ για στατιστικά τηλεφώνου\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΟ ΤΟ ΤΗΛΕΦΩÎΟ\n"; - } - -} - - -###################### -# ADD=31 modify server info in the system -###################### - -if ($ADD==31) -{ - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΔΙΑΚΟΜΙΣΤΗ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Διακομιστή: $NWB#servers-server_id$NWE
    ΠεÏιγÏαφή Διακομιστή: $NWB#servers-server_description$NWE
    Δνση IP Διακομιστή: $NWB#servers-server_ip$NWE
    ΕνεÏγή:$NWB#servers-active$NWE
    Εκδοση Asterisk: $NWB#servers-asterisk_version$NWE
    Μέγιστος ΑÏιθμός Trunk: $NWB#servers-max_vicidial_trunks$NWE
    Λήπτης Telnet: $NWB#servers-telnet_host$NWE
    ΠόÏτα Telnet: $NWB#servers-telnet_port$NWE
    ΧÏήστη ΔιαχειÏιστή: $NWB#servers-ASTmgrUSERNAME$NWE
    Κωδικός ΔιαχειÏιστή: $NWB#servers-ASTmgrSECRET$NWE
    ΕνημέÏωση ΧÏήστη ΔιαχειÏιστή: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    ΠαÏακολοÏθηση ΧÏήστη ΔιαχειÏιστή: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Αποστολή ΧÏήστη ΔιαχειÏιστή: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Τοπικό GMT: (Μην Ïυθμίσεις για DST)$NWB#servers-local_gmt$NWE
    VMail εσωτ.σÏνδεση απόÏÏιψης: $NWB#servers-voicemail_dump_exten$NWE
    AD εσωτ.σÏνδεση: $NWB#servers-answer_transfer_agent$NWE
    ΠÏοκαθοÏισμένο ΠεÏιεχόμενο: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    ΤΗΛΕΦΩÎΑ ΣΤΟΠΔΙΑΚΟΜΙΣΤΗ:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ΤΗΛ.ΣΥÎΔΕΣΗΟÎΟΜΑΕÎΕΡΓΑ
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Αυτός ο διακομιστής έχει $active_lists ενεÏγά τηλέφωνα και $inactive_lists μη ενεÏγά τηλέφωνα

    \n"; -echo "
    \n"; -} - - -###################### -# ADD=311 modify conference info in the system -###################### - -if ($ADD==311) -{ - echo ""; - - $stmt="SELECT * from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΣΥÎΔΙΑΛΕΞΗΣ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Συνδιαλέξη:$NWB#conferences-conf_exten$NWE
    IP Διακομιστή: $NWB#conferences-server_ip$NWE
    ΙσχÏουσα εσωτ.σÏνδεση:
    \n"; - -echo "
    \n"; - -} - - - -###################### -# ADD=4 submit phone modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) - {echo "
    ΤΟ ΤΗΛΕΦΩÎΟ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - υπάÏχει ήδη ένα τηλέφωνο με αυτή την εσωτ.σÏνδεση/διακομιστή\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    ΤΟ ΤΗΛΕΦΩÎΟ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n";} - else - { - echo "
    ΤΟ ΤΗΛΕΦΩÎΟ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $extension\n"; - - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid' where extension='$old_extension' and server_ip='$old_server_ip';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΤΗΛΕΦΩÎΟΥ: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Τηλ.σÏνδεσης τηλεφώνου: $NWB#phones-extension$NWE
    ΑÏιθμός Σχεδίου Κλήσεων: (μόνο αÏιθμοί)$NWB#phones-dialplan_number$NWE
    ΠεÏιεχόμενο Î¦Ï‰Î½Î·Ï„Î¹ÎºÎ¿Ï Î¤Î±Ï‡Ï…Î´Ïομείου: (μόνο αÏιθμοί)$NWB#phones-voicemail_id$NWE
    ΕξεÏχόμενο CallerID: (μόνο αÏιθμοί)$NWB#phones-outbound_cid$NWE
    Δνση IP Τηλεφώνου: (optional)$NWB#phones-phone_ip$NWE
    Δνση IP Υπολογιστή: (optional)$NWB#phones-computer_ip$NWE
    IP Διακομιστή: $NWB#phones-server_ip$NWE
    ΣÏνδεση:$NWB#phones-login$NWE
    Κωδικός:$NWB#phones-pass$NWE
    Κατάσταση:$NWB#phones-status$NWE
    ΕνεÏγός ΛογαÏιασμός: $NWB#phones-active$NWE
    ΤÏπος τηλεφώνου: $NWB#phones-phone_type$NWE
    ΠλήÏες Ονομα: $NWB#phones-fullname$NWE
    ΕταιÏία:$NWB#phones-company$NWE
    Εικόνα:$NWB#phones-picture$NWE
    Îέα ΜηνÏματα: $row[14]$NWB#phones-messages$NWE
    Παλαιά ΜηνÏματα: $row[15]$NWB#phones-old_messages$NWE
    ΠÏοτόκολο Πελάτη: $NWB#phones-protocol$NWE
    Τοπικό GMT: (Μην Ïυθμίσεις για DST)$NWB#phones-local_gmt$NWE
    ΔιαχειÏιστή ΣÏνδεση: $NWB#phones-ASTmgrUSERNAME$NWE
    Κωδικός ΔιαχειÏιστή: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL ΠÏοκαθοÏισμένος ΧÏήστης: $NWB#phones-login_user$NWE
    VICIDIAL ΠÏοκαθοÏισμένος Κωδικός: $NWB#phones-login_pass$NWE
    VICIDIAL ΠÏοκαθοÏισμένη εκστÏατεία: $NWB#phones-login_campaign$NWE
    Τηλ.σÏνδ. Στάθμευσης: $NWB#phones-park_on_extension$NWE
    Τηλ.σÏνδ. Συνδ.: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Τηλ.σÏνδ. Στάθμευσης: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL ΑÏχείο Στάθμευσης: $NWB#phones-VICIDIAL_park_on_filename$NWE
    ΠÏόθεμα ΠαÏακολοÏθησης: $NWB#phones-monitor_prefix$NWE
    ΗχογÏάφηση εσωτ.σÏνδ.: $NWB#phones-recording_exten$NWE
    VMailMain Τηλ.σÏνδ.: $NWB#phones-voicemail_exten$NWE
    VMailDump Τηλ.σÏνδ.: $NWB#phones-voicemail_dump_exten$NWE
    ΠεÏιεχόμενο Τηλ.σÏνδ: $NWB#phones-ext_context$NWE
    DTMFSend Κανάλι: $NWB#phones-dtmf_send_extension$NWE
    Ομάδα ΕξεÏχομένων Κλήσεων: $NWB#phones-call_out_number_group$NWE
    Θέση ΦυλλομετÏητή: $NWB#phones-client_browser$NWE
    Κατάλογος εγκατάστασης: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL ΠÏοκαθοÏισμένο URL: $NWB#phones-VICIDIAL_web_URL$NWE
    ΚαταγÏαφή Γεγονότος Κλήσης: $NWB#phones-AGI_call_logging_enabled$NWE
    Μεταγωγή ΧÏήστη: $NWB#phones-user_switching_enabled$NWE
    Σε συνδιαλέξη: $NWB#phones-conferencing_enabled$NWE
    ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï ÎšÎ»ÎµÎ¯ÏƒÎ¹Î¼Î¿: $NWB#phones-admin_hangup_enabled$NWE
    ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï ÎšÎ»Î­ÏˆÎ¹Î¼Î¿: $NWB#phones-admin_hijack_enabled$NWE
    ΔιαχειÏÎ¹ÏƒÏ„Î¿Ï Î Î±ÏακολοÏθηση: $NWB#phones-admin_monitor_enabled$NWE
    Στάθμευση Κλήσης: $NWB#phones-call_parking_enabled$NWE
    Ελεγχος ενημεÏωτή: $NWB#phones-updater_check_enabled$NWE
    AF ΚαταγÏαφή Γεγονότος: $NWB#phones-AFLogging_enabled$NWE
    ΕνεÏγή ΟυÏά: $NWB#phones-QUEUE_ACTION_enabled$NWE
    ΥπεÏεμφανιζόμενο παÏαθÏÏο CallerID: $NWB#phones-CallerID_popup_enabled$NWE
    ΠλήκτÏο VMail: $NWB#phones-voicemail_button_enabled$NWE
    ΤαχÏτητα Ανανέωσης: $NWB#phones-enable_fast_refresh$NWE
    Ρυθμός Ανανέωσης ΤαχÏτητας: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Συνεχής MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Αυτόματη Κλήση Επόμενου ΑÏιθμοÏ: $NWB#phones-auto_dial_next_number$NWE
    Σταμάτα την ηχογÏάφηση μετά από κάθε κλήση: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Διακομιστής: (ΠÏωταÏχικό DB Server)$NWB#phones-DBX_server$NWE
    DBX Βάση Δεδομένων: (ΠÏωταÏχικό Server Database)$NWB#phones-DBX_database$NWE
    DBX ΧÏήστης: (ΠÏωταÏχικό DB Login)$NWB#phones-DBX_user$NWE
    DBX Κωδικός: (ΠÏωταÏχικό DB Secret)$NWB#phones-DBX_pass$NWE
    DBX ΠόÏτα: (ΠÏωταÏχικό DB Port)$NWB#phones-DBX_port$NWE
    DBY Διακομιστής: (ΔευτεÏεÏονDB Server)$NWB#phones-DBY_server$NWE
    DBY Βάση Δεδομένων: (ΔευτεÏεÏονServer Database)$NWB#phones-DBY_database$NWE
    DBY ΧÏήστης: (ΔευτεÏεÏονDB Login)$NWB#phones-DBY_user$NWE
    DBY Κωδικός: (ΔευτεÏεÏονDB Secret)$NWB#phones-DBY_pass$NWE
    DBY ΠόÏτα: (ΔευτεÏεÏονDB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Επιλέξτε εδώ για στατιστικά τηλεφώνου\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΟ ΤΟ ΤΗΛΕΦΩÎΟ\n"; - } - -} - -###################### -# ADD=41 submit server modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_id != $old_server_id) ) - {echo "
    ΔΙΑΚΟΜΙΣΤΗΣ NOT MODIFIED - there is already a server in the system with this server_id\n";} - else - { - $stmt="SELECT count(*) from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_ip != $old_server_ip) ) - {echo "
    Ο ΔΙΑΚΟΜΙΣΤΗΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - υπάÏχει ήδη ένας διακομιστής με αυτό το IP\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    Ο ΔΙΑΚΟΜΙΣΤΗΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n";} - else - { - echo "
    Ο ΔΙΑΚΟΜΙΣΤΗΣ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $server_ip\n"; - - $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΔΙΑΚΟΜΙΣΤΗ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Διακομιστή: $NWB#servers-server_id$NWE
    ΠεÏιγÏαφή Διακομιστή: $NWB#servers-server_description$NWE
    Δνση IP Διακομιστή: $NWB#servers-server_ip$NWE
    ΕνεÏγή:$NWB#servers-active$NWE
    Εκδοση Asterisk: $NWB#servers-asterisk_version$NWE
    Μέγιστος ΑÏιθμός Trunk: $NWB#servers-max_vicidial_trunks$NWE
    Λήπτης Telnet: $NWB#servers-telnet_host$NWE
    ΠόÏτα Telnet: $NWB#servers-telnet_port$NWE
    ΧÏήστη ΔιαχειÏιστή: $NWB#servers-ASTmgrUSERNAME$NWE
    Κωδικός ΔιαχειÏιστή: $NWB#servers-ASTmgrSECRET$NWE
    ΕνημέÏωση ΧÏήστη ΔιαχειÏιστή: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    ΠαÏακολοÏθηση ΧÏήστη ΔιαχειÏιστή: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Αποστολή ΧÏήστη ΔιαχειÏιστή: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Τοπικό GMT: (Μην Ïυθμίσεις για DST)$NWB#servers-local_gmt$NWE
    VMail εσωτ.σÏνδεση απόÏÏιψης: $NWB#servers-voicemail_dump_exten$NWE
    AD εσωτ.σÏνδεση: $NWB#servers-answer_transfer_agent$NWE
    ΠÏοκαθοÏισμένο ΠεÏιεχόμενο: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    ΤΗΛΕΦΩÎΑ ΣΤΟΠΔΙΑΚΟΜΙΣΤΗ:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ΤΗΛ.ΣΥÎΔΕΣΗΟÎΟΜΑΕÎΕΡΓΑ
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Αυτός ο διακομιστής έχει $active_lists ενεÏγά τηλέφωνα και $inactive_lists μη ενεÏγά τηλέφωνα

    \n"; -echo "
    \n"; - -} - -###################### -# ADD=411 submit conference modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) - {echo "
    Η ΣΥÎΔΙΑΛΕΞΗ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - υπάÏχει ήδη μία συνδιάλεξη με αυτή την εσωτ.σÏνδεση-διακομιστή\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    Η ΣΥÎΔΙΑΛΕΞΗ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n";} - else - { - echo "
    Η ΣΥÎΔΙΑΛΕΞΗ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $conf_exten\n"; - - $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from conferences where conf_exten='$conf_exten';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΣΥÎΔΙΑΛΕΞΗΣ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Συνδιαλέξη:$NWB#conferences-conf_exten$NWE
    IP Διακομιστή: $NWB#conferences-server_ip$NWE
    ΙσχÏουσα εσωτ.σÏνδεση:
    \n"; - -echo "
    \n"; - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo ""; - -echo "
    ΑÎΑΖΗΤΗΣΗ ΤΗΛΕΦΩÎΟΥ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Εσωτ.σÏνδεση:
    ΠλήÏες Ονομα:
    Phone type:
    \n"; - -} - -###################### -# ADD=66 phone search results -###################### - -if ($ADD==66) -{ - echo ""; - - $SQL = ''; - if ($extension) {$SQL .= "extension LIKE \"%$extension%\" and";} - if ($fullname) {$SQL .= "fullname LIKE \"%$fullname%\" and";} - if ($phone_type) {$SQL .= "phone_type LIKE \"%$phone_type%\" and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from phones $SQL order by extension,server_ip;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    ΑÎΑΖΗΤΗΣΗ ΑΠΟΤΕΛΕΣΜΑΤΩÎ:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]ΤΡΟΠΟΠΟΙΗΣΗ | ΣΤΑΤΙΣΤΙΚΑ
    \n"; - -} - - - -###################### -# ADD=0 display all active phones -###################### -if ($ADD==0) -{ - echo ""; - - $stmt="SELECT * from phones order by extension,server_ip"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    ΕÎΤΑΓΜΕÎΑ ΤΗΛΕΦΩÎΑ:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]ΤΡΟΠΟΠΟΙΗΣΗ | ΣΤΑΤΙΣΤΙΚΑ
    \n"; -} - -###################### -# ADD=10 display all servers -###################### -if ($ADD==10) -{ - echo ""; - - $stmt="SELECT * from servers order by server_id"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    ΕÎΤΑΓΜΕÎΟΙ ΔΙΑΚΟΜΙΣΤΕΣ:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[1] $row[2] $row[4] $row[3]  Î¤Î¡ÎŸÎ ÎŸÎ ÎŸÎ™Î—ΣΗ
    \n"; -} - - -###################### -# ADD=100 display all conferences -###################### -if ($ADD==100) -{ - echo ""; - - $stmt="SELECT * from conferences order by conf_exten"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    ΕÎΤΑΓΜΕÎΕΣ ΣΥÎΔΙΑΛΕΞΕΙΣ:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]  Î¤Î¡ÎŸÎ ÎŸÎ ÎŸÎ™Î—ΣΗ
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds"; -echo "             ΕΚΔΟΣΗ: $version"; -echo "             ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_el/dbconnect.php b/agc_2-X/trunk/LANG_admin/astguiclient_el/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_el/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_el/help.gif b/agc_2-X/trunk/LANG_admin/astguiclient_el/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_el/inbound_popup.php b/agc_2-X/trunk/LANG_admin/astguiclient_el/inbound_popup.php deleted file mode 100644 index 5c34ba2c..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_el/inbound_popup.php +++ /dev/null @@ -1,228 +0,0 @@ - LICENSE: GPLv2 -### -# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system. -# -# changes: -# 60620-1329 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK ΑΠΟΜΑΚΡΥΣΜΕÎΟ ΕΙΣΕΡΧΟΜΕÎΟ: ΥπεÏεμφανιζόμενο ΠαÏαθÏÏο - - -
    - - 0) -{ - - $stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='" . mysql_real_escape_string($parked_time) . "' and channel='" . mysql_real_escape_string($channel) . "' LIMIT 1"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: " . mysql_real_escape_string($channel) . "','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Η εντολή ανακατεÏθυνσης στάλθηκε για το κανάλι $channel       $NOW_TIME\n

    \n"; - - - $url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&'; - $Suser = 'username='; - $Spass = '&passwd='; - $Sphone = '&phone='; - - $newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone"; - if ( ($phone == 'unknown') or (strlen($phone)<9) ) - {$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";} - - echo "Αναζήτηση του Πελάτη στο ΣÏστημα ΕξυπηÏέτησης Πελατών\n

    \n"; - - echo "Κλείσε αυτό το παÏάθυÏο\n

    \n"; -} -else -{ - echo "Η εντολή ανακατεÏθυνσης ΑΠΕΤΥΧΕ για το κανάλι $channel       $NOW_TIME\n

    \n"; - echo "Κλείσε αυτό το παÏάθυÏο\n

    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_el/phone_stats.php b/agc_2-X/trunk/LANG_admin/astguiclient_el/phone_stats.php deleted file mode 100644 index 133ce3cd..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_el/phone_stats.php +++ /dev/null @@ -1,244 +0,0 @@ - LICENSE: GPLv2 -# -# -# changes: -# 60620-1333 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$admin_page = './admin.php'; - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $row[0]; - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK ADMIN: Στατιστικά Τηλεφώνου - - -
    -
    - - - - - - -\n"; -echo "
      ΣΥΣΤΗΜΑ ΚΛΗΣΕΩÎ: ΔιαχείÏιση  
      ΛΙΣΤΑ ΤΗΛΕΦΩÎΩΠ| ΠΡΟΣΘΗΚΗ ΤΗΛΕΦΩÎΟΥ | ΑÎΑΖΗΤΗΣΗ ΤΗΛΕΦΩÎΟΥ | ΠΡΟΣΘΗΚΗ ΔΙΑΚΟΜΙΣΤΗ | ΛΙΣΤΑ ΔΙΑΚΟΜΙΣΤΩÎ
      ΕΜΦΑÎΙΣΗ ΣΥÎΔΙΑΛΕΞΕΩΠ| ΠΡΟΣΘΗΚΗ ΣΥÎΔΙΑΛΕΞΗΣ
      \n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - -echo "
    \n"; - -echo "ΧΡΟÎΟΣ ΟΜΙΛΙΑΣ ΚΑΙ ΚΑÎΑΛΙΑ:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} -# echo "|$stmt|\n"; - -echo "\n"; -echo "
    ΚΑÎΑΛΙ ΟΜΑΔΑΣ ΚΑΤΑΜΕΤΡΗΣΗ ΩΡΕΣ:ΛΕΠΤΑ
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    ΣΥÎΟΛΙΚΕΣ ΚΛΗΣΕΙΣ $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "ΤΕΛΕΥΤΑΙΕΣ 1000 ΚΛΗΣΕΙΣ ΓΙΑ ΤΟ ΔΙΑΣΤΗΜΑ ΗΜΕΡΟΜΗÎΙΑΣ:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - - - $call_seconds=0; - $o++; - } - - -echo "
    ΑΡΙΘΜΟΣ ΚΑÎΑΛΙ ΟΜΑΔΑΣ ΗΜΕΡΑ LENGTH(MIN.)
    $row[0] $row[1] $row[2] $row[3]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_el/remote_inbound.php b/agc_2-X/trunk/LANG_admin/astguiclient_el/remote_inbound.php deleted file mode 100644 index 4c44b1ad..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_el/remote_inbound.php +++ /dev/null @@ -1,162 +0,0 @@ - LICENSE: GPLv2 -### -# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available) - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - echo"\n"; - echo"ASTERISK ΑΠΟΜΑΚΡΥΣΜΕÎΟ ΕΙΣΕΡΧΟΜΕÎΟ: ΚÏÏιο\n"; - echo"\n"; - echo"\n"; - echo"\n"; - -?> - - -
    - -
    \n"; - -echo "Πατήστε στο κανάλι παÏακάτω, που θα επιθυμοÏσατε να έχετε κατευθÏνει στο τηλέφωνό σας

    \n"; - -echo "
    \n";
    -echo "CHANNEL    ΔΙΑΚΟΜΙΣΤΗΣ        CHANNEL_GROUP   EXTENSION    PARKED_BY            PARKED_TIME        \n";
    -echo "----------------------------------------------------------------------------------------------\n";
    -
    -
    -
    -
    -
    -$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		$channel =			sprintf("%-11s", $row[0]);
    -		$server =			sprintf("%-14s", $row[1]);
    -		$channel_group =	sprintf("%-16s", $row[2]);
    -		$extension =		sprintf("%-13s", $row[3]);
    -		$parked_by =		sprintf("%-21s", $row[4]);
    -		$parked_time =		sprintf("%-19s", $row[5]);
    -
    -		echo "$channel$server$channel_group$extension$parked_by$parked_time\n";
    -
    -		$i++;
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "*************************************** NO PARKED CALLS **************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	}
    -
    -
    -$ENDtime = date("U");
    -
    -$RUNtime = ($ENDtime - $STARTtime);
    -
    -echo "
    \n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_en/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_admin/astguiclient_en/AST_inboundEXTstats.php deleted file mode 100644 index 28c5b20d..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_en/AST_inboundEXTstats.php +++ /dev/null @@ -1,400 +0,0 @@ - LICENSE: GPLv2 -# -# CHANGES -# 60421-1450 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1322 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.11.20';} - -$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='" . mysql_real_escape_string($server_ip) . "';"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$inbound_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $inbound_to_print) - { - $row=mysql_fetch_row($rslt); - $inbound[$i] =$row[0]; - $fullnum[$i] =$row[1]; - $inbname[$i] =$row[2]; - $i++; - } -?> - - - - - -\n"; -#echo"\n"; -echo "ASTERISK: Inbound Calls Stats\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A NUMBER AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "ASTERISK: Inbound Calls Stats                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$extenSQL = "and extension='" . mysql_real_escape_string($group) . "'";
    -if (eregi("\*",$group))
    -	{$extenSQL = "and extension LIKE \"%$group\"";}
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls That came into this number:       $TOTALcalls\n";
    -echo "Average Call Length(seconds) for all Calls:   $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -if ($row[0])
    -	{
    -	$average_hold_seconds = ($row[1] / $row[0]);
    -	$average_hold_seconds = round($average_hold_seconds, 0);
    -	$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -	}
    -else {$DROPpercent=0;   $average_hold_seconds=0;}
    -echo "Total DROP Calls:   (less than 10 seconds)    $DROPcalls  $DROPpercent%\n";
    -echo "Average Call Length(seconds) for DROP Calls:  $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  CALLS STATS
    -
    -echo "\n";
    -echo "---------- CALL LISTINGS\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -echo "| CALLERID             | CALLERIDNAME         | LENGTH | DATE TIME           |\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -$stmt="select number_dialed,caller_code,length_in_sec,start_time from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$CID =			sprintf("%-20s", $row[0]);
    -	$CIDname =		sprintf("%-20s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$datetime =		sprintf("%-19s", $row[3]);
    -	$USERavgTALK =	$row[2];
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -if ($output == 'FULL')
    -	{
    -
    -	echo "\n";
    -	echo "---------- TIME STATS\n";
    -
    -	echo "\n";
    -
    -	$hi_hour_count=0;
    -	$last_full_record=0;
    -	$i=0;
    -	$h=0;
    -	while ($i <= 96)
    -		{
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -		$h++;
    -		}
    -
    -	$hour_multiplier = (100 / $hi_hour_count);
    -	#$hour_multiplier = round($hour_multiplier, 0);
    -
    -	echo "\n";
    -	echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS\n";
    -
    -	$k=1;
    -	$Mk=0;
    -	$call_scale = '0';
    -	while ($k <= 102) 
    -		{
    -		if ($Mk >= 5) 
    -			{
    -			$Mk=0;
    -			$scale_num=($k / $hour_multiplier);
    -			$scale_num = round($scale_num, 0);
    -			$LENscale_num = (strlen($scale_num));
    -			$k = ($k + $LENscale_num);
    -			$call_scale .= "$scale_num";
    -			}
    -		else
    -			{
    -			$call_scale .= " ";
    -			$k++;   $Mk++;
    -			}
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -	#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -	echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -	$ZZ = '00';
    -	$i=0;
    -	$h=4;
    -	$hour= -1;
    -	$no_lines_yet=1;
    -
    -	while ($i <= 96)
    -		{
    -		$char_counter=0;
    -		$time = '      ';
    -		if ($h >= 4) 
    -			{
    -			$hour++;
    -			$h=0;
    -			if ($hour < 10) {$hour = "0$hour";}
    -			$time = "+$hour$ZZ+";
    -			}
    -		if ($h == 1) {$time = "   15 ";}
    -		if ($h == 2) {$time = "   30 ";}
    -		if ($h == 3) {$time = "   45 ";}
    -		$Ghour_count = $hour_count[$i];
    -		if ($Ghour_count < 1) 
    -			{
    -			if ( ($no_lines_yet) or ($i > $last_full_record) )
    -				{
    -				$do_nothing=1;
    -				}
    -			else
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				echo "|$time|";
    -				$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -				echo "| $hour_count[$i] |\n";
    -				}
    -			}
    -		else
    -			{
    -			$no_lines_yet=0;
    -			$Xhour_count = ($Ghour_count * $hour_multiplier);
    -			$Yhour_count = (99 - $Xhour_count);
    -
    -			$Gdrop_count = $drop_count[$i];
    -			if ($Gdrop_count < 1) 
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "*X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -				echo "| 0     | $hour_count[$i] |\n";
    -
    -				}
    -			else
    -				{
    -				$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -			#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -				$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -				echo "D";   $char_counter++;
    -				$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -				echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -				}
    -			}
    -		
    -		
    -		$i++;
    -		$h++;
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -	}
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_en/admin.php b/agc_2-X/trunk/LANG_admin/astguiclient_en/admin.php deleted file mode 100644 index 654e9f12..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_en/admin.php +++ /dev/null @@ -1,1824 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI database administration -# -# CHANGES -# 50913-1118 - Added outbound_cid for web-client calls -# 50926-1356 - Modified to allow for language translation -# 50926-1613 - Added WeBRooTWritablE write controls -# 51128-1254 - Modified to allow PHP global vars off -# 51208-2120 - Added option to login with vicidial_user login if allowed -# 51213-1650 - Added option to delete phones if allowed by vicidial_users -# 60421-1430 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1137 - Fixed phone search bug -# 60620-1243 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '1.1.12'; -$build = '60620-1243'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} - elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} - elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} -if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} - elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} -if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} - elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} -if (isset($_GET["login"])) {$login=$_GET["login"];} - elseif (isset($_POST["login"])) {$login=$_POST["login"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} - elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} -if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} - elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} -if (isset($_GET["company"])) {$company=$_GET["company"];} - elseif (isset($_POST["company"])) {$company=$_POST["company"];} -if (isset($_GET["picture"])) {$picture=$_GET["picture"];} - elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} - elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} -if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} - elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} -if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} - elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} -if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} - elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} -if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} - elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} -if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} - elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} -if (isset($_GET["park_on_extension"])) {$park_on_extension=$_GET["park_on_extension"];} - elseif (isset($_POST["park_on_extension"])) {$park_on_extension=$_POST["park_on_extension"];} -if (isset($_GET["conf_on_extension"])) {$conf_on_extension=$_GET["conf_on_extension"];} - elseif (isset($_POST["conf_on_extension"])) {$conf_on_extension=$_POST["conf_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"];} - elseif (isset($_POST["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"];} - elseif (isset($_POST["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];} -if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} - elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} -if (isset($_GET["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} - elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} -if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} - elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["dtmf_send_extension"])) {$dtmf_send_extension=$_GET["dtmf_send_extension"];} - elseif (isset($_POST["dtmf_send_extension"])) {$dtmf_send_extension=$_POST["dtmf_send_extension"];} -if (isset($_GET["call_out_number_group"])) {$call_out_number_group=$_GET["call_out_number_group"];} - elseif (isset($_POST["call_out_number_group"])) {$call_out_number_group=$_POST["call_out_number_group"];} -if (isset($_GET["client_browser"])) {$client_browser=$_GET["client_browser"];} - elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} -if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} - elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} -if (isset($_GET["local_web_callerID_URL"])) {$local_web_callerID_URL=$_GET["local_web_callerID_URL"];} - elseif (isset($_POST["local_web_callerID_URL"])) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];} -if (isset($_GET["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"];} - elseif (isset($_POST["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];} -if (isset($_GET["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"];} - elseif (isset($_POST["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];} -if (isset($_GET["user_switching_enabled"])) {$user_switching_enabled=$_GET["user_switching_enabled"];} - elseif (isset($_POST["user_switching_enabled"])) {$user_switching_enabled=$_POST["user_switching_enabled"];} -if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} - elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} -if (isset($_GET["admin_hangup_enabled"])) {$admin_hangup_enabled=$_GET["admin_hangup_enabled"];} - elseif (isset($_POST["admin_hangup_enabled"])) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];} -if (isset($_GET["admin_hijack_enabled"])) {$admin_hijack_enabled=$_GET["admin_hijack_enabled"];} - elseif (isset($_POST["admin_hijack_enabled"])) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];} -if (isset($_GET["admin_monitor_enabled"])) {$admin_monitor_enabled=$_GET["admin_monitor_enabled"];} - elseif (isset($_POST["admin_monitor_enabled"])) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];} -if (isset($_GET["call_parking_enabled"])) {$call_parking_enabled=$_GET["call_parking_enabled"];} - elseif (isset($_POST["call_parking_enabled"])) {$call_parking_enabled=$_POST["call_parking_enabled"];} -if (isset($_GET["updater_check_enabled"])) {$updater_check_enabled=$_GET["updater_check_enabled"];} - elseif (isset($_POST["updater_check_enabled"])) {$updater_check_enabled=$_POST["updater_check_enabled"];} -if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} - elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} -if (isset($_GET["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"];} - elseif (isset($_POST["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];} -if (isset($_GET["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"];} - elseif (isset($_POST["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];} -if (isset($_GET["voicemail_button_enabled"])) {$voicemail_button_enabled=$_GET["voicemail_button_enabled"];} - elseif (isset($_POST["voicemail_button_enabled"])) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];} -if (isset($_GET["enable_fast_refresh"])) {$enable_fast_refresh=$_GET["enable_fast_refresh"];} - elseif (isset($_POST["enable_fast_refresh"])) {$enable_fast_refresh=$_POST["enable_fast_refresh"];} -if (isset($_GET["fast_refresh_rate"])) {$fast_refresh_rate=$_GET["fast_refresh_rate"];} - elseif (isset($_POST["fast_refresh_rate"])) {$fast_refresh_rate=$_POST["fast_refresh_rate"];} -if (isset($_GET["enable_persistant_mysql"])) {$enable_persistant_mysql=$_GET["enable_persistant_mysql"];} - elseif (isset($_POST["enable_persistant_mysql"])) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];} -if (isset($_GET["auto_dial_next_number"])) {$auto_dial_next_number=$_GET["auto_dial_next_number"];} - elseif (isset($_POST["auto_dial_next_number"])) {$auto_dial_next_number=$_POST["auto_dial_next_number"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} - elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} -if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} - elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} -if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} - elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} -if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];} - elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];} -if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];} - elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];} -if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} - elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} -if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} - elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} -if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} - elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} -if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];} - elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];} -if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];} - elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];} - elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} -if (isset($_GET["old_server_ip"])) {$old_server_ip=$_GET["old_server_ip"];} - elseif (isset($_POST["old_server_ip"])) {$old_server_ip=$_POST["old_server_ip"];} -if (isset($_GET["old_server_id"])) {$old_server_id=$_GET["old_server_id"];} - elseif (isset($_POST["old_server_id"])) {$old_server_id=$_POST["old_server_id"];} -if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} - elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} -if (isset($_GET["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} - elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} -if (isset($_GET["max_vicidial_trunks"])) {$max_vicidial_trunks=$_GET["max_vicidial_trunks"];} - elseif (isset($_POST["max_vicidial_trunks"])) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];} -if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];} - elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];} -if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];} - elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];} -if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} - elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} -if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];} - elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];} -if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];} - elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];} -if (isset($_GET["answer_transfer_agent"])) {$answer_transfer_agent=$_GET["answer_transfer_agent"];} - elseif (isset($_POST["answer_transfer_agent"])) {$answer_transfer_agent=$_POST["answer_transfer_agent"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["old_conf_exten"])) {$old_conf_exten=$_GET["old_conf_exten"];} - elseif (isset($_POST["old_conf_exten"])) {$old_conf_exten=$_POST["old_conf_exten"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS and Dots -$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); -$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); - -### DIGITS ONLY ### -$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); -$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); -$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); -$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); -$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); -$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); -$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); -$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); -$recording_exten = ereg_replace("[^0-9]","",$recording_exten); -$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); -$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); -$DBX_port = ereg_replace("[^0-9]","",$DBX_port); -$DBY_port = ereg_replace("[^0-9]","",$DBY_port); -$telnet_port = ereg_replace("[^0-9]","",$telnet_port); -$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); -$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); -$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); -$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); -$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); -$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); -$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); -$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); -$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); -$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); -$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); -$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); -$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); -$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); -$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); -$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); -$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); -$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); -$ADD = ereg_replace("[^0-9]","",$ADD); - -### ALPHA-NUMERIC and underscore and dash and slash and at and dot -$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); -$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); -$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); -$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); -$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); -$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); -$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); -$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); -$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); - -### ALPHA-NUMERIC (and underscore and dash) -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); -$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); -$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); -$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); -$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); -$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); -$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); -$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); -$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); -$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); -$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); -$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); -$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); -$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); -$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); -$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); -$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); -$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); -$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); -$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); -$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); -$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); -$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); -$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); -$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); -$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); -$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); -$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); - -### VARIABLES TO BE mysql_real_escape_string ### -# $VICIDIAL_web_URL = -# $local_web_callerID_URL = - -##### END VARIABLE FILTERING FOR SECURITY ##### - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -if (!isset($ADD)) {$ADD=0;} - -$STARTtime = date("U"); -$STARTdate = date("Y-m-d H:i:s"); - -if ($ADD==1) {$process = 'ADD NEW PHONE';} -if ($ADD==11) {$process = 'ADD NEW SERVER';} -if ($ADD==111) {$process = 'ADD NEW CONFERENCE';} -if ($ADD==2) {$process = 'ADDING NEW PHONE';} -if ($ADD==21) {$process = 'ADDING NEW SERVER';} -if ($ADD==211) {$process = 'ADDING NEW CONFERENCE';} -if ($ADD==3) {$process = 'MODIFY PHONE';} -if ($ADD==31) {$process = 'MODIFY SERVER';} -if ($ADD==311) {$process = 'MODIFY CONFERENCE';} -if ($ADD==4) {$process = 'MODIFYING PHONE';} -if ($ADD==41) {$process = 'MODIFYING SERVER';} -if ($ADD==411) {$process = 'MODIFYING CONFERENCE';} -if ($ADD==5) {$process = 'DELETE PHONE';} -if ($ADD==6) {$process = 'DELETE PHONE';} -if ($ADD==55) {$process = 'SEARCH PHONES';} -if ($ADD==66) {$process = 'SEARCH PHONES RESULTS';} -if ($ADD==0) {$process = 'PHONE LIST';} -if ($ADD==10) {$process = 'SERVER LIST';} -if ($ADD==100) {$process = 'CONFERENCE LIST';} -if ($ADD==99999) {$process = 'HELP';} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if ($auth<1) - { - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > '6' and ast_admin_access='1';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGdelete_phones =$row[17]; - } - } - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - echo "|$stmt|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - if (strlen($LOGfullname) < 1) - { - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - } - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rsltx=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rsltx); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $servers_list .= "\n"; - $o++; - } - - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); - -$NWB = "   \"HELP\""; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "ASTERISK ADMIN: Administration - $process \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    ASTERISK ADMIN: HELP


    \n"; - -?> -PHONES TABLE

    - -
    -Phone extension - This field is where you put the phones name as it appears to Asterisk not including the protocol or slash at the beginning. For Example: for the SIP phone SIP/test101 the Phone extension would be test101. Also, for IAX2 phones make sure you use the full phones name: IAX2/IAXphone1@IAXphone1 would be IAXphone1@IAXphone1. For Zap phones make sure you put the full channel: Zap/25-1 would be 25-1. Another note, make sure you set the Protocol below correctly for your type of phone. - -
    -
    -
    -Dialplan number - This field is for the number you dial to have the phone ring. This number is defined in the extensions.conf file of your Asterisk server - -
    -
    -
    -Voicemail Box - This field is for the voicemail box that the messages go to for the user of this phone. We use this to check for voicemail messages and for the user to be able to use the VOICEMAIL button on astGUIclient app. - -
    -
    -
    -Outbound CallerID - This field is where you would enter the callerID number that you would like to appear on outbound calls placed form the astguiclient web-client. This does not work on RBS, non-PRI, T1/E1s. - -
    -
    -
    -Phone IP address - This field is for the phone's IP address if it is a VOIP phone. This is an optional field - -
    -
    -
    -Computer IP address - This field is for the user's computer IP address. This is an optional field - -
    -
    -
    -Server IP - This menu is where you select which server the phone is active on. - -
    -
    -
    -Login - The login used for the phone user to login to the client applications. - -
    -
    -
    -Password - The password used for the phone user to login to the client applications. - -
    -
    -
    -Status - The status of the phone in the system, ACTIVE and ADMIN allow for GUI clients to work. ADMIN allows access to this administrative web site. All other statuses do not allow GUI or Admin web access. - -
    -
    -
    -Active Account - Whether the phone is active to put it in the list in the GUI client. - -
    -
    -
    -Phone Type - Purely for administrative notes. - -
    -
    -
    -Full Name - Used by the GUIclient in the list of active phones. - -
    -
    -
    -Company - Purely for administrative notes. - -
    -
    -
    -Picture - Not yet Implemented. - -
    -
    -
    -New Messages - Number of new voicemail messages for this phone on the Asterisk server. - -
    -
    -
    -Old Messages - Number of old voicemail messages for this phone on the Asterisk server. - -
    -
    -
    -Client Protocol - The protocol that the phone uses to connect to the Asterisk server: SIP, IAX2, Zap . Also, there is EXTERNAL for remote dial numbers or speed dial numbers that you want to list as phones. - -
    -
    -
    -Local GMT - The difference from Greenwich Mean time, or ZULU time where the phone is located. DO NOT ADJUST FOR DAYLIGHT SAVINGS TIME. This is used by the VICIDIAL campaign to accurately display the time and customer time. - -
    -
    -
    -Manager Login - This is the login that the GUI clients for this phone will use to access the Database where the server data resides. - -
    -
    -
    -Manager Secret - This is the password that the GUI clients for this phone will use to access the Database where the server data resides. - -
    -
    -
    -VICIDIAL Default User - This is to place a default value in the VICIDIAL user field whenever this phone user opens the astVICIDIAL client app. Leave blank for no user. - -
    -
    -
    -VICIDIAL Default Pass - This is to place a default value in the VICIDIAL password field whenever this phone user opens the astVICIDIAL client app. Leave blank for no pass. - -
    -
    -
    -VICIDIAL Default Campaign - This is to place a default value in the VICIDIAL campaign field whenever this phone user opens the astVICIDIAL client app. Leave blank for no campaign. - -
    -
    -
    -Park Exten - This is the default Parking extension for the client apps. Verify that a different one works before you change this. - -
    -
    -
    -Conf Exten - This is the default Conference park extension for the client apps. Verify that a different one works before you change this. - -
    -
    -
    -VICIDIAL Park Exten - This is the default Parking extension for VICIDIAL client app. Verify that a different one works before you change this. - -
    -
    -
    -VICIDIAL Park File - This is the default VICIDIAL park extension file name for the client apps. Verify that a different one works before you change this. limited to 10 characters. - -
    -
    -
    -Monitor Prefix - This is the dialplan prefix for monitoring of Zap channels automatically within the astGUIclient app. Only change according to the extensions.conf ZapBarge extensions records. - -
    -
    -
    -Recording Exten - This is the dialplan extension for the recording extension that is used to drop into meetme conferences to record them. It usually lasts upto one hour if not stopped. verify with extensions.conf file before changing. - -
    -
    -
    -VMAIL Main Exten - This is the dialplan extension going to check your voicemail. verify with extensions.conf file before changing. - -
    -
    -
    -VMAIL Dump Exten - This is the dialplan prefix used to send calls directly to a user's voicemail from a live call in the astGUIclient app. verify with extensions.conf file before changing. - -
    -
    -
    -Exten Context - This is the dialplan context that this phone primarily uses. It is assumed that all numbers dialed by the client apps are using this context so it is a good idea to make sure this is the most wide context possible. verify with extensions.conf file before changing. - -
    -
    -
    -DTMF send Channel - This is the channel string used to send DTMF sounds into meetme conferences from the client apps. Verify the exten and context with the extensions.conf file. - -
    -
    -
    -Outbound Call Group - This is the channel group that outbound calls from this phone are placed out of. There are a couple routines in the client apps that use this. For Zap channels you want to use something like Zap/g2 , for IAX2 trunks you would want to use the full IAX prefix like IAX2/VICItest1:secret@10.10.10.15:4569. Verify the trunks with the extensions.conf file, it is usually what you have defined as the TRUNK global variable at the top of the file. - -
    -
    -
    -Browser Location - This is applicable to only UNIX/LINUX clients, the absolute path to Mozilla or Firefox browser on the machine. verify this by launching it manually. - -
    -
    -
    -Install Directory - This is the place where the astGUIclient and astVICIDIAL scripts are located on your machine. For Win32 it should be something like C:\AST_VICI and for UNIX it should be something like /usr/local/perl_TK. verify this manually. - -
    -
    -
    -CallerID URL - This is the web address of the page used to do custom callerID lookups. default testing address is: http://astguiclient.sf.net/test_callerid_output.php - -
    -
    -
    -VICIDIAL Default URL - This is the web address of the page used to do custom VICIDIAL Web Form queries. default testing address is: http://astguiclient.sf.net/test_VICIDIAL_output.php - -
    -
    -
    -Call Logging - This is set to true if the call_log.agi file is in place in the extensions.conf file for all outbound and hangup 'h' extensions to log all calls. This should always be 1 because it is manditory for many astGUIclient and VICIDIAL features to work properly. - -
    -
    -
    -User Switching - Set to true to allow user to switch to another user account. NOTE: If user switches they can initiate recording on the new user's phone conversation - -
    -
    -
    -Conferencing - Set to true to allow user to start conference calls with upto six external lines. - -
    -
    -
    -Admin Hangup - Set to true to allow user to be able to hangup any line at will through astGUIclient. Good idea only to enable this for Admin users. - -
    -
    -
    -Admin Hijack - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers. - -
    -
    -
    -Admin Monitor - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers and as a training tool. - -
    -
    -
    -Call Park - Set to true to allow user to be able to park calls on astGUIclient hold to be picked up by any other astGUIclient user on the system. Calls stay on hold for upto a half hour then hangup. Usually enabled for all. - -
    -
    -
    -Updater Check - Set to true to display a popup warning that the updater time has not changed in 20 seconds. Useful for Admin users. - -
    -
    -
    -AF Logging - Set to true to log many actions of astGUIclient usage to a text file on the user's computer. - -
    -
    -
    -Queue Enabled - Set to true to have client apps use the Asterisk Central Queue system. Required for VICIDIAL and recommended for all users. - -
    -
    -
    -CallerID Popup - Set to true to allow for numbers defined in the extensions.conf file to send CallerID popup screens to astGUIclient users. - -
    -
    -
    -VMail Button - Set to true to display the VOICEMAIL button and the messages count display on astGUIclient. - -
    -
    -
    -Fast Refresh - Set to true to enable a new rate of refresh of call information for the astGUIclient. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. - -
    -
    -
    -Fast Refresh Rate - in milliseconds. Only used if Fast Refresh is enabled. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. - -
    -
    -
    -Persistant MySQL - If enabled the astGUIclient connection will remain connected instead of connecting every second. Useful if you have a fast refresh rate set. It will increase the number of connections on your MySQL machine. - -
    -
    -
    -Auto Dial Next Number - If enabled the VICIDIAL client will dial the next number on the list automatically upon disposition of a call unless they selected to "Stop Dialing" on the disposition screen. - -
    -
    -
    -Stop Rec after each call - If enabled the VICIDIAL client will stop whatever recording is going on after each call has been dispositioned. Useful if you are doing a lot of recording or you are using a web form to trigger recording. - -
    -
    -
    -DBX Server - The MySQL database server that this user should be connecting to. - -
    -
    -
    -DBX Database - The MySQL database that this user should be connecting to. Default is asterisk. - -
    -
    -
    -DBX User - The MySQL user login that this user should be using when connecting. Default is cron. - -
    -
    -
    -DBX Pass - The MySQL user password that this user should be using when connecting. Default is 1234. - -
    -
    -
    -DBX Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. - -
    -
    -
    -DBY Server - The MySQL database server that this user should be connecting to. Secondary server, not used currently. - -
    -
    -
    -DBY Database - The MySQL database that this user should be connecting to. Default is asterisk. Secondary server, not used currently. - -
    -
    -
    -DBY User - The MySQL user login that this user should be using when connecting. Default is cron. Secondary server, not used currently. - -
    -
    -
    -DBY Pass - The MySQL user password that this user should be using when connecting. Default is 1234. Secondary server, not used currently. - -
    -
    -
    -DBY Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. Secondary server, not used currently. - - -



    - -SERVERS TABLE

    -
    -
    -Server ID - This field is where you put the Asterisk servers name, doesnt have to be an official domain sub, just a nickname to identify the server to Admin users. - -
    -
    -
    -Server Description - The field where you use a small phrase to describe the Asterisk server. - -
    -
    -
    -Server IP Address - The field where you put the Network IP address of the Asterisk server. - -
    -
    -
    -Active - Set whether the Asterisk server is active or inactive. - -
    -
    -
    -Asterisk Version - Set the version of Asterisk that you have installed on this server. Examples: '1.2', '1.0.8', '1.0.7', 'CVS_HEAD', 'REALLY OLD', etc... This is used because versions 1.0.8 and 1.0.9 have a different method of dealing with Local/ channels, a bug that has been fixed in CVS v1.0, and need to be treated differently when handling their Local/ channels. Also, current CVS_HEAD and the 1.2 release tree uses different manager and command output so it must be treated differently as well. - -
    -
    -
    -Max VICIDIAL Trunks - This field will determine the maximum number of lines that the VICIDIAL auto-dialer will attempt to call on this server. If you want to dedicate two full PRI T1s to VICIDIALing on a server then you would set this to 46. Default is 96. - -
    -
    -
    -Telnet Host - This is the address or name of the Asterisk server and is how the manager applications connect to it from where they are running. If they are running on the Asterisk server, then the default of 'localhost' is fine. - -
    -
    -
    -Telnet Port - This is the port of the Asterisk server Manager connection and is how the manager applications connect to it from where they are running. The default of '5038' is fine for a standard install. - -
    -
    -
    -Manager User - The username or login used to connect genericly to the Asterisk server manager. Default is 'cron' - -
    -
    -
    -Manager Secret - The secret or password used to connect genericly to the Asterisk server manager. Default is '1234' - -
    -
    -
    -Manager Update User - The username or login used to connect to the Asterisk server manager optimized for the Update scripts. Default is 'updatecron' and assumes the same secret as the generic user. - -
    -
    -
    -Manager Listen User - The username or login used to connect to the Asterisk server manager optimized for scripts that only listen for output. Default is 'listencron' and assumes the same secret as the generic user. - -
    -
    -
    -Manager Send User - The username or login used to connect to the Asterisk server manager optimized for scripts that only send Actions to the manager. Default is 'sendcron' and assumes the same secret as the generic user. - -
    -
    -
    -Server GMT offset - The difference in hours from GMT time not adjusted for Daylight-Savings-Time of the server. Default is '-5' - -
    -
    -
    -VMail Dump Exten - The extension prefix used on this server to send calls directly through agc to a specific voicemail box. Default is '85026666666666' - -
    -
    -
    -VICIDIAL AD extension - The default extension if none is present in the campaign to send calls to for VICIDIAL auto dialing. Default is '8365' - -
    -
    -
    -Default Context - The default dialplan context used for scripts that operate for this server. Default is 'default' - - -



    - -CONFERENCES TABLE

    -
    -
    -Conference Number - This field is where you put the meetme conference dialpna number. It is also recommended that the meetme number in meetme.conf matches this number for each entry. This is for the conferences in astGUIclient and is used for leave-3way-call functionality in VICIDIAL. - -
    -
    -
    -Server IP - The menu where you select the Asterisk server that this conference will be on. - - - - - - -







    -







    -THE END -
    - - - -ASTERISK ADMIN: Administration - <? echo $process ?> - - - -
    - - - - - - -
      ASTERISK ADMIN - Logout  
      LIST ALL PHONES | ADD A NEW PHONE | SEARCH FOR A PHONE | ADD A SERVER | LIST ALL SERVERS
      SHOW ALL CONFERENCES | ADD A NEW CONFERENCE
    -"; - -echo "
    ADD A NEW PHONE
    \n"; -echo "\n"; -echo "
    \n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW SERVERS FORM SCREEN -###################### - -if ($ADD==11) -{ -echo ""; - -echo "
    ADD A NEW SERVER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW CONFERENCES FORM SCREEN -###################### - -if ($ADD==111) -{ -echo ""; - -echo "
    ADD A NEW CONFERENCE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference Number: (digits only)$NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    \n"; - -} - - -###################### -# ADD=2 adds the new phone to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    PHONE NOT ADDED - there is already a Phone in the system with this extension/server\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    PHONE NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    PHONE ADDED\n"; - - $stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new server to the system -###################### - -if ($ADD==21) -{ - echo ""; - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    SERVER NOT ADDED - there is already a server in the system with this ID\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    SERVER NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    SERVER ADDED\n"; - - $stmt="INSERT INTO servers (server_id,server_description,server_ip,active,asterisk_version) values('$server_id','$server_description','$server_ip','$active','$asterisk_version');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new conference to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CONFERENCE NOT ADDED - there is already a conference in the system with this ID and server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    CONFERENCE ADDED\n"; - - $stmt="INSERT INTO conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=100; -} - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of phone -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGdelete_phones < 1) ) - { - echo "
    PHONE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    Server IP be at least 7 characters in length\n"; - } - else - { - echo "
    PHONE DELETION CONFIRMATION: $extension - $server_ip\n"; - echo "

    Click here to delete phone $extension - $server_ip


    \n"; - } - -$ADD='3'; # go to phone modification below -} - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete phone record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGdelete_phones < 1) ) - { - echo "
    PHONE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from phones where extension='$extension' and server_ip='$server_ip' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING PHONE!!!|$PHP_AUTH_USER|$ip|extension='$extension'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
    PHONE DELETION COMPLETED: $extension - $server_ip\n"; - echo "

    \n"; - } - -$ADD='0'; # go to phone list -} - - - - - - -###################### -# ADD=3 modify phone info in the system -###################### - -if ($ADD==3) -{ - echo ""; - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A PHONE RECORD: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    New Messages: $row[14]$NWB#phones-messages$NWE
    Old Messages: $row[15]$NWB#phones-old_messages$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL Default User: $NWB#phones-login_user$NWE
    VICIDIAL Default Pass: $NWB#phones-login_pass$NWE
    VICIDIAL Default Campaign: $NWB#phones-login_campaign$NWE
    Park Exten: $NWB#phones-park_on_extension$NWE
    Conf Exten: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL Park File: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Monitor Prefix: $NWB#phones-monitor_prefix$NWE
    Recording Exten: $NWB#phones-recording_exten$NWE
    VMailMain Exten: $NWB#phones-voicemail_exten$NWE
    VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
    Exten Context: $NWB#phones-ext_context$NWE
    DTMFSend Channel: $NWB#phones-dtmf_send_extension$NWE
    Outbound Call Group: $NWB#phones-call_out_number_group$NWE
    Browser Location: $NWB#phones-client_browser$NWE
    Install Directory: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL Default URL: $NWB#phones-VICIDIAL_web_URL$NWE
    Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
    User Switching: $NWB#phones-user_switching_enabled$NWE
    Conferencing: $NWB#phones-conferencing_enabled$NWE
    Admin Hangup: $NWB#phones-admin_hangup_enabled$NWE
    Admin Hijack: $NWB#phones-admin_hijack_enabled$NWE
    Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
    Call Park: $NWB#phones-call_parking_enabled$NWE
    Updater Check: $NWB#phones-updater_check_enabled$NWE
    AF Logging: $NWB#phones-AFLogging_enabled$NWE
    Queue Enabled: $NWB#phones-QUEUE_ACTION_enabled$NWE
    CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
    VMail Button: $NWB#phones-voicemail_button_enabled$NWE
    Fast Refresh: $NWB#phones-enable_fast_refresh$NWE
    Fast Refresh Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Auto Dial Next Number: $NWB#phones-auto_dial_next_number$NWE
    Stop Rec after each call: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Server: (Primary DB Server)$NWB#phones-DBX_server$NWE
    DBX Database: (Primary Server Database)$NWB#phones-DBX_database$NWE
    DBX User: (Primary DB Login)$NWB#phones-DBX_user$NWE
    DBX Pass: (Primary DB Secret)$NWB#phones-DBX_pass$NWE
    DBX Port: (Primary DB Port)$NWB#phones-DBX_port$NWE
    DBY Server: (Secondary DB Server)$NWB#phones-DBY_server$NWE
    DBY Database: (Secondary Server Database)$NWB#phones-DBY_database$NWE
    DBY User: (Secondary DB Login)$NWB#phones-DBY_user$NWE
    DBY Pass: (Secondary DB Secret)$NWB#phones-DBY_pass$NWE
    DBY Port: (Secondary DB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Click here for phone stats\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    DELETE THIS PHONE\n"; - } - -} - - -###################### -# ADD=31 modify server info in the system -###################### - -if ($ADD==31) -{ - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A SERVER RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    Max VICIDIAL Trunks: $NWB#servers-max_vicidial_trunks$NWE
    Telnet Host: $NWB#servers-telnet_host$NWE
    Telnet Port: $NWB#servers-telnet_port$NWE
    Manager User: $NWB#servers-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#servers-ASTmgrSECRET$NWE
    Manager Update User: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Manager Listen User: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Manager Send User: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#servers-local_gmt$NWE
    VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
    VICIDIAL AD extension: $NWB#servers-answer_transfer_agent$NWE
    Default Context: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    PHONES WITHIN THIS SERVER:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    EXTENSIONNAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This server has $active_lists active phones and $inactive_lists inactive phones

    \n"; -echo "
    \n"; -} - - -###################### -# ADD=311 modify conference info in the system -###################### - -if ($ADD==311) -{ - echo ""; - - $stmt="SELECT * from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A CONFERENCE RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference: $NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    Current Extension:
    \n"; - -echo "
    \n"; - -} - - - -###################### -# ADD=4 submit phone modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) - {echo "
    PHONE NOT MODIFIED - there is already a Phone in the system with this extension/server\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    PHONE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    PHONE MODIFIED: $extension\n"; - - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid' where extension='$old_extension' and server_ip='$old_server_ip';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A PHONE RECORD: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    New Messages: $row[14]$NWB#phones-messages$NWE
    Old Messages: $row[15]$NWB#phones-old_messages$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL Default User: $NWB#phones-login_user$NWE
    VICIDIAL Default Pass: $NWB#phones-login_pass$NWE
    VICIDIAL Default Campaign: $NWB#phones-login_campaign$NWE
    Park Exten: $NWB#phones-park_on_extension$NWE
    Conf Exten: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL Park File: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Monitor Prefix: $NWB#phones-monitor_prefix$NWE
    Recording Exten: $NWB#phones-recording_exten$NWE
    VMailMain Exten: $NWB#phones-voicemail_exten$NWE
    VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
    Exten Context: $NWB#phones-ext_context$NWE
    DTMFSend Channel: $NWB#phones-dtmf_send_extension$NWE
    Outbound Call Group: $NWB#phones-call_out_number_group$NWE
    Browser Location: $NWB#phones-client_browser$NWE
    Install Directory: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL Default URL: $NWB#phones-VICIDIAL_web_URL$NWE
    Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
    User Switching: $NWB#phones-user_switching_enabled$NWE
    Conferencing: $NWB#phones-conferencing_enabled$NWE
    Admin Hangup: $NWB#phones-admin_hangup_enabled$NWE
    Admin Hijack: $NWB#phones-admin_hijack_enabled$NWE
    Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
    Call Park: $NWB#phones-call_parking_enabled$NWE
    Updater Check: $NWB#phones-updater_check_enabled$NWE
    AF Logging: $NWB#phones-AFLogging_enabled$NWE
    Queue Enabled: $NWB#phones-QUEUE_ACTION_enabled$NWE
    CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
    VMail Button: $NWB#phones-voicemail_button_enabled$NWE
    Fast Refresh: $NWB#phones-enable_fast_refresh$NWE
    Fast Refresh Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Auto Dial Next Number: $NWB#phones-auto_dial_next_number$NWE
    Stop Rec after each call: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Server: (Primary DB Server)$NWB#phones-DBX_server$NWE
    DBX Database: (Primary Server Database)$NWB#phones-DBX_database$NWE
    DBX User: (Primary DB Login)$NWB#phones-DBX_user$NWE
    DBX Pass: (Primary DB Secret)$NWB#phones-DBX_pass$NWE
    DBX Port: (Primary DB Port)$NWB#phones-DBX_port$NWE
    DBY Server: (Secondary DB Server)$NWB#phones-DBY_server$NWE
    DBY Database: (Secondary Server Database)$NWB#phones-DBY_database$NWE
    DBY User: (Secondary DB Login)$NWB#phones-DBY_user$NWE
    DBY Pass: (Secondary DB Secret)$NWB#phones-DBY_pass$NWE
    DBY Port: (Secondary DB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Click here for phone stats\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    DELETE THIS PHONE\n"; - } - -} - -###################### -# ADD=41 submit server modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_id != $old_server_id) ) - {echo "
    SERVER NOT MODIFIED - there is already a server in the system with this server_id\n";} - else - { - $stmt="SELECT count(*) from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_ip != $old_server_ip) ) - {echo "
    SERVER NOT MODIFIED - there is already a server in the system with this server_ip\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    SERVER NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    SERVER MODIFIED: $server_ip\n"; - - $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A SERVER RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    Max VICIDIAL Trunks: $NWB#servers-max_vicidial_trunks$NWE
    Telnet Host: $NWB#servers-telnet_host$NWE
    Telnet Port: $NWB#servers-telnet_port$NWE
    Manager User: $NWB#servers-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#servers-ASTmgrSECRET$NWE
    Manager Update User: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Manager Listen User: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Manager Send User: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#servers-local_gmt$NWE
    VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
    VICIDIAL AD extension: $NWB#servers-answer_transfer_agent$NWE
    Default Context: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    PHONES WITHIN THIS SERVER:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    EXTENSIONNAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This server has $active_lists active phones and $inactive_lists inactive phones

    \n"; -echo "
    \n"; - -} - -###################### -# ADD=411 submit conference modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) - {echo "
    CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    CONFERENCE MODIFIED: $conf_exten\n"; - - $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from conferences where conf_exten='$conf_exten';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A CONFERENCE RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference: $NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    Current Extension:
    \n"; - -echo "
    \n"; - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo ""; - -echo "
    SEARCH FOR A PHONE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    extension:
    Full Name:
    Phone type:
    \n"; - -} - -###################### -# ADD=66 phone search results -###################### - -if ($ADD==66) -{ - echo ""; - - $SQL = ''; - if ($extension) {$SQL .= "extension LIKE \"%$extension%\" and";} - if ($fullname) {$SQL .= "fullname LIKE \"%$fullname%\" and";} - if ($phone_type) {$SQL .= "phone_type LIKE \"%$phone_type%\" and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from phones $SQL order by extension,server_ip;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    SEARCH RESULTS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
    \n"; - -} - - - -###################### -# ADD=0 display all active phones -###################### -if ($ADD==0) -{ - echo ""; - - $stmt="SELECT * from phones order by extension,server_ip"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    PHONE LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
    \n"; -} - -###################### -# ADD=10 display all servers -###################### -if ($ADD==10) -{ - echo ""; - - $stmt="SELECT * from servers order by server_id"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    SERVER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[1] $row[2] $row[4] $row[3]  MODIFY
    \n"; -} - - -###################### -# ADD=100 display all conferences -###################### -if ($ADD==100) -{ - echo ""; - - $stmt="SELECT * from conferences order by conf_exten"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    CONFERENCE LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]  MODIFY
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; -echo "             VERSION: $version"; -echo "             BUILD: $build
    \n"; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_en/dbconnect.php b/agc_2-X/trunk/LANG_admin/astguiclient_en/dbconnect.php deleted file mode 100644 index fb6d5917..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_en/dbconnect.php +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_en/help.gif b/agc_2-X/trunk/LANG_admin/astguiclient_en/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_en/inbound_popup.php b/agc_2-X/trunk/LANG_admin/astguiclient_en/inbound_popup.php deleted file mode 100644 index 6f451656..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_en/inbound_popup.php +++ /dev/null @@ -1,228 +0,0 @@ - LICENSE: GPLv2 -### -# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system. -# -# changes: -# 60620-1329 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK REMOTE INBOUND: Popup - - -
    - - 0) -{ - - $stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='" . mysql_real_escape_string($parked_time) . "' and channel='" . mysql_real_escape_string($channel) . "' LIMIT 1"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: " . mysql_real_escape_string($channel) . "','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for channel $channel       $NOW_TIME\n

    \n"; - - - $url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&'; - $Suser = 'username='; - $Spass = '&passwd='; - $Sphone = '&phone='; - - $newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone"; - if ( ($phone == 'unknown') or (strlen($phone)<9) ) - {$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";} - - echo "Look up this customer in Customer Service System\n

    \n"; - - echo "Close this window\n

    \n"; -} -else -{ - echo "Redirect command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "Close this window\n

    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_en/phone_stats.php b/agc_2-X/trunk/LANG_admin/astguiclient_en/phone_stats.php deleted file mode 100644 index 8498746a..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_en/phone_stats.php +++ /dev/null @@ -1,244 +0,0 @@ - LICENSE: GPLv2 -# -# -# changes: -# 60620-1333 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$admin_page = './admin.php'; - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $row[0]; - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK ADMIN: Phone Stats - - -
    -
    - - - - - - -\n"; -echo "
      ASTERISK ADMIN: Administration  
      LIST ALL PHONES | ADD A NEW PHONE | SEARCH FOR A PHONE | ADD A SERVER | LIST ALL SERVERS
      SHOW ALL CONFERENCES | ADD A NEW CONFERENCE
      \n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - -echo "
    \n"; - -echo "CALL TIME AND CHANNELS:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} -# echo "|$stmt|\n"; - -echo "\n"; -echo "
    CHANNEL GROUP COUNT HOURS:MINUTES
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    TOTAL CALLS $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "LAST 1000 CALLS FOR DATE RANGE:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - - - $call_seconds=0; - $o++; - } - - -echo "
    NUMBER CHANNEL GROUP DATE LENGTH(MIN.)
    $row[0] $row[1] $row[2] $row[3]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_en/remote_inbound.php b/agc_2-X/trunk/LANG_admin/astguiclient_en/remote_inbound.php deleted file mode 100644 index 06642677..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_en/remote_inbound.php +++ /dev/null @@ -1,162 +0,0 @@ - LICENSE: GPLv2 -### -# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available) - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - echo"\n"; - echo"ASTERISK REMOTE INBOUND: Main\n"; - echo"\n"; - echo"\n"; - echo"\n"; - -?> - - -
    - -
    \n"; - -echo "Click on the channel below that you would like to have directed to your phone

    \n"; - -echo "
    \n";
    -echo "CHANNEL    SERVER        CHANNEL_GROUP   EXTENSION    PARKED_BY            PARKED_TIME        \n";
    -echo "----------------------------------------------------------------------------------------------\n";
    -
    -
    -
    -
    -
    -$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		$channel =			sprintf("%-11s", $row[0]);
    -		$server =			sprintf("%-14s", $row[1]);
    -		$channel_group =	sprintf("%-16s", $row[2]);
    -		$extension =		sprintf("%-13s", $row[3]);
    -		$parked_by =		sprintf("%-21s", $row[4]);
    -		$parked_time =		sprintf("%-19s", $row[5]);
    -
    -		echo "$channel$server$channel_group$extension$parked_by$parked_time\n";
    -
    -		$i++;
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "*************************************** NO PARKED CALLS **************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	}
    -
    -
    -$ENDtime = date("U");
    -
    -$RUNtime = ($ENDtime - $STARTtime);
    -
    -echo "
    \n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_es/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_admin/astguiclient_es/AST_inboundEXTstats.php deleted file mode 100644 index 0e39d450..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_es/AST_inboundEXTstats.php +++ /dev/null @@ -1,400 +0,0 @@ - LICENSE: GPLv2 -# -# CHANGES -# 60421-1450 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1322 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.11.20';} - -$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='" . mysql_real_escape_string($server_ip) . "';"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$inbound_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $inbound_to_print) - { - $row=mysql_fetch_row($rslt); - $inbound[$i] =$row[0]; - $fullnum[$i] =$row[1]; - $inbname[$i] =$row[2]; - $i++; - } -?> - - - - - -\n"; -#echo"\n"; -echo "ASTERISK: Estadística de Llamadas Entrantes\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "SELECCIONE POR FAVOR Un NÚMERO Y La FECHA ARRIBA Y El TECLEO SOMETEN\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "ASTERISK: Estadística de Llamadas Entrantes                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$extenSQL = "and extension='" . mysql_real_escape_string($group) . "'";
    -if (eregi("\*",$group))
    -	{$extenSQL = "and extension LIKE \"%$group\"";}
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Llamadas totales que vinieron en este número:       $TOTALcalls\n";
    -echo "Average Call Length(seconds) for all Calls:   $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -if ($row[0])
    -	{
    -	$average_hold_seconds = ($row[1] / $row[0]);
    -	$average_hold_seconds = round($average_hold_seconds, 0);
    -	$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -	}
    -else {$DROPpercent=0;   $average_hold_seconds=0;}
    -echo "Total DROP Calls:   (less than 10 seconds)    $DROPcalls  $DROPpercent%\n";
    -echo "Average Call Length(seconds) for DROP Calls:  $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  CALLS STATS
    -
    -echo "\n";
    -echo "---------- CALL LISTINGS\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -echo "| CALLERID             | CALLERIDNAME         | LENGTH | DATE TIME           |\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -$stmt="select number_dialed,caller_code,length_in_sec,start_time from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$CID =			sprintf("%-20s", $row[0]);
    -	$CIDname =		sprintf("%-20s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$datetime =		sprintf("%-19s", $row[3]);
    -	$USERavgTALK =	$row[2];
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -if ($output == 'FULL')
    -	{
    -
    -	echo "\n";
    -	echo "---------- ESTADÃSTICAS DEL TIEMPO\n";
    -
    -	echo "\n";
    -
    -	$hi_hour_count=0;
    -	$last_full_record=0;
    -	$i=0;
    -	$h=0;
    -	while ($i <= 96)
    -		{
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -		$h++;
    -		}
    -
    -	$hour_multiplier = (100 / $hi_hour_count);
    -	#$hour_multiplier = round($hour_multiplier, 0);
    -
    -	echo "\n";
    -	echo "GRÃFICO EN 15 INCREMENTOS MINUCIOSOS DE LLAMADAS TOTALES\n";
    -
    -	$k=1;
    -	$Mk=0;
    -	$call_scale = '0';
    -	while ($k <= 102) 
    -		{
    -		if ($Mk >= 5) 
    -			{
    -			$Mk=0;
    -			$scale_num=($k / $hour_multiplier);
    -			$scale_num = round($scale_num, 0);
    -			$LENscale_num = (strlen($scale_num));
    -			$k = ($k + $LENscale_num);
    -			$call_scale .= "$scale_num";
    -			}
    -		else
    -			{
    -			$call_scale .= " ";
    -			$k++;   $Mk++;
    -			}
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -	#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -	echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -	$ZZ = '00';
    -	$i=0;
    -	$h=4;
    -	$hour= -1;
    -	$no_lines_yet=1;
    -
    -	while ($i <= 96)
    -		{
    -		$char_counter=0;
    -		$time = '      ';
    -		if ($h >= 4) 
    -			{
    -			$hour++;
    -			$h=0;
    -			if ($hour < 10) {$hour = "0$hour";}
    -			$time = "+$hour$ZZ+";
    -			}
    -		if ($h == 1) {$time = "   15 ";}
    -		if ($h == 2) {$time = "   30 ";}
    -		if ($h == 3) {$time = "   45 ";}
    -		$Ghour_count = $hour_count[$i];
    -		if ($Ghour_count < 1) 
    -			{
    -			if ( ($no_lines_yet) or ($i > $last_full_record) )
    -				{
    -				$do_nothing=1;
    -				}
    -			else
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				echo "|$time|";
    -				$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -				echo "| $hour_count[$i] |\n";
    -				}
    -			}
    -		else
    -			{
    -			$no_lines_yet=0;
    -			$Xhour_count = ($Ghour_count * $hour_multiplier);
    -			$Yhour_count = (99 - $Xhour_count);
    -
    -			$Gdrop_count = $drop_count[$i];
    -			if ($Gdrop_count < 1) 
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "*X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -				echo "| 0     | $hour_count[$i] |\n";
    -
    -				}
    -			else
    -				{
    -				$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -			#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -				$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -				echo "D";   $char_counter++;
    -				$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -				echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -				}
    -			}
    -		
    -		
    -		$i++;
    -		$h++;
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -	}
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_es/admin.php b/agc_2-X/trunk/LANG_admin/astguiclient_es/admin.php deleted file mode 100644 index fcea423a..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_es/admin.php +++ /dev/null @@ -1,1824 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI database administration -# -# CHANGES -# 50913-1118 - Added outbound_cid for web-client calls -# 50926-1356 - Modified to allow for language translation -# 50926-1613 - Added WeBRooTWritablE write controls -# 51128-1254 - Modified to allow PHP global vars off -# 51208-2120 - Added option to login with vicidial_user login if allowed -# 51213-1650 - Added option to delete phones if allowed by vicidial_users -# 60421-1430 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1137 - Fixed phone search bug -# 60620-1243 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '1.1.12'; -$build = '60620-1243'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} - elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} - elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} -if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} - elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} -if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} - elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} -if (isset($_GET["login"])) {$login=$_GET["login"];} - elseif (isset($_POST["login"])) {$login=$_POST["login"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} - elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} -if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} - elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} -if (isset($_GET["company"])) {$company=$_GET["company"];} - elseif (isset($_POST["company"])) {$company=$_POST["company"];} -if (isset($_GET["picture"])) {$picture=$_GET["picture"];} - elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} - elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} -if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} - elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} -if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} - elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} -if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} - elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} -if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} - elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} -if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} - elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} -if (isset($_GET["park_on_extension"])) {$park_on_extension=$_GET["park_on_extension"];} - elseif (isset($_POST["park_on_extension"])) {$park_on_extension=$_POST["park_on_extension"];} -if (isset($_GET["conf_on_extension"])) {$conf_on_extension=$_GET["conf_on_extension"];} - elseif (isset($_POST["conf_on_extension"])) {$conf_on_extension=$_POST["conf_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"];} - elseif (isset($_POST["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"];} - elseif (isset($_POST["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];} -if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} - elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} -if (isset($_GET["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} - elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} -if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} - elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["dtmf_send_extension"])) {$dtmf_send_extension=$_GET["dtmf_send_extension"];} - elseif (isset($_POST["dtmf_send_extension"])) {$dtmf_send_extension=$_POST["dtmf_send_extension"];} -if (isset($_GET["call_out_number_group"])) {$call_out_number_group=$_GET["call_out_number_group"];} - elseif (isset($_POST["call_out_number_group"])) {$call_out_number_group=$_POST["call_out_number_group"];} -if (isset($_GET["client_browser"])) {$client_browser=$_GET["client_browser"];} - elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} -if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} - elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} -if (isset($_GET["local_web_callerID_URL"])) {$local_web_callerID_URL=$_GET["local_web_callerID_URL"];} - elseif (isset($_POST["local_web_callerID_URL"])) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];} -if (isset($_GET["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"];} - elseif (isset($_POST["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];} -if (isset($_GET["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"];} - elseif (isset($_POST["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];} -if (isset($_GET["user_switching_enabled"])) {$user_switching_enabled=$_GET["user_switching_enabled"];} - elseif (isset($_POST["user_switching_enabled"])) {$user_switching_enabled=$_POST["user_switching_enabled"];} -if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} - elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} -if (isset($_GET["admin_hangup_enabled"])) {$admin_hangup_enabled=$_GET["admin_hangup_enabled"];} - elseif (isset($_POST["admin_hangup_enabled"])) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];} -if (isset($_GET["admin_hijack_enabled"])) {$admin_hijack_enabled=$_GET["admin_hijack_enabled"];} - elseif (isset($_POST["admin_hijack_enabled"])) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];} -if (isset($_GET["admin_monitor_enabled"])) {$admin_monitor_enabled=$_GET["admin_monitor_enabled"];} - elseif (isset($_POST["admin_monitor_enabled"])) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];} -if (isset($_GET["call_parking_enabled"])) {$call_parking_enabled=$_GET["call_parking_enabled"];} - elseif (isset($_POST["call_parking_enabled"])) {$call_parking_enabled=$_POST["call_parking_enabled"];} -if (isset($_GET["updater_check_enabled"])) {$updater_check_enabled=$_GET["updater_check_enabled"];} - elseif (isset($_POST["updater_check_enabled"])) {$updater_check_enabled=$_POST["updater_check_enabled"];} -if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} - elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} -if (isset($_GET["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"];} - elseif (isset($_POST["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];} -if (isset($_GET["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"];} - elseif (isset($_POST["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];} -if (isset($_GET["voicemail_button_enabled"])) {$voicemail_button_enabled=$_GET["voicemail_button_enabled"];} - elseif (isset($_POST["voicemail_button_enabled"])) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];} -if (isset($_GET["enable_fast_refresh"])) {$enable_fast_refresh=$_GET["enable_fast_refresh"];} - elseif (isset($_POST["enable_fast_refresh"])) {$enable_fast_refresh=$_POST["enable_fast_refresh"];} -if (isset($_GET["fast_refresh_rate"])) {$fast_refresh_rate=$_GET["fast_refresh_rate"];} - elseif (isset($_POST["fast_refresh_rate"])) {$fast_refresh_rate=$_POST["fast_refresh_rate"];} -if (isset($_GET["enable_persistant_mysql"])) {$enable_persistant_mysql=$_GET["enable_persistant_mysql"];} - elseif (isset($_POST["enable_persistant_mysql"])) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];} -if (isset($_GET["auto_dial_next_number"])) {$auto_dial_next_number=$_GET["auto_dial_next_number"];} - elseif (isset($_POST["auto_dial_next_number"])) {$auto_dial_next_number=$_POST["auto_dial_next_number"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} - elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} -if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} - elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} -if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} - elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} -if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];} - elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];} -if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];} - elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];} -if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} - elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} -if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} - elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} -if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} - elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} -if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];} - elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];} -if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];} - elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];} - elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} -if (isset($_GET["old_server_ip"])) {$old_server_ip=$_GET["old_server_ip"];} - elseif (isset($_POST["old_server_ip"])) {$old_server_ip=$_POST["old_server_ip"];} -if (isset($_GET["old_server_id"])) {$old_server_id=$_GET["old_server_id"];} - elseif (isset($_POST["old_server_id"])) {$old_server_id=$_POST["old_server_id"];} -if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} - elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} -if (isset($_GET["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} - elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} -if (isset($_GET["max_vicidial_trunks"])) {$max_vicidial_trunks=$_GET["max_vicidial_trunks"];} - elseif (isset($_POST["max_vicidial_trunks"])) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];} -if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];} - elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];} -if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];} - elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];} -if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} - elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} -if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];} - elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];} -if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];} - elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];} -if (isset($_GET["answer_transfer_agent"])) {$answer_transfer_agent=$_GET["answer_transfer_agent"];} - elseif (isset($_POST["answer_transfer_agent"])) {$answer_transfer_agent=$_POST["answer_transfer_agent"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["old_conf_exten"])) {$old_conf_exten=$_GET["old_conf_exten"];} - elseif (isset($_POST["old_conf_exten"])) {$old_conf_exten=$_POST["old_conf_exten"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS and Dots -$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); -$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); - -### DIGITS ONLY ### -$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); -$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); -$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); -$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); -$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); -$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); -$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); -$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); -$recording_exten = ereg_replace("[^0-9]","",$recording_exten); -$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); -$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); -$DBX_port = ereg_replace("[^0-9]","",$DBX_port); -$DBY_port = ereg_replace("[^0-9]","",$DBY_port); -$telnet_port = ereg_replace("[^0-9]","",$telnet_port); -$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); -$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); -$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); -$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); -$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); -$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); -$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); -$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); -$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); -$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); -$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); -$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); -$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); -$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); -$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); -$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); -$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); -$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); -$ADD = ereg_replace("[^0-9]","",$ADD); - -### ALPHA-NUMERIC and underscore and dash and slash and at and dot -$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); -$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); -$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); -$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); -$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); -$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); -$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); -$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); -$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); - -### ALPHA-NUMERIC (and underscore and dash) -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); -$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); -$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); -$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); -$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); -$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); -$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); -$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); -$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); -$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); -$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); -$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); -$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); -$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); -$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); -$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); -$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); -$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); -$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); -$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); -$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); -$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); -$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); -$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); -$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); -$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); -$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); -$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); - -### VARIABLES TO BE mysql_real_escape_string ### -# $VICIDIAL_web_URL = -# $local_web_callerID_URL = - -##### END VARIABLE FILTERING FOR SECURITY ##### - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Usted ahora ha salido. Gracias\n"; - exit; -} - -if (!isset($ADD)) {$ADD=0;} - -$STARTtime = date("U"); -$STARTdate = date("Y-m-d H:i:s"); - -if ($ADD==1) {$process = 'NUEVO TELÉFONO';} -if ($ADD==11) {$process = 'NUEVO SERVIDOR';} -if ($ADD==111) {$process = 'NUEVA CONFERENCIA';} -if ($ADD==2) {$process = 'CREANDO TELÉFONO';} -if ($ADD==21) {$process = 'CREANDO SERVIDOR';} -if ($ADD==211) {$process = 'CREANDO CONFERENCIA';} -if ($ADD==3) {$process = 'MODIFICAR EL TELÉFONO';} -if ($ADD==31) {$process = 'MODIFICAR EL SERVIDOR';} -if ($ADD==311) {$process = 'MODIFICAR LA CONFERENCIA';} -if ($ADD==4) {$process = 'MODIFICANDO EL TELÉFONO';} -if ($ADD==41) {$process = 'MODIFICANDO EL SERVIDOR';} -if ($ADD==411) {$process = 'MODIFICANDO LA CONFERENCIA';} -if ($ADD==5) {$process = 'DELETE PHONE';} -if ($ADD==6) {$process = 'DELETE PHONE';} -if ($ADD==55) {$process = 'BUSCAR TELÉFONOS';} -if ($ADD==66) {$process = 'RESULTADO DE LA BÚSQUEDA DE TELÉFONOS';} -if ($ADD==0) {$process = 'LISTA DE TELÉFONOS';} -if ($ADD==10) {$process = 'LISTA DE SERVIDORES';} -if ($ADD==100) {$process = 'LISTA DE CONFERENCIAS';} -if ($ADD==99999) {$process = 'AYUDA';} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if ($auth<1) - { - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > '6' and ast_admin_access='1';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGdelete_phones =$row[17]; - } - } - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - echo "|$stmt|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - if (strlen($LOGfullname) < 1) - { - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - } - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rsltx=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rsltx); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $servers_list .= "\n"; - $o++; - } - - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); - -$NWB = "   \"AYUDA\""; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "ASTERISK ADMIN: Administración - $process \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    ASTERISK ADMIN: AYUDA


    \n"; - -?> -TABLA DE LOS TELÉFONOS

    - -
    -Extensión del teléfono - este campo es donde usted pone los nombres del teléfono que aparecen al marcar con asterisco no incluyendo el protocolo o la barra vertical del principio. Por ejemplo: para el teléfono SIP/test101 del SIP la extensión del teléfono sería test101. También, para los teléfonos IAX2 compruebe que usted utiliza el nombre del teléfono completo: IAX2/IAXphone1@IAXphone1 sería IAXphone1@IAXphone1. Para zap los teléfonos compruebe que usted pone el canal completo: Zap/25-1 sería 25-1. Otra nota, compruebe que usted fija el protocolo abajo correctamente para su tipo de teléfono. - -
    -
    -
    -Número del Dialplan - este campo está para el número que usted marca para tener el anillo del teléfono. Este número se define en el archivo de extensions.conf de su servidor asterisco - -
    -
    -
    -Caja de Buzón de Voz - este campo es para la caja del buzón de voz donde van los mensajes para al usuario de este teléfono. Utilizamos esto para comprobar los mensajes del buzón de voz y para que el usuario pueda acceder al Buzón de Voz desde astGUIclient. - -
    -
    -
    -CallerID de salida - este campo es donde usted incorporara el número del callerID que usted quiera que aparezca en las llamadas de salida. Esto no funciona en las líneas RTB(non-PRI) T1/E1. - -
    -
    -
    -Dirección IP del teléfono - este campo es para la dirección IP del teléfono si es un teléfono de VOZIP. Este es un campo opcional - -
    -
    -
    -Dirección IP del ordenador - este campo es para la dirección IP del ordenador del usuario. Es un campo opcional - -
    -
    -
    -IP del servidor - Este menú es donde usted selecciona en que servidor está el teléfono activo. - -
    -
    -
    -Conexión - la conexión usada para el usuario del teléfono a laconexión a los usos del cliente. - -
    -
    -
    -Contraseña - la contraseña usada para el usuario del teléfono a laconexión a los usos del cliente. - -
    -
    -
    -Estado - el estado del teléfono en el sistema, puede ser ACTIVO y ADMIN permiten que los clientes del GUI trabajen. ADMIN permite el acceso a este Web site de administración. El resto de los estados no permiten el acceso al GUI o al Web de Admin. - -
    -
    -
    -Cuenta activa - si el teléfono está activado ponerla en la lista del cliente del GUI. - -
    -
    -
    -Tipo de teléfono - solamente para información administrativas. - -
    -
    -
    -Nombre completo - usado por el GUIclient en la lista de teléfonos activos. - -
    -
    -
    -Compañía - solamente para las notas administrativas. - -
    -
    -
    -Cuadro - todavía no puesto en ejecución. - -
    -
    -
    -Nuevos mensajes - número de los nuevos mensajes del Buzón de Voz para este teléfono en el servidor del asterisco. - -
    -
    -
    -Viejos mensajes - número de los viejos mensajes del Buzón de Voz para este teléfono en el servidor del asterisco. - -
    -
    -
    -Protocolo del cliente - el protocolo que el teléfono utiliza para conectar con el servidor del asterisco: El Sip, IAX2, Zap. También, para los números External remotos o los números SpeedDial que usted desea enumerar como teléfonos. - -
    -
    -
    -GMT local - La diferencia a partir del tiempo malo del ZULÚ del time(or de Greenwich) donde se localiza el teléfono. NO AJUSTE POR TIEMPO DE LOS AHORROS DE LA LUZ DEL DÃA. Esto es utilizada por la campaña de VICIDIAL para exhibir exactamente el tiempo y el tiempo del cliente. - -
    -
    -
    -Conexión del encargado - Ésta es la conexión que los clientes del GUI para este teléfono utilizarán tener acceso a la base de datos donde residen los datos del servidor. - -
    -
    -
    -Secreto del encargado - Ésta es la contraseña que los clientes del GUI para este teléfono utilizarán tener acceso a la base de datos donde residen los datos del servidor. - -
    -
    -
    -Usuario del defecto de VICIDIAL - éste debe poner un valor prefijado en el campo del usuario de VICIDIAL siempre que este usuario del teléfono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún usuario. - -
    -
    -
    -Paso del defecto de VICIDIAL - éste debe poner un valor prefijado en el campo de la contraseña de VICIDIAL siempre que este usuario del teléfono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún paso. - -
    -
    -
    -Campaña del defecto de VICIDIAL - éste debe poner un valor prefijado en el campo de la campaña de VICIDIAL siempre que este usuario del teléfono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ninguna campaña. - -
    -
    -
    -Parque Exten - Ésta es la extensión del estacionamiento del defecto para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie esto. - -
    -
    -
    -Extensión de la conferencia - Ésta es la extensión del parque de la conferencia del defecto para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie esto. - -
    -
    -
    -Parque Exten de VICIDIAL - Ésta es la extensión del estacionamiento del defecto para el cliente app de VICIDIAL. Verifique que diverso trabaje antes de que usted cambie esto. - -
    -
    -
    -Archivo del parque de VICIDIAL - éste es el nombre del archivo de la extensión del parque del defecto VICIDIAL para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie éste limitado a 10 caracteres. - -
    -
    -
    -Prefijo del monitor - éste es el prefijo dialplan para supervisar de zap los canales automáticamente dentro del app astGUIclient. Cambie solamente según los expedientes de extensiones de extensions.conf ZapBarge. - -
    -
    -
    -Grabación Exten - Ésta es la extensión dialplan para la extensión de la grabación que se utiliza para caer en conferencias del meetme para registrarlas. Dura generalmente hasta que una hora si no parada verifica con el archivo de extensions.conf antes de cambiar. - -
    -
    -
    -VMAIL Exten principal - Ésta es la extensión dialplan que va a comprobar su voicemail. verifica con el archivo de extensions.conf antes de cambiar. - -
    -
    -
    -Descarga Exten de VMAIL - éste es el prefijo dialplan usado para enviar llamadas directamente al voicemail de un usuario de una llamada viva en el app. astGUIclient verifica con el archivo de extensions.conf antes de cambiar. - -
    -
    -
    -Contexto de Exten - éste es el contexto dialplan que este teléfono utiliza sobre todo. Se asume que todos los números marcados por los apps del cliente están utilizando este contexto así que es una buena idea cerciorarse de que éste es el contexto más amplio posible verifica con el archivo de extensions.conf antes de cambiar. - -
    -
    -
    -DTMF envían el canal - Ésta es la secuencia del canal usada para enviar sonidos de DTMF en conferencias del meetme de los apps del cliente. Verifique que exten y contexto con el archivo de extensions.conf. - -
    -
    -
    -Grupo de salida de la llamada - éste es el grupo de canal que las llamadas de salida de este teléfono están puestas de. Hay rutinas de un par en los apps del cliente que utilizan esto. Para zap los canales que usted desea utilizar algo como Zap/g2, porque los troncos IAX2 usted desearía utilizar el prefijo completo de IAX como IAX2/VICItest1:secret@10.10.10.15:4569. Verifique que los troncos con el file(it de extensions.conf sean generalmente lo que usted ha definido como la variable global del TRUNK en la tapa del archivo). - -
    -
    -
    -Localización del browser - esto es aplicable solamente a los clientes de UNIX/LINUX, el camino absoluto a Mozilla o el browser de Firefox en la máquina verifica esto lanzándolo manualmente. - -
    -
    -
    -Instale el directorio - éste es el lugar en donde las escrituras astGUIclient y de astVICIDIAL están situadas en su máquina. Para Win32 debe ser algo como C:\AST_VICI y para UNIX debe ser algo como /usr/local/perl_TK. verifica esto manualmente. - -
    -
    -
    -URL de CallerID - Ústa es la dirección de la tela de la página usada para hacer operaciones de búsqueda de encargo del callerID que es la dirección de prueba del defecto: http://astguiclient.sf.net/test_callerid_output.php - -
    -
    -
    -URL del defecto de VICIDIAL - Ésta es la dirección de la tela de la página usada para hacer preguntas de encargo de la forma del Web de VICIDIAL que es la dirección de prueba del defecto: http://astguiclient.sf.net/test_VICIDIAL_output.php - -
    -
    -
    -Registración de la llamada - esto se fija para verdad si el archivo de call_log.agi está en lugar en el archivo de extensions.conf para todo el de salida y las extensiones del retraso ' h ' para registrar todo llama. Ústa debe siempre ser 1 porque es manditory para muchos astGUIclient y características de VICIDIAL a trabajar correctamente. - -
    -
    -
    -Conmutación del usuario - fije para verdad para permitir que el usuario cambie a otra cuenta del usuario. NOTA: Si los interruptores del usuario ellos pueden iniciar la grabación en la conversación de teléfono del nuevo usuario - -
    -
    -
    -Comunicación - fije para verdad para permitir que el usuario comience llamadas de conferencia con hasta que seis líneas externas. - -
    -
    -
    -Retraso del Admin - sistema a verdad para permitir que el usuario pueda al retraso cualquier línea en la voluntad con astGUIclient. Buena idea de permitir solamente esto para los usuarios del Admin. - -
    -
    -
    -Secuestro del Admin - fije para verdad para permitir que el usuario pueda asir y volver a dirigir a su extensión cualquier línea en la voluntad con astGUIclient. Buena idea de permitir solamente esto para los usuarios del Admin. Pero es muy útil para los encargados. - -
    -
    -
    -Monitor del Admin - fije para verdad para permitir que el usuario pueda asir y volver a dirigir a su extensión cualquier línea en la voluntad con astGUIclient. Buena idea de permitir solamente esto para los usuarios del Admin. Pero es muy útil para los encargados y como herramienta del entrenamiento. - -
    -
    -
    -Parque de llamada - el sistema a verdad para permitir que el usuario pueda parquear invita el asimiento astGUIclient para ser tomado por cualquier otro usuario astGUIclient en el sistema. Las llamadas permanecen en el asimiento para hasta que un retraso de la media-hora entonces. Permitido generalmente para todos. - -
    -
    -
    -Cheque de Updater - fije para verdad para exhibir una advertencia del popup que el tiempo del updater no ha cambiado en 20 segundos. Útil para los usuarios del Admin. - -
    -
    -
    -Af que registra - fije para verdad para registrar muchas acciones del uso astGUIclient a un archivo de texto en la computadora del usuario. - -
    -
    -
    -La coleta permitió - al sistema verdad para hacer que los apps del cliente utilicen el sistema central de la coleta del asterisco. Requerido para VICIDIAL y recomendado para todos los usuarios. - -
    -
    -
    -Ventana emergente del CallerID - sistema a verdad para tener en cuenta los números definidos en el archivo de extensions.conf para enviar las pantallas del popup de CallerID a los usuarios astGUIclient. - -
    -
    -
    -Botón de VMail - fije para verdad para exhibir el botón de VOICEMAIL y los mensajes cuentan la exhibición en astGUIclient. - -
    -
    -
    -Rápido restaure - fije para verdad para permitir un nuevo índice de restauran de la información de la llamada para el astGUIclient. La tarifa inhabilitada defecto es el ms 1000 (1 segundo). Puede aumentar la carga de sistema si usted baja este número. - -
    -
    -
    -Rápido restaure la tarifa - en milisegundos. Utilizado solamente si es rápido restaure se permite. La tarifa inhabilitada defecto es el ms 1000 (1 segundo). Puede aumentar la carga de sistema si usted baja este número. - -
    -
    -
    -Persistant MySQL - si está permitida la conexión astGUIclient seguirá conectada en vez de conectar cada segundo. Útil si usted hace que un rápido restaure la tarifa fijada. Aumentará el número de conexiones en su máquina de MySQL. - -
    -
    -
    -Número siguiente del dial auto - si está permitido el cliente de VICIDIAL marcará el número siguiente en la lista automáticamente sobre la disposición de una llamada a menos que seleccionaran "para parar el marcar" en la pantalla de la disposición. - -
    -
    -
    -Pare Rec después de cada llamada - si está permitido el cliente de VICIDIAL parará se está encendiendo cualquier grabación después de que haya sido cada llamada dispositioned. Útil si usted está haciendo muchos de la grabación o usted están utilizando una forma de la tela para accionar la grabación. - -
    -
    -
    -Servidor de DBX - el servidor de la base de datos de MySQL con el cual este usuario debe conectar. - -
    -
    -
    -Base de datos de DBX - la base de datos de MySQL con la cual este usuario debe conectar. El defecto es asterisco. - -
    -
    -
    -Usuario de DBX - la conexión del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es cron. - -
    -
    -
    -Paso de DBX - la contraseña del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es 1234. - -
    -
    -
    -DBX viran - el puerto de MySQL hacia el lado de babor TCP que este usuario debe utilizar al conectar. El defecto es 3306. - -
    -
    -
    -Servidor de DBY - el servidor de la base de datos de MySQL con el cual este usuario debe conectar. Secundario server, no utilizado actualmente. - -
    -
    -
    -Base de datos de DBY - la base de datos de MySQL con la cual este usuario debe conectar. El defecto es asterisco. Secundario server, no utilizado actualmente. - -
    -
    -
    -Usuario de DBY - la conexión del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es cron. Secundario server, no utilizado actualmente. - -
    -
    -
    -Paso de DBY - la contraseña del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es 1234. Secundario server, no utilizado actualmente. - -
    -
    -
    -DBY viran - el puerto de MySQL hacia el lado de babor TCP que este usuario debe utilizar al conectar. El defecto es 3306. Secundario server, no utilizado actualmente. - - -



    - -TABLA DE LOS SERVIDORES

    -
    -
    -ID Del Servidor - Este campo es donde usted pone el nombre del servidor del asterisco, no tiene que ser un submarino oficial del dominio, apenas un apodo para identificar el servidor a los usuarios del Admin. - -
    -
    -
    -Descripción del servidor - el campo donde usted utiliza una frase pequeña para describir el servidor del asterisco. - -
    -
    -
    -IP address del servidor - el campo donde usted puso el IP address de la red del servidor del asterisco. - -
    -
    -
    -Activo - fije si el servidor del asterisco es activo o inactivo. - -
    -
    -
    -Versión del asterisco - fije la versión del asterisco que usted ha instalado en este servidor. Ejemplos: ' 1.2 ', ' 1.0.8 ', ' 1.0.7 ', ' CVS_HEAD ', ' REALMENTE VIEJO ', etc... Se utiliza esto porque las versiones 1.0.8 y 1.0.9 tienen un diverso método de ocuparse del insecto local del channels(a que ha estado fijado en CVS v1.0) y necesidad de ser tratado diferentemente cuando la manipulación de su Local/ acanala. También, CVS_HEAD actual y las 1.2 aplicaciones diverso encargado y comando del árbol del lanzamiento hicieron salir así que debe ser tratado diverso también. - -
    -
    -
    -Troncos máximos de VICIDIAL - este campo determinará el número de las líneas máximo que el auto-dialer de VICIDIAL procurará invitar este servidor. Si usted desea dedicar dos PRI llenos T1 a VICIDIALing en un servidor entonces usted fijaría esto a 46. E1 defecto es 96. - -
    -
    -
    -Anfitrión del telnet - éste es la dirección o el nombre del servidor del asterisco y es cómo los usos del encargado conectan con él de donde están funcionando. Si están funcionando en el servidor del asterisco, después el defecto del ' localhost ' está muy bien. - -
    -
    -
    -El telnet vira hacia el lado de babor - éste es el puerto de la conexión del encargado del servidor del asterisco y es cómo los usos del encargado conectan con ella de donde están funcionando. El defecto de ' 5038 ' está para un estándar instala muy bien. - -
    -
    -
    -Usuario del encargado - el username o la conexión conectaba genericly con el encargado del servidor del asterisco. El defecto es 'cron' - -
    -
    -
    -Secreto del encargado - el secreto o la contraseña conectaba genericly con el encargado del servidor del asterisco. El defecto es '1234' - -
    -
    -
    -Usuario en modo actualización del encargado - el username o la conexión conectaba con el encargado del servidor del asterisco optimizado para las escrituras de la actualización. Omita es 'updatecron' y asume el mismo secreto que el usuario genérico. - -
    -
    -
    -El encargado escucha usuario - el username o la conexión usada para conectar con el encargado del servidor del asterisco optimizado para las escrituras que esperan a escuchar solamente salida. Omita es 'listencron' y asume el mismo secreto que el usuario genérico. - -
    -
    -
    -El encargado envía a usuario - el username o la conexión usada para conectar con el encargado del servidor del asterisco optimizado para las escrituras que envían solamente acciones al encargado. Omita es 'sendcron' y asume el mismo secreto que el usuario genérico. - -
    -
    -
    -El GMT del servidor compensó - la diferencia sobre horas a partir del tiempo del GMT no ajustado según el Luz del di'a-Ahorro-Tiempo del servidor. El defecto es '-5' - -
    -
    -
    -Descarga Exten - el prefijo de VMail de la extensión usado en este servidor para enviar llamadas directamente a través de agc a una caja específica del voicemail. El defecto es '85026666666666' - -
    -
    -
    -Extensión del ANUNCIO de VICIDIAL - la extensión del defecto si ninguno está presente en la campaña enviar llamadas para a marcar auto de VICIDIAL. El defecto es '8365' - -
    -
    -
    -Contexto del defecto - el contexto dialplan del defecto usado para las escrituras que funcionan para este servidor. El defecto es 'defecto' - - -



    - -TABLA DE CONFERENCIAS

    -
    -
    -Número de la conferencia - este campo es donde usted pone el número del dialpna de la conferencia del meetme. También se recomienda que el número del meetme en meetme.conf empareja este número para cada entrada. Esto está para las conferencias en astGUIclient y se utiliza para la funcionalidad de leave-3way-call en VICIDIAL. - -
    -
    -
    -IP del servidor - El menú donde usted selecciona el servidor del asterisco que esta conferencia estará encendido. - - - - - - -







    -







    -EL EXTREMO -
    - - - -ASTERISK ADMIN: Administración - <? echo $process ?> - - - -
    - - - - - - -
      ASTERISK ADMIN - Salir  
      ENUMERE TODOS LOS TELÉFONOS | AGREGUE Un TELÉFONO NUEVO | BÚSQUEDA PARA Un TELÉFONO | AGREGUE Un SERVIDOR | ENUMERE TODOS LOS SERVIDORES
      DEMUESTRE TODAS LAS CONFERENCIAS | AGREGUE Una NUEVA CONFERENCIA
    -"; - -echo "
    AGREGUE Un TELÉFONO NUEVO
    \n"; -echo "\n"; -echo "
    \n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Extensión del teléfono: $NWB#phones-extension$NWE
    Número De Dialplan: (Solamente dígitos)$NWB#phones-dialplan_number$NWE
    Buzón de voz: (Solamente dígitos)$NWB#phones-voicemail_id$NWE
    CallerID De salida: (Solamente dígitos)$NWB#phones-outbound_cid$NWE
    Dirección IP del teléfono: (optional)$NWB#phones-phone_ip$NWE
    Dirección IP del ordenador: (optional)$NWB#phones-computer_ip$NWE
    IP Del Servidor: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Contraseña: $NWB#phones-pass$NWE
    Estado: $NWB#phones-status$NWE
    Cuenta Activa: $NWB#phones-active$NWE
    Tipo Del Teléfono: $NWB#phones-phone_type$NWE
    Nombre Completo: $NWB#phones-fullname$NWE
    Compañía: $NWB#phones-company$NWE
    Foto: $NWB#phones-picture$NWE
    Protocolo Del Cliente: $NWB#phones-protocol$NWE
    GMT Local: (No ajustar para el DST)$NWB#phones-local_gmt$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW SERVERS FORM SCREEN -###################### - -if ($ADD==11) -{ -echo ""; - -echo "
    AGREGAR Un SERVIDOR NUEVO\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Del Servidor: $NWB#servers-server_id$NWE
    Descripción Del Servidor: $NWB#servers-server_description$NWE
    Dirección IP del Servidor: $NWB#servers-server_ip$NWE
    Activo: $NWB#servers-active$NWE
    Versión De Asterisk: $NWB#servers-asterisk_version$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW CONFERENCES FORM SCREEN -###################### - -if ($ADD==111) -{ -echo ""; - -echo "
    AGREGUE Una NUEVA CONFERENCIA\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Número de la Conferencia: (Solamente dígitos)$NWB#conferences-conf_exten$NWE
    IP Del Servidor: $NWB#conferences-server_ip$NWE
    \n"; - -} - - -###################### -# ADD=2 adds the new phone to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    TELÉFONO NO AGREGADO - hay ya un teléfono en el sistema con esta extensión/servidor\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    TELÉFONO NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - echo "
    EL TELÉFONO AGREGÚ\n"; - - $stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new server to the system -###################### - -if ($ADD==21) -{ - echo ""; - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    SERVIDOR NO AGREGADO - hay ya un servidor en el sistema con esta identificación\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    SERVIDOR NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - echo "
    SERVIDOR AGREGADO\n"; - - $stmt="INSERT INTO servers (server_id,server_description,server_ip,active,asterisk_version) values('$server_id','$server_description','$server_ip','$active','$asterisk_version');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new conference to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CONFERENCIA NO AGREGADA - hay ya una conferencia en el sistema con esta identificación y servidor\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    CONFERENCIA NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - echo "
    LA CONFERENCIA AGREGÚ\n"; - - $stmt="INSERT INTO conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=100; -} - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of phone -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGdelete_phones < 1) ) - { - echo "
    TELÉFONO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    IP Del Servidor be at least 7 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DEL TELÉFONO: $extension - $server_ip\n"; - echo "

    Chasque aquí para suprimir el teléfono $extension - $server_ip


    \n"; - } - -$ADD='3'; # go to phone modification below -} - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete phone record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGdelete_phones < 1) ) - { - echo "
    TELÉFONO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    IP Del Servidor be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from phones where extension='$extension' and server_ip='$server_ip' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING PHONE!!!|$PHP_AUTH_USER|$ip|extension='$extension'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
    LA CANCELADURA DEL TELÉFONO TERMINÓ: $extension - $server_ip\n"; - echo "

    \n"; - } - -$ADD='0'; # go to phone list -} - - - - - - -###################### -# ADD=3 modify phone info in the system -###################### - -if ($ADD==3) -{ - echo ""; - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFICANDO EL TELÉFONO: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Extensión del teléfono: $NWB#phones-extension$NWE
    Número De Dialplan: (Solamente dígitos)$NWB#phones-dialplan_number$NWE
    Buzón de voz: (Solamente dígitos)$NWB#phones-voicemail_id$NWE
    CallerID De salida: (Solamente dígitos)$NWB#phones-outbound_cid$NWE
    Dirección IP del teléfono: (optional)$NWB#phones-phone_ip$NWE
    Dirección IP del ordenador: (optional)$NWB#phones-computer_ip$NWE
    IP Del Servidor: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Contraseña: $NWB#phones-pass$NWE
    Estado: $NWB#phones-status$NWE
    Cuenta Activa: $NWB#phones-active$NWE
    Tipo Del Teléfono: $NWB#phones-phone_type$NWE
    Nombre Completo: $NWB#phones-fullname$NWE
    Compañía: $NWB#phones-company$NWE
    Foto: $NWB#phones-picture$NWE
    Mensajes Nuevos: $row[14]$NWB#phones-messages$NWE
    Mensajes Viejos: $row[15]$NWB#phones-old_messages$NWE
    Protocolo Del Cliente: $NWB#phones-protocol$NWE
    GMT Local: (No ajustar para el DST)$NWB#phones-local_gmt$NWE
    Login del Manager: $NWB#phones-ASTmgrUSERNAME$NWE
    Contraseña del Manager: $NWB#phones-ASTmgrSECRET$NWE
    Usuario por defecto de VICIDIAL: $NWB#phones-login_user$NWE
    Contraseña por defecto de VICIDIAL: $NWB#phones-login_pass$NWE
    Campaña por defecto de VICIDIAL: $NWB#phones-login_campaign$NWE
    Extensión del parking: $NWB#phones-park_on_extension$NWE
    Extensión de la conferencia: $NWB#phones-conf_on_extension$NWE
    Exten. Del parking de VICIDIAL: $NWB#phones-VICIDIAL_park_on_extension$NWE
    Archivo para música del parking de VICIDIAL: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Prefijo al monitorizar: $NWB#phones-monitor_prefix$NWE
    Exten de Grabación: $NWB#phones-recording_exten$NWE
    Exten de VmailMain: $NWB#phones-voicemail_exten$NWE
    Exten de VmaiDumpl: $NWB#phones-voicemail_dump_exten$NWE
    Contexto De Exten: $NWB#phones-ext_context$NWE
    Canal de envío del DTMF: $NWB#phones-dtmf_send_extension$NWE
    Grupo de las llamadas de salida: $NWB#phones-call_out_number_group$NWE
    Localización del Navegador: $NWB#phones-client_browser$NWE
    Directorio de instalación: $NWB#phones-install_directory$NWE
    URL del CallerID: $NWB#phones-local_web_callerID_URL$NWE
    URL por defecto de VICIDIAL: $NWB#phones-VICIDIAL_web_URL$NWE
    Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
    Cambio de Usuario: $NWB#phones-user_switching_enabled$NWE
    Conferencias: $NWB#phones-conferencing_enabled$NWE
    Colgar del Admin: $NWB#phones-admin_hangup_enabled$NWE
    Captura del Admin: $NWB#phones-admin_hijack_enabled$NWE
    Monitorización del Admin: $NWB#phones-admin_monitor_enabled$NWE
    Parking de Llamada: $NWB#phones-call_parking_enabled$NWE
    Uptader Check: $NWB#phones-updater_check_enabled$NWE
    AF Logging: $NWB#phones-AFLogging_enabled$NWE
    Colas permitidas: $NWB#phones-QUEUE_ACTION_enabled$NWE
    Ventana emergente del CallerID: $NWB#phones-CallerID_popup_enabled$NWE
    Botón Vmail: $NWB#phones-voicemail_button_enabled$NWE
    Refresco rápido: $NWB#phones-enable_fast_refresh$NWE
    Refresco rápido de la tarifa: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Auto Marcar el Siguiente Número: $NWB#phones-auto_dial_next_number$NWE
    Parar de Grabar después de cada llamada: $NWB#phones-VDstop_rec_after_each_call$NWE
    Servidor de DBX: (Primario DB Server)$NWB#phones-DBX_server$NWE
    Base de datos de DBX: (Primario Server Database)$NWB#phones-DBX_database$NWE
    Usuario de DBX: (Primario DB Login)$NWB#phones-DBX_user$NWE
    Contraseña de DBX: (Primario DB Secret)$NWB#phones-DBX_pass$NWE
    Puerto de DBX: (Primario DB Port)$NWB#phones-DBX_port$NWE
    Servidor de DBY: (Secundario DB Server)$NWB#phones-DBY_server$NWE
    Base de datos de DBY: (Secundario Server Database)$NWB#phones-DBY_database$NWE
    Usuario de DBY: (Secundario DB Login)$NWB#phones-DBY_user$NWE
    Contraseña de DBY: (Secundario DB Secret)$NWB#phones-DBY_pass$NWE
    Puerto de DBY: (Secundario DB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Pinchar aquí­ para ver las estadísticas del teléfono\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    SUPRIMA ESTE TELÉFONO\n"; - } - -} - - -###################### -# ADD=31 modify server info in the system -###################### - -if ($ADD==31) -{ - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFICAR UN REGISTRO DEL SERVIDOR: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Del Servidor: $NWB#servers-server_id$NWE
    Descripción Del Servidor: $NWB#servers-server_description$NWE
    Dirección IP del Servidor: $NWB#servers-server_ip$NWE
    Activo: $NWB#servers-active$NWE
    Versión De Asterisk: $NWB#servers-asterisk_version$NWE
    Máx. Trunks en VICIDIAL: $NWB#servers-max_vicidial_trunks$NWE
    Host Del Telnet: $NWB#servers-telnet_host$NWE
    Puerto Del Telnet: $NWB#servers-telnet_port$NWE
    Usuario Del Manager: $NWB#servers-ASTmgrUSERNAME$NWE
    Contraseña del Manager: $NWB#servers-ASTmgrSECRET$NWE
    Usuario del Updater del Manager: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Usuario Listen del Manager: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Usuario Send del Manager: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    GMT Local: (No ajustar para el DST)$NWB#servers-local_gmt$NWE
    Extensión de Vmail Dump : $NWB#servers-voicemail_dump_exten$NWE
    Extensión del AD de VICIDIAL: $NWB#servers-answer_transfer_agent$NWE
    Contexto por Defecto: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    TELÉFONOS DENTRO DE ESTE SERVIDOR:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    EXTENSIÓNNOMBREACTIVO
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Este servidor tiene $active_lists Teléfonos activos y $inactive_lists Teléfonos inactivos

    \n"; -echo "
    \n"; -} - - -###################### -# ADD=311 modify conference info in the system -###################### - -if ($ADD==311) -{ - echo ""; - - $stmt="SELECT * from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFICAR UN REGISTRO DE LA CONFERENCIA: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conferencia: $NWB#conferences-conf_exten$NWE
    IP Del Servidor: $NWB#conferences-server_ip$NWE
    Extensión Actual:
    \n"; - -echo "
    \n"; - -} - - - -###################### -# ADD=4 submit phone modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) - {echo "
    TELÉFONO NO MODIFICADO - hay ya un teléfono en el sistema con esta extensión/servidor\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    TELÉFONO NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - echo "
    TELÉFONO MODIFICADO: $extension\n"; - - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid' where extension='$old_extension' and server_ip='$old_server_ip';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFICANDO EL TELÉFONO: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Extensión del teléfono: $NWB#phones-extension$NWE
    Número De Dialplan: (Solamente dígitos)$NWB#phones-dialplan_number$NWE
    Buzón de voz: (Solamente dígitos)$NWB#phones-voicemail_id$NWE
    CallerID De salida: (Solamente dígitos)$NWB#phones-outbound_cid$NWE
    Dirección IP del teléfono: (optional)$NWB#phones-phone_ip$NWE
    Dirección IP del ordenador: (optional)$NWB#phones-computer_ip$NWE
    IP Del Servidor: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Contraseña: $NWB#phones-pass$NWE
    Estado: $NWB#phones-status$NWE
    Cuenta Activa: $NWB#phones-active$NWE
    Tipo Del Teléfono: $NWB#phones-phone_type$NWE
    Nombre Completo: $NWB#phones-fullname$NWE
    Compañía: $NWB#phones-company$NWE
    Foto: $NWB#phones-picture$NWE
    Mensajes Nuevos: $row[14]$NWB#phones-messages$NWE
    Mensajes Viejos: $row[15]$NWB#phones-old_messages$NWE
    Protocolo Del Cliente: $NWB#phones-protocol$NWE
    GMT Local: (No ajustar para el DST)$NWB#phones-local_gmt$NWE
    Login del Manager: $NWB#phones-ASTmgrUSERNAME$NWE
    Contraseña del Manager: $NWB#phones-ASTmgrSECRET$NWE
    Usuario por defecto de VICIDIAL: $NWB#phones-login_user$NWE
    Contraseña por defecto de VICIDIAL: $NWB#phones-login_pass$NWE
    Campaña por defecto de VICIDIAL: $NWB#phones-login_campaign$NWE
    Extensión del parking: $NWB#phones-park_on_extension$NWE
    Extensión de la conferencia: $NWB#phones-conf_on_extension$NWE
    Exten. Del parking de VICIDIAL: $NWB#phones-VICIDIAL_park_on_extension$NWE
    Archivo para música del parking de VICIDIAL: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Prefijo al monitorizar: $NWB#phones-monitor_prefix$NWE
    Exten de Grabación: $NWB#phones-recording_exten$NWE
    Exten de VmailMain: $NWB#phones-voicemail_exten$NWE
    Exten de VmaiDumpl: $NWB#phones-voicemail_dump_exten$NWE
    Contexto De Exten: $NWB#phones-ext_context$NWE
    Canal de envío del DTMF: $NWB#phones-dtmf_send_extension$NWE
    Grupo de las llamadas de salida: $NWB#phones-call_out_number_group$NWE
    Localización del Navegador: $NWB#phones-client_browser$NWE
    Directorio de instalación: $NWB#phones-install_directory$NWE
    URL del CallerID: $NWB#phones-local_web_callerID_URL$NWE
    URL por defecto de VICIDIAL: $NWB#phones-VICIDIAL_web_URL$NWE
    Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
    Cambio de Usuario: $NWB#phones-user_switching_enabled$NWE
    Conferencias: $NWB#phones-conferencing_enabled$NWE
    Colgar del Admin: $NWB#phones-admin_hangup_enabled$NWE
    Captura del Admin: $NWB#phones-admin_hijack_enabled$NWE
    Monitorización del Admin: $NWB#phones-admin_monitor_enabled$NWE
    Parking de Llamada: $NWB#phones-call_parking_enabled$NWE
    Uptader Check: $NWB#phones-updater_check_enabled$NWE
    AF Logging: $NWB#phones-AFLogging_enabled$NWE
    Colas permitidas: $NWB#phones-QUEUE_ACTION_enabled$NWE
    Ventana emergente del CallerID: $NWB#phones-CallerID_popup_enabled$NWE
    Botón Vmail: $NWB#phones-voicemail_button_enabled$NWE
    Refresco rápido: $NWB#phones-enable_fast_refresh$NWE
    Refresco rápido de la tarifa: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Auto Marcar el Siguiente Número: $NWB#phones-auto_dial_next_number$NWE
    Parar de Grabar después de cada llamada: $NWB#phones-VDstop_rec_after_each_call$NWE
    Servidor de DBX: (Primario DB Server)$NWB#phones-DBX_server$NWE
    Base de datos de DBX: (Primario Server Database)$NWB#phones-DBX_database$NWE
    Usuario de DBX: (Primario DB Login)$NWB#phones-DBX_user$NWE
    Contraseña de DBX: (Primario DB Secret)$NWB#phones-DBX_pass$NWE
    Puerto de DBX: (Primario DB Port)$NWB#phones-DBX_port$NWE
    Servidor de DBY: (Secundario DB Server)$NWB#phones-DBY_server$NWE
    Base de datos de DBY: (Secundario Server Database)$NWB#phones-DBY_database$NWE
    Usuario de DBY: (Secundario DB Login)$NWB#phones-DBY_user$NWE
    Contraseña de DBY: (Secundario DB Secret)$NWB#phones-DBY_pass$NWE
    Puerto de DBY: (Secundario DB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Pinchar aquí­ para ver las estadísticas del teléfono\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    SUPRIMA ESTE TELÉFONO\n"; - } - -} - -###################### -# ADD=41 submit server modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_id != $old_server_id) ) - {echo "
    SERVIDOR NOT MODIFIED - there is already a server in the system with this server_id\n";} - else - { - $stmt="SELECT count(*) from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_ip != $old_server_ip) ) - {echo "
    SERVIDOR NO MODIFICADO - hay ya un servidor en el sistema con este server_ip\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    SERVIDOR NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - echo "
    SERVIDOR MODIFICADO: $server_ip\n"; - - $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFICAR UN REGISTRO DEL SERVIDOR: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Del Servidor: $NWB#servers-server_id$NWE
    Descripción Del Servidor: $NWB#servers-server_description$NWE
    Dirección IP del Servidor: $NWB#servers-server_ip$NWE
    Activo: $NWB#servers-active$NWE
    Versión De Asterisk: $NWB#servers-asterisk_version$NWE
    Máx. Trunks en VICIDIAL: $NWB#servers-max_vicidial_trunks$NWE
    Host Del Telnet: $NWB#servers-telnet_host$NWE
    Puerto Del Telnet: $NWB#servers-telnet_port$NWE
    Usuario Del Manager: $NWB#servers-ASTmgrUSERNAME$NWE
    Contraseña del Manager: $NWB#servers-ASTmgrSECRET$NWE
    Usuario del Updater del Manager: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Usuario Listen del Manager: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Usuario Send del Manager: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    GMT Local: (No ajustar para el DST)$NWB#servers-local_gmt$NWE
    Extensión de Vmail Dump : $NWB#servers-voicemail_dump_exten$NWE
    Extensión del AD de VICIDIAL: $NWB#servers-answer_transfer_agent$NWE
    Contexto por Defecto: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    TELÉFONOS DENTRO DE ESTE SERVIDOR:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    EXTENSIÓNNOMBREACTIVO
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Este servidor tiene $active_lists Teléfonos activos y $inactive_lists Teléfonos inactivos

    \n"; -echo "
    \n"; - -} - -###################### -# ADD=411 submit conference modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) - {echo "
    CONFERENCIA - hay ya una conferencia en el sistema con esta extensión - servidor NO MODIFICADO\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    CONFERENCIA NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - echo "
    CONFERENCIA MODIFICADA: $conf_exten\n"; - - $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from conferences where conf_exten='$conf_exten';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFICAR UN REGISTRO DE LA CONFERENCIA: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conferencia: $NWB#conferences-conf_exten$NWE
    IP Del Servidor: $NWB#conferences-server_ip$NWE
    Extensión Actual:
    \n"; - -echo "
    \n"; - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo ""; - -echo "
    BÚSQUEDA PARA Un TELÉFONO\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Extensión:
    Nombre Completo:
    Phone type:
    \n"; - -} - -###################### -# ADD=66 phone search results -###################### - -if ($ADD==66) -{ - echo ""; - - $SQL = ''; - if ($extension) {$SQL .= "extension LIKE \"%$extension%\" and";} - if ($fullname) {$SQL .= "fullname LIKE \"%$fullname%\" and";} - if ($phone_type) {$SQL .= "phone_type LIKE \"%$phone_type%\" and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from phones $SQL order by extension,server_ip;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    RESULTADOS DE LA BÚSQUEDA:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFICAR | ESTADÃSTICAS
    \n"; - -} - - - -###################### -# ADD=0 display all active phones -###################### -if ($ADD==0) -{ - echo ""; - - $stmt="SELECT * from phones order by extension,server_ip"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    LISTADOS DE TELÉFONOS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFICAR | ESTADÃSTICAS
    \n"; -} - -###################### -# ADD=10 display all servers -###################### -if ($ADD==10) -{ - echo ""; - - $stmt="SELECT * from servers order by server_id"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    LISTADOS DEL SERVIDOR:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[1] $row[2] $row[4] $row[3]  MODIFICAR
    \n"; -} - - -###################### -# ADD=100 display all conferences -###################### -if ($ADD==100) -{ - echo ""; - - $stmt="SELECT * from conferences order by conf_exten"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    LISTADOS DE CONFERENCIAS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]  MODIFICAR
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds"; -echo "             VERSIÓN: $version"; -echo "             CONSTRUCCION: $build
    \n"; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_es/dbconnect.php b/agc_2-X/trunk/LANG_admin/astguiclient_es/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_es/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_es/help.gif b/agc_2-X/trunk/LANG_admin/astguiclient_es/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_es/inbound_popup.php b/agc_2-X/trunk/LANG_admin/astguiclient_es/inbound_popup.php deleted file mode 100644 index 3f158865..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_es/inbound_popup.php +++ /dev/null @@ -1,228 +0,0 @@ - LICENSE: GPLv2 -### -# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system. -# -# changes: -# 60620-1329 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK SALIENTES REMOTOS: Popup - - -
    - - 0) -{ - - $stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='" . mysql_real_escape_string($parked_time) . "' and channel='" . mysql_real_escape_string($channel) . "' LIMIT 1"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: " . mysql_real_escape_string($channel) . "','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Vuelva a dirigir el comando enviado para el canal $channel       $NOW_TIME\n

    \n"; - - - $url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&'; - $Suser = 'username='; - $Spass = '&passwd='; - $Sphone = '&phone='; - - $newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone"; - if ( ($phone == 'unknown') or (strlen($phone)<9) ) - {$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";} - - echo "Mire para arriba a este cliente en sistema del servicio de cliente\n

    \n"; - - echo "Cierre esta ventana\n

    \n"; -} -else -{ - echo "Vuelva a dirigir el comando FALLADO para el canal $channel       $NOW_TIME\n

    \n"; - echo "Cierre esta ventana\n

    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_es/phone_stats.php b/agc_2-X/trunk/LANG_admin/astguiclient_es/phone_stats.php deleted file mode 100644 index c5286b55..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_es/phone_stats.php +++ /dev/null @@ -1,244 +0,0 @@ - LICENSE: GPLv2 -# -# -# changes: -# 60620-1333 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$admin_page = './admin.php'; - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $row[0]; - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK ADMIN: Estadísticas Del Teléfono - - -
    -
    - - - - - - -\n"; -echo "
      ASTERISK ADMIN: Administración  
      ENUMERE TODOS LOS TELÉFONOS | AGREGUE Un TELÉFONO NUEVO | BÚSQUEDA PARA Un TELÉFONO | AGREGUE Un SERVIDOR | ENUMERE TODOS LOS SERVIDORES
      DEMUESTRE TODAS LAS CONFERENCIAS | AGREGUE Una NUEVA CONFERENCIA
      \n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - -echo "
    \n"; - -echo "TIEMPO DE LLAMADA Y CANALES:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} -# echo "|$stmt|\n"; - -echo "\n"; -echo "
    GRUPO DE CANALES CUENTA HORAS:MINUTOS
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    LLAMADAS TOTALES $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "LLAMADAS DEL ÚLTIMO 1000 PARA LA GAMA DE LA FECHA:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - - - $call_seconds=0; - $o++; - } - - -echo "
    NÚMERO GRUPO DE CANALES FECHA LENGTH(MIN.)
    $row[0] $row[1] $row[2] $row[3]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/astguiclient_es/remote_inbound.php b/agc_2-X/trunk/LANG_admin/astguiclient_es/remote_inbound.php deleted file mode 100644 index c49b8e59..00000000 --- a/agc_2-X/trunk/LANG_admin/astguiclient_es/remote_inbound.php +++ /dev/null @@ -1,162 +0,0 @@ - LICENSE: GPLv2 -### -# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available) - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$ENVIAR=$_GET["ENVIAR"]; if (!$ENVIAR) {$ENVIAR=$_POST["ENVIAR"];} - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - echo"\n"; - echo"ASTERISK ENTRANTES REMOTOS: Principal\n"; - echo"\n"; - echo"\n"; - echo"\n"; - -?> - - -
    - -
    \n"; - -echo "Chasque encendido el canal debajo de ése que usted quisiera haber dirigido a su teléfono

    \n"; - -echo "
    \n";
    -echo "CHANNEL    SERVIDOR        CHANNEL_GROUP   EXTENSION    PARKED_BY            PARKED_TIME        \n";
    -echo "----------------------------------------------------------------------------------------------\n";
    -
    -
    -
    -
    -
    -$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		$channel =			sprintf("%-11s", $row[0]);
    -		$server =			sprintf("%-14s", $row[1]);
    -		$channel_group =	sprintf("%-16s", $row[2]);
    -		$extension =		sprintf("%-13s", $row[3]);
    -		$parked_by =		sprintf("%-21s", $row[4]);
    -		$parked_time =		sprintf("%-19s", $row[5]);
    -
    -		echo "$channel$server$channel_group$extension$parked_by$parked_time\n";
    -
    -		$i++;
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "*************************************** NO PARKED CALLS **************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	}
    -
    -
    -$ENDtime = date("U");
    -
    -$RUNtime = ($ENDtime - $STARTtime);
    -
    -echo "
    \n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_CLOSERstats.php deleted file mode 100644 index b7a7bb8c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_CLOSERstats.php +++ /dev/null @@ -1,396 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1714 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select group_id from vicidial_inbound_groups;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Closer Stats\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Closer Stats                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls placed from this Campaign:        $TOTALcalls\n";
    -echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total DROP Calls:                             $DROPcalls  $DROPpercent%\n";
    -echo "Average Length for DROP Calls in seconds:     $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USER                     | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='$group';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_VDADstats.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_VDADstats.php deleted file mode 100644 index 9ac17006..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_VDADstats.php +++ /dev/null @@ -1,417 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1718 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Stats                             $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls placed from this Campaign:        $TOTALcalls\n";
    -echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total DROP Calls:                             $DROPcalls  $DROPpercent%\n";
    -echo "Average Length for DROP Calls in seconds:     $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- AUTO-DIAL NO ANSWERS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$NAcalls =	sprintf("%10s", $row[0]);
    -$NApercent = (($NAcalls / $TOTALcalls) * 100);
    -$NApercent = round($NApercent, 0);
    -
    -$average_na_seconds = ($row[1] / $row[0]);
    -$average_na_seconds = round($average_na_seconds, 0);
    -$average_na_seconds =	sprintf("%10s", $average_na_seconds);
    -
    -echo "Total NA calls -Busy,Disconnect,BTvoicemail:  $NAcalls  $NApercent%\n";
    -echo "Average Call Length for NA Calls in seconds:  $average_na_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USER                     | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_VICIDIAL_hopperlist.php deleted file mode 100644 index 1824a939..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_VICIDIAL_hopperlist.php +++ /dev/null @@ -1,161 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1654 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.10.15';} - -$stmt="select campaign_id,campaign_name from vicidial_campaigns order by campaign_id;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $campaign_id[$i] =$row[0]; - $campaign_name[$i] =$row[1]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Hopper List\n"; -echo "
    \n"; -#echo "\n"; -#echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Live Current Hopper List                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -
    -echo "Total leads in hopper right now:       $TOTALcalls\n";
    -
    -
    -##############################
    -#########  LEAD STATS
    -
    -echo "\n";
    -echo "---------- LEADS IN HOPPER\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$FMT_i =		sprintf("%-4s", $i);
    -	$lead_id =		sprintf("%-9s", $row[0]);
    -	$phone_number =	sprintf("%-10s", $row[1]);
    -	$state =		sprintf("%-5s", $row[2]);
    -	$status =		sprintf("%-6s", $row[3]);
    -	$count =		sprintf("%-5s", $row[4]);
    -	$gmt =			sprintf("%-6s", $row[5]);
    -
    -	echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_admin_log_display.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_admin_log_display.php deleted file mode 100644 index b5286873..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_admin_log_display.php +++ /dev/null @@ -1,118 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$query_date = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$query_date); - -# AST GUI database administration -# AST_admin_log_display.php -# -# CHANGES -# 50325-0932 - First build -# 51123-1443 - removed globals=on requirement -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1044 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '0.0.4'; -$build = '60620-1044'; - -$STARTtime = date("U"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN LOG DISPLAY"; -echo "\n"; - -# Fri, 25 Mar 2005 - -$DAY_DATE = date("j"); -if ($DAY_DATE < 10) -# {$GREP_DATE = date("D, j M Y");} - {$GREP_DATE = date("D, 0j M Y");} -else - {$GREP_DATE = date("D, j M Y");} - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!$query_date) {$query_date = $GREP_DATE;} - -$Gquery_date = eregi_replace(" ",'\ ',$query_date); -echo "\n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -echo "VICIDIAL ADMIN CHANGE LOG                             $NOW_TIME\n";
    -
    -#passthru("grep $Gquery_date /home/www/htdocs/vicidial/admin_changes_log.txt");
    -passthru("grep $Gquery_date $WeBServeRRooT/vicidial/admin_changes_log.txt");
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_performance.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_performance.php deleted file mode 100644 index a489bc7d..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_performance.php +++ /dev/null @@ -1,232 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1711 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["shift"])) {$shift=$_GET["shift"];} - elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Agent Performance\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:33:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:33:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:33:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:33:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TALK   | TALKAVG| A    | B    | DC   | DNC  | N    | NI   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='" . mysql_real_escape_string($group) . "' group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_performance_detail.php
    deleted file mode 100644
    index 2dd3dc5e..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_performance_detail.php
    +++ /dev/null
    @@ -1,406 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1712 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($group)) {$group = '';}
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -$stmt="select campaign_id from vicidial_campaigns;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$campaigns_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $campaigns_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 03:45:00";   
    -	$query_date_END = "$query_date 15:15:00";
    -	$time_BEGIN = "03:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:15:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance Detail                        $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TIME   | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG| A    | B    | DC   | DNC  | N    | NI   | CB   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtime=($TOTtime + $row[1] + $row[5] + $row[7] + $row[9]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$TOTtotWAIT=($TOTtotWAIT + $row[7]);
    -	$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
    -	$TOTtotDISPO=($TOTtotDISPO + $row[9]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtime =	($row[1] + $row[5] + $row[7] + $row[9]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -	$USERtotPAUSE =	$row[5];
    -	$USERavgPAUSE =	$row[6];
    -	$USERtotWAIT =	$row[7];
    -	$USERavgWAIT =	$row[8];
    -	$USERtotDISPO =	$row[9];
    -	$USERavgDISPO =	$row[10];
    -
    -	$USERtime_M = ($USERtime / 60);
    -	$USERtime_M = round($USERtime_M, 2);
    -	$USERtime_M_int = intval("$USERtime_M");
    -	$USERtime_S = ($USERtime_M - $USERtime_M_int);
    -	$USERtime_S = ($USERtime_S * 60);
    -	$USERtime_S = round($USERtime_S, 0);
    -	if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
    -	$USERtime_MS = "$USERtime_M_int:$USERtime_S";
    -	$pfUSERtime_MS[$i] =		sprintf("%7s", $USERtime_MS);
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	$USERtotPAUSE_M = ($USERtotPAUSE / 60);
    -	$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
    -	$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
    -	$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
    -	$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
    -	$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
    -	if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
    -	$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
    -	$pfUSERtotPAUSE_MS[$i] =		sprintf("%6s", $USERtotPAUSE_MS);
    -
    -	$USERavgPAUSE_M = ($USERavgPAUSE / 60);
    -	$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
    -	$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
    -	$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
    -	$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
    -	$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
    -	if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
    -	$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
    -	$pfUSERavgPAUSE_MS[$i] =		sprintf("%6s", $USERavgPAUSE_MS);
    -
    -	$USERtotWAIT_M = ($USERtotWAIT / 60);
    -	$USERtotWAIT_M = round($USERtotWAIT_M, 2);
    -	$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
    -	$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
    -	$USERtotWAIT_S = ($USERtotWAIT_S * 60);
    -	$USERtotWAIT_S = round($USERtotWAIT_S, 0);
    -	if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
    -	$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
    -	$pfUSERtotWAIT_MS[$i] =		sprintf("%6s", $USERtotWAIT_MS);
    -
    -	$USERavgWAIT_M = ($USERavgWAIT / 60);
    -	$USERavgWAIT_M = round($USERavgWAIT_M, 2);
    -	$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
    -	$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
    -	$USERavgWAIT_S = ($USERavgWAIT_S * 60);
    -	$USERavgWAIT_S = round($USERavgWAIT_S, 0);
    -	if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
    -	$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
    -	$pfUSERavgWAIT_MS[$i] =		sprintf("%6s", $USERavgWAIT_MS);
    -	
    -	$USERtotDISPO_M = ($USERtotDISPO / 60);
    -	$USERtotDISPO_M = round($USERtotDISPO_M, 2);
    -	$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
    -	$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
    -	$USERtotDISPO_S = ($USERtotDISPO_S * 60);
    -	$USERtotDISPO_S = round($USERtotDISPO_S, 0);
    -	if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
    -	$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
    -	$pfUSERtotDISPO_MS[$i] =		sprintf("%6s", $USERtotDISPO_MS);
    -
    -	$USERavgDISPO_M = ($USERavgDISPO / 60);
    -	$USERavgDISPO_M = round($USERavgDISPO_M, 2);
    -	$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
    -	$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
    -	$USERavgDISPO_S = ($USERavgDISPO_S * 60);
    -	$USERavgDISPO_S = round($USERavgDISPO_S, 0);
    -	if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
    -	$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
    -	$pfUSERavgDISPO_MS[$i] =		sprintf("%6s", $USERavgDISPO_MS);
    -
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; $ctCB[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		if (($row[1] == 'CALLBK') || ($row[1] == 'CBHOLD') ) {$ctCB[$k]=sprintf("%-4s", $row[0]);	$TOT_CB = ($TOT_CB + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtime_MS[$k]| $pfUSERtotPAUSE_MS[$k] | $pfUSERavgPAUSE_MS[$k] | $pfUSERtotWAIT_MS[$k] | $pfUSERavgWAIT_MS[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $pfUSERtotDISPO_MS[$k] | $pfUSERavgDISPO_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctCB[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtime_M = ($TOTtime / 60);
    -	$TOTtime_M = round($TOTtime_M, 2);
    -	$TOTtime_M_int = intval("$TOTtime_M");
    -	$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
    -	$TOTtime_S = ($TOTtime_S * 60);
    -	$TOTtime_S = round($TOTtime_S, 0);
    -	if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
    -	$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
    -	$TOTtime_MS =		sprintf("%7s", $TOTtime_MS);
    -		while(strlen($TOTtime_MS)>7) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOTtotDISPO_M = ($TOTtotDISPO / 60);
    -	$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
    -	$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
    -	$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
    -	$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
    -	$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
    -	if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
    -	$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
    -	$TOTtotDISPO_MS =		sprintf("%7s", $TOTtotDISPO_MS);
    -		while(strlen($TOTtotDISPO_MS)>7) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
    -
    -	$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
    -	$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
    -	$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
    -	$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
    -	if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
    -	$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
    -	$TOTtotPAUSE_MS =		sprintf("%7s", $TOTtotPAUSE_MS);
    -		while(strlen($TOTtotPAUSE_MS)>7) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
    -
    -	$TOTtotWAIT_M = ($TOTtotWAIT / 60);
    -	$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
    -	$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
    -	$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
    -	$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
    -	$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
    -	if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
    -	$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
    -	$TOTtotWAIT_MS =		sprintf("%7s", $TOTtotWAIT_MS);
    -		while(strlen($TOTtotWAIT_MS)>7) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
    -
    -
    -	$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
    -	$TOTavgTALK_M = round($TOTavgTALK_M, 2);
    -	$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
    -	$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
    -	$TOTavgTALK_S = ($TOTavgTALK_S * 60);
    -	$TOTavgTALK_S = round($TOTavgTALK_S, 0);
    -	if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
    -	$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
    -	$TOTavgTALK_MS =		sprintf("%6s", $TOTavgTALK_MS);
    -		while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
    -
    -	$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
    -	$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
    -	$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
    -	$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
    -	$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
    -	$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
    -	if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
    -	$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
    -	$TOTavgDISPO_MS =		sprintf("%6s", $TOTavgDISPO_MS);
    -		while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
    -
    -	$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
    -	$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
    -	$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
    -	$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
    -	if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
    -	$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
    -	$TOTavgPAUSE_MS =		sprintf("%6s", $TOTavgPAUSE_MS);
    -		while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
    -
    -	$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
    -	$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
    -	$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
    -	$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
    -	$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
    -	$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
    -	if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
    -	$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
    -	$TOTavgWAIT_MS =		sprintf("%6s", $TOTavgWAIT_MS);
    -		while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
    -
    -	
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_CB = sprintf("%-5s", $TOT_CB);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtime_MS| $TOTtotPAUSE_MS| $TOTavgPAUSE_MS | $TOTtotWAIT_MS| $TOTavgWAIT_MS | $TOTtotTALK_MS| $TOTavgTALK_MS | $TOTtotDISPO_MS| $TOTavgDISPO_MS | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_CB| $TOT_SALE|\n";
    -echo "+--------------------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_time_sheet.php
    deleted file mode 100644
    index 46659eb6..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_time_sheet.php
    +++ /dev/null
    @@ -1,281 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1729 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
    -	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
    -	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Time Sheet\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$agent)
    -{
    -echo "\n";
    -echo "PLEASE SELECT AN AGENT ID AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from available agent log data\n";
    -}
    -
    -else
    -{
    -$query_date_BEGIN = "$query_date 00:00:00";   
    -$query_date_END = "$query_date 23:59:59";
    -$time_BEGIN = "00:00:00";   
    -$time_END = "23:59:59";
    -
    -$stmt="select full_name from vicidial_users where user='$agent';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$full_name = $row[0];
    -
    -echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENT TIME SHEET: $agent - $full_name -------------\n\n";
    -
    -if ($calls_summary)
    -	{
    -	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -
    -	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
    -
    -		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
    -		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
    -		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
    -		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
    -		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
    -		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
    -		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
    -		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
    -		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
    -		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
    -		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
    -		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
    -		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
    -		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
    -
    -		$TALK_TIME_H = ($row[1] / 3600);
    -		$TALK_TIME_H = round($TALK_TIME_H, 2);
    -		$TALK_TIME_H_int = intval("$TALK_TIME_H");
    -		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
    -		$TALK_TIME_M = ($TALK_TIME_M * 60);
    -		$TALK_TIME_M = round($TALK_TIME_M, 2);
    -		$TALK_TIME_M_int = intval("$TALK_TIME_M");
    -		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
    -		$TALK_TIME_S = ($TALK_TIME_S * 60);
    -		$TALK_TIME_S = round($TALK_TIME_S, 0);
    -		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
    -		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
    -		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
    -		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
    -
    -		$PAUSE_TIME_H = ($row[3] / 3600);
    -		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
    -		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
    -		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
    -		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
    -		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
    -		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
    -		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
    -		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
    -		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
    -		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
    -		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
    -		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
    -		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
    -
    -		$WAIT_TIME_H = ($row[5] / 3600);
    -		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
    -		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
    -		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
    -		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
    -		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
    -		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
    -		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
    -		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
    -		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
    -		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
    -		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
    -		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
    -		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
    -
    -		$WRAPUP_TIME_H = ($row[7] / 3600);
    -		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
    -		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
    -		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
    -		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
    -		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
    -		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
    -		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
    -		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
    -		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
    -
    -		$TALK_AVG_M = ($row[2] / 60);
    -		$TALK_AVG_M = round($TALK_AVG_M, 2);
    -		$TALK_AVG_M_int = intval("$TALK_AVG_M");
    -		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
    -		$TALK_AVG_S = ($TALK_AVG_S * 60);
    -		$TALK_AVG_S = round($TALK_AVG_S, 0);
    -		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
    -		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
    -		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
    -
    -		$PAUSE_AVG_M = ($row[4] / 60);
    -		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
    -		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
    -		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
    -		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
    -		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
    -		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
    -		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
    -		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
    -
    -		$WAIT_AVG_M = ($row[6] / 60);
    -		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
    -		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
    -		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
    -		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
    -		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
    -		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
    -		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
    -		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
    -
    -		$WRAPUP_AVG_M = ($row[8] / 60);
    -		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
    -		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
    -		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
    -		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
    -		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
    -		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
    -
    -	echo "TOTAL CALLS TAKEN: $row[0]\n";
    -	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
    -	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
    -	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
    -	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
    -	echo "----------------------------------------------------------------\n";
    -	echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
    -
    -	echo "\n";
    -	}
    -else
    -	{
    -	echo "Call Activity Summary\n\n";
    -
    -	}
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "FIRST LOGIN:          $row[0]\n";
    -$start = $row[1];
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "LAST LOG ACTIVITY:    $row[0]\n";
    -$end = $row[1];
    -
    -$login_time = ($end - $start);
    -	$LOGIN_TIME_H = ($login_time / 3600);
    -	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
    -	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
    -	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
    -	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
    -	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
    -	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
    -	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
    -	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
    -	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
    -	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
    -	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
    -	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
    -	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
    -
    -echo "-----------------------------------------\n";
    -echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_time_sheet_archive.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_time_sheet_archive.php
    deleted file mode 100644
    index f14eca16..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_agent_time_sheet_archive.php
    +++ /dev/null
    @@ -1,281 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1721 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
    -	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
    -	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Time Sheet\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$agent)
    -{
    -echo "\n";
    -echo "PLEASE SELECT AN AGENT ID AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from available agent log data\n";
    -}
    -
    -else
    -{
    -$query_date_BEGIN = "$query_date 00:00:00";   
    -$query_date_END = "$query_date 23:59:59";
    -$time_BEGIN = "00:00:00";   
    -$time_END = "23:59:59";
    -
    -$stmt="select full_name from vicidial_users where user='$agent';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$full_name = $row[0];
    -
    -echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENT TIME SHEET: $agent - $full_name -------------\n\n";
    -
    -if ($calls_summary)
    -	{
    -	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log_archive where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -
    -	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
    -
    -		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
    -		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
    -		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
    -		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
    -		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
    -		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
    -		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
    -		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
    -		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
    -		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
    -		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
    -		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
    -		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
    -		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
    -
    -		$TALK_TIME_H = ($row[1] / 3600);
    -		$TALK_TIME_H = round($TALK_TIME_H, 2);
    -		$TALK_TIME_H_int = intval("$TALK_TIME_H");
    -		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
    -		$TALK_TIME_M = ($TALK_TIME_M * 60);
    -		$TALK_TIME_M = round($TALK_TIME_M, 2);
    -		$TALK_TIME_M_int = intval("$TALK_TIME_M");
    -		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
    -		$TALK_TIME_S = ($TALK_TIME_S * 60);
    -		$TALK_TIME_S = round($TALK_TIME_S, 0);
    -		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
    -		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
    -		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
    -		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
    -
    -		$PAUSE_TIME_H = ($row[3] / 3600);
    -		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
    -		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
    -		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
    -		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
    -		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
    -		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
    -		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
    -		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
    -		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
    -		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
    -		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
    -		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
    -		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
    -
    -		$WAIT_TIME_H = ($row[5] / 3600);
    -		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
    -		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
    -		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
    -		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
    -		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
    -		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
    -		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
    -		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
    -		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
    -		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
    -		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
    -		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
    -		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
    -
    -		$WRAPUP_TIME_H = ($row[7] / 3600);
    -		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
    -		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
    -		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
    -		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
    -		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
    -		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
    -		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
    -		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
    -		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
    -
    -		$TALK_AVG_M = ($row[2] / 60);
    -		$TALK_AVG_M = round($TALK_AVG_M, 2);
    -		$TALK_AVG_M_int = intval("$TALK_AVG_M");
    -		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
    -		$TALK_AVG_S = ($TALK_AVG_S * 60);
    -		$TALK_AVG_S = round($TALK_AVG_S, 0);
    -		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
    -		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
    -		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
    -
    -		$PAUSE_AVG_M = ($row[4] / 60);
    -		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
    -		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
    -		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
    -		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
    -		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
    -		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
    -		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
    -		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
    -
    -		$WAIT_AVG_M = ($row[6] / 60);
    -		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
    -		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
    -		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
    -		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
    -		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
    -		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
    -		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
    -		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
    -
    -		$WRAPUP_AVG_M = ($row[8] / 60);
    -		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
    -		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
    -		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
    -		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
    -		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
    -		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
    -
    -	echo "TOTAL CALLS TAKEN: $row[0]\n";
    -	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
    -	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
    -	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
    -	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
    -	echo "----------------------------------------------------------------\n";
    -	echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
    -
    -	echo "\n";
    -	}
    -else
    -	{
    -	echo "Call Activity Summary\n\n";
    -
    -	}
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log_archive where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "FIRST LOGIN:          $row[0]\n";
    -$start = $row[1];
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log_archive where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "LAST LOG ACTIVITY:    $row[0]\n";
    -$end = $row[1];
    -
    -$login_time = ($end - $start);
    -	$LOGIN_TIME_H = ($login_time / 3600);
    -	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
    -	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
    -	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
    -	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
    -	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
    -	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
    -	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
    -	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
    -	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
    -	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
    -	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
    -	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
    -	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
    -
    -echo "-----------------------------------------\n";
    -echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_parkstats.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_parkstats.php
    deleted file mode 100644
    index eef768ca..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_parkstats.php
    +++ /dev/null
    @@ -1,396 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1717 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($group)) {$group = '';}
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -$stmt="select distinct channel_group from park_log;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$groups_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $groups_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Park Stats\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A GROUP AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Park Stats                             $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls taken in this Group:              $TOTALcalls\n";
    -echo "Average Hold Time(seconds) for all Calls:     $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Dropped Calls:                          $DROPcalls  $DROPpercent%\n";
    -echo "Average Hold Time(seconds) for Dropped Calls: $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USER                     | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select park_log.user,full_name,count(*),sum(talked_sec),avg(talked_sec) from park_log,vicidial_users where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and park_log.user is not null and talked_sec is not null and talked_sec > 4 and park_log.user=vicidial_users.user group by park_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:00:00' and parked_time <= '$query_date $h:14:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:00:00' and parked_time <= '$query_date $h:14:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:15:00' and parked_time <= '$query_date $h:29:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:15:00' and parked_time <= '$query_date $h:29:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:30:00' and parked_time <= '$query_date $h:44:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:30:00' and parked_time <= '$query_date $h:44:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:45:00' and parked_time <= '$query_date $h:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:45:00' and parked_time <= '$query_date $h:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_server_performance.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_server_performance.php deleted file mode 100644 index fdedb9d9..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_server_performance.php +++ /dev/null @@ -1,310 +0,0 @@ - LICENSE: GPLv2 -# -# CHANGES -# -# 60619-1732 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["shift"])) {$shift=$_GET["shift"];} - elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -# path from root to where ploticus files will be stored -$DOCroot = "$WeBServeRRooT/vicidial/ploticus/"; - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($group)) {$group = '';} - -$stmt="select server_ip from servers;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$servers_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $servers_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Server Performance\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "             REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:32:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:32:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Server Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- TOTALS, PEAKS and AVERAGES\n";
    -
    -$stmt="select sysload from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by sysload desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$HIGHload =	sprintf("%10s", $row[0]);
    -$HIGHmulti = intval($HIGHload / 100);
    -#$HIGHmulti = ($HIGHload / 100);
    -
    -$stmt="select AVG(sysload),AVG(channels_total) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGload =	sprintf("%10s", $row[0]);
    -$AVGchannels =	sprintf("%10s", $row[1]);
    -
    -$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGcpuUSER =	sprintf("%10s", $row[0]);
    -$AVGcpuSYSTEM =	sprintf("%10s", $row[1]);
    -$AVGcpuIDLE =	sprintf("%10s", $row[2]);
    -
    -$stmt="select usedram from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by usedram desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$USEDram =	sprintf("%10s", $row[0]);
    -
    -$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365','8366','8367') and  start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$OFFHOOKtime =	sprintf("%10s", $row[1]);
    -
    -
    -echo "Total Calls in/out on this server:        $TOTALcalls\n";
    -echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
    -echo "Average channels in use for server:       $AVGchannels\n";
    -echo "Average load for server:                  $AVGload\n";
    -echo "Peak load for server:                     $HIGHload\n";
    -#echo "Peak used memory for server (in MB):      $USEDram\n";
    -echo "Average USER process cpu percentage:      $AVGcpuUSER %\n";
    -echo "Average SYSTEM process cpu percentage:    $AVGcpuSYSTEM %\n";
    -echo "Average IDLE process cpu percentage:      $AVGcpuIDLE %\n";
    -
    -echo "\n";
    -echo "---------- LINE GRAPH:\n";
    -
    -
    -
    -##############################
    -#########  Graph stats
    -
    -$DAT = '.dat';
    -$HTM = '.htm';
    -$PNG = '.png';
    -$filedate = date("Y-m-d_His");
    -$DATfile = "$group$query_date$shift$filedate$DAT";
    -$HTMfile = "$group$query_date$shift$filedate$HTM";
    -$PNGfile = "$group$query_date$shift$filedate$PNG";
    -
    -$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
    -$DATfp = fopen ("$DOCroot/$DATfile", "a");
    -
    -$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='" . mysql_real_escape_string($group) . "' and start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' order by timex;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
    -	$row[6] = intval($row[6] * $HIGHmulti);
    -	fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
    -	$i++;
    -	}
    -fclose($DATfp);
    -
    -$rows_to_max = ($rows_to_print + 100);
    -
    -
    -
    -$HTMcontent  = '';
    -$HTMcontent .= "#proc page\n";
    -$HTMcontent .= "#if @DEVICE in png,gif\n";
    -$HTMcontent .= "   scale: 0.6\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#endif\n";
    -$HTMcontent .= "#proc getdata\n";
    -$HTMcontent .= "file: $DOCroot/$DATfile\n";
    -$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc areadef\n";
    -$HTMcontent .= "title: Server $group   $query_date_BEGIN to $query_date_END\n";
    -$HTMcontent .= "titledetails: size=14  align=C\n";
    -$HTMcontent .= "rectangle: 1 1 14 7\n";
    -$HTMcontent .= "xscaletype: time hh:mm:ss\n";
    -$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
    -$HTMcontent .= "yrange: 0 $HIGHload\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc xaxis\n";
    -$HTMcontent .= "stubs: inc 30 minutes\n";
    -$HTMcontent .= "minorticinc: 5 minutes\n";
    -$HTMcontent .= "stubformat: hh:mm:ssa\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc yaxis\n";
    -$HTMcontent .= "stubs: inc 50\n";
    -$HTMcontent .= "grid: color=yellow\n";
    -$HTMcontent .= "gridskip: min\n";
    -$HTMcontent .= "ticincrement: 100 1000\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: userproc\n";
    -$HTMcontent .= "linedetails: color=purple width=.5\n";
    -$HTMcontent .= "fill: lavender\n";
    -$HTMcontent .= "legendlabel: user proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: sysproc\n";
    -$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
    -$HTMcontent .= "fill: dullyellow\n";
    -$HTMcontent .= "legendlabel: system proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: load\n";
    -$HTMcontent .= "linedetails: color=blue width=.5\n";
    -$HTMcontent .= "legendlabel: load\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: processes\n";
    -$HTMcontent .= "linedetails: color=red width=.5\n";
    -$HTMcontent .= "legendlabel: processes\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: channels\n";
    -$HTMcontent .= "linedetails: color=green width=.5\n";
    -$HTMcontent .= "legendlabel: channels\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc legend\n";
    -$HTMcontent .= "location: max-2 max\n";
    -$HTMcontent .= "seglen: 0.2\n";
    -$HTMcontent .= "\n";
    -
    -fwrite ($HTMfp, "$HTMcontent");
    -fclose($HTMfp);
    -
    -
    -passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
    -
    -sleep(1);
    -
    -echo "
    \n"; -echo "\n"; -echo "\n"; - - -echo ""; - -} - - - -?> - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDAD.php deleted file mode 100644 index 52efd9cc..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDAD.php +++ /dev/null @@ -1,255 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 60620-1040 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Agents Time On Calls                         $NOW_TIME    REPORTS\n\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL    | STATUS | START TIME          | MINUTES |\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	$agentcount=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]=' - WAITING - ';
    -			$row[6]=$row[7];
    -			}
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$sessionid =		sprintf("%-9s", $row[2]);
    -		$channel =			sprintf("%-10s", $row[3]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[4]);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 5) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 10) {$G=''; $EG='';}
    -		if (eregi("PAUSED",$row[4])) 
    -			{
    -			if ($call_time_M_int >= 1) 
    -				{$i++; continue;} 
    -			else
    -				{$G=''; $EG='';}
    -			}
    -
    -		$agentcount++;
    -		echo "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -		echo "  $agentcount agents logged in on server $server_ip\n\n";
    -
    -		echo "             - Paused agents\n";
    -		echo "             - 5 minutes or more on call\n";
    -		echo "             - Over 10 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -echo "| CHANNEL    | STATUS | CAMPAIGN | PHONE NUMBER       | START TIME          | MINUTES |\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-8s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -		echo "  $i calls being placed on server $server_ip\n\n";
    -
    -		echo "             - LIVE CALL WAITING\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "******************************* NO LIVE CALLS WAITING *********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDAD_closer.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDAD_closer.php deleted file mode 100644 index eb7d3c39..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDAD_closer.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# CHANGES -# -# 60620-1037 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - -\n"; -echo " - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Agents Time On Calls                         $NOW_TIME    REPORTS\n\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL             | STATUS | CALLTIME | MINUTES | CAMPAIGN     | FRONT  |\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED|CLOSER",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- WAIT -';
    -			$row[6]=$row[7];
    -			}
    -		$extension[$i] =		sprintf("%-10s", $row[0]);
    -		$user[$i] =				sprintf("%-6s", $row[1]);
    -		$sessionid[$i] =		sprintf("%-9s", $row[2]);
    -		$channel[$i] =			sprintf("%-19s", $row[3]);
    -			$cc[$i]=0;
    -		while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
    -			{
    -			$channel[$i] = eregi_replace(".$","",$channel[$i]);   
    -			$cc[$i]++;
    -			if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
    -			}
    -		$status[$i] =			sprintf("%-6s", $row[4]);
    -		$start_time[$i] =		sprintf("%-8s", $row[5]);
    -			$cd[$i]=0;
    -		while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
    -			{
    -			$start_time[$i] = eregi_replace("^.","",$start_time[$i]);   
    -			$cd[$i]++;
    -			if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
    -			}
    -		$uniqueid[$i] =			$row[8];
    -		$lead_id[$i] =			$row[9];
    -		$closer[$i] =			$row[1];
    -		$call_time_S[$i] = ($STARTtime - $row[6]);
    -
    -		$call_time_M[$i] = ($call_time_S[$i] / 60);
    -		$call_time_M[$i] = round($call_time_M[$i], 2);
    -		$call_time_M_int[$i] = intval("$call_time_M[$i]");
    -		$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
    -		$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
    -		$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
    -		if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
    -		$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
    -		$call_time_MS[$i] =		sprintf("%7s", $call_time_MS[$i]);
    -		$i++;
    -		}
    -		$ext_count = $i;
    -		$i=0;
    -	while ($i < $ext_count)
    -		{
    -
    -		$stmt="select campaign_id from vicidial_auto_calls where uniqueid='$uniqueid[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "';";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$camp_to_print = mysql_num_rows($rslt);
    -		if ($camp_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$campaign = sprintf("%-12s", $row[0]);
    -			$camp_color = $row[0];
    -			}
    -		else
    -			{$campaign = 'DEAD        ';   	$camp_color = 'DEAD';}
    -		if (eregi("READY|PAUSED|CLOSER",$status[$i]))
    -			{$campaign = '            ';   	$camp_color = '';}
    -
    -		$stmt="select user from vicidial_xfer_log where lead_id='$lead_id[$i]' and closer='$closer[$i]' order by call_date desc limit 1;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$xfer_to_print = mysql_num_rows($rslt);
    -		if ($xfer_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$fronter = sprintf("%-6s", $row[0]);
    -			}
    -		else
    -			{$fronter = '      ';}
    -
    -		$G = '';		$EG = '';
    -		$G=""; $EG='';
    -	#	if ($call_time_M_int[$i] >= 5) {$G=''; $EG='';}
    -	#	if ($call_time_M_int[$i] >= 10) {$G=''; $EG='';}
    -
    -		echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -		echo "  $i agents logged in on server $server_ip\n\n";
    -
    -	#	echo "             - 5 minutes or more on call\n";
    -	#	echo "             - Over 10 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -#echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -echo "| CHANNEL             | STATUS | CAMPAIGN     | PHONE NUMBER       | CALLTIME | MINUTES |\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id desc;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-19s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 19) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 19) {$cc=101;}
    -			}
    -		$start_time =		sprintf("%-8s", $row[5]);
    -			$cd=0;
    -		while ( (strlen($start_time) > 8) and ($cd < 100) )
    -			{
    -			$start_time = eregi_replace("^.","",$start_time);   
    -			$cd++;
    -			if (strlen($start_time) <= 8) {$cd=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-12s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -		echo "  $i calls being placed on server $server_ip\n\n";
    -
    -		echo "             - LIVE CALL WAITING\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "******************************* NO LIVE CALLS WAITING *********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDADall.php deleted file mode 100644 index 540a5eb6..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDADall.php +++ /dev/null @@ -1,349 +0,0 @@ - LICENSE: GPLv2 -# -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60511-1343 - Added leads and drop info at the top of the screen -# 60608-1539 - Fixed CLOSER tallies for active calls -# 60619-1658 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["RR"])) {$RR=$_GET["RR"];} - elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($group)) {$group='';} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$NOW_DAY = date("Y-m-d"); -$NOW_HOUR = date("H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns where active='Y';"; -$rslt=mysql_query($stmt, $link); -if (!isset($DB)) {$DB=0;} -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!isset($RR)) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if (!isset($reset_counter)) {$reset_counter=0;} -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD Campaign: $group\n"; -echo "
    \n"; -echo "VICIDIAL: Realtime Campaign: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         MODIFY | REPORTS \n"; -echo "\n\n"; - - -if (!$group) {echo "

    please select a campaign from the pulldown above\n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$HOPlev = $row[8]; - -echo "
    "; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; - -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$VDhop = $row[0]; - -$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$DAleads = $row[0]; -$callsTODAY = $row[1]; -$dropsTODAY = $row[2]; -$drpctTODAY = $row[3]; - -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "
    DIAL LEVEL:  $row[0]    STATUSES:  $row[1], $row[2], $row[3], $row[4], $row[5]     ORDER:  $row[6]     FILTER:  $row[7]    
    HOPPER LEVEL:  $HOPlev     LEADS IN HOPPER:  $VDhop     DIALABLE LEADS:  $DAleads       TIME:
    CALLS TODAY:  $callsTODAY     CALLS DROPPED:  $dropsTODAY     DROPPED PERCENT:  $drpctTODAY%       $NOW_TIME
    "; - - -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - { - $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );"; - } -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo " NO LIVE CALLS WAITING \n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVER IP | CALL SERVER IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n\n"; - - $Aecho .= " - Paused agents\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo " NO AGENTS ON CALLS \n";
    -	}
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDADall_SIPmonitor.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDADall_SIPmonitor.php deleted file mode 100644 index 0b24f82e..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonVDADall_SIPmonitor.php +++ /dev/null @@ -1,301 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60504-2023 - Modified click-to-listen for SIP phones by Angelito Manansala -# 60619-1708 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];} -$RR=$_GET["RR"]; if (!$RR) {$RR=$_POST["RR"];} -$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];} -$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];} -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!$RR) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VF DIALER: Time On VDAD Campaign: $group\n"; -echo "
    \n"; -echo "VF DIALER: Realtime Campaign: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         MODIFY | REPORTS \n"; -echo "\n\n"; - -if (!$group) {echo "

    please select a campaign from the pulldown above
    \n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); - -echo "
    "; -echo "DIAL LEVEL: $row[0]         "; -echo "STATUSES: $row[1], $row[2], $row[3], $row[4], $row[5]         "; -echo "ORDER: $row[6]"; -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and (campaign_id='" . mysql_real_escape_string($group) . "' or campaign_id LIKE \"CL_%\");";} -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo " NO LIVE CALLS WAITING \n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VF DIALER: Agents Time On Calls Campaign: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVER IP | CALL SERVER IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - $sessionid = trim($sessionid); - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG LISTEN | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n"; - $Aecho .= " NOTE: Click LISTERN to monitor agent call, you must have installed softphone on you machine.\n\n"; - - - $Aecho .= " - Paused agents\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo " NO AGENTS ON CALLS \n";
    -	}
    -
    -?>
    -
    - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeoncall.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_timeoncall.php deleted file mode 100644 index fc8eeced..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeoncall.php +++ /dev/null @@ -1,180 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Call\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Call                                          $NOW_TIME\n\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -echo "| STATION    | SESSIONID | CHANNEL   | NUMBER DIALED    | START TIME          | MINUTES |\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -
    -$stmt="SELECT count(*) from live_sip_channels where server_ip='$server_ip';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="select extension from live_channels where server_ip='$server_ip';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$ext_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_zap_counter=0;
    -	$sessions = '';
    -	while ($i < $ext_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if (preg_match("/^8600/i",$row[0]))
    -			{
    -			$sessions .= "$row[0]|";
    -			}
    -		$i++;
    -		}
    -	$sessions = preg_replace("/\|$/",'',$sessions);
    -
    -	if ($DB) {echo "SESSIONS: -$sessions-\n";}
    -
    -	$stmt="select * from live_sip_channels where server_ip='$server_ip' order by channel;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_calls_counter=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ( (preg_match("/Zap\/|internal|ring/i",$row[3])) or (preg_match("/Local\//i",$row[0])) )
    -			{
    -			if ($DB) {echo "NOT STATION |$row[0]|$row[3]|\n";}
    -			$session_id = '';
    -			}
    -		else 
    -			{
    -			if (preg_match("/$row[3]/i",$sessions))
    -				{
    -				if ($DB) {echo "LIVE STATION|$row[0]|$row[3]|\n";}
    -				$session_id = $row[3];
    -				$station = preg_replace("/SIP\//",'',$row[0]);
    -				$station = preg_replace("/-.*/",'',$station);
    -			
    -				$LIVE_sessions[$live_calls_counter] =			"$session_id";
    -				$LIVE_sessions_FORMAT[$live_calls_counter] =	sprintf("%-9s", $session_id);
    -				$LIVE_stations[$live_calls_counter] =			"$station";
    -				$LIVE_stations_FORMAT[$live_calls_counter] =	sprintf("%-10s", $station);
    -
    -		#		echo "| $station | $session_id | \n";
    -
    -				$live_calls_counter++;
    -				}
    -			else
    -				{
    -				if ($DB) {echo "NOT STATIONZ|$row[0]|$row[3]|\n";}
    -				$session_id = '';
    -				}
    -			}
    -
    -		$i++;
    -		}
    -
    -		if ($live_calls_counter > 0)
    -		{
    -		$i=0;
    -		$LC_counter = $live_calls_counter;
    -
    -		while ($i < $live_calls_counter)
    -			{
    -			$stmt="select channel,extension,number_dialed,start_time,start_epoch from call_log where extension='$LIVE_stations[$i]' and server_ip='$server_ip' order by uniqueid desc LIMIT 1;";
    -			$rslt=mysql_query($stmt, $link);
    -			if ($DB) {echo "$stmt\n";}
    -			$parked_to_print = mysql_num_rows($rslt);
    -			$row=mysql_fetch_row($rslt);
    -
    -			$channel =			sprintf("%-9s", $row[0]);
    -			$number_dialed =	sprintf("%-16s", $row[2]);
    -			$start_time =		sprintf("%-19s", $row[3]);
    -			$call_time_S = ($STARTtime - $row[4]);
    -
    -			$call_time_M = ($call_time_S / 60);
    -			$call_time_M = round($call_time_M, 2);
    -			$call_time_M_int = intval("$call_time_M");
    -			$call_time_SEC = ($call_time_M - $call_time_M_int);
    -			$call_time_SEC = ($call_time_SEC * 60);
    -			$call_time_SEC = round($call_time_SEC, 0);
    -			if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -			$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -			$call_time_MS =		sprintf("%7s", $call_time_MS);
    -			$G = '';		$EG = '';
    -			if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -			if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -			echo "| $G$LIVE_stations_FORMAT[$i]$EG | $G$LIVE_sessions_FORMAT[$i]$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -			$i++;
    -			}
    -
    -		echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -		echo "  $i stations on live calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on live call\n";
    -		echo "             - Over 30 minutes on live call\n";
    -
    -		}
    -		else
    -		{
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*************************************** NO LIVE STATIONS ********************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*************************************** NO LIVE STATIONS ********************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	}
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonpark.php b/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonpark.php deleted file mode 100644 index 2bc03bb1..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/AST_timeonpark.php +++ /dev/null @@ -1,197 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$timeONEhoursAGO = ($STARTtime - 3600); -$epochHALFhoursAGO = ($STARTtime - 1860); -$timeONEhoursAGO = date("Y-m-d H:i:s",$timeONEhoursAGO); -$timeHALFhoursAGO = date("Y-m-d H:i:s",$epochHALFhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where status='TALKING' and grab_time < '$timeONEhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - $stmt="delete from park_log where status='PARKED' and parked_time < '$timeHALFhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Park\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select extension,user,channel,channel_group,parked_time,UNIX_TIMESTAMP(parked_time) from park_log where status ='PARKED' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 1) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i callers waiting on server $server_ip\n\n";
    -
    -		echo "             - 1 minute or more on hold\n";
    -		echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	echo "******************** NO LIVE CALLS WAITING *********************\n";
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	}
    -
    -###################################################################################
    -###### TIME ON INBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Agents Time On Inbound Calls                             $NOW_TIME\n\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,channel,channel_group,grab_time,UNIX_TIMESTAMP(grab_time) from park_log where status ='TALKING' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -		echo "| $G$extension$EG | $G$user$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i agents on calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on call\n";
    -		echo "             - Over 30 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/admin-old.php b/agc_2-X/trunk/LANG_admin/vicidial/admin-old.php deleted file mode 100644 index 2adf48f2..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/admin-old.php +++ /dev/null @@ -1,2289 +0,0 @@ -0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN: "; - -if ($ADD==1) {echo "Add New User";} -if ($ADD==11) {echo "Add New Campaign";} -if ($ADD==111) {echo "Add New List";} -if ($ADD==1111) {echo "Add New In-Group";} -if ($ADD==11111) {echo "Add New Remote Agents";} -if ($ADD==111111) {echo "Add New Users Group";} -if ($ADD==2) {echo "New User Addition";} -if ($ADD==21) {echo "New Campaign Addition";} -if ($ADD==22) {echo "New Campaign Status Addition";} -if ($ADD==211) {echo "New List Addition";} -if ($ADD==2111) {echo "New In-Group Addition";} -if ($ADD==21111) {echo "New Remote Agents Addition";} -if ($ADD==211111) {echo "New Users Group Addition";} -if ($ADD==3) {echo "Modify User";} -if ($ADD==31) {echo "Modify Campaign";} -if ($ADD==311) {echo "Modify List";} -if ($ADD==3111) {echo "Modify In-Group";} -if ($ADD==31111) {echo "Modify Remote Agents";} -if ($ADD==311111) {echo "Modify Users Groups";} -if ($ADD==4) {echo "Modify User";} -if ($ADD==41) {echo "Modify Campaign";} -if ($ADD==42) {echo "Modify Campaign Status";} -if ($ADD==411) {echo "Modify List";} -if ($ADD==4111) {echo "Modify In-Group";} -if ($ADD==41111) {echo "Modify Remote Agents";} -if ($ADD==411111) {echo "Modify Users Group";} -if ($ADD==0) {echo "Welcome";} -if ($ADD==10) {echo "Campaigns";} -if ($ADD==100) {echo "Lists";} -if ($ADD==1000) {echo "In-Groups";} -if ($ADD==10000) {echo "Remote Agents";} -if ($ADD==100000) {echo "User Groups";} -if ($ADD==5) {echo "Search Form";} -if ($ADD==6) {echo "Search Results";} -if ($ADD==99999) {echo "HELP";} - -if ( (strlen($ADD)>4) && ($ADD < 99998) ) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rsltx=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rsltx); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rsltx=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rsltx); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rsltx=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rsltx); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_value\""; - $p=0; - while ($p<50) - { - if ($group_id_value == $groups[$p]) - { - $groups_list .= " CHECKED"; - $groups_value .= " $group_id_value"; - } - $p++; - } - $groups_list .= "> $group_id_value - $group_name_value<BR>\n"; - $o++; - } - if (strlen($groups_value)>2) {$groups_value .= " -";} - } - - - - - -$NWB = "   <a href=\"javascript:openNewWindow('$PHP_SELF?ADD=99999"; -$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>"; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    VICIDIAL ADMIN: HELP


    \n"; - -?> -VICIDIAL_USERS TABLE

    - -
    -User ID - This field is where you put the VICIDIAL user's ID number, can be up to 8 digits in length, Must be at least 2 characters in length. - -
    -
    -
    -Password - This field is where you put the VICIDIAL user's password. Must be at least 2 characters in length. - -
    -
    -
    -Full Name - This field is where you put the VICIDIAL user's full name. Must be at least 2 characters in length. - -
    -
    -
    -User Level - This menu is where you select the VICIDIAL user's user level. Must be a level of 1 to log into VICIDIAL, Must be level greater than 2 to log in as a closer, Must be user level 8 or greater to get into admin web section. - -
    -
    -
    -User Group - This menu is where you select the VICIDIAL user's group that this user will belong to. This does not have any restrictions at this time, this is just to subdivide users and allow for future features based upon it. - - -



    - -VICIDIAL_CAMPAIGNS TABLE

    -
    -
    -Campaign ID - This is the short name of the campaign, it is not editable after initial submission, cannot contain spaces and must be between 2 and 8 characters in length. - -
    -
    -
    -Campaign Name - This is the description of the campaign, it must be between 6 and 40 characters in length. - -
    -
    -
    -Active - This is where you set the campaign to Active or Inactive. If Inactive, noone can log into it. - -
    -
    -
    -Park Extension - This is where you can customize the on-hold music for VICIDIAL. Make sure the extension is in place in the extensions.conf and that it points to the filename below. - -
    -
    -
    -Park File Name - This is where you can customize the on-hold music for VICIDIAL. Make sure the filename is 10 characters in length or less and that the file is in place in the /var/lib/asterisk/sounds directory. - -
    -
    -
    -Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. - -
    -
    -
    -Allow Closers - This is where you can set whether the users of this campaign will have the option to send the call to a closer. - -
    -
    -
    -Dial Status - This is where you set the statuses that you are wanting to dial on within the lists that are active for the campaign below - -
    -
    -
    -List Order - This menu is where you select how the leads(that match the statuses selected above) will be put in the lead hopper: -
      - DOWN: select the first leads loaded into the vicidial_list table -
      - UP: select the last leads loaded into the vicidial_list table -
      - UP PHONE: select the highest phone number and works it's way down -
      - DOWN PHONE: select the lowest phone number and works it's way up -
      - UP LAST NAME: starts with last names starting with Z and works it's way down -
      - DOWN LAST NAME: starts with last names starting with A and works it's way up -
      - UP COUNT: starts with most called leads and works its way down -
      - DOWN COUNT: starts with least called leads and works it's way up -
      - DOWN COUNT 2nd NEW: starts with least called leads and works it's way up inserting a NEW lead in every other lead(Must NOT have NEW selected in the dial statuses) -
      - DOWN COUNT 3nd NEW: starts with least called leads and works it's way up inserting a NEW lead in every third lead(Must NOT have NEW selected in the dial statuses) -
      - DOWN COUNT 4th NEW: starts with least called leads and works it's way up inserting a NEW lead in every forth lead(Must NOT have NEW selected in the dial statuses) - -
    -
    -
    -Hopper Level - This is how many leads the VDhopper script tries to keep in the vicidial_hopper table for this campaign. If running VDhopper script every minute, make this slightly greater than the number of leads you go through in a minute. - -
    -
    -
    -Force Reset of Hopper - This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs. - -
    -
    -
    -Auto Dial Level - This is where you set how many lines VICIDIAL should use per active agent. zero (0) means auto dialing is off and the agents will click to dial each number. Otherwise VICIDIAL will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. - -
    -
    -
    -Next Agent Call - This determines which agent receives the next call that is available: -
      - random: orders by the random update value in the vicidial_live_agents table -
      - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
      - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. - -
    -
    -
    -Local Call Time - This is where you set during which hours you would like to dial, as determined by the local time in the are in which you are calling. This is controlled by area code and is adjusted for Daylight Savings time if applicable. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm. - -
    -
    -
    -Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. - -
    -
    -
    -Dial Timeout - If defined, calls that would normally hangup after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve. - -
    -
    -
    -Dial Prefix - This field allows for more easily changing a path of dialing to go out through a different method without doing a reload in Asterisk. Default is 9 based upon a 91NXXNXXXXXX in the dialplan(extensions.conf). - -
    -
    -
    -Campaign CallerID - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. This option is only available if you are using PRIs(ISDN T1s or E1s) that have the custom callerid feature turned on. This feature may also work with IAX2 trunks depending on what your provider allows. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. - -
    -
    -
    -Campaign VDAD extension - This field allows for a custom VDAD transfer extension. This allows you to use different VDADtransfer...agi scripts depending upon your campaign. The default transfer AGI(exten 8365 [agi-VDADtransfer.agi]) just immediately sends the calls on to agents as soon as they are picked up. An additional sample political survey AGI is also now included (8366 [agi-VDADtransferSURVEY.agi]) that plays a message to the called person and allows them to make a choice by pressing buttons(effectively pre-screening the lead). Please note that except for surveys, political calls and charities this form of calling is illegal in the United States. - - -



    - -VICIDIAL_LISTS TABLE

    -
    -
    -List ID - This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. - -
    -
    -
    -List Name - This is the description of the list, it must be between 2 and 20 characters in length. - -
    -
    -
    -Campaign - This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time. - -
    -
    -
    -Active - This defines whether the list is to be dialed on or not. - -
    -
    -
    -Reset Lead-Called-Status for this list - This resets all leads in this list to N for "not called since last reset" and means that any lead can now be called if it is the right status as defined in the campaign screen. - - -



    - -VICIDIAL_INBOUND_GROUPS TABLE

    -
    -
    -Group ID - This is the short name of the inbound group, it is not editable after initial submission, must not contain any spaces and must be between 2 and 20 characters in length. - -
    -
    -
    -Group Name - This is the description of the group, it must be between 2 and 30 characters in length. Cannot include dashes '-', plusses '+' or spaces ' '. - -
    -
    -
    -Group Color - This is the color that displays in the VICIDIAL client app when a call comes in on this group. It must be between 2 and 7 characters long. If this is a hex color definition you must remember to put a # at the beginning of the string or VICIDIAL will not work properly. - -
    -
    -
    -Active - This determines whether this group show up in the selection box when a VICIDIAL agent logs in. - -
    -
    -
    -Web Form - This is the custom address that clicking on the WEB FORM button in VICIDIAL will take you to for calls that come in on this group. - -
    -
    -
    -Voicemail - If defined, this is the Voicemail box that calls will go to instead of being dropped if no agents are available after the hold time is up. - -
    -
    -
    -Next Agent Call - This determines which agent receives the next call that is available: -
      - random: orders by the random update value in the vicidial_live_agents table -
      - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
      - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. - -
    -
    -
    -Fronter Display - This field determines whether the inbound VICIDIAL agent would have the fronter name(if there is one) displayed in the Status field when the call comes to the agent. - - - -



    - -VICIDIAL_REMOTE_AGENTS TABLE

    -
    -
    -User ID Start - This is the starting User ID that is used when the remote agent entries are inserted into the system. If the Number of Lines is set higher than 1, this number is incremented by one until each line has an entry. Make sure you create a new VICIDIAL user account with a user level of 4 or great if you want them to be able to use the vdremote.php page for remote web access of this account. - -
    -
    -
    -Number of Lines - This defines how many remote agent entries the system creates, and determines how many lines it thinks it can safely send to the number below. - -
    -
    -
    -Server IP - A remote agent entry is only good for one specific server, here is where you select which server you want. - -
    -
    -
    -External Extension - This is the number that you want the calls forwarded to. Make sure that it is a full dialplan number and that if you need a 9 at the beginning you put it in here. Test by dialing this number from a phone on the system. - -
    -
    -
    -Status - Here is where you turn the remote agent on and off. As soon as the agent is Active the system assumes that it can send calls to it. It may take up to 30 seconds once you change the status to Inactive to stop receiving calls. - -
    -
    -
    -Campaign - Here is where you select the campaign that these remote agents will be logged into. Inbound needs to use the CLOSER campaign and select the inbound campaigns below that you want to receive calls from. - -
    -
    -
    -Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - - -



    - -VICIDIAL_CAMPAIGN_LISTS

    -
    -
    -The lists within this campaign are listed here, whether they are active is denoted by the Y or N and you can go to the list screen by clicking on the list ID in the first column. - - -



    - -VICIDIAL_CAMPAIGN_STATUSES TABLE

    -
    -
    -Through the use of Custom campaign statuses, you can have statuses that only exist for a specific campaign. The Status must be 1-8 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as a disposition. - - - - - -



    - -VICIDIAL_USER_GROUPS TABLE

    -
    -
    -User Group - This is the short name of a Vicidial User group, try not to use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. - -
    -
    -
    -Group Name - This is the description of the vicidial user group max of 40 characters. - - - - - -



    - -VICIDIAL LIST LOADER FUNCTIONALITY

    -
    -
    -The VICIDIAL web-based lead loader is designed simply to take a lead file(up to 8MB in size) that is either tab or pipe delimited and load it into the vicidial_list table. The lead loader does not do data validation or check for duplicates in itself or other lists, so that is something you need to do before you load the leads. Also, make sure that you have created the list that these leads are to be under so that you can use them. There is also the matter of time-zone-coding these leads. You may want to increase the frequency that the ADMIN_adjust_GMTnow_on_leads.pl is being run in the cron on your Asterisk server so that any loaded leads can be coded faster. Here is a list of the fields in their proper order for the lead files: -
      -
    1. Vendor Lead Code - shows up in the Vendor ID field of the GUI -
    2. Source Code - internal use only for admins and DBAs -
    3. List ID - the list number that these leads will show up under -
    4. Phone Code - the prefix for the phone number(1 for US, 01144 for UK, 01161 for AUS, etc) -
    5. Phone Number - must be at least 8 digits long -
    6. Title - title of the customer(Mr. Ms. Mrs, etc...) -
    7. First Name -
    8. Middle Initial -
    9. Last Name -
    10. Address Line 1 -
    11. Address Line 2 -
    12. Address Line 3 -
    13. City -
    14. State - limited to 2 characters -
    15. Province -
    16. Postal Code -
    17. Country -
    18. Gender -
    19. Date of Birth -
    20. Alternate Phone Number -
    21. Email Address -
    22. Security Phrase -
    23. Comments -
    - - - -







    -







    -THE END -
    - - - - - -
    - - - - - - - -
      VICIDIAL ADMIN - Logout  
      LIST USERS | ADD NEW USER | SEARCH FOR A USER | ADD USER GROUP | LIST USER GROUPS
      ADD CAMPAIGN | LIST CAMPAIGNS | SHOW LISTS | ADD NEW LIST |               | LOAD NEW LEADS
      SHOW IN-GROUPS | ADD NEW IN-GROUP | SHOW REMOTE AGENTS | ADD NEW REMOTE AGENTS
      SERVER STATS | PARK REPORT | VDAD REPORT | CLOSER REPORT |               | SEARCH FOR A LEAD | GROUP HOURLY
    -"; - -echo "
    ADD A NEW USER
    \n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User Number: $NWB#vicidial_users-user$NWE
    Password: $NWB#vicidial_users-pass$NWE
    Full Name: $NWB#vicidial_users-full_name$NWE
    User Level: $NWB#vicidial_users-user_level$NWE
    User Group: $NWB#vicidial_users-user_group$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN -###################### - -if ($ADD==11) -{ -echo ""; - -echo "
    ADD A NEW CAMPAIGN\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    Campaign ID: $NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: $NWB#vicidial_campaigns-park_ext$NWE
    Park Filename: $NWB#vicidial_campaigns-park_file_name$NWE
    Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Next Agent Call: $NWB#vicidial_campaigns-next_agent_call$NWE
    Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW LIST FORM SCREEN -###################### - -if ($ADD==111) -{ -echo ""; - -echo "
    ADD A NEW LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    List ID: (digits only)$NWB#vicidial_lists-list_id$NWE
    List Name: $NWB#vicidial_lists-list_name$NWE
    Campaign: $NWB#vicidial_lists-campaign_id$NWE
    Active: $NWB#vicidial_lists-active$NWE
    \n"; - -} - - -###################### -# ADD=1111 display the ADD NEW INBOUND GROUP SCREEN -###################### - -if ($ADD==1111) -{ -echo ""; - -echo "
    ADD A NEW INBOUND GROUP\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group ID: (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE
    Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
    Active: $NWB#vicidial_inbound_groups-active$NWE
    Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
    \n"; - -} - - -###################### -# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN -###################### - -if ($ADD==11111) -{ -echo ""; - -echo "
    ADD NEW REMOTE AGENTS\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
    External Extension: (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status: $NWB#vicidial_remote_agents-status$NWE
    Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Groups: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - -###################### -# ADD=111111 display the ADD NEW USERS GROUP SCREEN -###################### - -if ($ADD==111111) -{ -echo ""; - -echo "
    ADD NEW USERS GROUP\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
    Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -} - - -###################### -# ADD=2 adds the new person to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USER NOT ADDED - there is already a user in the system with this user number\n";} - else - { - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) - { - echo "
    USER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    user id must be between 2 and 8 characters long\n"; - echo "
    full name and password must be at least 2 characters long\n"; - } - else - { - echo "
    USER ADDED: $user\n"; - - $stmt="INSERT INTO vicidial_users values('','$user','$pass','$full_name','$user_level','$user_group');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A USER |$PHP_AUTH_USER|$ip|'$user','$pass','$full_name','$user_level'|\n"); - fclose($fp); - } - } -$ADD=0; -} - -###################### -# ADD=21 adds the new campaign to the system -###################### - -if ($ADD==21) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) - { - echo "
    CAMPAIGN NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    campaign ID must be between 2 and 8 characters in length\n"; - echo "
    campaign name must be between 6 and 40 characters in length\n"; - } - else - { - echo "
    CAMPAIGN ADDED: $campaign_id\n"; - - $stmt="INSERT INTO vicidial_campaigns values('$campaign_id','$campaign_name','$active','','','','','','DOWN','$park_ext','$park_file_name','$web_form_address','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','','','','');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN |$PHP_AUTH_USER|$ip|'$campaign_id','$campaign_name','$active','','','','','','DOWN','$park_ext','$park_file_name','$web_form_address','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','','','',''|\n"); - fclose($fp); - - } - } -$ADD=31; -} - -###################### -# ADD=22 adds the new campaign status to the system -###################### - -if ($ADD==22) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN STATUS NOT ADDED - there is already a campaign-status in the system with this name\n";} - else - { - $stmt="SELECT count(*) from vicidial_statuses where status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) - { - echo "
    CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 8 characters in length\n"; - echo "
    status name must be between 2 and 30 characters in length\n"; - } - else - { - echo "
    CAMPAIGN STATUS ADDED: $campaign_id - $status\n"; - - $stmt="INSERT INTO vicidial_campaign_statuses values('$status','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN STATUS |$PHP_AUTH_USER|$ip|'$status','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - - } - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new list to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    LIST NOT ADDED - there is already a list in the system with this ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or (strlen($list_id) < 2) or (strlen($list_id) > 8) ) - { - echo "
    LIST NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    List ID must be between 2 and 8 characters in length\n"; - echo "
    List name must be at least 2 characters in length\n"; - } - else - { - echo "
    LIST ADDED: $list_id\n"; - - $stmt="INSERT INTO vicidial_lists values('$list_id','$list_name','$campaign_id','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LIST |$PHP_AUTH_USER|$ip|'$list_id','$list_name','$campaign_id','$active'|\n"); - fclose($fp); - - } - } -$ADD=311; -} - - - -###################### -# ADD=2111 adds the new inbound group to the system -###################### - -if ($ADD==2111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    GROUP NOT ADDED - there is already a group in the system with this ID\n";} - else - { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi('-',$group_id)) or (eregi('+',$group_id)) ) - { - echo "
    GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Group ID must be between 2 and 20 characters in length and contain no ' -+'.\n"; - echo "
    Group name and group color must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_inbound_groups values('$group_id','$group_name','$group_color','$active','$web_form_address','$voicemail_ext','$next_agent_call','$fronter_display');"; - $rslt=mysql_query($stmt, $link); - - echo "
    GROUP ADDED: $group_id\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW GROUP |$PHP_AUTH_USER|$ip|'$group_id','$group_name','$group_color','$active','$web_form_address','$voicemail_ext','$next_agent_call','$fronter_display'|\n"); - fclose($fp); - - } - } -$ADD=1000; -} - - -###################### -# ADD=21111 adds new remote agents to the system -###################### - -if ($ADD==21111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    REMOTE AGENTS NOT ADDED - there is already a remote agents entry starting with this userID\n";} - else - { - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    User ID start and external extension must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTE AGENTS ADDED: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|'$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value'|\n"); - fclose($fp); - - } - } -$ADD=10000; -} - -###################### -# ADD=211111 adds new user group to the system -###################### - -if ($ADD==211111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USER GROUP NOT ADDED - there is already a user group entry with this name\n";} - else - { - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    USER GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Group name and description must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_user_groups values('$user_group','$group_name');"; - $rslt=mysql_query($stmt, $link); - - echo "
    USER GROUP ADDED: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW USER GROUP ENTRY |$PHP_AUTH_USER|$ip|'$user_group','$group_name'|\n"); - fclose($fp); - - } - } -$ADD=100000; -} - - - - - -###################################################################################################### -###################################################################################################### -####### 4 series, record modifications submitted and DB is modified, then on to 3 series forms below -###################################################################################################### -###################################################################################################### - - - -###################### -# ADD=4 submit user modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group' where user='$user'|\n"); - fclose($fp); - - } - -$ADD=3; # go to user modification below -} - -###################### -# ADD=41 submit campaign modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign name needs to be at least 6 characters in length\n"; - } - else - { - echo "
    CAMPAIGN MODIFIED: $campaign_id\n"; - - $stmt="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - if ($reset_hopper == 'Y') - { - echo "
    RESETTING CAMPAIGN LEAD HOPPER\n"; - echo "
    - Wait 1 minute before dialing next number\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG RESET TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten' where campaign_id='$campaign_id'|$reset_hopper|\n"); - fclose($fp); - - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=42 delete campaign status in the system -###################### - -if ($ADD==42) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign id needs to be at least 2 characters in length\n"; - echo "
    the campaign status needs to be at least 1 characters in length\n"; - } - else - { - echo "
    CUSTOM CAMPAIGN STATUS DELETED: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status'|\n"); - fclose($fp); - - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=411 submit list modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) - { - echo "
    LIST NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    list name must be at least 2 characters in length\n"; - } - else - { - echo "
    LIST MODIFIED: $list_id\n"; - - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - if ($reset_list == 'Y') - { - echo "
    RESETTING LIST-CALLED-STATUS\n"; - $stmt="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - ### LOG RESET TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|RESET LIST CALLED |$PHP_AUTH_USER|$ip|list_name='$list_name'|\n"); - fclose($fp); - } - if ($campaign_id != "$old_campaign_id") - { - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($old_campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LIST INFO |$PHP_AUTH_USER|$ip|list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id'|\n"); - fclose($fp); - - } - -$ADD=311; # go to list modification form below -} - - -###################### -# ADD=4111 modify group info in the system -###################### - -if ($ADD==4111) -{ - echo ""; - - if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) - { - echo "
    GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    group name and group color must be at least 2 characters in length\n"; - } - else - { - echo "
    GROUP MODIFIED: $group_id\n"; - - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='$web_form_address', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display' where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY GROUP INFO |$PHP_AUTH_USER|$ip|group_name='$group_name',group_color='$group_color',active='$active', web_form_address='$web_form_address', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display' where group_id='$group_id'|\n"); - fclose($fp); - - } - -$ADD=3111; # go to group modification form below -} - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    User ID Start and External Extension must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTE AGENTS MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - - } - -$ADD=31111; # go to remote agents modification form below -} - - - -###################### -# ADD=411111 modify user group info in the system -###################### - -if ($ADD==411111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    USER GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Group name and description must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group';"; - $rslt=mysql_query($stmt, $link); - - echo "
    USER GROUP MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER GROUP ENTRY |$PHP_AUTH_USER|$ip|UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group'|\n"); - fclose($fp); - - } - -$ADD=311111; # go to user group modification form below -} - - - - - - - - -###################################################################################################### -###################################################################################################### -####### 3 series, record modification forms -###################################################################################################### -###################################################################################################### - - - - -###################### -# ADD=3 modify user info in the system -###################### - -if ($ADD==3) -{ - echo ""; - - $stmt="SELECT * from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[5]; - -echo "
    MODIFY A USER'S RECORD: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User Number: $row[1]$NWB#vicidial_users-user$NWE
    Password: $NWB#vicidial_users-pass$NWE
    Full Name: $NWB#vicidial_users-full_name$NWE
    User Level: $NWB#vicidial_users-user_level$NWE
    User Group: $NWB#vicidial_users-user_group$NWE
    \n"; - -echo "

    Click here for user stats\n"; - -} - - -###################### -# ADD=31 modify campaign info in the system -###################### - -if ($ADD==31) -{ - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - -echo "
    MODIFY A CAMPAIGN'S RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; -echo "
    Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: $row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE
    Web Form: $row[11]$NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Dial status 1: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 2: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 3: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 4: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 5: $NWB#vicidial_campaigns-dial_status$NWE
    List Order: $NWB#vicidial_campaigns-lead_order$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Next Agent Call: $NWB#vicidial_campaigns-next_agent_call$NWE
    Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Dial Timeout: in seconds$NWB#vicidial_campaigns-dial_timeout$NWE
    Dial Prefix: for 91NXXNXXXXXX value would be 9, for no dial prefix use X$NWB#vicidial_campaigns-dial_prefix$NWE
    Campaign CallerID: $NWB#vicidial_campaigns-campaign_cid$NWE
    Campaign VDAD exten: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE
    \n"; - - ##### calculate what gmt_offset_now values are within the allowed local_call_time setting - if ($local_call_time == '24hours') - { - $p='13'; - $GMT_allowed = ''; - while ($p > -13) - { - $tz = sprintf("%.2f", $p); $GMT_allowed = "$GMT_allowed'$tz',"; - $p = ($p - 0.25); - } - } - if ($local_call_time == '9am-9pm') - { - $p='13'; - $GMT_allowed = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $phour=gmdate("G", time() + $pzone); - if ( ($phour >= 9) && ($phour <= 20) ){$tz = sprintf("%.2f", $p); $GMT_allowed = "$GMT_allowed'$tz',";} - $p = ($p - 0.25); - } - } - if ($local_call_time == '9am-5pm') - { - $p='13'; - $GMT_allowed = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $phour=gmdate("G", time() + $pzone); - if ( ($phour >= 9) && ($phour <= 16) ){$tz = sprintf("%.2f", $p); $GMT_allowed = "$GMT_allowed'$tz',";} - $p = ($p - 0.25); - } - } - if ($local_call_time == '12pm-5pm') - { - $p='13'; - $GMT_allowed = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $phour=gmdate("G", time() + $pzone); - if ( ($phour >= 12) && ($phour <= 16) ){$tz = sprintf("%.2f", $p); $GMT_allowed = "$GMT_allowed'$tz',";} - $p = ($p - 0.25); - } - } - if ($local_call_time == '12pm-9pm') - { - $p='13'; - $GMT_allowed = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $phour=gmdate("G", time() + $pzone); - if ( ($phour >= 12) && ($phour <= 20) ){$tz = sprintf("%.2f", $p); $GMT_allowed = "$GMT_allowed'$tz',";} - $p = ($p - 0.25); - } - } - if ($local_call_time == '5pm-9pm') - { - $p='13'; - $GMT_allowed = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $phour=gmdate("G", time() + $pzone); - if ( ($phour >= 17) && ($phour <= 20) ){$tz = sprintf("%.2f", $p); $GMT_allowed = "$GMT_allowed'$tz',";} - $p = ($p - 0.25); - } - } - - $GMT_allowed = "$GMT_allowed'99'"; - - - - - - - - - - -echo "
    \n"; -echo "
    LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LIST IDLIST NAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

    \n"; - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and gmt_offset_now IN($GMT_allowed)"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rsltx_rows = mysql_num_rows($rsltx); - if ($rsltx_rows) - { - $rowx=mysql_fetch_row($rsltx); - $active_leads = "$rowx[0]"; - } - else {$active_leads = '0';} - -echo "This campaign has $active_leads leads to be dialed in those lists

    \n"; - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $hopper_leads = "$rowx[0]"; - -echo "This campaign has $hopper_leads leads in the dial hopper

    \n"; -echo "Click here to see what leads are in the hopper right now

    \n"; -echo "
    \n"; - - - - -echo "
    \n"; -echo "
    CUSTOM STATUSES WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_statuses$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; - $rsltx=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rsltx); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    STATUSDESCRIPTIONSELECTABLEDELETE
    $rowx[0]$rowx[1]$rowx[2]DELETE
    \n"; - -echo "
    ADD NEW CUSTOM CAMPAIGN STATUS
    \n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Description:   \n"; -echo "Selectable:   \n"; -echo "
    \n"; - -echo "

    \n"; - -} - - -###################### -# ADD=311 modify list info in the system -###################### - -if ($ADD==311) -{ - echo ""; - - $stmt="SELECT * from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $campaign_id = $row[2]; - $active = $row[3]; - -echo "
    MODIFY A LIST'S RECORD: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    List ID: $row[0]$NWB#vicidial_lists-list_id$NWE
    List Name: $NWB#vicidial_lists-list_name$NWE
    Campaign: $NWB#vicidial_lists-campaign_id$NWE
    Active: $NWB#vicidial_lists-active$NWE
    Reset Lead-Called-Status for this list: $NWB#vicidial_lists-reset_list$NWE
    \n"; - -echo "
    \n"; -echo "
    STATUSES WITHIN THIS LIST:
    \n"; -echo "\n"; -echo "\n"; - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by status,called_since_last_reset order by status,called_since_last_reset"; - $rsltx=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rsltx); - - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $leads_in_list = ($leads_in_list + $rowx[2]); - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($rowx[1] == 'N') - { - $leads_in_list_N = ($leads_in_list_N + $rowx[2]); - echo "\n"; - } - else - { - $leads_in_list_Y = ($leads_in_list_Y + $rowx[2]); - echo "\n"; - - } - - $o++; - } - -echo "\n"; -echo "\n"; - -echo "
    STATUSCALLEDNOT CALLED
    $rowx[0] $rowx[2]
    $rowx[0]$rowx[2]
    SUBTOTALS$leads_in_list_Y$leads_in_list_N
    TOTAL$leads_in_list

    \n"; - - - - - -echo "
    \n"; -echo "
    TIME ZONES WITHIN THIS LIST:
    \n"; -echo "\n"; -echo "\n"; - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT gmt_offset_now,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by gmt_offset_now,called_since_last_reset order by gmt_offset_now,called_since_last_reset"; - $rsltx=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rsltx); - - $o=0; - $plus='+'; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $leads_in_list = ($leads_in_list + $rowx[2]); - - $LOCALzone=3600 * $rowx[0]; - $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); - - if ($rowx[0] >= 0) {$rowx[0] = "$plus$rowx[0]";} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($rowx[1] == 'N') - { - $leads_in_list_N = ($leads_in_list_N + $rowx[2]); - echo "\n"; - } - else - { - $leads_in_list_Y = ($leads_in_list_Y + $rowx[2]); - echo "\n"; - - } - - $o++; - } - -echo "\n"; -echo "\n"; - -echo "
    GMT OFFSET NOW (local time)CALLEDNOT CALLED
    $rowx[0]     ($LOCALdate) $rowx[2]
    $rowx[0]     ($LOCALdate)$rowx[2]
    SUBTOTALS$leads_in_list_Y$leads_in_list_N
    TOTAL$leads_in_list

    \n"; - - - - - - - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_count,count(*) from vicidial_list where list_id='$list_id' group by status,called_count order by status,called_count"; - $rsltx=mysql_query($stmt, $link); - $status_called_to_print = mysql_num_rows($rsltx); - - $o=0; - $sts=0; - $first_row=1; - $all_called_first=1000; - $all_called_last=0; - while ($status_called_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $leads_in_list = ($leads_in_list + $rowx[2]); - $count_statuses[$o] = "$rowx[0]"; - $count_called[$o] = "$rowx[1]"; - $count_count[$o] = "$rowx[2]"; - $all_called_count[$rowx[1]] = ($all_called_count[$rowx[1]] + $rowx[2]); - - if ( (strlen($status[$sts]) < 1) or ($status[$sts] != "$rowx[0]") ) - { - if ($first_row) {$first_row=0;} - else {$sts++;} - $status[$sts] = "$rowx[0]"; - $status_called_first[$sts] = "$rowx[1]"; - if ($status_called_first[$sts] < $all_called_first) {$all_called_first = $status_called_first[$sts];} - } - $leads_in_sts[$sts] = ($leads_in_sts[$sts] + $rowx[2]); - $status_called_last[$sts] = "$rowx[1]"; - if ($status_called_last[$sts] > $all_called_last) {$all_called_last = $status_called_last[$sts];} - - $o++; - } - - - - -echo "
    \n"; -echo "
    CALLED COUNTS WITHIN THIS LIST:
    \n"; -echo "\n"; -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - echo ""; - $first++; - } -echo "\n"; - - $sts=0; - $statuses_called_to_print = count($status); - while ($statuses_called_to_print > $sts) - { - if (eregi("1$|3$|5$|7$|9$", $sts)) - {$bgcolor='bgcolor="#B9CBFD"'; $AB='bgcolor="#9BB9FB"';} - else - {$bgcolor='bgcolor="#9BB9FB"'; $AB='bgcolor="#B9CBFD"';} -# echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n"; -# echo "$status[$sts]|"; - echo ""; - - $first = $all_called_first; - while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $sts)) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - else - { - if (eregi("0$|2$|4$|6$|8$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - - $called_printed=0; - $o=0; - while ($status_called_to_print > $o) - { - if ( ($count_statuses[$o] == "$status[$sts]") and ($count_called[$o] == "$first") ) - { - $called_printed++; - echo ""; - } - - - $o++; - } - if (!$called_printed) - {echo "";} - $first++; - } - echo "\n\n"; - - $sts++; - } - -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - echo ""; - $first++; - } -echo "\n"; - -echo "
    STATUS$firstSUBTOTAL
    $status[$sts] $count_count[$o]  $leads_in_sts[$sts]
    TOTAL$all_called_count[$first]$leads_in_list

    \n"; - - - - - -echo "
    \n"; - -} - - - -###################### -# ADD=3111 modify in-group info in the system -###################### - -if ($ADD==3111) -{ - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = $row[4]; - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - -echo "
    MODIFY A GROUP'S RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    Group ID: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
    Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
    Active: $NWB#vicidial_inbound_groups-active$NWE
    Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
    \n"; - -echo "

    \n"; - -echo "
    \n"; - -} - - - -###################### -# ADD=31111 modify remote agents info in the system -###################### - -if ($ADD==31111) -{ - echo ""; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
    External Extension: (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status: $NWB#vicidial_remote_agents-status$NWE
    Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Groups: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - -###################### -# ADD=311111 modify user group info in the system -###################### - -if ($ADD==311111) -{ - echo ""; - - $stmt="SELECT * from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[0]; - $group_name = $row[1]; -echo ""; - -echo "
    MODIFY A USERS GROUP ENTRY\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
    Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -} - - - - - - - - -###################### -# ADD=5 search form -###################### - -if ($ADD==5) -{ -echo ""; - -echo "
    SEARCH FOR A USER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User Number:
    Full Name:
    User Level:
    User Group:
    \n"; - -} - -###################### -# ADD=6 user search results -###################### - -if ($ADD==6) -{ - echo ""; - - $SQL = ''; - if ($user) {$SQL .= " user LIKE \"%$user%\" and";} - if ($full_name) {$SQL .= " full_name LIKE \"%$full_name%\" and";} - if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";} - if ($user_group) {$SQL .= " user_group LIKE \"%$user_group%\" and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from vicidial_users $SQL order by full_name desc;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    SEARCH RESULTS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFY | STATS
    \n"; - -} - - - -###################### -# ADD=0 display all active users -###################### -if ($ADD==0) -{ - echo ""; - - $stmt="SELECT * from vicidial_users order by full_name"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFY | STATS
    \n"; -} - -###################### -# ADD=10 display all campaigns -###################### -if ($ADD==10) -{ - echo ""; - - $stmt="SELECT * from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[1] $row[2] $row[3]$row[4]$row[5] $row[6]$row[7]  MODIFY
    \n"; -} - - -###################### -# ADD=100 display all lists -###################### -if ($ADD==100) -{ - echo ""; - - $stmt="SELECT * from vicidial_lists order by list_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    LIST LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  MODIFY
    \n"; -} - - - -###################### -# ADD=1000 display all inbound groups -###################### -if ($ADD==1000) -{ - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    INBOUND GROUP LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[5]  MODIFY
    \n"; -} - - -###################### -# ADD=10000 display all remote agents -###################### -if ($ADD==10000) -{ - echo ""; - - $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    REMOTE AGENTS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
    \n"; -} - - -###################### -# ADD=100000 display all user groups -###################### -if ($ADD==100000) -{ - echo ""; - - $stmt="SELECT * from vicidial_user_groups order by user_group"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USER GROUPS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/admin.php b/agc_2-X/trunk/LANG_admin/vicidial/admin.php deleted file mode 100644 index e296c40c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/admin.php +++ /dev/null @@ -1,6514 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} - elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} -if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} - elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];} - elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];} - elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];} -if (isset($_GET["park_file_name"])) {$park_file_name=$_GET["park_file_name"];} - elseif (isset($_POST["park_file_name"])) {$park_file_name=$_POST["park_file_name"];} -if (isset($_GET["web_form_address"])) {$web_form_address=$_GET["web_form_address"];} - elseif (isset($_POST["web_form_address"])) {$web_form_address=$_POST["web_form_address"];} -if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} - elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} -if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} - elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["next_agent_call"])) {$next_agent_call=$_GET["next_agent_call"];} - elseif (isset($_POST["next_agent_call"])) {$next_agent_call=$_POST["next_agent_call"];} -if (isset($_GET["local_call_time"])) {$local_call_time=$_GET["local_call_time"];} - elseif (isset($_POST["local_call_time"])) {$local_call_time=$_POST["local_call_time"];} -if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} - elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];} - elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];} -if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} - elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];} - elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} -if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} - elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["dial_status_a"])) {$dial_status_a=$_GET["dial_status_a"];} - elseif (isset($_POST["dial_status_a"])) {$dial_status_a=$_POST["dial_status_a"];} -if (isset($_GET["dial_status_b"])) {$dial_status_b=$_GET["dial_status_b"];} - elseif (isset($_POST["dial_status_b"])) {$dial_status_b=$_POST["dial_status_b"];} -if (isset($_GET["dial_status_c"])) {$dial_status_c=$_GET["dial_status_c"];} - elseif (isset($_POST["dial_status_c"])) {$dial_status_c=$_POST["dial_status_c"];} -if (isset($_GET["dial_status_d"])) {$dial_status_d=$_GET["dial_status_d"];} - elseif (isset($_POST["dial_status_d"])) {$dial_status_d=$_POST["dial_status_d"];} -if (isset($_GET["dial_status_e"])) {$dial_status_e=$_GET["dial_status_e"];} - elseif (isset($_POST["dial_status_e"])) {$dial_status_e=$_POST["dial_status_e"];} -if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} - elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["campaign_vdad_exten"])) {$campaign_vdad_exten=$_GET["campaign_vdad_exten"];} - elseif (isset($_POST["campaign_vdad_exten"])) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];} -if (isset($_GET["campaign_rec_exten"])) {$campaign_rec_exten=$_GET["campaign_rec_exten"];} - elseif (isset($_POST["campaign_rec_exten"])) {$campaign_rec_exten=$_POST["campaign_rec_exten"];} -if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} - elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} -if (isset($_GET["campaign_rec_filename"])) {$campaign_rec_filename=$_GET["campaign_rec_filename"];} - elseif (isset($_POST["campaign_rec_filename"])) {$campaign_rec_filename=$_POST["campaign_rec_filename"];} -if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} - elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} -if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} - elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} -if (isset($_GET["old_campaign_id"])) {$old_campaign_id=$_GET["old_campaign_id"];} - elseif (isset($_POST["old_campaign_id"])) {$old_campaign_id=$_POST["old_campaign_id"];} -if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} - elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} -if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} - elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];} -if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} - elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} -if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} - elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];} - elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} -if (isset($_GET["delete_user_groups"])) {$delete_user_groups=$_GET["delete_user_groups"];} - elseif (isset($_POST["delete_user_groups"])) {$delete_user_groups=$_POST["delete_user_groups"];} -if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} - elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} -if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} - elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} -if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} - elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} -if (isset($_GET["delete_remote_agents"])) {$delete_remote_agents=$_GET["delete_remote_agents"];} - elseif (isset($_POST["delete_remote_agents"])) {$delete_remote_agents=$_POST["delete_remote_agents"];} -if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];} - elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} -if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} - elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} -if (isset($_GET["ast_admin_access"])) {$ast_admin_access=$_GET["ast_admin_access"];} - elseif (isset($_POST["ast_admin_access"])) {$ast_admin_access=$_POST["ast_admin_access"];} -if (isset($_GET["ast_delete_phones"])) {$ast_delete_phones=$_GET["ast_delete_phones"];} - elseif (isset($_POST["ast_delete_phones"])) {$ast_delete_phones=$_POST["ast_delete_phones"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} -if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} - elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} -if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];} - elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];} -if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];} - elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];} -if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} - elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} -if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];} - elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} -if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} - elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} -if (isset($_GET["get_call_launch"])) {$get_call_launch=$_GET["get_call_launch"];} - elseif (isset($_POST["get_call_launch"])) {$get_call_launch=$_POST["get_call_launch"];} -if (isset($_GET["am_message_exten"])) {$am_message_exten=$_GET["am_message_exten"];} - elseif (isset($_POST["am_message_exten"])) {$am_message_exten=$_POST["am_message_exten"];} -if (isset($_GET["amd_send_to_vmx"])) {$amd_send_to_vmx=$_GET["amd_send_to_vmx"];} - elseif (isset($_POST["amd_send_to_vmx"])) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];} -if (isset($_GET["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"];} - elseif (isset($_POST["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];} -if (isset($_GET["xferconf_a_number"])) {$xferconf_a_number=$_GET["xferconf_a_number"];} - elseif (isset($_POST["xferconf_a_number"])) {$xferconf_a_number=$_POST["xferconf_a_number"];} -if (isset($_GET["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"];} - elseif (isset($_POST["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];} -if (isset($_GET["xferconf_b_number"])) {$xferconf_b_number=$_GET["xferconf_b_number"];} - elseif (isset($_POST["xferconf_b_number"])) {$xferconf_b_number=$_POST["xferconf_b_number"];} -if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} - elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} -if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} - elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} -if (isset($_GET["change_agent_campaign"])) {$change_agent_campaign=$_GET["change_agent_campaign"];} - elseif (isset($_POST["change_agent_campaign"])) {$change_agent_campaign=$_POST["change_agent_campaign"];} -if (isset($_GET["agent_choose_ingroups"])) {$agent_choose_ingroups=$_GET["agent_choose_ingroups"];} - elseif (isset($_POST["agent_choose_ingroups"])) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];} -if (isset($_GET["alt_number_dialing"])) {$alt_number_dialing=$_GET["alt_number_dialing"];} - elseif (isset($_POST["alt_number_dialing"])) {$alt_number_dialing=$_POST["alt_number_dialing"];} -if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} - elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} -if (isset($_GET["lead_filter_id"])) {$lead_filter_id=$_GET["lead_filter_id"];} - elseif (isset($_POST["lead_filter_id"])) {$lead_filter_id=$_POST["lead_filter_id"];} -if (isset($_GET["lead_filter_name"])) {$lead_filter_name=$_GET["lead_filter_name"];} - elseif (isset($_POST["lead_filter_name"])) {$lead_filter_name=$_POST["lead_filter_name"];} -if (isset($_GET["lead_filter_comments"])) {$lead_filter_comments=$_GET["lead_filter_comments"];} - elseif (isset($_POST["lead_filter_comments"])) {$lead_filter_comments=$_POST["lead_filter_comments"];} -if (isset($_GET["lead_filter_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} - elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} -if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} - elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} -if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} - elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} -if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];} - elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];} -if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];} - elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];} -if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} - elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} -if (isset($_GET["alter_agent_interface_options"])) {$alter_agent_interface_options=$_GET["alter_agent_interface_options"];} - elseif (isset($_POST["alter_agent_interface_options"])) {$alter_agent_interface_options=$_POST["alter_agent_interface_options"];} -if (isset($_GET["closer_default_blended"])) {$closer_default_blended=$_GET["closer_default_blended"];} - elseif (isset($_POST["closer_default_blended"])) {$closer_default_blended=$_POST["closer_default_blended"];} -if (isset($_GET["drop_call_seconds"])) {$drop_call_seconds=$_GET["drop_call_seconds"];} - elseif (isset($_POST["drop_call_seconds"])) {$drop_call_seconds=$_POST["drop_call_seconds"];} -if (isset($_GET["safe_harbor_message"])) {$safe_harbor_message=$_GET["safe_harbor_message"];} - elseif (isset($_POST["safe_harbor_message"])) {$safe_harbor_message=$_POST["safe_harbor_message"];} -if (isset($_GET["safe_harbor_exten"])) {$safe_harbor_exten=$_GET["safe_harbor_exten"];} - elseif (isset($_POST["safe_harbor_exten"])) {$safe_harbor_exten=$_POST["safe_harbor_exten"];} -if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} - elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} -if (isset($_GET["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} - elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} -if (isset($_GET["call_time_id"])) {$call_time_id=$_GET["call_time_id"];} - elseif (isset($_POST["call_time_id"])) {$call_time_id=$_POST["call_time_id"];} -if (isset($_GET["call_time_name"])) {$call_time_name=$_GET["call_time_name"];} - elseif (isset($_POST["call_time_name"])) {$call_time_name=$_POST["call_time_name"];} -if (isset($_GET["call_time_comments"])) {$call_time_comments=$_GET["call_time_comments"];} - elseif (isset($_POST["call_time_comments"])) {$call_time_comments=$_POST["call_time_comments"];} -if (isset($_GET["ct_default_start"])) {$ct_default_start=$_GET["ct_default_start"];} - elseif (isset($_POST["ct_default_start"])) {$ct_default_start=$_POST["ct_default_start"];} -if (isset($_GET["ct_default_stop"])) {$ct_default_stop=$_GET["ct_default_stop"];} - elseif (isset($_POST["ct_default_stop"])) {$ct_default_stop=$_POST["ct_default_stop"];} -if (isset($_GET["ct_sunday_start"])) {$ct_sunday_start=$_GET["ct_sunday_start"];} - elseif (isset($_POST["ct_sunday_start"])) {$ct_sunday_start=$_POST["ct_sunday_start"];} -if (isset($_GET["ct_sunday_stop"])) {$ct_sunday_stop=$_GET["ct_sunday_stop"];} - elseif (isset($_POST["ct_sunday_stop"])) {$ct_sunday_stop=$_POST["ct_sunday_stop"];} -if (isset($_GET["ct_monday_start"])) {$ct_monday_start=$_GET["ct_monday_start"];} - elseif (isset($_POST["ct_monday_start"])) {$ct_monday_start=$_POST["ct_monday_start"];} -if (isset($_GET["ct_monday_stop"])) {$ct_monday_stop=$_GET["ct_monday_stop"];} - elseif (isset($_POST["ct_monday_stop"])) {$ct_monday_stop=$_POST["ct_monday_stop"];} -if (isset($_GET["ct_tuesday_start"])) {$ct_tuesday_start=$_GET["ct_tuesday_start"];} - elseif (isset($_POST["ct_tuesday_start"])) {$ct_tuesday_start=$_POST["ct_tuesday_start"];} -if (isset($_GET["ct_tuesday_stop"])) {$ct_tuesday_stop=$_GET["ct_tuesday_stop"];} - elseif (isset($_POST["ct_tuesday_stop"])) {$ct_tuesday_stop=$_POST["ct_tuesday_stop"];} -if (isset($_GET["ct_wednesday_start"])) {$ct_wednesday_start=$_GET["ct_wednesday_start"];} - elseif (isset($_POST["ct_wednesday_start"])) {$ct_wednesday_start=$_POST["ct_wednesday_start"];} -if (isset($_GET["ct_wednesday_stop"])) {$ct_wednesday_stop=$_GET["ct_wednesday_stop"];} - elseif (isset($_POST["ct_wednesday_stop"])) {$ct_wednesday_stop=$_POST["ct_wednesday_stop"];} -if (isset($_GET["ct_thursday_start"])) {$ct_thursday_start=$_GET["ct_thursday_start"];} - elseif (isset($_POST["ct_thursday_start"])) {$ct_thursday_start=$_POST["ct_thursday_start"];} -if (isset($_GET["ct_thursday_stop"])) {$ct_thursday_stop=$_GET["ct_thursday_stop"];} - elseif (isset($_POST["ct_thursday_stop"])) {$ct_thursday_stop=$_POST["ct_thursday_stop"];} -if (isset($_GET["ct_friday_start"])) {$ct_friday_start=$_GET["ct_friday_start"];} - elseif (isset($_POST["ct_friday_start"])) {$ct_friday_start=$_POST["ct_friday_start"];} -if (isset($_GET["ct_friday_stop"])) {$ct_friday_stop=$_GET["ct_friday_stop"];} - elseif (isset($_POST["ct_friday_stop"])) {$ct_friday_stop=$_POST["ct_friday_stop"];} -if (isset($_GET["ct_saturday_start"])) {$ct_saturday_start=$_GET["ct_saturday_start"];} - elseif (isset($_POST["ct_saturday_start"])) {$ct_saturday_start=$_POST["ct_saturday_start"];} -if (isset($_GET["ct_saturday_stop"])) {$ct_saturday_stop=$_GET["ct_saturday_stop"];} - elseif (isset($_POST["ct_saturday_stop"])) {$ct_saturday_stop=$_POST["ct_saturday_stop"];} -if (isset($_GET["state_call_time_state"])) {$state_call_time_state=$_GET["state_call_time_state"];} - elseif (isset($_POST["state_call_time_state"])) {$state_call_time_state=$_POST["state_call_time_state"];} -if (isset($_GET["state_rule"])) {$state_rule=$_GET["state_rule"];} - elseif (isset($_POST["state_rule"])) {$state_rule=$_POST["state_rule"];} -if (isset($_GET["delete_call_times"])) {$delete_call_times=$_GET["delete_call_times"];} - elseif (isset($_POST["delete_call_times"])) {$delete_call_times=$_POST["delete_call_times"];} -if (isset($_GET["modify_call_times"])) {$modify_call_times=$_GET["modify_call_times"];} - elseif (isset($_POST["modify_call_times"])) {$modify_call_times=$_POST["modify_call_times"];} -if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} - elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} -if (isset($_GET["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} - elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} -if (isset($_GET["attempt_delay"])) {$attempt_delay=$_GET["attempt_delay"];} - elseif (isset($_POST["attempt_delay"])) {$attempt_delay=$_POST["attempt_delay"];} -if (isset($_GET["attempt_maximum"])) {$attempt_maximum=$_GET["attempt_maximum"];} - elseif (isset($_POST["attempt_maximum"])) {$attempt_maximum=$_POST["attempt_maximum"];} - - if (isset($script_id)) {$script_id= strtoupper($script_id);} - if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS ONLY ### -$user_level = ereg_replace("[^0-9]","",$user_level); -$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); -$xferconf_a_number = ereg_replace("[^0-9]","",$xferconf_a_number); -$xferconf_b_number = ereg_replace("[^0-9]","",$xferconf_b_number); -$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); -$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); -$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); -$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); -$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); -$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); -$drop_exten = ereg_replace("[^0-9]","",$drop_exten); -$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); -$park_ext = ereg_replace("[^0-9]","",$park_ext); -$hopper_level = ereg_replace("[^0-9]","",$hopper_level); -$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); -$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); -$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); -$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); -$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); -$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); -$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); -$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); -$delete_users = ereg_replace("[^0-9]","",$delete_users); -$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); -$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); -$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); -$delete_lists = ereg_replace("[^0-9]","",$delete_lists); -$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); -$delete_filters = ereg_replace("[^0-9]","",$delete_filters); -$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); -$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); -$load_leads = ereg_replace("[^0-9]","",$delete_call_times); -$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); -$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); -$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); -$modify_leads = ereg_replace("[^0-9]","",$modify_leads); -$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); -$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); -$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); -$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); -$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); -$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); -$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); -$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); -$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); -$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); -$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); -$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); -$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); -$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); -$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); -$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); -$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); -$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); -$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); -$user_start = ereg_replace("[^0-9]","",$user_start); -$phone_number = ereg_replace("[^0-9]","",$phone_number); -$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); -$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); -$hotkey = ereg_replace("[^0-9]","",$hotkey); -$list_id = ereg_replace("[^0-9]","",$list_id); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); -$allow_closers = ereg_replace("[^NY]","",$allow_closers); -$reset_hopper = ereg_replace("[^NY]","",$reset_hopper); -$amd_send_to_vmx = ereg_replace("[^NY]","",$amd_send_to_vmx); -$alt_number_dialing = ereg_replace("[^NY]","",$alt_number_dialing); -$safe_harbor_message = ereg_replace("[^NY]","",$safe_harbor_message); -$selectable = ereg_replace("[^NY]","",$selectable); -$reset_list = ereg_replace("[^NY]","",$reset_list); -$fronter_display = ereg_replace("[^NY]","",$fronter_display); -$drop_message = ereg_replace("[^NY]","",$drop_message); -$use_internal_dnc = ereg_replace("[^NY]","",$use_internal_dnc); - -### ALPHA-NUMERIC ONLY ### -$user = ereg_replace("[^0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^0-9a-zA-Z]","",$pass); -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$script_id = ereg_replace("[^0-9a-zA-Z]","",$script_id); -$submit = ereg_replace("[^0-9a-zA-Z]","",$submit); -$CoNfIrM = ereg_replace("[^0-9a-zA-Z]","",$CoNfIrM); -$campaign_cid = ereg_replace("[^0-9a-zA-Z]","",$campaign_cid); -$get_call_launch = ereg_replace("[^0-9a-zA-Z]","",$get_call_launch); -$campaign_recording = ereg_replace("[^0-9a-zA-Z]","",$campaign_recording); -$ADD = ereg_replace("[^0-9a-zA-Z]","",$ADD); -$dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$dial_prefix); -$state_call_time_state = ereg_replace("[^0-9a-zA-Z]","",$state_call_time_state); -$scheduled_callbacks = ereg_replace("[^0-9a-zA-Z]","",$scheduled_callbacks); - -### DIGITS and Dots -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); - -### DIGITS and spaces and hash and star and comma -$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_a_dtmf); -$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_b_dtmf); - -### ALPHA-NUMERIC and underscore and dash -$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); -$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); -$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); -$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); -$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); -$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); -$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); -$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); -$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); -$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); -$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); -$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); -$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); -$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); -$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); -$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); -$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); -$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); -$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); - -### ALPHA-NUMERIC and spaces -$lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); -### ALPHA-NUMERIC and hash -$group_color = ereg_replace("[^\#0-9a-zA-Z]","",$group_color); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); -$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); -$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); -$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); -$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); -$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); -$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); -$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); -$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); -$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); -$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); -$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); -$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); - -### remove semi-colons ### -$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); - -### VARIABLES TO BE mysql_real_escape_string ### -# $web_form_address -# $script_text - -##### END VARIABLE FILTERING FOR SECURITY ##### - - -# AST GUI database administration -# admin.php -# -# CHANGES -# 50315-1110 - Added Custom Campaign Statuses -# 50317-1438 - Added Fronter Display var to inbound groups -# 50322-1355 - Added custom callerID per campaign -# 50517-1356 - Added user_groups sections and user_group to vicidial_users -# 50517-1440 - Added ability to logout (must click OK with empty user/pass) -# 50602-1622 - Added lead loader pages to load new files into vicidial_list -# 50620-1351 - Added custom vdad transfer AGI extension per campaign -# 50810-1414 - modified in groups to kick out spaces and dashes -# 50908-2136 - Added Custom Campaign HotKeys -# 50914-0950 - Fixed user search by user_group -# 50926-1358 - Modified to allow for language translation -# 50926-1615 - Added WeBRooTWritablE write controls -# 51020-1008 - Added editable web address and park ext - NEW dial campaigns -# 51020-1056 - Added fields and help for campaign recording control -# 51123-1335 - Altered code to function in php globals=off -# 51208-1038 - Added user_level changes, function controls and default user phones -# 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents -# 51213-1706 - Added add/delete/modify vicidial scripts -# 51214-1737 - Added preview of vicidial script in popup window -# 51219-1225 - Added campaign and ingroups script selector and get_call_launch field -# 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button -# 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug -# 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen -# 60204-0659 - Fixed hopper reset bug -# 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets -# 60213-1100 - Added several vicidial_users permissions fields -# 60215-1319 - Added On-hold CallBacks display and links -# 60227-1226 - Fixed vicidial_inbound_groups insert bug -# 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables -# - Added status name in selected dial statuses in campaign screen -# 60417-1416 - Added vicidial_lead_filters sections -# - Changed the header links to color-coded sectional with sublinks below -# - Added filter name and script name to campaign and in-group modify sections -# - Added callback and alt dial options to campaigns section -# - Added callback, alt dial and other options to users section -# 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered -# 60421-1441 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60425-2355 - Added agent options to vicidial_users, reformatted user page -# 60502-1627 - Added drop_call_seconds and safe_harbor_ fields to campaign screen -# 60503-1228 - Added drop_call_seconds and drop_ fields to inbound groups screen -# 60505-1117 - Added initial framework for new local_call_times tables and definitions -# 60506-1033 - More revisions to the local_call_time section -# 60508-1354 - Finished call_times and state_call_times sections -# - Added modify/delete options for call_times -# 60509-1311 - Functionalize campaign dialable leads calculation -# - Change state_call_times selection from call_times to only allow one per state -# - Added dialable leads count popup to campaign screen if auto-calc is disabled -# - Added test dialable leads count popup to filter screen -# 60510-1050 - Added Wrapup seconds and Wrapup message to campaigns screen -# 60608-1401 - Added allowable inbound_groups checkboxes to CLOSER campaign detail screen -# 60609-1051 - Added add-to-dnc in LISTS section -# 60613-1415 - Added lead recycling options to campaign detail screen -# 60619-1523 - Added variable filtering to eliminate SQL injection attack threat -# 60622-1216 - Fixed HotKey addition form issues and variable filtering -# 60623-1159 - Fixed Scheduled Callbacks over-filtering bug -# - -# 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 - -$version = '1.1.12-3'; -$build = '60623-1159'; - -$STARTtime = date("U"); - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGuser_level =$row[4]; - $LOGdelete_users =$row[8]; - $LOGdelete_user_groups =$row[9]; - $LOGdelete_lists =$row[10]; - $LOGdelete_campaigns =$row[11]; - $LOGdelete_ingroups =$row[12]; - $LOGdelete_remote_agents =$row[13]; - $LOGload_leads =$row[14]; - $LOGcampaign_detail =$row[15]; - $LOGdelete_scripts =$row[18]; - $LOGdelete_filters =$row[29]; - $LOGalter_agent_interface =$row[30]; - $LOGdelete_call_times =$row[32]; - $LOGmodify_call_times =$row[33]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN: "; - -if (!isset($ADD)) {$ADD=0;} - -if ($ADD==1) {$hh='users'; echo "Add New User";} -if ($ADD==11) {$hh='campaigns'; echo "Add New Campaign";} -if ($ADD==111) {$hh='lists'; echo "Add New List";} -if ($ADD==121) {$hh='lists'; echo "Add New DNC";} -if ($ADD==1111) {$hh='ingroups'; echo "Add New In-Group";} -if ($ADD==11111) {$hh='remoteagent'; echo "Add New Remote Agents";} -if ($ADD==111111) {$hh='usergroups'; echo "Add New Users Group";} -if ($ADD==1111111) {$hh='scripts'; echo "Add New Script";} -if ($ADD==11111111) {$hh='filters'; echo "Add New Filter";} -if ($ADD==111111111) {$hh='times'; echo "Add New Call Time";} -if ($ADD==1111111111) {$hh='times'; echo "Add New State Call Time";} -if ($ADD==2) {$hh='users'; echo "New User Addition";} -if ($ADD==21) {$hh='campaigns'; echo "New Campaign Addition";} -if ($ADD==22) {$hh='campaigns'; echo "New Campaign Status Addition";} -if ($ADD==23) {$hh='campaigns'; echo "New Campaign HotKey Addition";} -if ($ADD==25) {$hh='campaigns'; echo "New Campaign Lead Recycle Addition";} -if ($ADD==211) {$hh='lists'; echo "New List Addition";} -if ($ADD==2111) {$hh='ingroups'; echo "New In-Group Addition";} -if ($ADD==21111) {$hh='remoteagent'; echo "New Remote Agents Addition";} -if ($ADD==211111) {$hh='usergroups'; echo "New Users Group Addition";} -if ($ADD==2111111) {$hh='scripts'; echo "New Script Addition";} -if ($ADD==21111111) {$hh='filters'; echo "New Filter Addition";} -if ($ADD==211111111) {$hh='times'; echo "New Call Time Addition";} -if ($ADD==2111111111) {$hh='times'; echo "New State Call Time Addition";} -if ($ADD==3) {$hh='users'; echo "Modify User";} -if ($ADD==31) {$hh='campaigns'; echo "Modify Campaign";} -if ($ADD==34) {$hh='campaigns'; echo "Modify Campaign - Basic View";} -if ($ADD==311) {$hh='lists'; echo "Modify List";} -if ($ADD==3111) {$hh='ingroups'; echo "Modify In-Group";} -if ($ADD==31111) {$hh='remoteagent'; echo "Modify Remote Agents";} -if ($ADD==311111) {$hh='usergroups'; echo "Modify Users Groups";} -if ($ADD==3111111) {$hh='scripts'; echo "Modify Script";} -if ($ADD==31111111) {$hh='filters'; echo "Modify Filter";} -if ($ADD==311111111) {$hh='times'; echo "Modify Call Time";} -if ($ADD==321111111) {$hh='times'; echo "Modify Call Time State Definitions List";} -if ($ADD==3111111111) {$hh='times'; echo "Modify State Call Time";} -if ($ADD=="4A") {$hh='users'; echo "Modify User - Admin";} -if ($ADD=="4B") {$hh='users'; echo "Modify User - Admin";} -if ($ADD==4) {$hh='users'; echo "Modify User";} -if ($ADD==41) {$hh='campaigns'; echo "Modify Campaign";} -if ($ADD==42) {$hh='campaigns'; echo "Modify Campaign Status";} -if ($ADD==43) {$hh='campaigns'; echo "Modify Campaign HotKey";} -if ($ADD==44) {$hh='campaigns'; echo "Modify Campaign - Basic View";} -if ($ADD==45) {$hh='campaigns'; echo "Modify Campaign Lead Recycle";} -if ($ADD==411) {$hh='lists'; echo "Modify List";} -if ($ADD==4111) {$hh='ingroups'; echo "Modify In-Group";} -if ($ADD==41111) {$hh='remoteagent'; echo "Modify Remote Agents";} -if ($ADD==411111) {$hh='usergroups'; echo "Modify Users Groups";} -if ($ADD==4111111) {$hh='scripts'; echo "Modify Script";} -if ($ADD==41111111) {$hh='filters'; echo "Modify Filter";} -if ($ADD==411111111) {$hh='times'; echo "Modify Call Time";} -if ($ADD==4111111111) {$hh='times'; echo "Modify State Call Time";} -if ($ADD==5) {$hh='users'; echo "Delete User";} -if ($ADD==51) {$hh='campaigns'; echo "Delete Campaign";} -if ($ADD==52) {$hh='campaigns'; echo "Logout Agents";} -if ($ADD==511) {$hh='lists'; echo "Delete List";} -if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==51111) {$hh='remoteagent'; echo "Delete Remote Agents";} -if ($ADD==511111) {$hh='usergroups'; echo "Delete Users Group";} -if ($ADD==5111111) {$hh='scripts'; echo "Delete Script";} -if ($ADD==51111111) {$hh='filters'; echo "Delete Filter";} -if ($ADD==511111111) {$hh='times'; echo "Delete Call Time";} -if ($ADD==5111111111) {$hh='times'; echo "Delete State Call Time";} -if ($ADD==6) {$hh='users'; echo "Delete User";} -if ($ADD==61) {$hh='campaigns'; echo "Delete Campaign";} -if ($ADD==62) {$hh='campaigns'; echo "Logout Agents";} -if ($ADD==65) {$hh='campaigns'; echo "Delete Lead Recycle";} -if ($ADD==611) {$hh='lists'; echo "Delete List";} -if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==61111) {$hh='remoteagent'; echo "Delete Remote Agents";} -if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";} -if ($ADD==6111111) {$hh='scripts'; echo "Delete Script";} -if ($ADD==61111111) {$hh='filters'; echo "Delete Filter";} -if ($ADD==611111111) {$hh='times'; echo "Delete Call Time";} -if ($ADD==6111111111) {$hh='times'; echo "Delete State Call Time";} -if ($ADD==73) {$hh='campaigns'; echo "Dialable Lead Count";} -if ($ADD==7111111) {$hh='scripts'; echo "Preview Script";} -if ($ADD==0) {$hh='users'; echo "Users List";} -if ($ADD==8) {$hh='users'; echo "CallBacks Within Agent";} -if ($ADD==81) {$hh='campaigns'; echo "CallBacks Within Campaign";} -if ($ADD==811) {$hh='campaigns'; echo "CallBacks Within List";} -if ($ADD==10) {$hh='campaigns'; echo "Campaigns";} -if ($ADD==100) {$hh='lists'; echo "Lists";} -if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";} -if ($ADD==10000) {$hh='remoteagent'; echo "Remote Agents";} -if ($ADD==100000) {$hh='usergroups'; echo "User Groups";} -if ($ADD==1000000) {$hh='scripts'; echo "Scripts";} -if ($ADD==10000000) {$hh='filters'; echo "Filters";} -if ($ADD==100000000) {$hh='times'; echo "Call Times";} -if ($ADD==1000000000) {$hh='times'; echo "State Call Times";} -if ($ADD==55) {$hh='users'; echo "Search Form";} -if ($ADD==66) {$hh='users'; echo "Search Results";} -if ($ADD==99999) {$hh='users'; echo "HELP";} - -if ( ($ADD>9) && ($ADD < 99998) ) - { - ##### get scripts listing for dynamic pulldown - $stmt="SELECT script_id,script_name from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $scripts_to_print = mysql_num_rows($rslt); - $scripts_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($scripts_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $scripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $scriptname_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - ##### get filters listing for dynamic pulldown - $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_sql from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - $filters_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($filters_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $filters_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $filtername_list["$rowx[0]"] = "$rowx[1]"; - $filtersql_list["$rowx[0]"] = "$rowx[2]"; - $o++; - } - - ##### get call_times listing for dynamic pulldown - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $times_to_print = mysql_num_rows($rslt); - - $o=0; - while ($times_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $call_times_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $call_timename_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - } - -if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD==21) or ($ADD==31) or ($ADD==41) or ($ADD=="4A") or ($ADD=="4B") ) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ($ADD==31) - { - $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ($ADD==3) - { - $stmt="SELECT closer_campaigns from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_value\""; - $p=0; - while ($p<100) - { - if ($group_id_value == $groups[$p]) - { - $groups_list .= " CHECKED"; - $groups_value .= " $group_id_value"; - } - $p++; - } - $groups_list .= "> $group_id_value - $group_name_value<BR>\n"; - $o++; - } - if (strlen($groups_value)>2) {$groups_value .= " -";} - } - - - - - -$NWB = "   <a href=\"javascript:openNewWindow('$PHP_SELF?ADD=99999"; -$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>"; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    VICIDIAL ADMIN: HELP


    \n"; - -?> -VICIDIAL_USERS TABLE

    - -
    -User ID - This field is where you put the VICIDIAL users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. - -
    -
    -
    -Password - This field is where you put the VICIDIAL users password. Must be at least 2 characters in length. - -
    -
    -
    -Full Name - This field is where you put the VICIDIAL users full name. Must be at least 2 characters in length. - -
    -
    -
    -User Level - This menu is where you select the VICIDIAL users user level. Must be a level of 1 to log into VICIDIAL, Must be level greater than 2 to log in as a closer, Must be user level 8 or greater to get into admin web section. - -
    -
    -
    -User Group - This menu is where you select the VICIDIAL users group that this user will belong to. This does not have any restrictions at this time, this is just to subdivide users and allow for future features based upon it. - -
    -
    -
    -Phone Login - Here is where you can set a default phone login value for when the user logs into vicidial.php. This value will populate the phone_login automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. - -
    -
    -
    -Phone Pass - Here is where you can set a default phone pass value for when the user logs into vicidial.php. This value will populate the phone_pass automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. - -
    -
    -
    -HotKeys Active - This option if set to 1 allows the user to use the HotKeys quick-dispositioning function in vicidial.php. - -
    -
    -
    -Agent Choose Ingroups - This option if set to 1 allows the user to choose the ingroups that they will receive calls from when they login to a CLOSER or INBOUND campaign. Otherwise the Manager will need to set this in their user detail screen of the admin page. - -
    -
    -
    -Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - -
    -
    -
    -Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. - -
    -
    -
    -Agent-Only Callbacks - This option allows an agent to set a callback so that they are the only Agent that can call the customer back. This also allows the agent to see their callback listings and call them back any time they want to. - -
    -
    -
    -Agent Call Manual - This option allows an agent to manually enter a new lead into the system and call them. This also allows the calling of any phone number from their vicidial screen and puts that call into their session. Use this option with caution. - -
    -
    -
    -Vicidial Recording - This option can prevent an agent from doing any recordings after they log in to vicidial. This option must be on for vicidial to follow the campaign recording session. - -
    -
    -
    -Vicidial Transfers - This option can prevent an agent from opening the transfer - conference session of vicidial. If this is disabled, the agent cannot third party call or blind transfer any calls. - -
    -
    -
    -Closer Default Blended - This option simply defaults the Blended checkbox on a CLOSER login screen. - -
    -
    -
    -Alter Agent Interface Options - This option if set to 1 allows the administrative user to modify the Agents interface options in admin.php. - -
    -
    -
    -Delete Users - This option if set to 1 allows the user to delete other users of equal or lesser user level from the system. - -
    -
    -
    -Delete User Groups - This option if set to 1 allows the user to delete user groups from the system. - -
    -
    -
    -Delete Lists - This option if set to 1 allows the user to delete vicidial lists from the system. - -
    -
    -
    -Delete Campaigns - This option if set to 1 allows the user to delete vicidial campaigns from the system. - -
    -
    -
    -Delete In-Groups - This option if set to 1 allows the user to delete vicidial In-Groups from the system. - -
    -
    -
    -Delete Remote Agents - This option if set to 1 allows the user to delete vicidial remote agents from the system. - -
    -
    -
    -Load Leads - This option if set to 1 allows the user to load vicidial leads into the vicidial_list table by way of the web based lead loader. - -
    -
    -
    -Campaign Detail - This option if set to 1 allows the user to view and modify the campaign detail screen elements. - -
    -
    -
    -AGC Admin Access - This option if set to 1 allows the user to login to the astGUIclient admin pages. - -
    -
    -
    -AGC Delete Phones - This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages. - -
    -
    -
    -Delete Scripts - This option if set to 1 allows the user to delete Campaign scripts in the script modification screen. - -
    -
    -
    -Modify Leads - This option if set to 1 allows the user to modify leads in the admin section lead search results page. - -
    -
    -
    -Change Agent Campaign - This option if set to 1 allows the user to alter the campaign that an agent is logged into while they are logged into it. - -
    -
    -
    -Delete Filters - This option allows the user to be able to delete vicidial lead filters from the system. - -
    -
    -
    -Delete Call Times - This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system. - -
    -
    -
    -Modify Call Times - This option allows the user to view and modify the call times and state call times records. A user doesn't need this option enabled if they only need to change the call times option on the campaigns screen. - - - - -



    - -VICIDIAL_CAMPAIGNS TABLE

    -
    -
    -Campaign ID - This is the short name of the campaign, it is not editable after initial submission, cannot contain spaces and must be between 2 and 8 characters in length. - -
    -
    -
    -Campaign Name - This is the description of the campaign, it must be between 6 and 40 characters in length. - -
    -
    -
    -Active - This is where you set the campaign to Active or Inactive. If Inactive, noone can log into it. - -
    -
    -
    -Park Extension - This is where you can customize the on-hold music for VICIDIAL. Make sure the extension is in place in the extensions.conf and that it points to the filename below. - -
    -
    -
    -Park File Name - This is where you can customize the on-hold music for VICIDIAL. Make sure the filename is 10 characters in length or less and that the file is in place in the /var/lib/asterisk/sounds directory. - -
    -
    -
    -Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. - -
    -
    -
    -Allow Closers - This is where you can set whether the users of this campaign will have the option to send the call to a closer. - -
    -
    -
    -Dial Status - This is where you set the statuses that you are wanting to dial on within the lists that are active for the campaign below - -
    -
    -
    -List Order - This menu is where you select how the leads that match the statuses selected above will be put in the lead hopper: -
      - DOWN: select the first leads loaded into the vicidial_list table -
      - UP: select the last leads loaded into the vicidial_list table -
      - UP PHONE: select the highest phone number and works its way down -
      - DOWN PHONE: select the lowest phone number and works its way up -
      - UP LAST NAME: starts with last names starting with Z and works its way down -
      - DOWN LAST NAME: starts with last names starting with A and works its way up -
      - UP COUNT: starts with most called leads and works its way down -
      - DOWN COUNT: starts with least called leads and works its way up -
      - DOWN COUNT 2nd NEW: starts with least called leads and works its way up inserting a NEW lead in every other lead - Must NOT have NEW selected in the dial statuses -
      - DOWN COUNT 3nd NEW: starts with least called leads and works its way up inserting a NEW lead in every third lead - Must NOT have NEW selected in the dial statuses -
      - DOWN COUNT 4th NEW: starts with least called leads and works its way up inserting a NEW lead in every forth lead - Must NOT have NEW selected in the dial statuses - -
    -
    -
    -Hopper Level - This is how many leads the VDhopper script tries to keep in the vicidial_hopper table for this campaign. If running VDhopper script every minute, make this slightly greater than the number of leads you go through in a minute. - -
    -
    -
    -Lead Filter - This is a method of filtering your leads using a fragment of a SQL query. Use this feature with caution, it is easy to stop dialing accidentally with the slightest alteration to the SQL statement. Default is NONE. - -
    -
    -
    -Force Reset of Hopper - This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs. - -
    -
    -
    -Auto Dial Level - This is where you set how many lines VICIDIAL should use per active agent. zero 0 means auto dialing is off and the agents will click to dial each number. Otherwise VICIDIAL will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. - -
    -
    -
    -Next Agent Call - This determines which agent receives the next call that is available: -
      - random: orders by the random update value in the vicidial_live_agents table -
      - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
      - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. -
      - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. - -
    -
    -
    -Local Call Time - This is where you set during which hours you would like to dial, as determined by the local time in the are in which you are calling. This is controlled by area code and is adjusted for Daylight Savings time if applicable. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm. - -
    -
    -
    -Dial Timeout - If defined, calls that would normally hangup after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve. - -
    -
    -
    -Dial Prefix - This field allows for more easily changing a path of dialing to go out through a different method without doing a reload in Asterisk. Default is 9 based upon a 91NXXNXXXXXX in the dialplan - extensions.conf. - -
    -
    -
    -Campaign CallerID - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service(RBS) circuits. This will also work through most VOIP(SIP or IAX trunks) providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. - -
    -
    -
    -Campaign VDAD extension - This field allows for a custom VDAD transfer extension. This allows you to use different VDADtransfer...agi scripts depending upon your campaign. The default transfer AGI - exten 8365 agi-VDADtransfer.agi - just immediately sends the calls on to agents as soon as they are picked up. An additional sample political survey AGI is also now included - 8366 agi-VDADtransferSURVEY.agi - that plays a message to the called person and allows them to make a choice by pressing buttons - effectively pre-screening the lead - . Please note that except for surveys, political calls and charities this form of calling is illegal in the United States. - -
    -
    -
    -Campaign Rec extension - This field allows for a custom recording extension to be used with VICIDIAL. This allows you to use different extensions depending upon how long you want to allow a maximum recording and what type of codec you want to record in. The default exten is 8309 which if you follow the SCRATCH_INSTALL examples will record in the WAV format for upto one hour. Another option included in the examples is 8310 which will record in GSM format for upto one hour. - -
    -
    -
    -Campaign Recording - This menu allows you to choose what level of recording is allowed on this campaign. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. - -
    -
    -
    -Campaign Rec Filename - This field allows you to customize the name of the recording when Campaign recording is ONDEMAND or ALLCALLS. The allowed variables are CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. 50 char max. - -
    -
    -
    -Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. - -
    -
    -
    -Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. - -
    -
    -
    -Answering Machine Message - This field is for entering in an extension to blind transfer calls to when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this exten up in the dialplan - extensions.conf - and make sure it plays an audio file then hangs up. - -
    -
    -
    -AMD send to vm exten - This menu allows you to define whether a message is left on an answering machine when it is detected. the call will be immediately forwarded to the Answering-Machine-Message extension if AMD is active and it is determined that the call is an answering machine. - -
    -
    -
    -Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. - -
    -
    -
    -Agent Alt Num Dialing - This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called. - -
    -
    -
    -Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. - -
    -
    -
    -Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls. - -
    -
    -
    -Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. - -
    -
    -
    -Safe Harbor Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y. - -
    -
    -
    -Safe Harbor Exten - This is the dialplan extension that the desired Safe Harbor audio file is located at on your server. - -
    -
    -
    -Wrapup Seconds - The number of seconds to force an agent to wait before allowing them to receive or dial another call. The timer begins as soon as an agent hangs up on their customer - or in the case of alternate number dialing when the agent finishes the lead - Default is 0 seconds. If the timer runs out before the agent has dispositioned the call, the agent still will NOT move on to the next call until they select a disposition. - -
    -
    -
    -Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set. - -
    -
    -
    -Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set. - -
    -
    -
    -Use Internal DNC List - This defines whether this campaign is to filter leads against the Internal DNC list. If it is set to Y, the hopper will look for each phone number in the DNC list before placing it in the hopper. If it is in the DNC list then it will change that lead status to DNCL so it cannot be dialed. Default is N. - -
    -
    -
    -Allowed Inbound Groups - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound/outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. - - - -



    - -VICIDIAL_LISTS TABLE

    -
    -
    -List ID - This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. - -
    -
    -
    -List Name - This is the description of the list, it must be between 2 and 20 characters in length. - -
    -
    -
    -Campaign - This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time. - -
    -
    -
    -Active - This defines whether the list is to be dialed on or not. - -
    -
    -
    -Reset Lead-Called-Status for this list - This resets all leads in this list to N for "not called since last reset" and means that any lead can now be called if it is the right status as defined in the campaign screen. - -
    -
    -
    -VICIDIAL DNC List - This Do Not Call list contains every lead that has been set to a status of DNC in the system. Through the LISTS - ADD NUMBER TO DNC page you are able to manually add a number to this list so that it will not be called by campaigns that use the internal DNC list. - - - -



    - -VICIDIAL_INBOUND_GROUPS TABLE

    -
    -
    -Group ID - This is the short name of the inbound group, it is not editable after initial submission, must not contain any spaces and must be between 2 and 20 characters in length. - -
    -
    -
    -Group Name - This is the description of the group, it must be between 2 and 30 characters in length. Cannot include dashes, plusses or spaces . - -
    -
    -
    -Group Color - This is the color that displays in the VICIDIAL client app when a call comes in on this group. It must be between 2 and 7 characters long. If this is a hex color definition you must remember to put a # at the beginning of the string or VICIDIAL will not work properly. - -
    -
    -
    -Active - This determines whether this group show up in the selection box when a VICIDIAL agent logs in. - -
    -
    -
    -Web Form - This is the custom address that clicking on the WEB FORM button in VICIDIAL will take you to for calls that come in on this group. - -
    -
    -
    -Next Agent Call - This determines which agent receives the next call that is available: -
      - random: orders by the random update value in the vicidial_live_agents table -
      - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
      - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. -
      - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. - -
    -
    -
    -Fronter Display - This field determines whether the inbound VICIDIAL agent would have the fronter name - if there is one - displayed in the Status field when the call comes to the agent. - -
    -
    -
    -Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. - -
    -
    -
    -Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. - -
    -
    -
    -Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. - -
    -
    -
    -Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls. - -
    -
    -
    -Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. - -
    -
    -
    -Drop Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y. - -
    -
    -
    -Drop Exten - This is the dialplan extension that the desired Dropped call audio file is located at on your server. - - - -



    - -VICIDIAL_REMOTE_AGENTS TABLE

    -
    -
    -User ID Start - This is the starting User ID that is used when the remote agent entries are inserted into the system. If the Number of Lines is set higher than 1, this number is incremented by one until each line has an entry. Make sure you create a new VICIDIAL user account with a user level of 4 or great if you want them to be able to use the vdremote.php page for remote web access of this account. - -
    -
    -
    -Number of Lines - This defines how many remote agent entries the system creates, and determines how many lines it thinks it can safely send to the number below. - -
    -
    -
    -Server IP - A remote agent entry is only good for one specific server, here is where you select which server you want. - -
    -
    -
    -External Extension - This is the number that you want the calls forwarded to. Make sure that it is a full dialplan number and that if you need a 9 at the beginning you put it in here. Test by dialing this number from a phone on the system. - -
    -
    -
    -Status - Here is where you turn the remote agent on and off. As soon as the agent is Active the system assumes that it can send calls to it. It may take up to 30 seconds once you change the status to Inactive to stop receiving calls. - -
    -
    -
    -Campaign - Here is where you select the campaign that these remote agents will be logged into. Inbound needs to use the CLOSER campaign and select the inbound campaigns below that you want to receive calls from. - -
    -
    -
    -Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - - -



    - -VICIDIAL_CAMPAIGN_LISTS

    -
    -
    -The lists within this campaign are listed here, whether they are active is denoted by the Y or N and you can go to the list screen by clicking on the list ID in the first column. - - -



    - -VICIDIAL_CAMPAIGN_STATUSES TABLE

    -
    -
    -Through the use of custom campaign statuses, you can have statuses that only exist for a specific campaign. The Status must be 1-8 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as a disposition. - - - -



    - -VICIDIAL_CAMPAIGN_HOTKEYS TABLE

    -
    -
    -Through the use of custom campaign hotkeys, agents that use the vicidial web-client can hangup and disposition calls just by pressing a single key on their keyboard. - - - - -



    - -VICIDIAL_LEAD_RECYCLE TABLE

    -
    -
    -Through the use of lead recycling, you can call specific statuses of leads again at a specified interval without resetting the entire list. Lead recycling is campaign-specific and does not have to be a selected dialable status in your campaign. The attempt delay field is the number of seconds until the lead can be placed back in the hopper, this number must be at least 120 seconds. The attempt maximum field is the maximum number of times that a lead of this status can be attempted before the list needs to be reset, this number can be from 1 to 10. You can activate and deactivate a lead recycle entry with the provided links. This feature only works in auto-dial mode, where dial level is greater than 0. - - - - - -



    - -VICIDIAL_USER_GROUPS TABLE

    -
    -
    -User Group - This is the short name of a Vicidial User group, try not to use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. - -
    -
    -
    -Group Name - This is the description of the vicidial user group max of 40 characters. - - - - - -



    - -VICIDIAL_SCRIPTS TABLE

    -
    -
    -Script ID - This is the short name of a Vicidial Script. This needs to be a unique identifier. Try not to use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Script Name - This is the title of a Vicidial Script. This is a short summary of the script. max 50 characters, minimum of 2 characters. There should be no spaces or punctuation of any kind in theis field. - -
    -
    -Script Comments - This is where you can place comments for a Vicidial Script such as -changed to free upgrade on Sept 23-. max 255 characters, minimum of 2 characters. - -
    -
    -Script Text - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments. For example, this sentence would print the persons name in it----

    Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

    This would read----

    Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today? - -
    -
    -
    -Active - This determines whether this script can be selected to be used by a campaign. - - - - - -



    - -VICIDIAL_LEAD_FILTERS TABLE

    -
    -
    -Filter ID - This is the short name of a Vicidial Lead Filter. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Filter Name - This is a more descriptive name of the Filter. This is a short summary of the filter. max 30 characters, minimum of 2 characters. - -
    -
    -Filter Comments - This is where you can place comments for a Vicidial Filter such as -calls all California leads-. max 255 characters, minimum of 2 characters. - -
    -
    -Filter SQL - This is where you place the SQL query fragment that you want to filter by. do not begin or end with an AND, that will be added by the hopper cron script automatically. an example SQL query that would work here is- called_count > 4 and called_count < 8 -. - - - - - -



    - -VICIDIAL_CALL TIMES TABLE

    -
    -
    -Call Time ID - This is the short name of a Vicidial Call Time Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Call Time Name - This is a more descriptive name of the Call Time Definition. This is a short summary of the Call Time definition. max 30 characters, minimum of 2 characters. - -
    -
    -Call Time Comments - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters. - -
    -
    -Default Start and Stop Times - This is the default time that calling will be allowed to be started or stopped within this call time definition if the day-of-the-week start time is not defined. 0 is midnight. To prevent calling completely set this field to 2400 and set the Default Stop time to 2400. To allow calling 24 hours a day set the start time to 0 and the stop time to 2400. - -
    -
    -Weekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times. - -
    -
    -State Call Time Definitions - This is the list of State specific call time definitions that are followed in this Call Time Definition. - -
    -
    -State Call Time State - This is the two letter code for the state that this calling time definition is for. For this to be in effect the local call time that is set in the campaign must have this state call time record in it as well as all of the leads having two letter state codes in them. - - - - -



    - -VICIDIAL LIST LOADER FUNCTIONALITY

    -
    -
    -The VICIDIAL basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. There is also a new beta version super lead loader that allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation or check for duplicates in itself or other lists, so that is something you need to do before you load the leads. Also, make sure that you have created the list that these leads are to be under so that you can use them. There is also the matter of time-zone-coding these leads. You may want to increase the frequency that the ADMIN_adjust_GMTnow_on_leads.pl is being run in the cron on your Asterisk server so that any loaded leads can be coded faster. Here is a list of the fields in their proper order for the lead files: -
      -
    1. Vendor Lead Code - shows up in the Vendor ID field of the GUI -
    2. Source Code - internal use only for admins and DBAs -
    3. List ID - the list number that these leads will show up under -
    4. Phone Code - the prefix for the phone number - 1 for US, 01144 for UK, 01161 for AUS, etc -
    5. Phone Number - must be at least 8 digits long -
    6. Title - title of the customer - Mr. Ms. Mrs, etc... -
    7. First Name -
    8. Middle Initial -
    9. Last Name -
    10. Address Line 1 -
    11. Address Line 2 -
    12. Address Line 3 -
    13. City -
    14. State - limited to 2 characters -
    15. Province -
    16. Postal Code -
    17. Country -
    18. Gender -
    19. Date of Birth -
    20. Alternate Phone Number -
    21. Email Address -
    22. Security Phrase -
    23. Comments -
    - -
    NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /home/cron/AST_SERVER_conf.pl file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. - -







    -







    -THE END -
    -\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$dial_status_a = $row[3]; -$dial_status_b = $row[4]; -$dial_status_c = $row[5]; -$dial_status_d = $row[6]; -$dial_status_e = $row[7]; -$local_call_time = $row[16]; -if ($lead_filter_id=='') - { - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') - { - $lead_filter_id='NONE'; - } - } - -$stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; -$rslt=mysql_query($stmt, $link); -$lists_to_print = mysql_num_rows($rslt); -$camp_lists=''; -$o=0; -while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; -if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";} -} -$camp_lists = eregi_replace(".$","",$camp_lists); - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - -echo "

    \n"; -echo "Show Dialable Leads Count -

    \n"; -echo "CAMPAIGN: $campaign_id
    \n"; -echo "LISTS: $camp_lists
    \n"; -echo "STATUSES: $dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e
    \n"; -echo "FILTER: $lead_filter_id
    \n"; -echo "CALL TIME: $local_call_time

    \n"; - -### call function to calculate and print dialable leads -dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - -echo "

    \n"; -echo "\n"; - -exit; -} - - -###################### -# ADD=7111111 view sample script with test variables -###################### - -if ($ADD==7111111) -{ - ##### TEST VARIABLES ##### - $vendor_lead_code = 'VENDORLEADCODE'; - $list_id = 'LISTID'; - $gmt_offset_now = 'GMTOFFSET'; - $phone_code = '1'; - $phone_number = '7275551212'; - $title = 'Mr.'; - $first_name = 'JOHN'; - $middle_initial = 'Q'; - $last_name = 'PUBLIC'; - $address1 = '1234 Main St.'; - $address2 = 'Apt. 3'; - $address3 = 'ADDRESS3'; - $city = 'CHICAGO'; - $state = 'IL'; - $province = 'PROVINCE'; - $postal_code = '33760'; - $country_code = 'USA'; - $gender = 'M'; - $date_of_birth = '1970-01-01'; - $alt_phone = '3125551212'; - $email = 'test@test.com'; - $security_phrase = 'SECUTIRY'; - $comments = 'COMMENTS FIELD'; - $RGfullname = 'JOE AGENT'; - $RGuser = '6666'; - -echo "\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$script_name = $row[1]; -$script_text = $row[3]; - -$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); -$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text); -$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text); -$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text); -$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text); -$script_text = eregi_replace('--A--title--B--',"$title",$script_text); -$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text); -$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text); -$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text); -$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text); -$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text); -$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text); -$script_text = eregi_replace('--A--city--B--',"$city",$script_text); -$script_text = eregi_replace('--A--state--B--',"$state",$script_text); -$script_text = eregi_replace('--A--province--B--',"$province",$script_text); -$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text); -$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text); -$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text); -$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text); -$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text); -$script_text = eregi_replace('--A--email--B--',"$email",$script_text); -$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text); -$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text); -$script_text = eregi_replace('--A--fullname--B--',"$RGfullname",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace("\n","
    ",$script_text); - - -echo ""; - -echo "Preview Script: $script_id
    \n"; -echo "
    \n"; -echo "
    $script_name
    \n"; -echo "$script_text\n"; -echo "
    \n"; - -echo "\n"; - -exit; -} - - - - -######################### HTML HEADER BEGIN ####################################### -if ($hh=='users') {$users_hh='bgcolor ="#FFFF99"'; $users_fc='BLACK';} # yellow - else {$users_hh=''; $users_fc='WHITE';} -if ($hh=='campaigns') {$campaigns_hh='bgcolor ="#FFCC99"'; $campaigns_fc='BLACK';} # orange - else {$campaigns_hh=''; $campaigns_fc='WHITE';} -if ($hh=='lists') {$lists_hh='bgcolor ="#FFCCCC"'; $lists_fc='BLACK';} # red - else {$lists_hh=''; $lists_fc='WHITE';} -if ($hh=='ingroups') {$ingroups_hh='bgcolor ="#CC99FF"'; $ingroups_fc='BLACK';} # purple - else {$ingroups_hh=''; $ingroups_fc='WHITE';} -if ($hh=='remoteagent') {$remoteagent_hh='bgcolor ="#CCFFCC"'; $remoteagent_fc='BLACK';} # green - else {$remoteagent_hh=''; $remoteagent_fc='WHITE';} -if ($hh=='usergroups') {$usergroups_hh='bgcolor ="#CCFFFF"'; $usergroups_fc='BLACK';} # cyan - else {$usergroups_hh=''; $usergroups_fc='WHITE';} -if ($hh=='scripts') {$scripts_hh='bgcolor ="#99FFCC"'; $scripts_fc='BLACK';} # light teal - else {$scripts_hh=''; $scripts_fc='WHITE';} -if ($hh=='filters') {$filters_hh='bgcolor ="#CCCCCC"'; $filters_fc='BLACK';} # grey - else {$filters_hh=''; $filters_fc='WHITE';} -if ($hh=='times') {$times_hh='bgcolor ="#99FF33"'; $times_fc='BLACK';} # hard teal - else {$times_hh=''; $times_fc='WHITE';} - -?> - - - - -\n"; -?> -
    - - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - - - - -
      VICIDIAL ADMIN - Logout  
    > SIZE=1> USERS > SIZE=1> CAMPAIGNS > SIZE=1> LISTS > SIZE=1> SCRIPTS > SIZE=1> FILTERS > SIZE=1> IN-GROUPS > SIZE=1> CALL TIMES > SIZE=1> USER GROUPS > SIZE=1> REMOTE AGENTS > REPORTS
      LIST USERS     |     ADD A NEW USER     |     SEARCH FOR A USER
      ADD CAMPAIGN     |     LIST CAMPAIGNS
      SHOW LISTS     |     ADD NEW LIST     |     SEARCH FOR A LEAD |     ADD NUMBER TO DNC           |     LOAD NEW LEADS
      ADD SCRIPT     |     VIEW SCRIPTS
      ADD FILTER     |     VIEW FILTERS
      SHOW IN-GROUPS     |     ADD NEW IN-GROUP
      SHOW CALL TIMES     |     ADD NEW CALL TIME     |     SHOW STATE CALL TIMES     |     ADD NEW STATE CALL TIME  
      ADD USER GROUP     |     LIST USER GROUPS     |     GROUP HOURLY
      SHOW REMOTE AGENTS     |     ADD NEW REMOTE AGENTS
     
    -
    \n"; -echo ""; - -echo "
    ADD A NEW USER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "$NWB#vicidial_users-user_group$NWE\n"; -echo "\n"; -echo "
    User Number: $NWB#vicidial_users-user$NWE
    Password: $NWB#vicidial_users-pass$NWE
    Full Name: $NWB#vicidial_users-full_name$NWE
    User Level: $NWB#vicidial_users-user_level$NWE
    User Group:
    Phone Login: $NWB#vicidial_users-phone_login$NWE
    Phone Pass: $NWB#vicidial_users-phone_pass$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN -###################### - -if ($ADD==11) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW CAMPAIGN\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Campaign ID: $NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: $NWB#vicidial_campaigns-park_ext$NWE
    Park Filename: $NWB#vicidial_campaigns-park_file_name$NWE
    Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Next Agent Call: $NWB#vicidial_campaigns-next_agent_call$NWE
    Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW LIST FORM SCREEN -###################### - -if ($ADD==111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    List ID: (digits only)$NWB#vicidial_lists-list_id$NWE
    List Name: $NWB#vicidial_lists-list_name$NWE
    Campaign: $NWB#vicidial_lists-campaign_id$NWE
    Active: $NWB#vicidial_lists-active$NWE
    \n"; - -} - - -###################### -# ADD=121 display the ADD NUMBER TO DNC FORM SCREEN and add a new number -###################### - -if ($ADD==121) -{ -echo "
    \n"; -echo ""; - -if (strlen($phone_number) > 2) - { - $stmt="SELECT count(*) from vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    DNC NOT ADDED - This phone number is already in the Do Not Call List: $phone_number

    \n";} - else - { - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$phone_number');"; - $rslt=mysql_query($stmt, $link); - - echo "
    DNC ADDED: $phone_number

    \n"; - - ### LOG INSERTION TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW DNC NUMBER|$PHP_AUTH_USER|$ip|'$phone_number'|\n"); - fclose($fp); - } - } - } - -echo "
    ADD A NUMBER TO THE DNC LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    Phone Number: (digits only)$NWB#vicidial_list-dnc$NWE
    \n"; - -} - - -###################### -# ADD=1111 display the ADD NEW INBOUND GROUP SCREEN -###################### - -if ($ADD==1111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW INBOUND GROUP\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group ID: (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE
    Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
    Active: $NWB#vicidial_inbound_groups-active$NWE
    Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN -###################### - -if ($ADD==11111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW REMOTE AGENTS\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
    External Extension: (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status: $NWB#vicidial_remote_agents-status$NWE
    Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Groups: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - -###################### -# ADD=111111 display the ADD NEW USERS GROUP SCREEN -###################### - -if ($ADD==111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW USERS GROUP\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
    Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -} - - -###################### -# ADD=1111111 display the ADD NEW SCRIPT SCREEN -###################### - -if ($ADD==1111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW SCRIPT\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Script ID: (no spaces or punctuation)$NWB#vicidial_scripts-script_id$NWE
    Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
    Script Comments: $NWB#vicidial_scripts-script_comments$NWE
    Active: $NWB#vicidial_scripts-active$NWE
    Script Text: $NWB#vicidial_scripts-script_text$NWE
    \n"; - -} - - -###################### -# ADD=11111111 display the ADD NEW FILTER SCREEN -###################### - -if ($ADD==11111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW FILTER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Filter ID: (no spaces or punctuation)$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; -} - - -###################### -# ADD=111111111 display the ADD NEW CALL TIME SCREEN -###################### - -if ($ADD==111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW CALL TIME\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    Call Time ID: (no spaces or punctuation)$NWB#vicidial_call_times-call_time_id$NWE
    Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Day and time options will appear once you have created the Call Time Definition
    \n"; -} - - -###################### -# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN -###################### - -if ($ADD==1111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW STATE CALL TIME\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    State Call Time ID: (no spaces or punctuation)$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: (no spaces or punctuation)$NWB#vicidial_call_times-state_call_time_state$NWE
    State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    State Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Day and time options will appear once you have created the Call Time Definition
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 2 series, validates form data and inserts the new record into the database -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=2 adds the new user to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USER NOT ADDED - there is already a user in the system with this user number\n";} - else - { - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) - { - echo "
    USER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    user id must be between 2 and 8 characters long\n"; - echo "
    full name and password must be at least 2 characters long\n"; - } - else - { - echo "
    USER ADDED: $user\n"; - - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass) values('$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A USER |$PHP_AUTH_USER|$ip|'$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass'|\n"); - fclose($fp); - } - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new campaign to the system -###################### - -if ($ADD==21) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) - { - echo "
    CAMPAIGN NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    campaign ID must be between 2 and 8 characters in length\n"; - echo "
    campaign name must be between 6 and 40 characters in length\n"; - } - else - { - echo "
    CAMPAIGN ADDED: $campaign_id\n"; - - $stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,active,dial_status_a,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,campaign_script,get_call_launch) values('$campaign_id','$campaign_name','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - echo ""; - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - - } - } -$ADD=31; -} - -###################### -# ADD=22 adds the new campaign status to the system -###################### - -if ($ADD==22) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN STATUS NOT ADDED - there is already a campaign-status in the system with this name\n";} - else - { - $stmt="SELECT count(*) from vicidial_statuses where status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) - { - echo "
    CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 8 characters in length\n"; - echo "
    status name must be between 2 and 30 characters in length\n"; - } - else - { - echo "
    CAMPAIGN STATUS ADDED: $campaign_id - $status\n"; - - $stmt="INSERT INTO vicidial_campaign_statuses values('$status','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN STATUS |$PHP_AUTH_USER|$ip|'$status','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } - } -$ADD=31; -} - - -###################### -# ADD=23 adds the new campaign hotkey to the system -###################### - -if ($ADD==23) -{ - $HKstatus_data = explode('-----',$HKstatus); - $status = $HKstatus_data[0]; - $status_name = $HKstatus_data[1]; - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_hotkeys where campaign_id='$campaign_id' and hotkey='$hotkey' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN HOTKEY NOT ADDED - there is already a campaign-hotkey in the system with this hotkey\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    CAMPAIGN HOTKEY NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    hotkey must be a single character between 1 and 9 \n"; - echo "
    status must be between 1 and 8 characters in length\n"; - } - else - { - echo "
    CAMPAIGN HOTKEY ADDED: $campaign_id - $status - $hotkey\n"; - - $stmt="INSERT INTO vicidial_campaign_hotkeys values('$status','$hotkey','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN HOTKEY |$PHP_AUTH_USER|$ip|'$status','$hotkey','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=25 adds the new campaign lead recycle entry to the system -###################### - -if ($ADD==25) -{ - $status = eregi_replace("-----.*",'',$status); - echo ""; - $stmt="SELECT count(*) from vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN LEAD RECYCLE NOT ADDED - there is already a lead-recycle for this campaign with this status\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD RECYCLE ADDED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="INSERT INTO vicidial_lead_recycle(campaign_id,status,attempt_delay,attempt_maximum,active) values('$campaign_id','$status','$attempt_delay','$attempt_maximum','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new list to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    LIST NOT ADDED - there is already a list in the system with this ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or (strlen($list_id) < 2) or (strlen($list_id) > 8) ) - { - echo "
    LIST NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    List ID must be between 2 and 8 characters in length\n"; - echo "
    List name must be at least 2 characters in length\n"; - } - else - { - echo "
    LIST ADDED: $list_id\n"; - - $stmt="INSERT INTO vicidial_lists values('$list_id','$list_name','$campaign_id','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LIST |$PHP_AUTH_USER|$ip|'$list_id','$list_name','$campaign_id','$active'|\n"); - fclose($fp); - } - } - } -$ADD=311; -} - - - -###################### -# ADD=2111 adds the new inbound group to the system -###################### - -if ($ADD==2111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    GROUP NOT ADDED - there is already a group in the system with this ID\n";} - else - { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) - { - echo "
    GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Group ID must be between 2 and 20 characters in length and contain no ' -+'.\n"; - echo "
    Group name and group color must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - echo "
    GROUP ADDED: $group_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW GROUP |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000; -} - - -###################### -# ADD=21111 adds new remote agents to the system -###################### - -if ($ADD==21111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    REMOTE AGENTS NOT ADDED - there is already a remote agents entry starting with this userID\n";} - else - { - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    User ID start and external extension must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTE AGENTS ADDED: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|'$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value'|\n"); - fclose($fp); - } - } - } -$ADD=10000; -} - -###################### -# ADD=211111 adds new user group to the system -###################### - -if ($ADD==211111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USER GROUP NOT ADDED - there is already a user group entry with this name\n";} - else - { - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    USER GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Group name and description must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_user_groups values('$user_group','$group_name');"; - $rslt=mysql_query($stmt, $link); - - echo "
    USER GROUP ADDED: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW USER GROUP ENTRY |$PHP_AUTH_USER|$ip|'$user_group','$group_name'|\n"); - fclose($fp); - } - } - } -$ADD=100000; -} - -###################### -# ADD=2111111 adds new script to the system -###################### - -if ($ADD==2111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    SCRIPT NOT ADDED - there is already a script entry with this name\n";} - else - { - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    SCRIPT NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Script name, description and text must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_scripts values('$script_id','$script_name','$script_comments','" . mysql_real_escape_string($script_text) . "','$active');"; - $rslt=mysql_query($stmt, $link); - - echo "
    SCRIPT ADDED: $script_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000000; -} - - -###################### -# ADD=21111111 adds new filter to the system -###################### - -if ($ADD==21111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    FILTER NOT ADDED - there is already a filter entry with this ID\n";} - else - { - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Filter ID, name and SQL must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTER ADDED: $lead_filter_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=10000000; -} - - -###################### -# ADD=211111111 adds new call time definition to the system -###################### - -if ($ADD==211111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID and name must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_call_times SET call_time_id='$call_time_id',call_time_name='$call_time_name',call_time_comments='$call_time_comments';"; - $rslt=mysql_query($stmt, $link); - - echo "
    CALL TIME ADDED: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111; -} - - -###################### -# ADD=2111111111 adds new state call time definition to the system -###################### - -if ($ADD==2111111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    STATE CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    STATE CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    State Call Time ID, name and state must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_state_call_times SET state_call_time_id='$call_time_id',state_call_time_name='$call_time_name',state_call_time_comments='$call_time_comments',state_call_time_state='$state_call_time_state';"; - $rslt=mysql_query($stmt, $link); - - echo "
    STATE CALL TIME ADDED: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=3111111111; -} - - - - -###################################################################################################### -###################################################################################################### -####### 4 series, record modifications submitted and DB is modified, then on to 3 series forms below -###################################################################################################### -###################################################################################################### - - - -###################### -# ADD=4A submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4A") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - -###################### -# ADD=4B submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4B") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - - -###################### -# ADD=4 submit user modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - -###################### -# ADD=41 submit campaign modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign name needs to be at least 6 characters in length\n"; - } - else - { - echo "
    CAMPAIGN MODIFIED: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    RESETTING CAMPAIGN LEAD HOPPER\n"; - echo "
    - Wait 1 minute before dialing next number\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=42 delete campaign status in the system -###################### - -if ($ADD==42) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign id needs to be at least 2 characters in length\n"; - echo "
    the campaign status needs to be at least 1 characters in length\n"; - } - else - { - echo "
    CUSTOM CAMPAIGN STATUS DELETED: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=43 delete campaign hotkey in the system -###################### - -if ($ADD==43) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    CAMPAIGN HOTKEY NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign id needs to be at least 2 characters in length\n"; - echo "
    the campaign status needs to be at least 1 characters in length\n"; - echo "
    the campaign hotkey needs to be at least 1 characters in length\n"; - } - else - { - echo "
    CUSTOM CAMPAIGN HOTKEY DELETED: $campaign_id - $status - $hotkey\n"; - - $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=44 submit campaign modifications to the system - Basic View -###################### - -if ($ADD==44) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign name needs to be at least 6 characters in length\n"; - } - else - { - echo "
    CAMPAIGN MODIFIED: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level',lead_filter_id='$lead_filter_id' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    RESETTING CAMPAIGN LEAD HOPPER\n"; - echo "
    - Wait 1 minute before dialing next number\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG HOPPER RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=34; # go to campaign modification form below -} - -###################### -# ADD=45 modify campaign lead recycle in the system -###################### - -if ($ADD==45) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD MODIFIED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=411 submit list modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) - { - echo "
    LIST NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    list name must be at least 2 characters in length\n"; - } - else - { - echo "
    LIST MODIFIED: $list_id\n"; - - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - if ($reset_list == 'Y') - { - echo "
    RESETTING LIST-CALLED-STATUS\n"; - $stmt="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|RESET LIST CALLED |$PHP_AUTH_USER|$ip|list_name='$list_name'|\n"); - fclose($fp); - } - } - if ($campaign_id != "$old_campaign_id") - { - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($old_campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LIST INFO |$PHP_AUTH_USER|$ip|list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id'|\n"); - fclose($fp); - } - } - -$ADD=311; # go to list modification form below -} - - -###################### -# ADD=4111 modify in-group info in the system -###################### - -if ($ADD==4111) -{ - echo ""; - - if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) - { - echo "
    GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    group name and group color must be at least 2 characters in length\n"; - } - else - { - echo "
    GROUP MODIFIED: $group_id\n"; - - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_message='$drop_message',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten' where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY GROUP INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111; # go to in-group modification form below -} - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    User ID Start and External Extension must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTE AGENTS MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - } - -$ADD=31111; # go to remote agents modification form below -} - - - -###################### -# ADD=411111 modify user group info in the system -###################### - -if ($ADD==411111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    USER GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Group name and description must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group';"; - $rslt=mysql_query($stmt, $link); - - echo "
    USER GROUP MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER GROUP ENTRY |$PHP_AUTH_USER|$ip|UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group'|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    SCRIPT NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Script name, description and text must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    SCRIPT MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111; # go to script modification form below -} - - -###################### -# ADD=41111111 modify filter in the system -###################### - -if ($ADD==41111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Filter ID, name and SQL must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTER MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31111111; # go to filter modification form below -} - - -###################### -# ADD=411111111 modify call time in the system -###################### - -if ($ADD==411111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID and name must be at least 2 characters in length\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    CALL TIME MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111; # go to call time modification form below -} - - -###################### -# ADD=4111111111 modify state call time in the system -###################### - -if ($ADD==4111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    STATE CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    State Call Time ID, name and state must be at least 2 characters in length\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    STATE CALL TIME MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111111; # go to state call time modification form below -} - - - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of user -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) - { - echo "
    USER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - echo "
    USER DELETION CONFIRMATION: $user\n"; - echo "

    Click here to delete user $user


    \n"; - } - -$ADD='3'; # go to user modification below -} - -###################### -# ADD=51 confirmation before deletion of campaign -###################### - -if ($ADD==51) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) - { - echo "
    CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - echo "
    CAMPAIGN DELETION CONFIRMATION: $campaign_id\n"; - echo "

    Click here to delete campaign $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=52 confirmation before logging all agents out of campaign of campaign -###################### - -if ($ADD==52) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - echo "
    AGENT LOGOUT CONFIRMATION: $campaign_id\n"; - echo "

    Click here to log all agents out of $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=511 confirmation before deletion of list -###################### - -if ($ADD==511) -{ - echo ""; - - if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) - { - echo "
    LIST NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - echo "
    LIST DELETION CONFIRMATION: $list_id\n"; - echo "

    Click here to delete list and all of its leads $list_id


    \n"; - } - -$ADD='311'; # go to campaign modification below -} - -###################### -# ADD=5111 confirmation before deletion of in-group -###################### - -if ($ADD==5111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) - { - echo "
    IN-GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - echo "
    IN-GROUP DELETION CONFIRMATION: $group_id\n"; - echo "

    Click here to delete in-group $group_id


    \n"; - } - -$ADD='3111'; # go to in-group modification below -} - -###################### -# ADD=51111 confirmation before deletion of remote agent record -###################### - -if ($ADD==51111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) - { - echo "
    REMOTE AGENT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - echo "
    REMOTE AGENT DELETION CONFIRMATION: $remote_agent_id\n"; - echo "

    Click here to delete remote agent $remote_agent_id


    \n"; - } - -$ADD='31111'; # go to remote agent modification below -} - -###################### -# ADD=511111 confirmation before deletion of user group record -###################### - -if ($ADD==511111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) - { - echo "
    USER GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - echo "
    USER GROUP DELETION CONFIRMATION: $user_group\n"; - echo "

    Click here to delete user group $user_group


    \n"; - } - -$ADD='311111'; # go to user group modification below -} - -###################### -# ADD=5111111 confirmation before deletion of script record -###################### - -if ($ADD==5111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) - { - echo "
    SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Script_id must be at least 2 characters in length\n"; - } - else - { - echo "
    SCRIPT DELETION CONFIRMATION: $script_id\n"; - echo "

    Click here to delete script $script_id


    \n"; - } - -$ADD='3111111'; # go to script modification below -} - -###################### -# ADD=51111111 confirmation before deletion of filter record -###################### - -if ($ADD==51111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) - { - echo "
    FILTER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Filter ID must be at least 2 characters in length\n"; - } - else - { - echo "
    FILTER DELETION CONFIRMATION: $lead_filter_id\n"; - echo "

    Click here to delete filter $lead_filter_id


    \n"; - } - -$ADD='31111111'; # go to filter modification below -} - -###################### -# ADD=511111111 confirmation before deletion of call time record -###################### - -if ($ADD==511111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - echo "
    CALL TIME DELETION CONFIRMATION: $call_time_id\n"; - echo "

    Click here to delete call time $call_time_id


    \n"; - } - -$ADD='311111111'; # go to call time modification below -} - -###################### -# ADD=5111111111 confirmation before deletion of call time record -###################### - -if ($ADD==5111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    STATE CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - echo "
    STATE CALL TIME DELETION CONFIRMATION: $call_time_id\n"; - echo "

    Click here to delete state call time $call_time_id


    \n"; - } - -$ADD='3111111111'; # go to state call time modification below -} - - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete user record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) ) - { - echo "
    USER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_users where user='$user' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|user='$user'|\n"); - fclose($fp); - } - echo "
    USER DELETION COMPLETED: $user\n"; - echo "

    \n"; - } - -$ADD='0'; # go to user list -} - -###################### -# ADD=61 delete campaign record -###################### - -if ($ADD==61) -{ - echo ""; - - if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) ) - { - echo "
    CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_campaigns where campaign_id='$campaign_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!DELETING CAMPAIGN!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    CAMPAIGN DELETION COMPLETED: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='10'; # go to campaigns list -} - -###################### -# ADD=62 Logout all agents fro a campaign -###################### - -if ($ADD==62) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_live_agents where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!AGENT LOGOUT!!!!!!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    AGENT LOGOUT COMPLETED: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='31'; # go to campaign modification below -} - - -###################### -# ADD=65 delete campaign lead recycle in the system -###################### - -if ($ADD==65) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD RECYCLE DELETED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="DELETE FROM vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=611 delete list record and all leads within it -###################### - -if ($ADD==611) -{ - echo ""; - - if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) ) - { - echo "
    LIST NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lists where list_id='$list_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($list_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST LEADS FROM VICIDIAL_LIST TABLE\n"; - $stmt="DELETE from vicidial_list where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING LIST!!!!|$PHP_AUTH_USER|$ip|list_id='$list_id'|\n"); - fclose($fp); - } - echo "
    LIST DELETION COMPLETED: $list_id\n"; - echo "

    \n"; - } - -$ADD='100'; # go to lists list -} - -###################### -# ADD=6111 delete in-group record -###################### - -if ($ADD==6111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_ingroups < 1) ) - { - echo "
    IN-GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_inbound_groups where group_id='$group_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING IN-GROUP!!|$PHP_AUTH_USER|$ip|group_id='$group_id'|\n"); - fclose($fp); - } - echo "
    IN-GROUP DELETION COMPLETED: $group_id\n"; - echo "

    \n"; - } - -$ADD='1000'; # go to in-group list -} - -###################### -# ADD=61111 delete remote agent record -###################### - -if ($ADD==61111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) ) - { - echo "
    REMOTE AGENT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_remote_agents where remote_agent_id='$remote_agent_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING RMTAGENT!!|$PHP_AUTH_USER|$ip|remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - echo "
    REMOTE AGENT DELETION COMPLETED: $remote_agent_id\n"; - echo "

    \n"; - } - -$ADD='10000'; # go to remote agents list -} - -###################### -# ADD=611111 delete user group record -###################### - -if ($ADD==611111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_user_groups < 1) ) - { - echo "
    USER GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_user_groups where user_group='$user_group' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING USRGROUP!!|$PHP_AUTH_USER|$ip|user_group='$user_group'|\n"); - fclose($fp); - } - echo "
    USER GROUP DELETION COMPLETED: $user_group\n"; - echo "

    \n"; - } - -$ADD='100000'; # go to user group list -} - -###################### -# ADD=6111111 delete script record -###################### - -if ($ADD==6111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_scripts < 1) ) - { - echo "
    SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Script_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_scripts where script_id='$script_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING SCRIPT!!!!|$PHP_AUTH_USER|$ip|script_id='$script_id'|\n"); - fclose($fp); - } - echo "
    SCRIPT DELETION COMPLETED: $script_id\n"; - echo "

    \n"; - } - -$ADD='1000000'; # go to script list -} - - -###################### -# ADD=61111111 delete filter record -###################### - -if ($ADD==61111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) ) - { - echo "
    FILTER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Filter ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING FILTER!!!!|$PHP_AUTH_USER|$ip|lead_filter_id='$lead_filter_id'|\n"); - fclose($fp); - } - echo "
    FILTER DELETION COMPLETED: $lead_filter_id\n"; - echo "

    \n"; - } - -$ADD='10000000'; # go to filter list -} - - -###################### -# ADD=611111111 delete call times record -###################### - -if ($ADD==611111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_call_times where call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    CALL TIME DELETION COMPLETED: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='100000000'; # go to call times list -} - - -###################### -# ADD=6111111111 delete call times record -###################### - -if ($ADD==6111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    STATE CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_state_call_times where state_call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT call_time_id,ct_state_call_times from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\" order by call_time_id;"; - $rslt=mysql_query($stmt, $link); - $sct_to_print = mysql_num_rows($rslt); - $sct_list=''; - - $o=0; - while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_ids[$o] = "$rowx[0]"; - $sct_states[$o] = "$rowx[1]"; - $o++; - } - $o=0; - - while ($sct_to_print > $o) { - $sct_states[$o] = eregi_replace("\|$call_time_id\|",'|',$sct_states[$o]); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$sct_states[$o]' where call_time_id='$sct_ids[$o]';"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - echo "State Rule Removed: $sct_ids[$o]
    \n"; - $o++; - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|state_call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    STATE CALL TIME DELETION COMPLETED: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='1000000000'; # go to call times list -} - - - - - - -###################################################################################################### -###################################################################################################### -####### 3 series, record modification forms -###################################################################################################### -###################################################################################################### - - - - -###################### -# ADD=3 modify user info in the system -###################### - -if ($ADD==3) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_level = $row[4]; - $user_group = $row[5]; - $phone_login = $row[6]; - $phone_pass = $row[7]; - $delete_users = $row[8]; - $delete_user_groups = $row[9]; - $delete_lists = $row[10]; - $delete_campaigns = $row[11]; - $delete_ingroups = $row[12]; - $delete_remote_agents = $row[13]; - $load_leads = $row[14]; - $campaign_detail = $row[15]; - $ast_admin_access = $row[16]; - $ast_delete_phones = $row[17]; - $delete_scripts = $row[18]; - $modify_leads = $row[19]; - $hotkeys_active = $row[20]; - $change_agent_campaign =$row[21]; - $agent_choose_ingroups =$row[22]; - $scheduled_callbacks = $row[24]; - $agentonly_callbacks = $row[25]; - $agentcall_manual = $row[26]; - $vicidial_recording = $row[27]; - $vicidial_transfers = $row[28]; - $delete_filters = $row[29]; - $alter_agent_interface_options =$row[30]; - $closer_default_blended = $row[31]; - $delete_call_times = $row[32]; - $modify_call_times = $row[33]; - -if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) - { - echo "
    You do not have permissions to modify this user: $row[1]\n"; - } -else - { - echo "
    MODIFY A USERS RECORD: $row[1]\n"; - if ($LOGuser_level > 8) - {echo "\n";} - else - { - if ($LOGalter_agent_interface == "1") - {echo "\n";} - else - {echo "\n";} - } - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") ) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($LOGuser_level > 8) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "\n"; - echo "
    User Number: $row[1]$NWB#vicidial_users-user$NWE
    Password: $NWB#vicidial_users-pass$NWE
    Full Name: $NWB#vicidial_users-full_name$NWE
    User Level: $NWB#vicidial_users-user_level$NWE
    User Group: $NWB#vicidial_users-user_group$NWE
    Phone Login: $NWB#vicidial_users-phone_login$NWE
    Phone Pass: $NWB#vicidial_users-phone_pass$NWE
    AGENT INTERFACE OPTIONS:
    Agent Choose Ingroups: $NWB#vicidial_users-agent_choose_ingroups$NWE
    HotKeys Active: $NWB#vicidial_users-hotkeys_active$NWE
    Scheduled Callbacks: $NWB#vicidial_users-scheduled_callbacks$NWE
    Agent-Only Callbacks: $NWB#vicidial_users-agentonly_callbacks$NWE
    Agent Call Manual: $NWB#vicidial_users-agentcall_manual$NWE
    Vicidial Recording: $NWB#vicidial_users-vicidial_recording$NWE
    Vicidial Transfers: $NWB#vicidial_users-vicidial_transfers$NWE
    Closer Default Blended: $NWB#vicidial_users-closer_default_blended$NWE
    Inbound Groups: \n"; - echo "$groups_list"; - echo "$NWB#vicidial_users-closer_campaigns$NWE
    ADMIN INTERFACE OPTIONS:
    Alter Agent Interface Options: $NWB#vicidial_users-alter_agent_interface_options$NWE
    Delete Users: $NWB#vicidial_users-delete_users$NWE
    Delete User Groups: $NWB#vicidial_users-delete_user_groups$NWE
    Delete Lists: $NWB#vicidial_users-delete_lists$NWE
    Delete Campaigns: $NWB#vicidial_users-delete_campaigns$NWE
    Delete In-Groups: $NWB#vicidial_users-delete_ingroups$NWE
    Delete Remote Agents: $NWB#vicidial_users-delete_remote_agents$NWE
    Delete Scripts: $NWB#vicidial_users-delete_scripts$NWE
    Load Leads: $NWB#vicidial_users-load_leads$NWE
    Campaign Detail: $NWB#vicidial_users-campaign_detail$NWE
    AGC Admin Access: $NWB#vicidial_users-ast_admin_access$NWE
    AGC Delete Phones: $NWB#vicidial_users-ast_delete_phones$NWE
    Modify Leads: $NWB#vicidial_users-modify_leads$NWE
    Change Agent Campaign: $NWB#vicidial_users-change_agent_campaign$NWE
    Delete Filters: $NWB#vicidial_users-delete_filters$NWE
    Delete Call Times: $NWB#vicidial_users-delete_call_times$NWE
    Modify Call Times: $NWB#vicidial_users-modify_call_times$NWE
    \n"; - - if ($LOGdelete_users > 0) - { - echo "

    DELETE THIS USER\n"; - } - echo "

    Click here for user time sheet\n"; - echo "

    Click here for user status\n"; - echo "

    Click here for user stats\n"; - echo "

    Click here for user CallBack Holds\n"; - } - -} - - -###################### -# ADD=31 modify campaign info in the system - Detail view -###################### - -if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Basic if not allowed - -if ($ADD==31) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $campaign_rec_exten = $row[22]; - $campaign_recording = $row[23]; - $campaign_rec_filename = $row[24]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $am_message_exten = $row[27]; - $amd_send_to_vmx = $row[28]; - $xferconf_a_dtmf = $row[29]; - $xferconf_a_number = $row[30]; - $xferconf_b_dtmf = $row[31]; - $xferconf_b_number = $row[32]; - $alt_number_dialing = $row[33]; - $scheduled_callbacks = $row[34]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $drop_call_seconds = $row[36]; - $safe_harbor_message = $row[37]; - $safe_harbor_exten = $row[38]; - $display_dialable_count = $row[39]; - $wrapup_seconds = $row[40]; - $wrapup_message = $row[41]; -# $closer_campaigns = $row[42]; - $use_internal_dnc = $row[43]; - -echo "
    MODIFY A CAMPAIGNS RECORD: $row[0] - Basic View"; -echo " | Detail View | "; -echo "Realtime Screen\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -if (eregi("CLOSER", $campaign_id)) - { - echo "\n"; - } - - - -echo "\n"; -echo "
    Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
    Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Dial status 1: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 2: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 3: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 4: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 5: $NWB#vicidial_campaigns-dial_status$NWE
    List Order: $NWB#vicidial_campaigns-lead_order$NWE
    Lead Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Next Agent Call: $NWB#vicidial_campaigns-next_agent_call$NWE
    Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
    Dial Timeout: in seconds$NWB#vicidial_campaigns-dial_timeout$NWE
    Dial Prefix: for 91NXXNXXXXXX value would be 9, for no dial prefix use X$NWB#vicidial_campaigns-dial_prefix$NWE
    Campaign CallerID: $NWB#vicidial_campaigns-campaign_cid$NWE
    Campaign VDAD exten: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE
    Campaign Rec exten: $NWB#vicidial_campaigns-campaign_rec_exten$NWE
    Campaign Recording: $NWB#vicidial_campaigns-campaign_recording$NWE
    Campaign Rec Filename: $NWB#vicidial_campaigns-campaign_rec_filename$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE
    Answering Machine Message: $NWB#vicidial_campaigns-am_message_exten$NWE
    AMD Send to VM exten: $NWB#vicidial_campaigns-amd_send_to_vmx$NWE
    Transfer-Conf DTMF 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf Number 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf DTMF 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf Number 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Alt Number Dialing: $NWB#vicidial_campaigns-alt_number_dialing$NWE
    Scheduled Callbacks: $NWB#vicidial_campaigns-scheduled_callbacks$NWE
    Drop Call Seconds: $NWB#vicidial_campaigns-drop_call_seconds$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Use Safe Harbor Message: $NWB#vicidial_campaigns-safe_harbor_message$NWE
    Safe Harbor Exten: $NWB#vicidial_campaigns-safe_harbor_exten$NWE
    Wrapup Seconds: $NWB#vicidial_campaigns-wrapup_seconds$NWE
    Wrapup Message: $NWB#vicidial_campaigns-wrapup_message$NWE
    Use Internal DNC List: $NWB#vicidial_campaigns-use_internal_dnc$NWE
    Allowed Inbound Groups:
    "; - echo " $NWB#vicidial_campaigns-closer_campaigns$NWE
    \n"; - echo "$groups_list"; - echo "
    \n"; - -echo "
    \n"; -echo "
    LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LIST IDLIST NAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

    \n"; - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - HIDE

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - SHOW

    "; - } - - - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "This campaign has $hopper_leads leads in the dial hopper

    \n"; -echo "Click here to see what leads are in the hopper right now

    \n"; -echo "Click here to see all CallBack Holds in this campaign

    \n"; -echo "
    \n"; - - - - -echo "
    \n"; -echo "
    CUSTOM STATUSES WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_statuses$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    STATUSDESCRIPTIONSELECTABLEDELETE
    $rowx[0]$rowx[1]$rowx[2]DELETE
    \n"; - -echo "
    ADD NEW CUSTOM CAMPAIGN STATUS
    \n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Description:   \n"; -echo "Selectable:   \n"; -echo "
    \n"; - -echo "

    \n"; - - - -echo "
    CUSTOM HOTKEYS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_hotkeys$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    HOTKEYSTATUSDESCRIPTIONDELETE
    $rowx[1]$rowx[0]$rowx[2]DELETE
    \n"; - -echo "
    ADD NEW CUSTOM CAMPAIGN HOTKEY
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Hotkey:   \n"; -echo "Status:   \n"; -echo "
    \n"; -echo "

    \n"; - - - -echo "

    LEAD RECYCLING WITHIN THIS CAMPAIGN:   $NWB#vicidial_lead_recycle$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $recycle_to_print = mysql_num_rows($rslt); - $o=0; - while ($recycle_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - -echo "
    STATUSATTEMPT DELAYATTEMPT MAXIMUMACTIVE DELETE
    $rowx[2]
    \n"; - echo "\n"; - echo "\n"; - echo "
    DELETE
    \n"; - -echo "
    ADD NEW CAMPAIGN LEAD RECYCLE
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Attempt Delay: \n"; -echo "Attempt Maximum: \n"; -echo "
    \n"; - -echo "

    \n"; - -echo "LOG ALL AGENTS OUT OF THIS CAMPAIGN

    \n"; - -if ($LOGdelete_campaigns > 0) - { - echo "

    DELETE THIS CAMPAIGN\n"; - } - -} - - -###################### -# ADD=34 modify campaign info in the system - Basic View -###################### - -if ($ADD==34) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $display_dialable_count = $row[39]; - -echo "
    MODIFY A CAMPAIGN'S RECORD: $row[0] - Basic View | "; -echo "Detail View | "; -echo "Realtime Screen\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; -echo "
    Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: $row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE
    Web Form: $row[11]$NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $row[12] $NWB#vicidial_campaigns-allow_closers$NWE
    Dial status 1: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 2: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 3: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 4: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 5: $NWB#vicidial_campaigns-dial_status$NWE
    List Order: $NWB#vicidial_campaigns-lead_order$NWE
    Lead Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Script: $script_id
    Get Call Launch: $get_call_launch
    \n"; - -echo "
    \n"; -echo "
    LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LIST IDLIST NAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

    \n"; - - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - HIDE

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - SHOW

    "; - } - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "This campaign has $hopper_leads leads in the dial hopper

    \n"; -echo "Click here to see what leads are in the hopper right now

    \n"; -echo "Click here to see all CallBack Holds in this campaign

    \n"; -echo "
    \n"; - -echo "
    \n"; - -echo "LOG ALL AGENTS OUT OF THIS CAMPAIGN

    \n"; - - -if ($LOGdelete_campaigns > 0) - { - echo "

    DELETE THIS CAMPAIGN\n"; - } - - -} - - -###################### -# ADD=311 modify list info in the system -###################### - -if ($ADD==311) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $campaign_id = $row[2]; - $active = $row[3]; - - # grab names of global statuses and statuses in the selected campaign - $stmt="SELECT * from vicidial_statuses order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $Cstatuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($Cstatuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - # end grab status names - - -echo "
    MODIFY A LISTS RECORD: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    List ID: $row[0]$NWB#vicidial_lists-list_id$NWE
    List Name: $NWB#vicidial_lists-list_name$NWE
    Campaign: $NWB#vicidial_lists-campaign_id$NWE
    Active: $NWB#vicidial_lists-active$NWE
    Reset Lead-Called-Status for this list: $NWB#vicidial_lists-reset_list$NWE
    \n"; - -echo "
    \n"; -echo "
    STATUSES WITHIN THIS LIST:
    \n"; -echo "\n"; -echo "\n"; - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by status,called_since_last_reset order by status,called_since_last_reset"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - $o=0; - if ($lead_list['count'] > 0) - { - while (list($dispo,) = each($lead_list[$since_reset])) - { - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($dispo == 'CBHOLD') - { - $CLB=""; - $CLE=""; - } - else - { - $CLB=''; - $CLE=''; - } - - echo "\n"; - $o++; - } - } - -echo "\n"; -echo "\n"; - -echo "
    STATUSSTATUS NAMECALLEDNOT CALLED
    $CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
    SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; -unset($lead_list); - - - - - -echo "
    \n"; -echo "
    TIME ZONES WITHIN THIS LIST:
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT gmt_offset_now,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by gmt_offset_now,called_since_last_reset order by gmt_offset_now,called_since_last_reset"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $plus='+'; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - if ($lead_list['count'] > 0) - { - while (list($tzone,) = each($lead_list[$since_reset])) - { - $LOCALzone=3600 * $tzone; - $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); - - if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} - else {$DISPtzone = "$tzone";} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - } - -echo "\n"; -echo "\n"; - -echo "
    GMT OFFSET NOW (local time)CALLEDNOT CALLED
    ".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
    SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; -unset($lead_list); - - - - - - - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_count,count(*) from vicidial_list where list_id='$list_id' group by status,called_count order by status,called_count"; - $rslt=mysql_query($stmt, $link); - $status_called_to_print = mysql_num_rows($rslt); - - $o=0; - $sts=0; - $first_row=1; - $all_called_first=1000; - $all_called_last=0; - while ($status_called_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $leads_in_list = ($leads_in_list + $rowx[2]); - $count_statuses[$o] = "$rowx[0]"; - $count_called[$o] = "$rowx[1]"; - $count_count[$o] = "$rowx[2]"; - $all_called_count[$rowx[1]] = ($all_called_count[$rowx[1]] + $rowx[2]); - - if ( (strlen($status[$sts]) < 1) or ($status[$sts] != "$rowx[0]") ) - { - if ($first_row) {$first_row=0;} - else {$sts++;} - $status[$sts] = "$rowx[0]"; - $status_called_first[$sts] = "$rowx[1]"; - if ($status_called_first[$sts] < $all_called_first) {$all_called_first = $status_called_first[$sts];} - } - $leads_in_sts[$sts] = ($leads_in_sts[$sts] + $rowx[2]); - $status_called_last[$sts] = "$rowx[1]"; - if ($status_called_last[$sts] > $all_called_last) {$all_called_last = $status_called_last[$sts];} - - $o++; - } - - - - -echo "
    \n"; -echo "
    CALLED COUNTS WITHIN THIS LIST:
    \n"; -echo "\n"; -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - - $sts=0; - $statuses_called_to_print = count($status); - while ($statuses_called_to_print > $sts) - { - $Pstatus = $status[$sts]; - if (eregi("1$|3$|5$|7$|9$", $sts)) - {$bgcolor='bgcolor="#B9CBFD"'; $AB='bgcolor="#9BB9FB"';} - else - {$bgcolor='bgcolor="#9BB9FB"'; $AB='bgcolor="#B9CBFD"';} -# echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n"; -# echo "$status[$sts]|"; - echo ""; - - $first = $all_called_first; - while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $sts)) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - else - { - if (eregi("0$|2$|4$|6$|8$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - - $called_printed=0; - $o=0; - while ($status_called_to_print > $o) - { - if ( ($count_statuses[$o] == "$Pstatus") and ($count_called[$o] == "$first") ) - { - $called_printed++; - echo ""; - } - - - $o++; - } - if (!$called_printed) - {echo "";} - $first++; - } - echo "\n\n"; - - $sts++; - } - -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - -echo "
    STATUSSTATUS NAME$firstSUBTOTAL
    $Pstatus$statuses_list[$Pstatus] $count_count[$o]  $leads_in_sts[$sts]
    TOTAL$all_called_count[$first]$leads_in_list

    \n"; - - - - - -echo "
    \n"; - -if ($LOGdelete_lists > 0) - { - echo "

    DELETE THIS LIST\n"; - } - -} - - - -###################### -# ADD=3111 modify in-group info in the system -###################### - -if ($ADD==3111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = $row[4]; - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - $script_id = $row[8]; - $get_call_launch = $row[9]; - $xferconf_a_dtmf = $row[10]; - $xferconf_a_number = $row[11]; - $xferconf_b_dtmf = $row[12]; - $xferconf_b_number = $row[13]; - $drop_call_seconds = $row[14]; - $drop_message = $row[15]; - $drop_exten = $row[16]; - -echo "
    MODIFY A GROUPS RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -echo "\n"; -echo "
    Group ID: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
    Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
    Active: $NWB#vicidial_inbound_groups-active$NWE
    Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    Transfer-Conf DTMF 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf Number 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf DTMF 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf Number 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Drop Call Seconds: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Use Drop Message: $NWB#vicidial_inbound_groups-drop_message$NWE
    Drop Exten: $NWB#vicidial_inbound_groups-drop_exten$NWE
    \n"; - -echo "

    \n"; - -echo "
    \n"; - -if ($LOGdelete_ingroups > 0) - { - echo "

    DELETE THIS IN-GROUP\n"; - } - -} - - - -###################### -# ADD=31111 modify remote agents info in the system -###################### - -if ($ADD==31111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
    External Extension: (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status: $NWB#vicidial_remote_agents-status$NWE
    Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Groups: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - - -if ($LOGdelete_remote_agents > 0) - { - echo "

    DELETE THIS REMOTE AGENT\n"; - } - -} - - -###################### -# ADD=311111 modify user group info in the system -###################### - -if ($ADD==311111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[0]; - $group_name = $row[1]; -echo ""; - -echo "
    MODIFY A USERS GROUP ENTRY\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
    Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -if ($LOGdelete_user_groups > 0) - { - echo "

    DELETE THIS USER GROUP\n"; - } - -} - - -###################### -# ADD=3111111 modify script info in the system -###################### - -if ($ADD==3111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $script_name = $row[1]; - $script_comments = $row[2]; - $script_text = $row[3]; - $active = $row[4]; -echo ""; - -echo "
    MODIFY A SCRIPT\n"; -echo "\n"; -echo "\n"; -echo "
    Script ID: $script_id$NWB#vicidial_scripts-script_name$NWE
    Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
    Script Comments: $NWB#vicidial_scripts-script_comments$NWE
    Active: $NWB#vicidial_scripts-active$NWE
    Script Text:

    Preview Script
    $NWB#vicidial_scripts-script_text$NWE
    \n"; - -if ($LOGdelete_scripts > 0) - { - echo "

    DELETE THIS SCRIPT\n"; - } - -} - - -###################### -# ADD=31111111 modify filter info in the system -###################### - -if ($ADD==31111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $lead_filter_name = $row[1]; - $lead_filter_comments = $row[2]; - $lead_filter_sql = $row[3]; -echo ""; - -echo "
    MODIFY A FILTER\n"; -echo "\n"; -echo "\n"; -echo "
    Filter ID: $lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - -echo "

    "; -echo "
    TEST ON CAMPAIGN:
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -if ($LOGdelete_filters > 0) - { - echo "

    DELETE THIS FILTER\n"; - } - -} - - -###################### -# ADD=321111111 modify call time definition info in the system -###################### - -if ($ADD==321111111) -{ -if ($LOGmodify_call_times==1) -{ - -if ( ($stage=="ADD") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - if (eregi("\|$",$ct_state_call_times)) - {$ct_state_call_times = "$ct_state_call_times$state_rule\|";} - else - {$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";} - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "State Rule Added: $state_rule
    \n"; - } -if ( ($stage=="REMOVE") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - $ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "State Rule Removed: $state_rule
    \n"; - } - -$ADD=311111111; -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - -###################### -# ADD=311111111 modify call time definition info in the system -###################### - -if ($ADD==311111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -$ct_srs=1; -$b=0; -$srs_SQL =''; -if (strlen($ct_state_call_times)>2) - { - $state_rules = explode('|',$ct_state_call_times); - $ct_srs = ((count($state_rules)) - 1); - } -echo "\n"; -echo "\n"; -while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>0) - { - $stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - echo "\n"; - $srs_SQL .= "'$state_rules[$b]',"; - $srs_state_SQL .= "'$row[0]',"; - } - $b++; - } -if (strlen($srs_SQL)>2) - { - $srs_SQL = "$srs_SQL''"; - $srs_state_SQL = "$srs_state_SQL''"; - $srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)"; - } -else - {$srs_SQL='';} -$stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;"; -$rslt=mysql_query($stmt, $link); -$sct_to_print = mysql_num_rows($rslt); -$sct_list=''; - -$o=0; -while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_list .= "\n"; - $o++; -} -echo "\n"; -echo "\n"; - -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $call_time_name = $row[1]; - $call_time_comments = $row[2]; - $ct_default_start = $row[3]; - $ct_default_stop = $row[4]; - $ct_sunday_start = $row[5]; - $ct_sunday_stop = $row[6]; - $ct_monday_start = $row[7]; - $ct_monday_stop = $row[8]; - $ct_tuesday_start = $row[9]; - $ct_tuesday_stop = $row[10]; - $ct_wednesday_start = $row[11]; - $ct_wednesday_stop = $row[12]; - $ct_thursday_start = $row[13]; - $ct_thursday_stop = $row[14]; - $ct_friday_start = $row[15]; - $ct_friday_stop = $row[16]; - $ct_saturday_start = $row[17]; - $ct_saturday_stop = $row[18]; - $ct_state_call_times = $row[19]; - -echo ""; - -echo "
    MODIFY A CALL TIME\n"; -echo "\n"; -echo "\n"; -echo "
    Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
    Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Active State Call Time Definitions for this Record:  
    $state_rules[$b] - REMOVE $row[0] - $row[1]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Add state call time rule:


    \n"; -echo "CAMPAIGNS USING THIS CALL TIME:
    \n"; -echo "\n"; - - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - $CT_camp_id = $row[1]; - $CT_camp_name = $row[2]; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    DELETE THIS CALL TIME DEFINITION\n"; - } -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - -###################### -# ADD=3111111111 modify state call time definition info in the system -###################### - -if ($ADD==3111111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $state_call_time_state =$row[1]; - $call_time_name = $row[2]; - $call_time_comments = $row[3]; - $ct_default_start = $row[4]; - $ct_default_stop = $row[5]; - $ct_sunday_start = $row[6]; - $ct_sunday_stop = $row[7]; - $ct_monday_start = $row[8]; - $ct_monday_stop = $row[9]; - $ct_tuesday_start = $row[10]; - $ct_tuesday_stop = $row[11]; - $ct_wednesday_start = $row[12]; - $ct_wednesday_stop = $row[13]; - $ct_thursday_start = $row[14]; - $ct_thursday_stop = $row[15]; - $ct_friday_start = $row[16]; - $ct_friday_stop = $row[17]; - $ct_saturday_start = $row[18]; - $ct_saturday_stop = $row[19]; - -echo ""; - -echo "
    MODIFY A STATE CALL TIME
    \n"; -echo "\n"; -echo "\n"; -echo "
    Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: $NWB#vicidial_call_times-state_call_time_state$NWE
    State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    State Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
    Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE


    \n"; -echo "CALL TIMES USING THIS STATE CALL TIME:
    \n"; -echo "\n"; - - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    DELETE THIS STATE CALL TIME DEFINITION\n"; - } - -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo "
    \n"; -echo ""; - -echo "
    SEARCH FOR A USER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    User Number:
    Full Name:
    User Level:
    User Group:
    \n"; - -} - -###################### -# ADD=66 user search results -###################### - -if ($ADD==66) -{ -echo "
    \n"; - echo ""; - - $SQL = ''; - if ($user) {$SQL .= " user LIKE \"%$user%\" and";} - if ($full_name) {$SQL .= " full_name LIKE \"%$full_name%\" and";} - if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";} - if ($user_group) {$SQL .= " user_group = '$user_group' and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from vicidial_users $SQL order by full_name desc;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    SEARCH RESULTS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
    \n"; - -} - - -###################################################################################################### -###################################################################################################### -####### 8 series, Callback lists -###################################################################################################### -###################################################################################################### - -###################### -# ADD=8 find all callbacks on hold by a User -###################### -if ($ADD==8) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    USER CALLBACK HOLD LISTINGS: $user\n"; -$ADD='82'; -} - -###################### -# ADD=81 find all callbacks on hold within a Campaign -###################### -if ($ADD==81) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; -$ADD='82'; -} - -###################### -# ADD=811 find all callbacks on hold within a List -###################### -if ($ADD==811) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    LIST CALLBACK HOLD LISTINGS: $list_id\n"; -$ADD='82'; -} - -###################### -# ADD=82 display all callbacks on hold -###################### -if ($ADD==82) -{ -echo "
    \n"; -echo "
    \n"; -echo "\n"; - - $o=0; - while ($cb_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    LEADLISTCAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUS
    $row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 0 series, displays and searches -###################################################################################################### -###################################################################################################### - -###################### -# ADD=0 display all active users -###################### -if ($ADD==0) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users order by full_name"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
    \n"; -} - -###################### -# ADD=10 display all campaigns -###################### -if ($ADD==10) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3]$row[4]$row[5] $row[6]$row[7]  MODIFY
    \n"; -} - - -###################### -# ADD=100 display all lists -###################### -if ($ADD==100) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists order by list_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    LIST LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  MODIFY
    \n"; -} - - - -###################### -# ADD=1000 display all inbound groups -###################### -if ($ADD==1000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    INBOUND GROUP LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[5]  MODIFY
    \n"; -} - - -###################### -# ADD=10000 display all remote agents -###################### -if ($ADD==10000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    REMOTE AGENTS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
    \n"; -} - - -###################### -# ADD=100000 display all user groups -###################### -if ($ADD==100000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups order by user_group"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USER GROUPS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=1000000 display all scripts -###################### -if ($ADD==1000000) -{ -echo "\n";echo "\n";?> -
    -
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    SCRIPTS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=10000000 display all filters -###################### -if ($ADD==10000000) -{ -echo "\r\n"; - } -} - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/listloader_super.pl b/agc_2-X/trunk/LANG_admin/vicidial/listloader_super.pl deleted file mode 100644 index a36765d0..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/listloader_super.pl +++ /dev/null @@ -1,691 +0,0 @@ -#!/usr/bin/perl - -### listloader_super.pl -### -### Copyright (C) 2006 Matt Florell,Joe Johnson LICENSE: GPLv2 -### -# -# -# CHANGES -# 60616-1548 - Added listID override feature to force all leads into same list -# - Added gmt_offset_now lookup for each lead -# - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help|-h/i) - { - print "allowed run time options:\n [-forcelistid=1234] = overrides the listID given in the file with the 1234\n [-h] = this help screen\n\n"; - } - else - { - if ($args =~ /--forcelistid=/i) - { - @data_in = split(/--forcelistid=/,$args); - $forcelistid = $data_in[1]; - print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n"; - } - else - {$forcelistid = '';} - } -} -### end parsing run-time options ### - -use Spreadsheet::ParseExcel; -use Time::Local; -use Net::MySQL; - -### Make sure this file is in a libs path or put the absolute path to it -require("/home/cron/AST_SERVER_conf.pl"); # local configuration file - -if (!$DB_port) {$DB_port='3306';} - -$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") - or die "Couldn't connect to database: $DB_server - $DB_database\n"; - - -$vars=$ARGV[0]; -@xls_fields=split(/\,/, $vars); - -$|=0; -$secX = time(); - -($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); -$year = ($year + 1900); -$mon++; -if ($hour < 10) {$hour = "0$hour";} -if ($min < 10) {$min = "0$min";} -if ($sec < 10) {$sec = "0$sec";} -if ($mon < 10) {$mon = "0$mon";} -if ($mday < 10) {$mday = "0$mday";} -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$pulldate="$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $DBSERVER_GMT = "$record->[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - } - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -if ($isdst) {$LOCAL_GMT_OFF++;} -if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - - -$total=0; $good=0; $bad=0; -open(STMT_FILE, "> listloader_stmts.txt"); - -$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls"); -my($iR, $iC, $oWkS, $oWkC); - -foreach $oWkS (@{$oBook->{Worksheet}}) { - for($iR = 0 ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) { - - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[0]]; - if ($oWkC) {$vendor_lead_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[1]]; - if ($oWkC) {$source_code=$oWkC->Value; } - $source_id=$source_code; - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[2]]; - if ($oWkC) {$list_id=$oWkC->Value; } - $gmt_offset = '0'; - $called_since_last_reset='N'; - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[3]]; - if ($oWkC) {$phone_code=$oWkC->Value; } - $phone_code=~s/[^0-9]//g; - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[4]]; - if ($oWkC) {$phone_number=$oWkC->Value; } - $phone_number=~s/[^0-9]//g; - $USarea = substr($phone_number, 0, 3); - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[5]]; - if ($oWkC) {$title=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[6]]; - if ($oWkC) {$first_name=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[7]]; - if ($oWkC) {$middle_initial=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[8]]; - if ($oWkC) {$last_name=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[9]]; - if ($oWkC) {$address1=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[10]]; - if ($oWkC) {$address2=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[11]]; - if ($oWkC) {$address3=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[12]]; - if ($oWkC) {$city=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[13]]; - if ($oWkC) {$state=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[14]]; - if ($oWkC) {$province=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[15]]; - if ($oWkC) {$postal_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[16]]; - if ($oWkC) {$country_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[17]]; - if ($oWkC) {$gender=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[18]]; - if ($oWkC) {$date_of_birth=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[19]]; - if ($oWkC) {$alt_phone=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[20]]; - if ($oWkC) {$email=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[21]]; - if ($oWkC) {$security_phrase=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[22]]; - if ($oWkC) {$comments=$oWkC->Value; } - $comments=~s/^\s*(.*?)\s*$/$1/; - - if (length($phone_number)>8) { - if (length($forcelistid) > 0) - { - $list_id = $forcelistid; # set list_id to override value - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =~ /^1$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### MEXICO ### - if ($phone_code =~ /^52$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### AUSTRALIA ### - if ($phone_code =~ /^61$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = ($secX + (3600 * $AC_GMT_diff)); - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($AC_localtime); - $year = ($year + 1900); - $mon++; - if ($mon < 10) {$mon = "0$mon";} - if ($mday < 10) {$mday = "0$mday";} - if ($hour < 10) {$hour = "0$hour";} - if ($min < 10) {$min = "0$min";} - if ($sec < 10) {$sec = "0$sec";} - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) && ($dst_range =~ /FSA-LSO/) ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - &USA_dstcalc; - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /LSM-LSO/) ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - &GBR_dstcalc; - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /LSO-LSM/) ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - &AUS_dstcalc; - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /FSO-LSM/) ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - &AUST_dstcalc; - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - &NZL_dstcalc; - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $dbhA->query("$stmtZ"); - print STMT_FILE $stmtZ."\r\n"; - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - sleep(1); -# flush(); - } - } -} - -if ($multi_insert_counter > 0) { - $stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";"; - $dbhA->query("$stmtZ"); - print STMT_FILE $stmtZ."\r\n"; -} - -print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total"; - -exit; - - - - - - -sub USA_dstcalc { -#********************************************************************** -# FSA-LSO -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on first Sunday in April and last Sunday in October at 2 am. -# INPUTS: -# mm INTEGER Month. -# dd INTEGER Day of the month. -# ns INTEGER Seconds into the day. -# dow INTEGER Day of week (0=Sunday, to 6=Saturday) -# OPTIONAL INPUT: -# timezone INTEGER hour difference UTC - local standard time -# (DEFAULT is blank) -# make calculations based on UTC time, -# which means shift at 10:00 UTC in April -# and 9:00 UTC in October -# OUTPUT: -# INTEGER 1 = DST, 0 = not DST -#********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; return 0; - } elsif ($mm >= 5 && $mm <= 9) { - $USA_DST=1; return 1; - } elsif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $USA_DST=0; return 0; - } else { - $USA_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 7200) { - $USA_DST=0; return 0; - } else { - $USA_DST=1; return 1; - } - } - } else { - $USA_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $USA_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; return 1; - } else { - $USA_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; return 1; - } else { - $USA_DST=0; return 0; - } - } - } else { - $USA_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - -sub GBR_dstcalc { -#********************************************************************** -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on last Sunday in March and last Sunday in October at 1 am. -#********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; return 0; - } elsif ($mm >= 4 && $mm <= 9) { - $GBR_DST=1; return 1; - } elsif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; return 0; - } elsif ($dd < ($dow+25)) { - $GBR_DST=0; return 0; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; return 0; - } else { - $GBR_DST=1; return 1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; return 0; - } else { - $GBR_DST=1; return 1; - } - } - } else { - $GBR_DST=1; return 1; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $GBR_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; return 1; - } else { - $GBR_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; return 1; - } else { - $GBR_DST=0; return 0; - } - } - } else { - $GBR_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - -sub AUS_dstcalc { -#********************************************************************** -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on last Sunday in October and last Sunday in March at 1 am. -#********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $AUS_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $AUS_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; return 1; - } else { - $AUS_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; return 1; - } else { - $AUS_DST=0; return 0; - } - } - } else { - $AUS_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; return 0; - } elsif ($dd < ($dow+25)) { - $AUS_DST=0; return 0; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; return 0; - } else { - $AUS_DST=1; return 1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; return 0; - } else { - $AUS_DST=1; return 1; - } - } - } else { - $AUS_DST=1; return 1; - } - } # end of month checks -} # end of subroutine dstcalc - - - - - -sub AUST_dstcalc { -#********************************************************************** -# TASMANIA ONLY -# 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 last Sunday in March at 1 am. -#********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $AUST_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $AUST_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; return 1; - } else { - $AUST_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; return 1; - } else { - $AUST_DST=0; return 0; - } - } - } else { - $AUST_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $AUST_DST=0; return 0; - } else { - $AUST_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 3600) { - $AUST_DST=0; return 0; - } else { - $AUST_DST=1; return 1; - } - } - } else { - $AUST_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - - -sub NZL_dstcalc { -#********************************************************************** -# 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 third Sunday in March at 1 am. -#********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $NZL_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; return 1; - } elsif ($dd < ($dow+14)) { - $NZL_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; return 1; - } else { - $NZL_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; return 1; - } else { - $NZL_DST=0; return 0; - } - } - } else { - $NZL_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $NZL_DST=0; return 0; - } else { - $NZL_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 3600) { - $NZL_DST=0; return 0; - } else { - $NZL_DST=1; return 1; - } - } - } else { - $NZL_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc diff --git a/agc_2-X/trunk/LANG_admin/vicidial/log_test.php b/agc_2-X/trunk/LANG_admin/vicidial/log_test.php deleted file mode 100644 index cd7a86b7..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/log_test.php +++ /dev/null @@ -1,37 +0,0 @@ - LICENSE: GPLv2 -# - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - -$fp = fopen ("./closer_SQL_updates.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - fwrite ($fp, "CLOSER SQL UPDATE|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - - -exit; - - - -?> - - -Hello - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/new_listloader_superL.php b/agc_2-X/trunk/LANG_admin/vicidial/new_listloader_superL.php deleted file mode 100644 index 6c0ac713..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/new_listloader_superL.php +++ /dev/null @@ -1,1364 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60113-1603 - Fixed a few bugs in Excel import -# 60421-1624 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1240 - added listID override -# 60616-1604 - added gmt lookup for each lead -# 60619-1651 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12-1'; -$build = '60619-1651'; - - -require("dbconnect.php"); - -### links used for testing -#$link=mysql_connect("10.10.10.15", "cron", "1234"); -#mysql_select_db("asterisk"); -#$WeBServeRRooT = '/home/www/htdocs'; - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];} - elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} - elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} -if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} - elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} -if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} - elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];} -if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];} - elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];} -if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];} - elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];} -if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];} - elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];} -if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];} - elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];} -if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];} - elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];} -if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];} - elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];} -if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];} - elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];} -if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];} - elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];} -if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];} - elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];} -if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];} - elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];} -if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];} - elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];} -if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];} - elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];} -if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];} - elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];} -if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];} - elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];} -if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];} - elseif (isset($_POST["province_field"])) {$province_field=$_POST["province_field"];} -if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];} - elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];} -if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];} - elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];} -if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];} - elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];} -if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];} - elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];} -if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];} - elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];} -if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];} - elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];} -if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];} - elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];} -if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];} - elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];} -if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];} - elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); - -# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"HELP\""; - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -function macfontfix($fontsize) { - - $browser = getenv("HTTP_USER_AGENT"); - $pctype = explode("(", $browser); - if (ereg("Mac",$pctype[1])) { - /* Browser is a Mac. If not Netscape 6, raise fonts */ - - $blownbrowser = explode('/', $browser); - $ver = explode(' ', $blownbrowser[1]); - $ver = $ver[0]; - if ($ver >= 5.0) return $fontsize; else return ($fontsize+2); - - } else return $fontsize; /* Browser is not a Mac - don't touch fonts */ -} - -echo "\n"; - -?> - - - -VICIDIAL ADMIN: Super Lead Loader - - -
    method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> - - -
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    LEAD FILTER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=100000000 display all call times -###################### -if ($ADD==100000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    CALL TIME LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[4] MODIFY
    \n"; -} - -###################### -# ADD=1000000000 display all state call times -###################### -if ($ADD==1000000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_state_call_times order by state_call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    STATE CALL TIME LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3] $row[4] MODIFY
    \n"; -} - - - - - -echo "
    \n"; - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; -echo "             VERSION: $version"; -echo "             BUILD: $build
    \n"; - - -?> - - -
    - - - -1) - { - $g=0; - $p='13'; - $GMT_gmt[0] = ''; - $GMT_hour[0] = ''; - $GMT_day[0] = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $pmin=(gmdate("i", time() + $pzone)); - $phour=( (gmdate("G", time() + $pzone)) * 100); - $pday=gmdate("w", time() + $pzone); - $tz = sprintf("%.2f", $p); - $GMT_gmt[$g] = "$tz"; - $GMT_day[$g] = "$pday"; - $GMT_hour[$g] = ($phour + $pmin); - $p = ($p - 0.25); - $g++; - } - - $stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $Gct_default_start = "$rowx[3]"; - $Gct_default_stop = "$rowx[4]"; - $Gct_sunday_start = "$rowx[5]"; - $Gct_sunday_stop = "$rowx[6]"; - $Gct_monday_start = "$rowx[7]"; - $Gct_monday_stop = "$rowx[8]"; - $Gct_tuesday_start = "$rowx[9]"; - $Gct_tuesday_stop = "$rowx[10]"; - $Gct_wednesday_start = "$rowx[11]"; - $Gct_wednesday_stop = "$rowx[12]"; - $Gct_thursday_start = "$rowx[13]"; - $Gct_thursday_stop = "$rowx[14]"; - $Gct_friday_start = "$rowx[15]"; - $Gct_friday_stop = "$rowx[16]"; - $Gct_saturday_start = "$rowx[17]"; - $Gct_saturday_stop = "$rowx[18]"; - $Gct_state_call_times = "$rowx[19]"; - - $ct_states = ''; - $ct_state_gmt_SQL = ''; - $ct_srs=0; - $b=0; - if (strlen($Gct_state_call_times)>2) - { - $state_rules = explode('|',$Gct_state_call_times); - $ct_srs = ((count($state_rules)) - 2); - } - while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>1) - { - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Gstate_call_time_id = "$row[0]"; - $Gstate_call_time_state = "$row[1]"; - $Gsct_default_start = "$row[4]"; - $Gsct_default_stop = "$row[5]"; - $Gsct_sunday_start = "$row[6]"; - $Gsct_sunday_stop = "$row[7]"; - $Gsct_monday_start = "$row[8]"; - $Gsct_monday_stop = "$row[9]"; - $Gsct_tuesday_start = "$row[10]"; - $Gsct_tuesday_stop = "$row[11]"; - $Gsct_wednesday_start = "$row[12]"; - $Gsct_wednesday_stop = "$row[13]"; - $Gsct_thursday_start = "$row[14]"; - $Gsct_thursday_stop = "$row[15]"; - $Gsct_friday_start = "$row[16]"; - $Gsct_friday_stop = "$row[17]"; - $Gsct_saturday_start = "$row[18]"; - $Gsct_saturday_stop = "$row[19]"; - - $ct_states .="'$Gstate_call_time_state',"; - - $r=0; - $state_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday local time - { - if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday local time - { - if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday local time - { - if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday local time - { - if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday local time - { - if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday local time - { - if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday local time - { - if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - $state_gmt = "$state_gmt'99'"; - $ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) "; - } - - $b++; - } - if (strlen($ct_states)>2) - { - $ct_states = eregi_replace(",$",'',$ct_states); - $ct_statesSQL = "and state NOT IN($ct_states)"; - } - else - { - $ct_statesSQL = ""; - } - - $r=0; - $default_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday local time - { - if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday local time - { - if (($Gct_monday_start==0) and ($Gct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday local time - { - if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday local time - { - if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday local time - { - if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday local time - { - if (($Gct_friday_start==0) and ($Gct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday local time - { - if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - - $default_gmt = "$default_gmt'99'"; - $all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL"; - - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and ($all_gmtSQL) $fSQL"; - #$DB=1; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rslt_rows = mysql_num_rows($rslt); - if ($rslt_rows) - { - $rowx=mysql_fetch_row($rslt); - $active_leads = "$rowx[0]"; - } - else {$active_leads = '0';} - - echo "This campaign has $active_leads leads to be dialed in those lists\n"; - } - else - { - echo "no active lists selected for this campaign\n"; - } - } -else - { - echo "no active lists selected for this campaign\n"; - } -##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ### -} -?> diff --git a/agc_2-X/trunk/LANG_admin/vicidial/admin_modify_lead.php b/agc_2-X/trunk/LANG_admin/vicidial/admin_modify_lead.php deleted file mode 100644 index 9dad4f62..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/admin_modify_lead.php +++ /dev/null @@ -1,476 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"];} - elseif (isset($_POST["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];} -if (isset($_GET["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"];} - elseif (isset($_POST["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];} -if (isset($_GET["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"];} - elseif (isset($_POST["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["CBuser"])) {$CBuser=$_GET["CBuser"];} - elseif (isset($_POST["CBuser"])) {$CBuser=$_POST["CBuser"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Lead record modification - - -
    - - 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "information modified

    \n"; - echo "\n"; - - if ( ($dispo != $status) and ($dispo == 'CBHOLD') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status='ACTIVE';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - if ( ($dispo != $status) and ($dispo == 'CALLBK') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - - if ( ($dispo != $status) and ($status == 'DNC') ) - { - ### add lead to the internal DNC list - $stmt="INSERT INTO vicidial_dnc (phone_number) values('" . mysql_real_escape_string($phone_number) . "');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    Lead added to DNC List: $lead_id - $phone_number
    \n"; - } - -} -else -{ - - if ($CBchangeUSERtoANY == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set recipient='ANYONE' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to ANYONE
    \n"; - } - if ($CBchangeUSERtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record user changed to $CBuser
    \n"; - } - if ($CBchangeANYtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "',recipient='USERONLY' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to USERONLY, user: $CBuser
    \n"; - } - - - - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $dispo = "$row[3]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Call information: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Lead ID: $lead_id
    Fronter: $tsr     List ID: $list_id
    First Name:   \n"; - echo " Last Name:
    Address 1 :
    Address 2 :
    Address 3 :
    City :
    State:   \n"; - echo " Postal Code:
    Province :
    Country :
    Alt Phone :
    Email :
    Security :
    Comments :
    Disposition:
    \n"; - echo "


    \n"; - - if ( ($dispo == 'CALLBK') or ($dispo == 'CBHOLD') ) - { - ### find any vicidial_callback records for this lead - $stmt="select * from vicidial_callbacks where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $CB_to_print = mysql_num_rows($rslt); - $rowx=mysql_fetch_row($rslt); - - if ($CB_to_print>0) - { - if ($rowx[9] == 'USERONLY') - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    \n"; - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - else - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - } - else - { - echo "
    No Callback records found
    \n"; - } - } - - - - - - - } - else - { - echo "lead lookup FAILED for lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - -echo "

    \n"; - -echo "
    \n"; - -echo "CALLS TO THIS LEAD:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS TSR CAMPAIGN LIST LEAD
    $row[4] $row[7] $row[8] $row[11] $row[3] $row[2] $row[1]
    \n"; - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/admin_search_lead.php b/agc_2-X/trunk/LANG_admin/vicidial/admin_search_lead.php deleted file mode 100644 index a727e3a1..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/admin_search_lead.php +++ /dev/null @@ -1,224 +0,0 @@ - LICENSE: GPLv2 -### -### AST GUI database administration search for lead info -### admin_modify_lead.php -# -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead -# -# changes: -# 60620-1055 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - Changed results to multi-record -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Lead Search - -Lead Lookup - - - -
    \n"; - echo "
    \n"; - echo "\n"; - echo "Please enter a:
    Vendor ID(vendor lead code): or \n"; - echo "
    a Home Phone Number: or\n"; - echo "
    a lead ID:

    \n"; - echo "
    \n"; - echo "\n
    \n"; - echo "\n"; - exit; - } - -else - { - - if ($vendor_id) - { - $stmt="SELECT * from vicidial_list where vendor_lead_code='" . mysql_real_escape_string($vendor_id) . "' order by modify_date desc limit 1000"; - } - else - { - if ($phone) - { - $stmt="SELECT * from vicidial_list where phone_number='" . mysql_real_escape_string($phone) . "' order by modify_date desc limit 1000"; - } - else - { - if ($lead_id) - { - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "' order by modify_date desc limit 1000"; - } - else - { - print "ERROR: you must search for something! Go back and search for something"; - exit; - } - } - } - if ($DB) - { - echo "\n\n$stmt\n\n"; - } - - $rslt=mysql_query($stmt, $link); - $results_to_print = mysql_num_rows($rslt); - if ($results_to_print < 1) - { - echo date("l F j, Y G:i:s A"); - echo "\n

    \n"; - echo "The search variables you entered are not active in the system

    \n"; - echo "Please go back and double check the information you entered and submit again\n"; - echo "
    \n"; - echo "\n"; - exit; - } - else - { - echo "RESULTS: $results_to_print

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $o=0; - while ($results_to_print > $o) - { - $row=mysql_fetch_row($rslt); - $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "
    #LEAD IDSTATUSVENDOR IDLAST AGENTLIST IDPHONENAMECITYSECURITYLAST CALL
    $o$row[0]$row[3]$row[5]$row[4]$row[7]$row[11]$row[13] $row[15]$row[19]$row[28]$row[2]
    \n"; - } - } - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \nNEW SEARCH"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; - - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/closer-fronter_popup.php b/agc_2-X/trunk/LANG_admin/vicidial/closer-fronter_popup.php deleted file mode 100644 index 53a1a41d..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/closer-fronter_popup.php +++ /dev/null @@ -1,508 +0,0 @@ - LICENSE: GPLv2 -### -# this is the closer popup of a specific call that starts recording the call and allows you to go and fetch info on that caller in the local CRM system. - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - - -#$DB = '1'; # DEBUG override -$US = '_'; -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$REC_TIME = date("Ymd-His"); -$FILE_datetime = $STARTtime; -$parked_time = $STARTtime; - -# $ext_context = 'default'; defined in dbconnect file - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name from vicidial_users where user='$user' and pass='$pass'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - if ( (strlen($customer_zap_channel)>2) and (eregi('zap',$customer_zap_channel)) ) - { - echo "\n\n"; - echo "\n\n"; - - } - else - { - echo "Bad channel: $customer_zap_channel\n"; - echo "Make sure the Zap channel is live and try again\n"; - exit; - } - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "VICIDIAL FRONTER-CLOSER: Popup\n"; - -if (eregi('CL_UNIV',$channel_group)) - { - ?> - - \n"; - echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n"; - echo "\n"; - } -?> - - -
    - - 0) -{ - -# $stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RZ$FILE_datetime$user"; - - ### insert a NEW record to the vicidial_manager table to be processed - - $channel = $customer_zap_channel; - $channel = eregi_replace('Zap/', "", $channel); - $SIPexten = eregi_replace('SIP/', "", $SIPexten); - $filename = "$REC_TIME$US$SIPexten"; - -# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: Zap/$channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - - # Local/78600098@demo-6617,2 - - $stmt = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$server_ip','','Originate','$DTqueryCID','Channel: $local_DEF$conf_silent_prefix$session_id$local_AMP$ext_context','Context: $ext_context','Exten: $recording_exten','Priority: 1','Callerid: $filename','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('Zap/$channel','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - - echo "Recording command sent for channel $channel - $filename - $recording_id       $NOW_TIME\n

    \n"; - - $stmt="SELECT full_name from vicidial_users where user='$user'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - echo "Call Referred by: $user - $full_name\n

    \n"; - - $url = "http://10.10.99.2/vicidial/closer_dispo.php?lead_id=$lead_id&channel=$channel&server_ip=$server_ip&extension=$SIPexten&call_began=$STARTtime&parked_time=$parked_time&DB=$DB"; - - echo "View Customer Info and Disposition Call\n

    \n"; - - - -# $stmt="UPDATE park_log set grab_time='$NOW_TIME',status='TALKING',extension='$extension',user='$user' where parked_time='$parked_time' and server_ip='$server_ip' and channel='$channel'"; -# if ($DB) {echo "|$stmt|\n";} -# $fp = fopen ("./closer_SQL_updates.txt", "a"); -# fwrite ($fp, "$date|$user|$stmt|\n"); -# fclose($fp); -# $rslt=mysql_query($stmt, $link); - -########################################################################################### -####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX -########################################################################################### -if (eregi('CL_TEST',$channel_group)) - { - echo "GALLERIA TEST CLOSER GROUP: $channel_group\n"; - - $stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $fronter=$row[0]; - $search_phone=$row[1]; - - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - -- INTERNAL CALL GALLERIA FRONT --
    \n"; - $group_color='#99FF99'; - } - if (eregi('CL_GALLER2',$channel_group)) - { - echo "
    -- TouchAsia CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - if (eregi('CL_GALLER3',$channel_group)) - { - echo "
    -- DebitSupplies CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - if (eregi('CL_GALLER4',$channel_group)) - { - echo "
    -- Vishnu CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    New Search
    Reservation Number:
    Confirmation #:
    Phone #:


    Back
    - -
    - - - Close this window\n

    \n"; -} -else -{ - echo "Record command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "Please go back and try again\n

    \n"; -# echo "
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/closer-fronter_popup2.php b/agc_2-X/trunk/LANG_admin/vicidial/closer-fronter_popup2.php deleted file mode 100644 index 2cbadf1a..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/closer-fronter_popup2.php +++ /dev/null @@ -1,423 +0,0 @@ - LICENSE: GPLv2 -### -# this is the closer popup of a specific call that starts recording the call and allows you to go and fetch info on that caller in the local CRM system. - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - - -#$DB = '1'; # DEBUG override -$US = '_'; -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$REC_TIME = date("Ymd-His"); -$FILE_datetime = $STARTtime; -$parked_time = $STARTtime; - -# $ext_context = 'default'; defined in dbconnect file -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if (!$auth) - { - if ( (strlen($PHP_AUTH_USER)>1) and ( (eregi("tsr",$PHP_AUTH_PW)) or (eregi("sales",$PHP_AUTH_PW)) ) ) - { - $auth=1; - $user = $PHP_AUTH_USER; - $pass = $PHP_AUTH_PW; - } - } - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER - $user - $PHP_AUTH_USER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name from vicidial_users where user='$user' and pass='$pass'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - if ( (strlen($customer_zap_channel)>2) and ( (eregi('zap',$customer_zap_channel)) or (eregi('iax',$customer_zap_channel)) ) ) - { - echo "\n\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - } - else - { - echo "Bad channel: $customer_zap_channel\n"; - echo "Make sure the Zap channel is live and try again\n"; - exit; - } - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "VICIDIAL FRONTER-CLOSER: Popup\n"; - -if (eregi('CL_UNIV',$channel_group)) - { - ?> - - \n"; - echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n"; - echo "\n"; - } -?> - - -
    - - 0) -{ - -# $stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RZ$FILE_datetime$user"; - - ### insert a NEW record to the vicidial_manager table to be processed - - $channel = $customer_zap_channel; -# $channel = eregi_replace('Zap/', "", $channel); - $SIPexten = eregi_replace('SIP/', "", $SIPexten); - $filename = "$REC_TIME$US$SIPexten"; - -# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: Zap/$channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - - # Local/78600098@demo-6617,2 - - $stmt = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$server_ip','','Originate','$DTqueryCID','Channel: $local_DEF$conf_silent_prefix$session_id$local_AMP$ext_context','Context: $ext_context','Exten: $recording_exten','Priority: 1','Callerid: $filename','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - - echo "Recording command sent for channel $channel - $filename - $recording_id       $NOW_TIME\n

    \n"; - - $stmt="SELECT full_name from vicidial_users where user='$fronter'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - echo "Call Referred by: $fronter - $full_name\n

    \n"; - - $url = "http://10.10.10.196/vicidial/closer_dispo.php?lead_id=$lead_id&channel=$channel&server_ip=$server_ip&extension=$SIPexten&call_began=$STARTtime&parked_time=$parked_time&DB=$DB"; - - echo "View Customer Info and Disposition Call\n

    \n"; - - - $stmt="SELECT group_name,group_color from vicidial_inbound_groups where group_id='$channel_group'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $group_name = $row[0]; - $group_color = $row[1]; - - echo "
    \n"; - echo "
    $channel_group - $group_name

    \n\n"; - -########################################################################################### -####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX -########################################################################################### - -if (eregi('CL',$channel_group)) - { - if (strlen($phone) > 9) {$search_phone = $phone;} - if ( (strlen($search_phone) < 10) or (strlen($fronter) < 1) ) - { - echo "\n"; - $stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($fronter) < 1) {$fronter=$row[0];} - if (strlen($search_phone) < 10) {$search_phone=$row[1];} - } - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    New Search
    Reservation Number:
    Confirmation #:
    Phone #:


    Back
    - -
    - - - Close this window\n

    \n"; -} -else -{ - echo "Record command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "Please go back and try again\n

    \n"; -# echo "
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/closer.php b/agc_2-X/trunk/LANG_admin/vicidial/closer.php deleted file mode 100644 index dbd9efe7..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/closer.php +++ /dev/null @@ -1,345 +0,0 @@ - LICENSE: GPLv2 -### -# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available) - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["group_selected"])) {$group_selected=$_GET["group_selected"];} - elseif (isset($_POST["group_selected"])) {$group_selected=$_POST["group_selected"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["groupselect"])) {$groupselect=$_GET["groupselect"];} - elseif (isset($_POST["groupselect"])) {$groupselect=$_POST["groupselect"];} -if (isset($_GET["PHONE_LOGIN"])) {$PHONE_LOGIN=$_GET["PHONE_LOGIN"];} - elseif (isset($_POST["PHONE_LOGIN"])) {$PHONE_LOGIN=$_POST["PHONE_LOGIN"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["debugvars"])) {$debugvars=$_GET["debugvars"];} - elseif (isset($_POST["debugvars"])) {$debugvars=$_POST["debugvars"];} -if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];} - elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './closer_popup.php'; - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - -$color_class[0] = 'green'; -$color_class[1] = 'red'; -$color_class[2] = 'blue'; -$color_class[3] = 'purple'; -$color_class[4] = 'orange'; -$color_class[5] = 'green'; -$color_class[6] = 'red'; -$color_class[7] = 'blue'; -$color_class[8] = 'purple'; -$color_class[9] = 'orange'; -?> - - - - - -VICIDIAL CLOSER: Main - - -
    - - 0) - { - $stmt="SELECT dialplan_number,server_ip from phones where extension='$extension';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dialplan_number=$row[0]; - $server_ip=$row[1]; - - if (!$group_selected) - { - $stmt="select distinct channel_group from park_log;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $groups_to_print = mysql_num_rows($rslt); - $i=0; - while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - echo "
    Please select the groups you want to pick calls up from:
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Inbound Call Groups:
    \n"; - $o=0; - while ($groups_to_print > $o) - { - $group_form_print = sprintf("%-20s", $groups[$o]); - echo "$group_form_print
    \n"; - $o++; - } - echo "
    \n"; - echo "\n"; - echo "


    \n"; - } - else - { - $o=0; - while($o < $group_selected) - { - $form_groups = "$form_groups&groupselect[$o]=$groupselect[$o]"; - $o++; - } - - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGIN','CLOSER','$NOW_TIME','$STARTtime');"; - $rslt=mysql_query($stmt, $link); - - echo"\n"; - echo"\n"; - - echo "extension found, forwarding you to closer page, please wait 3 seconds...
    \n"; - } - - } - else - { - echo "The extension you entered does not exist, please try again
    \n"; - echo "
    Please enter your phone_ID: \n"; - echo "\n"; - echo "phone station ID:   \n"; - echo "\n"; - echo "


    \n"; - } - - } - else - { - echo "
    Please enter your phone_ID: \n"; - echo "\n"; - echo "phone station ID:   \n"; - echo "\n"; - echo "


    \n"; - } - -exit; - -} - -$o=0; -while($o < $group_selected) -{ - $listen_groups = "$listen_groups     $groupselect[$o]"; - $form_groups = "$form_groups&groupselect[$o]=$groupselect[$o]"; - $o++; -} - - -echo"\n"; -echo"\n"; - -#CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME -#---------------------------------------------------------------------------------------------- -#Zap/73-1 10.10.11.11 IN_800_TPP_CS TPPpark 7275338730 2004-04-22 12:41:00 - - - -echo "$NOW_TIME           $PHP_AUTH_USER - $fullname - CALLS SENT TO: $dialplan_number

    \n"; - -echo "Click on the channel below that you would like to have directed to your phone
    \n"; - -echo "
    \n";
    -echo "CHANNEL    SERVER        CHANNEL_GROUP   EXTENSION    PARKED_BY            PARKED_TIME         \n";
    -echo "---------------------------------------------------------------------------------------------- \n";
    -
    -
    -
    -
    -
    -$stmt="SELECT count(*) from parked_channels where server_ip='$server_ip'";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="SELECT * from parked_channels where server_ip='$server_ip' and channel_group LIKE \"CL_%\" order by channel_group,parked_time";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		$channel =			sprintf("%-11s", $row[0]);
    -		$server =			sprintf("%-14s", $row[1]);
    -		$channel_group =	sprintf("%-16s", $row[2]);
    -		$park_extension =	sprintf("%-13s", $row[3]);
    -		$parked_by =		sprintf("%-21s", $row[4]);
    -		$parked_time =		sprintf("%-19s", $row[5]);
    -
    -		$G='';   $EG='';
    -		$o=0;
    -		$with_color=0;
    -		while($o < $group_selected)
    -			{
    -				if (eregi("$groupselect[$o]",$channel_group))
    -					{
    -					$G=""; $EG='';
    -					$with_color++;
    -					}
    -				$o++;
    -			}
    -		if ($with_color)
    -			{
    -			if (eregi('CL_GAL',$row[2]))
    -				{
    -				echo "$G$channel$server$channel_group$park_extension                     $parked_time $EG\n";
    -				}
    -			else
    -				{
    -				echo "$G$channel$server$channel_group$park_extension$parked_by$parked_time $EG\n";
    -				}
    -			}
    -#	
    -		$i++;
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "********************************************************************************************** \n";
    -	echo "********************************************************************************************** \n";
    -	echo "*************************************** NO PARKED CALLS ************************************** \n";
    -	echo "********************************************************************************************** \n";
    -	echo "********************************************************************************************** \n";
    -	}
    -
    -echo "  \n\n";
    -echo "looking for calls on these groups:\n";
    -$o=0;
    -while($o < $group_selected)
    -{
    -	$group_print =		sprintf("%-20s", $groupselect[$o]);
    -	echo "             - $group_print\n";
    -	$o++;
    -}
    -
    -
    -$ENDtime = date("U");
    -
    -$RUNtime = ($ENDtime - $STARTtime);
    -
    -echo "
    \n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/closer_dispo.php b/agc_2-X/trunk/LANG_admin/vicidial/closer_dispo.php deleted file mode 100644 index 54e61219..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/closer_dispo.php +++ /dev/null @@ -1,329 +0,0 @@ - LICENSE: GPLv2 -### -# this is the closer disposition screen of a call that has been grabbed. This allows the closer to modify customer information and disposition the call -# CHANGES -# -# 60619-1641 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -VICIDIAL CLOSER: Call Disposition -\n"; -?> - - -
    - - 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from live_channels where server_ip='$server_ip' and channel='" . mysql_real_escape_string($channel) . "' and extension like \"%" . mysql_real_escape_string($extension) . "%\""; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $parked_count = $row[0]; - - if ($parked_count > 0) - { - - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','" . mysql_real_escape_string($server_ip) . "','','Hangup','$DTqueryCID','Channel: " . mysql_real_escape_string($channel) . "','','','','','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Hangup command sent for channel $channel       $NOW_TIME\n

    \n"; - - echo "\n"; - } - else - { - echo "Hangup command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "
    \n"; - } -} -else -{ - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Call information: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Campaign ID: $campaign_id
    Fronter: $tsr     List ID: $list_id
    First Name:   \n"; - echo " Last Name:
    Address 1 :
    Address 2 :
    Address 3 :
    City :
    State:   \n"; - echo " Postal Code:
    Province :
    Country :
    Alt Phone :
    Email :
    Security :
    Comments :
    Disposition:
    \n"; - echo "


    \n"; - - } - else - { - echo "lead lookup FAILED for lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/closer_popup.php b/agc_2-X/trunk/LANG_admin/vicidial/closer_popup.php deleted file mode 100644 index 6c1db90e..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/closer_popup.php +++ /dev/null @@ -1,445 +0,0 @@ - LICENSE: GPLv2 -### -# this is the closer popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system. - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["group_selected"])) {$group_selected=$_GET["group_selected"];} - elseif (isset($_POST["group_selected"])) {$group_selected=$_POST["group_selected"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["groupselect"])) {$groupselect=$_GET["groupselect"];} - elseif (isset($_POST["groupselect"])) {$groupselect=$_POST["groupselect"];} -if (isset($_GET["PHONE_LOGIN"])) {$PHONE_LOGIN=$_GET["PHONE_LOGIN"];} - elseif (isset($_POST["PHONE_LOGIN"])) {$PHONE_LOGIN=$_POST["PHONE_LOGIN"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["debugvars"])) {$debugvars=$_GET["debugvars"];} - elseif (isset($_POST["debugvars"])) {$debugvars=$_POST["debugvars"];} -if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];} - elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - - -#$DB=1; -$US = '_'; -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$REC_TIME = date("Ymd-His"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "VICIDIAL CLOSER: Popup\n"; - -if (eregi('CL_UNIV',$channel_group)) - { - ?> - - \n"; - echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n"; - echo "\n"; - } -?> - - -
    - - 0) -{ - $stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - - #$monitor_channel = eregi_replace('Zap/', "", $channel); - $monitor_channel = eregi_replace('-1', "", $channel); - $SIPexten = $extension; - $filename = "$REC_TIME$US$SIPexten"; - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - -# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: $monitor_channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - -# $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$monitor_channel','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - -# $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; -# $rslt=mysql_query($stmt, $link); -# if ($DB) {echo "$stmt\n";} -# $row=mysql_fetch_row($rslt); -# $recording_id = $row[0]; - -# echo "Recording command sent for channel $channel - $filename - $recording_id
    \n"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: $channel','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for channel $channel       $NOW_TIME\n

    \n"; - - $stmt="SELECT full_name from vicidial_users where user='$parked_by'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - echo "Call Referred by: $parked_by - $full_name\n

    \n"; - - $url = "http://10.10.10.196/vicidial/closer_dispo.php?lead_id=$parked_by&channel=$channel&server_ip=$server_ip&extension=$extension&call_began=$STARTtime&parked_time=$parked_time&DB=$DB"; - - echo "View Customer Info and Disposition Call\n

    \n"; - - - - $stmt="UPDATE park_log set grab_time='$NOW_TIME',status='TALKING',extension='$extension',user='$PHP_AUTH_USER' where parked_time='$parked_time' and server_ip='$server_ip' and channel='$channel'"; - if ($DB) {echo "|$stmt|\n";} - $fp = fopen ("./closer_SQL_updates.txt", "a"); - fwrite ($fp, "$date|$PHP_AUTH_USER|$stmt|\n"); - fclose($fp); - - - $rslt=mysql_query($stmt, $link); - -########################################################################################### -####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX -########################################################################################### -if (eregi('CL_TEST',$channel_group)) - { - echo "GALLERIA TEST CLOSER GROUP: $channel_group\n"; - - $stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $fronter=$row[0]; - $search_phone=$row[1]; - - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - -- INTERNAL CALL GALLERIA FRONT --
    \n"; - $group_color='#99FF99'; - } - if (eregi('CL_GALLER2',$channel_group)) - { - echo "
    -- TouchAsia CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - if (eregi('CL_GALLER3',$channel_group)) - { - echo "
    -- DebitSupplies CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - if (eregi('CL_GALLER4',$channel_group)) - { - echo "
    -- Vishnu CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    New Search
    Reservation Number:
    Confirmation #:
    Phone #:


    Back
    - -
    - - - Close this window\n

    \n"; -} -else -{ - echo "Redirect command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/count.htm b/agc_2-X/trunk/LANG_admin/vicidial/count.htm deleted file mode 100644 index 51f8a361..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/count.htm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/dbconnect.php b/agc_2-X/trunk/LANG_admin/vicidial/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/group_hourly_stats.php b/agc_2-X/trunk/LANG_admin/vicidial/group_hourly_stats.php deleted file mode 100644 index b7eb1b31..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/group_hourly_stats.php +++ /dev/null @@ -1,252 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1014 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["date_with_hour"])) {$date_with_hour=$_GET["date_with_hour"];} - elseif (isset($_POST["date_with_hour"])) {$date_with_hour=$_POST["date_with_hour"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$date_with_hour_default = date("Y-m-d H"); -$date_no_hour_default = $TODAY; - -if (!isset($date_with_hour)) {$date_with_hour = $date_with_hour_default;} - $date_no_hour = $date_with_hour; - $date_no_hour = eregi_replace(" ([0-9]{2})",'',$date_no_hour); -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - -# $stmt="SELECT full_name from vicidial_users where user='$user';"; -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: Group Hourly Stats -\n"; -?> - - -
    - - - - - -= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDtotal[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_no_hour) . " 00:00:00' and call_date <= '" . mysql_real_escape_string($date_no_hour) . " 23:59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDday[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDcount[$o] = "$row[0]"; - $o++; - } - -echo "
      VICIDIAL ADMIN: Group Hourly Stats  
    \n"; - -echo "
    \n"; - -echo "TSR HOUR COUNTS: $group | $status | $date_with_hour | $date_no_hour\n"; - -echo "
    \n"; -echo "\n"; - - $day_calls=0; - $hour_calls=0; - $total_calls=0; - $o=0; - while($o < $tsrs_to_print) - { - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $VDtotal[$o]); - $hour_calls = ($hour_calls + $VDcount[$o]); - $day_calls = ($day_calls + $VDday[$o]); - - $o++; - } - -echo "\n"; - - -} - -echo "
    TSR ID   $status   TOTAL CALLS   $status DAY    
    $VDuser[$o] $VDname[$o] $VDcount[$o] $VDtotal[$o] $VDday[$o]MODIFY | STATS
    TOTAL $status $hour_calls $total_calls $day_calls
    \n"; -echo "

    \n"; - - - echo "
    Please enter the group you want to get hourly stats for:
    \n"; - echo "\n"; - echo "group:
    \n"; - echo "status:   (example: XFER)
    \n"; - echo "date with hour:   (example: 2004-06-25 14)
    \n"; - echo "\n"; - echo "


    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/help.gif b/agc_2-X/trunk/LANG_admin/vicidial/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/vicidial/listloader.php b/agc_2-X/trunk/LANG_admin/vicidial/listloader.php deleted file mode 100644 index 920505a8..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/listloader.php +++ /dev/null @@ -1,698 +0,0 @@ - LICENSE: GPLv2 -# -# AST Web GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1006 - added listID override and gmt_offset lookup while loading -# 60619-1652 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12'; -$build = '60619-1652'; - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -$submit_file=$_GET["submit_file"]; if (!$submit_file) {$submit_file=$_POST["submit_file"];} -$list_id_override=$_GET["list_id_override"]; if (!$list_id_override) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - - -#$DB=1; -#$DBX=1; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('listloader.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"HELP\""; - - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -?> - - - - - - method=post enctype="multipart/form-data"> -
    - - - - - - - - - - - - - -
    Load leads from this file:
    List ID Override: (numbers only or leave blank for values in the file)
    CLICK HERE TO GO TO THE SUPER LEAD LOADER (BETA VERSION)     BACK TO ADMIN
    - -document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - $pulldate=date("Y-m-d H:i:s"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("./vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Processing $delim_name-delimited file... ($tab_count|$pipe_count)\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city = $row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) - { - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $gmt_offset = '0'; - $called_since_last_reset='N'; - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =='1') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### MEXICO ### - if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### AUSTRALIA ### - if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - print ""; -} else if (filesize($leadfile)>8388608) { - print "
    ERROR: File exceeds the 8MB limit.
    "; -} -?> - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/listloader.pl b/agc_2-X/trunk/LANG_admin/vicidial/listloader.pl deleted file mode 100644 index 753c31f7..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/listloader.pl +++ /dev/null @@ -1,690 +0,0 @@ -#!/usr/bin/perl - -### listloader.pl -### -### Copyright (C) 2006 Matt Florell,Joe Johnson LICENSE: GPLv2 -### -# -# -# CHANGES -# 60616-1548 - Added listID override feature to force all leads into same list -# - Added gmt_offset_now lookup for each lead -# - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help|-h/i) - { - print "allowed run time options:\n [-forcelistid=1234] = overrides the listID given in the file with the 1234\n [-h] = this help screen\n\n"; - } - else - { - if ($args =~ /--forcelistid=/i) - { - @data_in = split(/--forcelistid=/,$args); - $forcelistid = $data_in[1]; - print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n"; - } - else - {$forcelistid = '';} - } -} -### end parsing run-time options ### - - -use Spreadsheet::ParseExcel; -use Time::Local; -use Net::MySQL; - -### Make sure this file is in a libs path or put the absolute path to it -require("/home/cron/AST_SERVER_conf.pl"); # local configuration file - -if (!$DB_port) {$DB_port='3306';} - -$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") - or die "Couldn't connect to database: $DB_server - $DB_database\n"; - - -$|=0; -$secX = time(); - -($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); -$year = ($year + 1900); -$mon++; -if ($hour < 10) {$hour = "0$hour";} -if ($min < 10) {$min = "0$min";} -if ($sec < 10) {$sec = "0$sec";} -if ($mon < 10) {$mon = "0$mon";} -if ($mday < 10) {$mday = "0$mday";} -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$pulldate="$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $DBSERVER_GMT = "$record->[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - } - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -if ($isdst) {$LOCAL_GMT_OFF++;} -if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - - -$total=0; $good=0; $bad=0; -print "
    Processing Excel file...\n"; -open(STMT_FILE, "> listloader_stmts.txt"); - -$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls"); -my($iR, $iC, $oWkS, $oWkC); - -foreach $oWkS (@{$oBook->{Worksheet}}) { - for($iR = 0 ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) { - - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $oWkC = $oWkS->{Cells}[$iR][0]; - if ($oWkC) {$vendor_lead_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][1]; - if ($oWkC) {$source_code=$oWkC->Value; } - $source_id=$source_code; - $oWkC = $oWkS->{Cells}[$iR][2]; - if ($oWkC) {$list_id=$oWkC->Value; } - $gmt_offset = '0'; - $called_since_last_reset='N'; - $oWkC = $oWkS->{Cells}[$iR][3]; - if ($oWkC) {$phone_code=$oWkC->Value; } - $phone_code=~s/[^0-9]//g; - $oWkC = $oWkS->{Cells}[$iR][4]; - if ($oWkC) {$phone_number=$oWkC->Value; } - $phone_number=~s/[^0-9]//g; - $USarea = substr($phone_number, 0, 3); - $oWkC = $oWkS->{Cells}[$iR][5]; - if ($oWkC) {$title=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][6]; - if ($oWkC) {$first_name=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][7]; - if ($oWkC) {$middle_initial=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][8]; - if ($oWkC) {$last_name=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][9]; - if ($oWkC) {$address1=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][10]; - if ($oWkC) {$address2=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][11]; - if ($oWkC) {$address3=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][12]; - if ($oWkC) {$city=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][13]; - if ($oWkC) {$state=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][14]; - if ($oWkC) {$province=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][15]; - if ($oWkC) {$postal_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][16]; - if ($oWkC) {$country=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][17]; - if ($oWkC) {$gender=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][18]; - if ($oWkC) {$date_of_birth=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][19]; - if ($oWkC) {$alt_phone=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][20]; - if ($oWkC) {$email=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][21]; - if ($oWkC) {$security_phrase=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][22]; - if ($oWkC) {$comments=$oWkC->Value; } - $comments=~s/^\s*(.*?)\s*$/$1/; - - if (length($phone_number)>8) { - if (length($forcelistid) > 0) - { - $list_id = $forcelistid; # set list_id to override value - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =~ /^1$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### MEXICO ### - if ($phone_code =~ /^52$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### AUSTRALIA ### - if ($phone_code =~ /^61$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = ($secX + (3600 * $AC_GMT_diff)); - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($AC_localtime); - $year = ($year + 1900); - $mon++; - if ($mon < 10) {$mon = "0$mon";} - if ($mday < 10) {$mday = "0$mday";} - if ($hour < 10) {$hour = "0$hour";} - if ($min < 10) {$min = "0$min";} - if ($sec < 10) {$sec = "0$sec";} - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) && ($dst_range =~ /FSA-LSO/) ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - &USA_dstcalc; - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /LSM-LSO/) ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - &GBR_dstcalc; - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /LSO-LSM/) ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - &AUS_dstcalc; - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /FSO-LSM/) ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - &AUST_dstcalc; - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - &NZL_dstcalc; - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $dbhA->query("$stmtZ"); - print STMT_FILE $stmtZ."\r\n"; - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - sleep(1); -# flush(); - } - } -} - -if ($multi_insert_counter > 0) { - $stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";"; - $dbhA->query("$stmtZ"); - print STMT_FILE $stmtZ."\r\n"; -} - -print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - -exit; - - - - - - -sub USA_dstcalc { -#********************************************************************** -# FSA-LSO -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on first Sunday in April and last Sunday in October at 2 am. -# INPUTS: -# mm INTEGER Month. -# dd INTEGER Day of the month. -# ns INTEGER Seconds into the day. -# dow INTEGER Day of week (0=Sunday, to 6=Saturday) -# OPTIONAL INPUT: -# timezone INTEGER hour difference UTC - local standard time -# (DEFAULT is blank) -# make calculations based on UTC time, -# which means shift at 10:00 UTC in April -# and 9:00 UTC in October -# OUTPUT: -# INTEGER 1 = DST, 0 = not DST -#********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; return 0; - } elsif ($mm >= 5 && $mm <= 9) { - $USA_DST=1; return 1; - } elsif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $USA_DST=0; return 0; - } else { - $USA_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 7200) { - $USA_DST=0; return 0; - } else { - $USA_DST=1; return 1; - } - } - } else { - $USA_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $USA_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; return 1; - } else { - $USA_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; return 1; - } else { - $USA_DST=0; return 0; - } - } - } else { - $USA_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - -sub GBR_dstcalc { -#********************************************************************** -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on last Sunday in March and last Sunday in October at 1 am. -#********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; return 0; - } elsif ($mm >= 4 && $mm <= 9) { - $GBR_DST=1; return 1; - } elsif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; return 0; - } elsif ($dd < ($dow+25)) { - $GBR_DST=0; return 0; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; return 0; - } else { - $GBR_DST=1; return 1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; return 0; - } else { - $GBR_DST=1; return 1; - } - } - } else { - $GBR_DST=1; return 1; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $GBR_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; return 1; - } else { - $GBR_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; return 1; - } else { - $GBR_DST=0; return 0; - } - } - } else { - $GBR_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - -sub AUS_dstcalc { -#********************************************************************** -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on last Sunday in October and last Sunday in March at 1 am. -#********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $AUS_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $AUS_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; return 1; - } else { - $AUS_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; return 1; - } else { - $AUS_DST=0; return 0; - } - } - } else { - $AUS_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; return 0; - } elsif ($dd < ($dow+25)) { - $AUS_DST=0; return 0; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; return 0; - } else { - $AUS_DST=1; return 1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; return 0; - } else { - $AUS_DST=1; return 1; - } - } - } else { - $AUS_DST=1; return 1; - } - } # end of month checks -} # end of subroutine dstcalc - - - - - -sub AUST_dstcalc { -#********************************************************************** -# TASMANIA ONLY -# 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 last Sunday in March at 1 am. -#********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $AUST_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $AUST_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; return 1; - } else { - $AUST_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; return 1; - } else { - $AUST_DST=0; return 0; - } - } - } else { - $AUST_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $AUST_DST=0; return 0; - } else { - $AUST_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 3600) { - $AUST_DST=0; return 0; - } else { - $AUST_DST=1; return 1; - } - } - } else { - $AUST_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - - -sub NZL_dstcalc { -#********************************************************************** -# 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 third Sunday in March at 1 am. -#********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $NZL_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; return 1; - } elsif ($dd < ($dow+14)) { - $NZL_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; return 1; - } else { - $NZL_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; return 1; - } else { - $NZL_DST=0; return 0; - } - } - } else { - $NZL_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $NZL_DST=0; return 0; - } else { - $NZL_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 3600) { - $NZL_DST=0; return 0; - } else { - $NZL_DST=1; return 1; - } - } - } else { - $NZL_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc diff --git a/agc_2-X/trunk/LANG_admin/vicidial/listloaderMAIN.php b/agc_2-X/trunk/LANG_admin/vicidial/listloaderMAIN.php deleted file mode 100644 index 67ee25bc..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/listloaderMAIN.php +++ /dev/null @@ -1,79 +0,0 @@ - LICENSE: GPLv2 -# -# this is the main frame page for the lead loading section. This is where you -# would upload a file and have it inserted into vicidial_list -# -# changes: -# 60620-1149 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - -VICIDIAL: Lead Loader Module - - - - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/listloader_rowdisplay.pl b/agc_2-X/trunk/LANG_admin/vicidial/listloader_rowdisplay.pl deleted file mode 100644 index ca0da8c5..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/listloader_rowdisplay.pl +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/perl -use Spreadsheet::ParseExcel; -use Time::Local; -use Net::MySQL; - -### Make sure this file is in a libs path or put the absolute path to it -require("/home/cron/AST_SERVER_conf.pl"); # local configuration file - -if (!$DB_port) {$DB_port='3306';} - -$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") - or die "Couldn't connect to database: $DB_server - $DB_database\n"; - - -$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls"); -my($iR, $iC, $oWkS, $oWkC); -$var_str=""; - -foreach $oWkS (@{$oBook->{Worksheet}}) { - for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) { - $oWkC = $oWkS->{Cells}[0][$iC]; - if ($oWkC) { - $var_str.=$oWkC->Value."|"; - } else { - $var_str.="|"; - } - } -} - -@xls_row=split(/\|/, $var_str); - - -$dbhA->query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1"); - -if ($dbhA->has_selected_record) { - $rslt = $dbhA->create_record_iterator(); - my @row = $rslt->get_field_names(); - for ($i=0; $i\r\n"; - print "
    ".$field_name.": \r\n"; - print " \r\n"; - print "
    - - - - - - - - - - - - - - - - - -
    Load leads from this file:
    List ID Override: (numbers only or leave blank for values in the file)
    File layout to use:Standard VICIDIAL    Custom layout
            
    CLICK HERE TO GO TO THE BASIC LEAD LOADER         BACK TO ADMIN
    SUPER LIST LOADER-     VERSION:     BUILD:
    - - -document.forms[0].leadfile.disabled=true;document.forms[0].list_id_override.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - $total=0; $good=0; $bad=0; - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Processing $delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - print "
    Processing Excel file... \n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    \n"; - } - # print "$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field"; - passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override"); - } else { - # copy($leadfile, "./vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - } - print ""; - } - -if ($leadfile && filesize($LF_path)<=8388608) { - $total=0; $good=0; $bad=0; - if ($file_layout=="standard") { - - print ""; - flush(); - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Processing $delim_name-delimited file... ($tab_count|$pipe_count)\n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } - print ""; - - } else { - print "
    "; - flush(); - print "\r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - - $rslt=mysql_query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1", $link); - - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Processing $delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - $total=0; $good=0; $bad=0; - $row=fgetcsv($file, 1000, ","); - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print "
    VICIDIAL ColumnFile data
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
            
    \r\n"; - # } - print ""; - } -} else if (filesize($leadfile)>8388608) { - print "
    ERROR: File exceeds the 8MB limit.
    "; -} -?> - - - - - - - - - 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### MEXICO ### -if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### AUSTRALIA ### -if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### ALL OTHER COUNTRY CODES ### -if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - -### Find out if DST to raise the gmt offset ### -$AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); -$AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - -$AC_processed=0; -if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } -if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - -return $gmt_offset; -} \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/record_conf_1_hour.php b/agc_2-X/trunk/LANG_admin/vicidial/record_conf_1_hour.php deleted file mode 100644 index 59ae1f09..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/record_conf_1_hour.php +++ /dev/null @@ -1,156 +0,0 @@ - LICENSE: GPLv2 -### -# grab: $server_ip $station $session_id -# -# CHANGES -# -# 60620-1011 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["station"])) {$station=$_GET["station"];} - elseif (isset($_POST["station"])) {$station=$_POST["station"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["NEW_RECORDING"])) {$NEW_RECORDING=$_GET["NEW_RECORDING"];} - elseif (isset($_POST["NEW_RECORDING"])) {$NEW_RECORDING=$_POST["NEW_RECORDING"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$MYSQL_datetime = date("Y-m-d H:i:s"); -$FILE_datetime = date("Ymd-His_"); -$secX = $STARTtime; - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL RECORD CONFERENCE: 1 hour -\n"; -?> - - -
    - - 8) && (strlen($session_id) > 3) && (strlen($station) > 3) ) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $conf_silent_prefix = '7'; - $ext_context = 'demo'; - - $stmt="INSERT INTO vicidial_manager values('','','$MYSQL_datetime','NEW','N','" . mysql_real_escape_string($server_ip) . "','','Originate','RB$FILE_datetime" . mysql_real_escape_string($station) . "','Channel: $local_DEF$conf_silent_prefix" . mysql_real_escape_string($session_id) . "$local_AMP$ext_context','Context: $ext_context','Exten: 8309','Priority: 1','Callerid: $FILE_datetime" . mysql_real_escape_string($station) . "','','','','','')"; - echo "|$stmt|\n

    \n"; - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('" . mysql_real_escape_string($session_id) . "','" . mysql_real_escape_string($server_ip) . "','" . mysql_real_escape_string($station) . "','$MYSQL_datetime','$secX','$FILE_datetime" . mysql_real_escape_string($station) . "')"; - echo "|$stmt|\n

    \n"; - $rslt=mysql_query($stmt, $link); - - echo "Recording started\n

    \n"; - echo "Back to main recording screen\n

    \n"; - } - else - { - echo "ERROR!!!! Not all info entered properly\n

    \n"; - echo "|$server_ip| |$session_id| |$station|\n

    \n"; - echo "Back to main recording screen\n

    \n"; - } -} -else -{ -echo "
    Start recording a conference for 1 hour:
    \n"; -echo "\n"; -echo "server_ip: | \n"; -echo "session_id: | \n"; -echo "station: | \n"; -echo "\n"; -echo "


    \n"; - - - -} -?> - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/remote_dispo.php b/agc_2-X/trunk/LANG_admin/vicidial/remote_dispo.php deleted file mode 100644 index da249fba..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/remote_dispo.php +++ /dev/null @@ -1,327 +0,0 @@ - LICENSE: GPLv2 -### -# this is the remote agent disposition screen for calls sent to remote agents. This allows the remote agent to modify customer information and disposition the call - -# CHANGES -# -# 60619-1626 - Added variable filtering to eliminate SQL injection attack threat -# - - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - -$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 > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -VICIDIAL REMOTE: Call Disposition -\n"; -?> - - -
    - -"; - -if ($end_call > 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="UPDATE vicidial_closer_log set end_epoch='$STARTtime', length_in_sec='" . mysql_real_escape_string($call_length) . "', status='" . mysql_real_escape_string($status) . "', user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by start_epoch desc limit 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "',user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Call has been dispositioned       $NOW_TIME\n

    \n"; - - echo "\n"; - -} -else -{ - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Call information: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Campaign ID: $campaign_id
    Fronter: $tsr     List ID: $list_id
    First Name:   \n"; - echo " Last Name:
    Address 1 :
    Address 2 :
    Address 3 :
    City :
    State:   \n"; - echo " Postal Code:
    Province :
    Country :
    Alt Phone :
    Email :
    Security :
    Comments :
    Disposition:
    \n"; - echo "


    \n"; - - } - else - { - echo "lead lookup FAILED for lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/server_stats.php b/agc_2-X/trunk/LANG_admin/vicidial/server_stats.php deleted file mode 100644 index a427f5c0..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/server_stats.php +++ /dev/null @@ -1,96 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1037 - Added Link back to Admin section -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select * from servers;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$servers_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $servers_to_print) - { - $row=mysql_fetch_row($rslt); - $server_id[$i] = $row[0]; - $server_description[$i] = $row[1]; - $server_ip[$i] = $row[2]; - $active[$i] = $row[3]; - $i++; - } -?> - - - - - -VICIDIAL: Server Stats and Reports -VICIDIAL: Server Stats and Reports                           -BACK TO ADMIN

    - - -
    
    -
    - $o)
    -	{
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	$o++;
    -	}
    -
    -?>
    -
    SERVERDESCRIPTIONIP ADDRESSACTIVEVDAD timeVDcall timePARK timeCLOSER/INBOUND time
    $server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINKLINK
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/test.txt b/agc_2-X/trunk/LANG_admin/vicidial/test.txt deleted file mode 100644 index 70c379b6..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/test.txt +++ /dev/null @@ -1 +0,0 @@ -Hello world \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial/user_stats.php b/agc_2-X/trunk/LANG_admin/vicidial/user_stats.php deleted file mode 100644 index bdada227..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/user_stats.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1743 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: User Stats -\n"; -?> - - -
    - - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Stats for  
      \n"; - -echo "
    \n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_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' group by status order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - -echo "
    \n"; - -echo "TALK TIME AND STATUS:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from vicidial_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'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - -echo "\n"; -echo "
    STATUSCOUNTHOURS:MINUTES
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    TOTAL CALLS $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "LOGIN/LOGOUT TIME:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT event,event_epoch,event_date,campaign_id from vicidial_user_log where user='" . mysql_real_escape_string($user) . "' and event_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("LOGIN", $row[0])) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if (ereg("LOGIN", $row[0])) - { - $event_start_seconds = $row[1]; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - if (ereg("LOGOUT", $row[0])) - { - if ($event_start_seconds) - { - $event_stop_seconds = $row[1]; - $event_seconds = ($event_stop_seconds - $event_start_seconds); - $total_login_time = ($total_login_time + $event_seconds); - $event_hours = ($event_seconds / 3600); - $event_hours = round($event_hours, 2); - $event_hours_int = intval("$event_hours"); - $event_minutes = ($event_hours - $event_hours_int); - $event_minutes = ($event_minutes * 60); - $event_minutes_int = round($event_minutes, 0); - if ($event_minutes_int < 10) {$event_minutes_int = "0$event_minutes_int";} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - $event_start_seconds=''; - $event_stop_seconds=''; - } - else - { - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - } - - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - -$total_login_hours = ($total_login_time / 3600); -$total_login_hours = round($total_login_hours, 2); -$total_login_hours_int = intval("$total_login_hours"); -$total_login_minutes = ($total_login_hours - $total_login_hours_int); -$total_login_minutes = ($total_login_minutes * 60); -$total_login_minutes_int = round($total_login_minutes, 0); -if ($total_login_minutes_int < 10) {$total_login_minutes_int = "0$total_login_minutes_int";} - -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "
    EVENT DATE CAMPAIGNHOURS:MINUTES
    $row[0] $row[2] $row[3]
    $row[0] $row[2] $row[3] $event_hours_int:$event_minutes_int
    $row[0] $row[2] $row[3]
    TOTAL $total_login_hours_int:$total_login_minutes_int
    \n"; - - -echo "

    \n"; - -echo "
    \n"; - -echo "LAST 50 CALLS:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where user='" . mysql_real_escape_string($user) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS PHONE CAMPAIGN LIST LEAD
    $row[4] $row[7] $row[8] $row[10] $row[3] $row[2] $row[1]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/user_status.php b/agc_2-X/trunk/LANG_admin/vicidial/user_status.php deleted file mode 100644 index 8efe670f..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/user_status.php +++ /dev/null @@ -1,238 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1738 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,change_agent_campaign from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $change_agent_campaign=$row[1]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $agents_to_print = mysql_num_rows($rslt); - $i=0; - while ($i < $agents_to_print) - { - $row=mysql_fetch_row($rslt); - $Aserver_ip = $row[2]; - $Asession_id = $row[3]; - $Aextension = $row[4]; - $Astatus = $row[5]; - $Acampaign = $row[7]; - $Alast_call = $row[14]; - $Acl_campaigns = $row[15]; - $i++; - } - - } - -$stmt="select * from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - - - -?> - - -VICIDIAL ADMIN: User Status -\n"; -?> - - -
    -
    - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Status for  
      \n"; - -if ($stage == "live_campaign_change") -{ - $stmt="UPDATE vicidial_live_agents set campaign_id='" . mysql_real_escape_string($group) . "' where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name changed to $group campaign
    \n"; - - exit; -} - -if ($stage == "log_agent_out") -{ - $stmt="DELETE from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name has been emergency logged out, make sure they close their web browser
    \n"; - - exit; -} - -if ($agents_to_print > 0) -{ - echo "
    ";
    -	echo "Agent Logged in at server:  $Aserver_ip\n";
    -	echo "               in session:  $Asession_id\n";
    -	echo "               from phone:  $Aextension\n";
    -	echo "Agent is in campaign:       $Acampaign\n";
    -	echo "              status:       $Astatus\n";
    -	echo " hungup last call at:       $Alast_call\n";
    -	echo "       Closer groups:       $Acl_campaigns\n\n";
    -
    -	echo "
    "; - - - if ($change_agent_campaign > 0) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "Current Campaign: \n"; - echo "
    \n"; - - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - } -} - -else -{ - echo "Agent is not logged in\n
    "; - -} - - -echo "           $user - $full_name - \n"; - -echo "VICIDIAL Time Sheet\n"; - -echo "
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - -echo "|$stage|$group|"; - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial/vdremote.php b/agc_2-X/trunk/LANG_admin/vicidial/vdremote.php deleted file mode 100644 index dfe11fa3..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial/vdremote.php +++ /dev/null @@ -1,602 +0,0 @@ - LICENSE: GPLv2 -# -# Changes -# 50307-1721 - First version -# 51123-1502 - removed requirement of PHP Globals=on -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1603 - Added variable filtering to eliminate SQL injection attack threat -# -# make sure you have added a user to the vicidial_users MySQL table with at least user_level 4 to access this page the first time - -$version = '1.1.12'; -$build = '60619-1603'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($force_logout)) {$force_logout = 0;} - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -$popup_page = './closer_popup.php'; -$STARTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - - $stmt="SELECT count(*) from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $authx=$row[0]; - - if($authx>0) - { - $stmt="SELECT remote_agent_id,server_ip,number_of_lines from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id=$row[0]; - $server_ip=$row[1]; - if (!$number_of_lines) {$number_of_lines=$row[2];} - - fwrite ($fp, "VDremote|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - echo "This remote agent does not exist: |$PHP_AUTH_USER|\n"; - exit; - } - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -if ($ADD==61111) - { - echo"\n"; - } -echo "\n"; -?> - -VICIDIAL REMOTE AGENTS: $LOGfullname - $PHP_AUTH_USER "; - -if (!$ADD) {$ADD="31111";} -if ($ADD==31111) {echo "Modify Remote Agents";} -if ($ADD==41111) {echo "Modify Remote Agents";} -if ($ADD==61111) {echo "Remote Agent Status";} -if ($ADD==71111) {echo "Remote Agent Closer Stats";} - - -if (strlen($ADD)>4) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "2) {$groups_value .= " -";} - } - -?> - - - -
    -
    - - - -
      VICIDIAL REMOTE AGENTS:   Logout  
      MODIFY | ">STATUS | ">INBOUND STATS
    -"; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: $user_start
    Number of Lines: (numbers only)
    Server IP: $row[3]
    External Extension: (number dialed to reach agents [i.e. 913125551212])
    Status:
    Campaign: $campaign_id
    Inbound Groups: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($number_of_lines) < 1) or (strlen($conf_exten) < 2) ) - {echo "
    REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - $stmt="UPDATE vicidial_remote_agents set number_of_lines='" . mysql_real_escape_string($number_of_lines) . "', conf_exten='" . mysql_real_escape_string($conf_exten) . "', status='" . mysql_real_escape_string($status) . "', closer_campaigns='" . mysql_real_escape_string($groups_value) . "' where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - -# echo "$stmt\n"; - echo "
    REMOTE AGENTS MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - - } - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: $user_start
    Number of Lines: (numbers only)
    Server IP: $row[3]
    External Extension: (number dialed to reach agents [i.e. 913125551212])
    Status:
    Campaign: $campaign_id
    Inbound Groups: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - - - -###################### -# ADD=61111 status of remote agent in the system and active calls and queue -###################### - -if ($ADD==61111) -{ - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    REMOTE AGENTS ERROR - Please go back and look at the data you entered\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'" . mysql_real_escape_string($nextuser) . "',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - echo "VICIDIAL: Remote Agent Time On Calls $NOW_TIME\n\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo "| STATION | USER | LEADID | CHANNEL | STATUS | START TIME | MINUTES |\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select extension,user,lead_id,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' and user IN($users_list) order by extension;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $leadlink=0; - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[3]=''; - $row[5]=' - WAITING - '; - $row[6]=$row[7]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $leadid = sprintf("%-12s", $row[2]); - if ($row[2] > 0) - { - $leadidLINK=$row[2]; - $leadlink++; - if ( eregi("QUEUE",$row[4]) ) {$row[6]=$STARTtime;} - $leadid = "$leadid"; - } - $channel = sprintf("%-10s", $row[3]); - $cc=0; - while ( (strlen($channel) > 10) and ($cc < 100) ) - { - $channel = eregi_replace(".$","",$channel); - $cc++; - if (strlen($channel) <= 10) {$cc=101;} - } - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = ($STARTtime - $row[6]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} - if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$extension$EG | $G$user$EG | $G$leadid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo " $i agents logged in on server $server_ip\n\n"; - - echo " - 5 minutes or more on call\n"; - echo " - Over 10 minutes on call\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "********************************* NO AGENTS ON CALLS *********************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - -###################### -# ADD=71111 stats for remote agents from closer logs(vicidial_closer_log) -###################### - -if ($ADD==71111) -{ - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n\n"; - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    REMOTE AGENTS ERROR - Please go back and look at the data you entered\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'$nextuser',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - $stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list);"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $in_calls = $row[0]; - $in_time = $row[1]; - $in_time_M = ($in_time / 60); - $in_time_M = round($in_time_M, 2); - $in_time_M_int = intval("$in_time_M"); - $in_time_SEC = ($in_time_M - $in_time_M_int); - $in_time_SEC = ($in_time_SEC * 60); - $in_time_SEC = round($in_time_SEC, 0); - if ($in_time_SEC < 10) {$in_time_SEC = "0$in_time_SEC";} - $in_time_MS = "$in_time_M_int:$in_time_SEC"; - $in_time_MS = sprintf("%7s", $in_time_MS); - - echo "VICIDIAL: Remote Agent inbound stats $NOW_TIME\n\n"; - echo "\n"; - echo "Total calls taken $query_date: $in_calls\n"; - echo "Total talk time on $query_date: $in_time_MS (minutes:seconds)\n"; - echo "\n"; - echo "\n"; - echo "Call list for $query_date:\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - echo "| USER | LEADID | GROUP | PHONE NUM | STATUS | CALL TIME | MINUTES |\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select user,lead_id,campaign_id,phone_number,status,call_date,length_in_sec from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list) order by call_date;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - $user = sprintf("%-8s", $row[0]); - $leadid = sprintf("%-10s", $row[1]); - $group = sprintf("%-14s", $row[2]); - $phone = sprintf("%-10s", $row[3]); - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = $row[6]; - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - # if ($call_time_M_int >= 5) {$G=''; $EG='';} - # if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$user$EG | $G$leadid$EG | $G$group$EG | $G$phone$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - # echo " $i agents logged in on server $server_ip\n\n"; - - # echo " - 5 minutes or more on call\n"; - # echo " - Over 10 minutes on call\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "********************************* NO CALLS ON THIS DAY *******************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_CLOSERstats.php deleted file mode 100644 index e96e2319..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_CLOSERstats.php +++ /dev/null @@ -1,396 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1714 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select group_id from vicidial_inbound_groups;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Genauerer Notfall\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           ÄNDERN Sie | REPORTS \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "WÄHLEN Sie BITTE Eine KAMPAGNE Vor UND DATUM OBEN UND KLICKEN REICHTEin\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Automobil-Vorwahlknopf Genauerer Notfall                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Gesamtanrufe gesetzt von dieser Kampagne:                       $TOTALcalls\n";
    -echo "Durchschnittliche Anruf-Länge für alle benennt in den Sekunden: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Gesamt-TROPFEN Anrufe:                                          $DROPcalls  $DROPpercent%\n";
    -echo "Durchschnittliche Länge für TROPFEN Anrufe in den Sekunden:     $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| BENUTZER | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='$group';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "DIAGRAMM IN 15 MINUZIÖSEN STUFENSPRÜNGEN DER GESAMTANRUFE GESETZTVON DIESER KAMPAGNE\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_VDADstats.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_VDADstats.php deleted file mode 100644 index 67764a49..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_VDADstats.php +++ /dev/null @@ -1,417 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1718 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           ÄNDERN Sie | REPORTS \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "WÄHLEN Sie BITTE Eine KAMPAGNE Vor UND DATUM OBEN UND KLICKEN REICHTEin\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Stats                             $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Gesamtanrufe gesetzt von dieser Kampagne:                       $TOTALcalls\n";
    -echo "Durchschnittliche Anruf-Länge für alle benennt in den Sekunden: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Gesamt-TROPFEN Anrufe:                                          $DROPcalls  $DROPpercent%\n";
    -echo "Durchschnittliche Länge für TROPFEN Anrufe in den Sekunden:     $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "----------AUTO-DIAL KEINE ANTWORTEN\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$NAcalls =	sprintf("%10s", $row[0]);
    -$NApercent = (($NAcalls / $TOTALcalls) * 100);
    -$NApercent = round($NApercent, 0);
    -
    -$average_na_seconds = ($row[1] / $row[0]);
    -$average_na_seconds = round($average_na_seconds, 0);
    -$average_na_seconds =	sprintf("%10s", $average_na_seconds);
    -
    -echo "Gesamt-Na benennt - beschäftigt, Trennung, BTvoicemail:         $NAcalls  $NApercent%\n";
    -echo "Durchschnittliche Anruf-Länge für Na benennt in den Sekunden:   $average_na_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| BENUTZER | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "DIAGRAMM IN 15 MINUZIÖSEN STUFENSPRÜNGEN DER GESAMTANRUFE GESETZTVON DIESER KAMPAGNE\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_VICIDIAL_hopperlist.php deleted file mode 100644 index f6b51205..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_VICIDIAL_hopperlist.php +++ /dev/null @@ -1,161 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1654 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.10.15';} - -$stmt="select campaign_id,campaign_name from vicidial_campaigns order by campaign_id;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $campaign_id[$i] =$row[0]; - $campaign_name[$i] =$row[1]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Zufuhrbehälter-Liste\n"; -echo "
    \n"; -#echo "\n"; -#echo "\n"; -echo "\n"; -echo "\n"; -echo "           ÄNDERN Sie \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "WÄHLEN Sie BITTE Eine KAMPAGNE OBEN Vor UND KLICKEN REICHT Ein\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Gegenwärtige Zufuhrbehälter-Lebhaftliste                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -
    -echo "Gesamtleitungen im Zufuhrbehälter im Augenblick:       $TOTALcalls\n";
    -
    -
    -##############################
    -#########  LEAD STATS
    -
    -echo "\n";
    -echo "---------- LEADS IN HOPPER\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$FMT_i =		sprintf("%-4s", $i);
    -	$lead_id =		sprintf("%-9s", $row[0]);
    -	$phone_number =	sprintf("%-10s", $row[1]);
    -	$state =		sprintf("%-5s", $row[2]);
    -	$status =		sprintf("%-6s", $row[3]);
    -	$count =		sprintf("%-5s", $row[4]);
    -	$gmt =			sprintf("%-6s", $row[5]);
    -
    -	echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_admin_log_display.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_admin_log_display.php deleted file mode 100644 index c9fad01a..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_admin_log_display.php +++ /dev/null @@ -1,118 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$query_date = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$query_date); - -# AST GUI database administration -# AST_admin_log_display.php -# -# CHANGES -# 50325-0932 - First build -# 51123-1443 - removed globals=on requirement -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1044 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '0.0.4'; -$build = '60620-1044'; - -$STARTtime = date("U"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN LOG DISPLAY"; -echo "\n"; - -# Fri, 25 Mar 2005 - -$DAY_DATE = date("j"); -if ($DAY_DATE < 10) -# {$GREP_DATE = date("D, j M Y");} - {$GREP_DATE = date("D, 0j M Y");} -else - {$GREP_DATE = date("D, j M Y");} - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!$query_date) {$query_date = $GREP_DATE;} - -$Gquery_date = eregi_replace(" ",'\ ',$query_date); -echo "\n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -echo "VICIDIAL ADMIN CHANGE LOG                             $NOW_TIME\n";
    -
    -#passthru("grep $Gquery_date /home/www/htdocs/vicidial/admin_changes_log.txt");
    -passthru("grep $Gquery_date $WeBServeRRooT/vicidial/admin_changes_log.txt");
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_performance.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_performance.php deleted file mode 100644 index 7947c17f..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_performance.php +++ /dev/null @@ -1,232 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1711 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["shift"])) {$shift=$_GET["shift"];} - elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Agent Performance\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           ÄNDERN Sie | REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A BEDIENERAND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:33:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:33:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:33:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:33:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TALK   | TALKAVG| A    | B    | DC   | DNC  | N    | NI   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='" . mysql_real_escape_string($group) . "' group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_performance_detail.php
    deleted file mode 100644
    index 02a7c24a..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_performance_detail.php
    +++ /dev/null
    @@ -1,406 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1712 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($group)) {$group = '';}
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -$stmt="select campaign_id from vicidial_campaigns;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$campaigns_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $campaigns_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           ÄNDERN Sie | REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 03:45:00";   
    -	$query_date_END = "$query_date 15:15:00";
    -	$time_BEGIN = "03:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:15:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance Detail                        $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TIME   | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG| A    | B    | DC   | DNC  | N    | NI   | CB   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtime=($TOTtime + $row[1] + $row[5] + $row[7] + $row[9]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$TOTtotWAIT=($TOTtotWAIT + $row[7]);
    -	$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
    -	$TOTtotDISPO=($TOTtotDISPO + $row[9]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtime =	($row[1] + $row[5] + $row[7] + $row[9]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -	$USERtotPAUSE =	$row[5];
    -	$USERavgPAUSE =	$row[6];
    -	$USERtotWAIT =	$row[7];
    -	$USERavgWAIT =	$row[8];
    -	$USERtotDISPO =	$row[9];
    -	$USERavgDISPO =	$row[10];
    -
    -	$USERtime_M = ($USERtime / 60);
    -	$USERtime_M = round($USERtime_M, 2);
    -	$USERtime_M_int = intval("$USERtime_M");
    -	$USERtime_S = ($USERtime_M - $USERtime_M_int);
    -	$USERtime_S = ($USERtime_S * 60);
    -	$USERtime_S = round($USERtime_S, 0);
    -	if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
    -	$USERtime_MS = "$USERtime_M_int:$USERtime_S";
    -	$pfUSERtime_MS[$i] =		sprintf("%7s", $USERtime_MS);
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	$USERtotPAUSE_M = ($USERtotPAUSE / 60);
    -	$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
    -	$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
    -	$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
    -	$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
    -	$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
    -	if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
    -	$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
    -	$pfUSERtotPAUSE_MS[$i] =		sprintf("%6s", $USERtotPAUSE_MS);
    -
    -	$USERavgPAUSE_M = ($USERavgPAUSE / 60);
    -	$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
    -	$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
    -	$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
    -	$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
    -	$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
    -	if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
    -	$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
    -	$pfUSERavgPAUSE_MS[$i] =		sprintf("%6s", $USERavgPAUSE_MS);
    -
    -	$USERtotWAIT_M = ($USERtotWAIT / 60);
    -	$USERtotWAIT_M = round($USERtotWAIT_M, 2);
    -	$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
    -	$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
    -	$USERtotWAIT_S = ($USERtotWAIT_S * 60);
    -	$USERtotWAIT_S = round($USERtotWAIT_S, 0);
    -	if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
    -	$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
    -	$pfUSERtotWAIT_MS[$i] =		sprintf("%6s", $USERtotWAIT_MS);
    -
    -	$USERavgWAIT_M = ($USERavgWAIT / 60);
    -	$USERavgWAIT_M = round($USERavgWAIT_M, 2);
    -	$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
    -	$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
    -	$USERavgWAIT_S = ($USERavgWAIT_S * 60);
    -	$USERavgWAIT_S = round($USERavgWAIT_S, 0);
    -	if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
    -	$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
    -	$pfUSERavgWAIT_MS[$i] =		sprintf("%6s", $USERavgWAIT_MS);
    -	
    -	$USERtotDISPO_M = ($USERtotDISPO / 60);
    -	$USERtotDISPO_M = round($USERtotDISPO_M, 2);
    -	$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
    -	$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
    -	$USERtotDISPO_S = ($USERtotDISPO_S * 60);
    -	$USERtotDISPO_S = round($USERtotDISPO_S, 0);
    -	if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
    -	$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
    -	$pfUSERtotDISPO_MS[$i] =		sprintf("%6s", $USERtotDISPO_MS);
    -
    -	$USERavgDISPO_M = ($USERavgDISPO / 60);
    -	$USERavgDISPO_M = round($USERavgDISPO_M, 2);
    -	$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
    -	$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
    -	$USERavgDISPO_S = ($USERavgDISPO_S * 60);
    -	$USERavgDISPO_S = round($USERavgDISPO_S, 0);
    -	if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
    -	$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
    -	$pfUSERavgDISPO_MS[$i] =		sprintf("%6s", $USERavgDISPO_MS);
    -
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; $ctCB[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		if (($row[1] == 'CALLBK') || ($row[1] == 'CBHOLD') ) {$ctCB[$k]=sprintf("%-4s", $row[0]);	$TOT_CB = ($TOT_CB + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtime_MS[$k]| $pfUSERtotPAUSE_MS[$k] | $pfUSERavgPAUSE_MS[$k] | $pfUSERtotWAIT_MS[$k] | $pfUSERavgWAIT_MS[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $pfUSERtotDISPO_MS[$k] | $pfUSERavgDISPO_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctCB[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtime_M = ($TOTtime / 60);
    -	$TOTtime_M = round($TOTtime_M, 2);
    -	$TOTtime_M_int = intval("$TOTtime_M");
    -	$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
    -	$TOTtime_S = ($TOTtime_S * 60);
    -	$TOTtime_S = round($TOTtime_S, 0);
    -	if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
    -	$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
    -	$TOTtime_MS =		sprintf("%7s", $TOTtime_MS);
    -		while(strlen($TOTtime_MS)>7) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOTtotDISPO_M = ($TOTtotDISPO / 60);
    -	$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
    -	$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
    -	$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
    -	$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
    -	$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
    -	if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
    -	$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
    -	$TOTtotDISPO_MS =		sprintf("%7s", $TOTtotDISPO_MS);
    -		while(strlen($TOTtotDISPO_MS)>7) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
    -
    -	$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
    -	$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
    -	$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
    -	$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
    -	if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
    -	$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
    -	$TOTtotPAUSE_MS =		sprintf("%7s", $TOTtotPAUSE_MS);
    -		while(strlen($TOTtotPAUSE_MS)>7) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
    -
    -	$TOTtotWAIT_M = ($TOTtotWAIT / 60);
    -	$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
    -	$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
    -	$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
    -	$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
    -	$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
    -	if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
    -	$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
    -	$TOTtotWAIT_MS =		sprintf("%7s", $TOTtotWAIT_MS);
    -		while(strlen($TOTtotWAIT_MS)>7) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
    -
    -
    -	$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
    -	$TOTavgTALK_M = round($TOTavgTALK_M, 2);
    -	$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
    -	$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
    -	$TOTavgTALK_S = ($TOTavgTALK_S * 60);
    -	$TOTavgTALK_S = round($TOTavgTALK_S, 0);
    -	if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
    -	$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
    -	$TOTavgTALK_MS =		sprintf("%6s", $TOTavgTALK_MS);
    -		while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
    -
    -	$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
    -	$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
    -	$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
    -	$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
    -	$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
    -	$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
    -	if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
    -	$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
    -	$TOTavgDISPO_MS =		sprintf("%6s", $TOTavgDISPO_MS);
    -		while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
    -
    -	$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
    -	$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
    -	$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
    -	$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
    -	if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
    -	$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
    -	$TOTavgPAUSE_MS =		sprintf("%6s", $TOTavgPAUSE_MS);
    -		while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
    -
    -	$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
    -	$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
    -	$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
    -	$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
    -	$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
    -	$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
    -	if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
    -	$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
    -	$TOTavgWAIT_MS =		sprintf("%6s", $TOTavgWAIT_MS);
    -		while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
    -
    -	
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_CB = sprintf("%-5s", $TOT_CB);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtime_MS| $TOTtotPAUSE_MS| $TOTavgPAUSE_MS | $TOTtotWAIT_MS| $TOTavgWAIT_MS | $TOTtotTALK_MS| $TOTavgTALK_MS | $TOTtotDISPO_MS| $TOTavgDISPO_MS | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_CB| $TOT_SALE|\n";
    -echo "+--------------------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_time_sheet.php
    deleted file mode 100644
    index ccc62e80..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_agent_time_sheet.php
    +++ /dev/null
    @@ -1,281 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1729 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
    -	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
    -	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Time Sheet\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$agent)
    -{
    -echo "\n";
    -echo "PLEASE SELECT AN MITTELID AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from available agent log data\n";
    -}
    -
    -else
    -{
    -$query_date_BEGIN = "$query_date 00:00:00";   
    -$query_date_END = "$query_date 23:59:59";
    -$time_BEGIN = "00:00:00";   
    -$time_END = "23:59:59";
    -
    -$stmt="select full_name from vicidial_users where user='$agent';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$full_name = $row[0];
    -
    -echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- MITTELTIME SHEET: $agent - $full_name -------------\n\n";
    -
    -if ($calls_summary)
    -	{
    -	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -
    -	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
    -
    -		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
    -		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
    -		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
    -		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
    -		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
    -		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
    -		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
    -		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
    -		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
    -		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
    -		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
    -		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
    -		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
    -		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
    -
    -		$TALK_TIME_H = ($row[1] / 3600);
    -		$TALK_TIME_H = round($TALK_TIME_H, 2);
    -		$TALK_TIME_H_int = intval("$TALK_TIME_H");
    -		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
    -		$TALK_TIME_M = ($TALK_TIME_M * 60);
    -		$TALK_TIME_M = round($TALK_TIME_M, 2);
    -		$TALK_TIME_M_int = intval("$TALK_TIME_M");
    -		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
    -		$TALK_TIME_S = ($TALK_TIME_S * 60);
    -		$TALK_TIME_S = round($TALK_TIME_S, 0);
    -		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
    -		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
    -		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
    -		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
    -
    -		$PAUSE_TIME_H = ($row[3] / 3600);
    -		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
    -		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
    -		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
    -		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
    -		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
    -		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
    -		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
    -		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
    -		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
    -		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
    -		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
    -		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
    -		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
    -
    -		$WAIT_TIME_H = ($row[5] / 3600);
    -		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
    -		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
    -		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
    -		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
    -		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
    -		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
    -		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
    -		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
    -		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
    -		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
    -		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
    -		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
    -		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
    -
    -		$WRAPUP_TIME_H = ($row[7] / 3600);
    -		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
    -		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
    -		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
    -		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
    -		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
    -		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
    -		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
    -		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
    -		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
    -
    -		$TALK_AVG_M = ($row[2] / 60);
    -		$TALK_AVG_M = round($TALK_AVG_M, 2);
    -		$TALK_AVG_M_int = intval("$TALK_AVG_M");
    -		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
    -		$TALK_AVG_S = ($TALK_AVG_S * 60);
    -		$TALK_AVG_S = round($TALK_AVG_S, 0);
    -		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
    -		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
    -		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
    -
    -		$PAUSE_AVG_M = ($row[4] / 60);
    -		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
    -		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
    -		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
    -		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
    -		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
    -		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
    -		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
    -		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
    -
    -		$WAIT_AVG_M = ($row[6] / 60);
    -		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
    -		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
    -		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
    -		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
    -		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
    -		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
    -		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
    -		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
    -
    -		$WRAPUP_AVG_M = ($row[8] / 60);
    -		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
    -		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
    -		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
    -		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
    -		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
    -		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
    -
    -	echo "GESAMTANRUFETAKEN: $row[0]\n";
    -	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
    -	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
    -	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
    -	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
    -	echo "----------------------------------------------------------------\n";
    -	echo "TOTAL ACTIVE MITTELTIME: $pfTOTAL_TIME_HMS\n";
    -
    -	echo "\n";
    -	}
    -else
    -	{
    -	echo "Call Activity Summary\n\n";
    -
    -	}
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "FIRST LOGIN:          $row[0]\n";
    -$start = $row[1];
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "LAST LOG ACTIVITY:    $row[0]\n";
    -$end = $row[1];
    -
    -$login_time = ($end - $start);
    -	$LOGIN_TIME_H = ($login_time / 3600);
    -	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
    -	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
    -	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
    -	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
    -	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
    -	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
    -	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
    -	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
    -	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
    -	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
    -	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
    -	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
    -	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
    -
    -echo "-----------------------------------------\n";
    -echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_server_performance.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_server_performance.php
    deleted file mode 100644
    index 6331a75a..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_server_performance.php
    +++ /dev/null
    @@ -1,310 +0,0 @@
    -    LICENSE: GPLv2
    -#
    -# CHANGES
    -#
    -# 60619-1732 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))	{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))	{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))	{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -# path from root to where ploticus files will be stored
    -$DOCroot = "$WeBServeRRooT/vicidial/ploticus/";
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -if (!isset($group)) {$group = '';}
    -
    -$stmt="select server_ip from servers;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$servers_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $servers_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Server Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "             REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A BEDIENERAND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:32:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:32:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Server Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- TOTALS, PEAKS and AVERAGES\n";
    -
    -$stmt="select sysload from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by sysload desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$HIGHload =	sprintf("%10s", $row[0]);
    -$HIGHmulti = intval($HIGHload / 100);
    -#$HIGHmulti = ($HIGHload / 100);
    -
    -$stmt="select AVG(sysload),AVG(channels_total) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGload =	sprintf("%10s", $row[0]);
    -$AVGchannels =	sprintf("%10s", $row[1]);
    -
    -$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGcpuUSER =	sprintf("%10s", $row[0]);
    -$AVGcpuSYSTEM =	sprintf("%10s", $row[1]);
    -$AVGcpuIDLE =	sprintf("%10s", $row[2]);
    -
    -$stmt="select usedram from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by usedram desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$USEDram =	sprintf("%10s", $row[0]);
    -
    -$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365','8366','8367') and  start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$OFFHOOKtime =	sprintf("%10s", $row[1]);
    -
    -
    -echo "Total Calls in/out on this server:        $TOTALcalls\n";
    -echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
    -echo "Average channels in use for server:       $AVGchannels\n";
    -echo "Average load for server:                  $AVGload\n";
    -echo "Peak load for server:                     $HIGHload\n";
    -#echo "Peak used memory for server (in MB):      $USEDram\n";
    -echo "Average USER process cpu percentage:      $AVGcpuUSER %\n";
    -echo "Average SYSTEM process cpu percentage:    $AVGcpuSYSTEM %\n";
    -echo "Average IDLE process cpu percentage:      $AVGcpuIDLE %\n";
    -
    -echo "\n";
    -echo "---------- LINE GRAPH:\n";
    -
    -
    -
    -##############################
    -#########  Graph stats
    -
    -$DAT = '.dat';
    -$HTM = '.htm';
    -$PNG = '.png';
    -$filedate = date("Y-m-d_His");
    -$DATfile = "$group$query_date$shift$filedate$DAT";
    -$HTMfile = "$group$query_date$shift$filedate$HTM";
    -$PNGfile = "$group$query_date$shift$filedate$PNG";
    -
    -$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
    -$DATfp = fopen ("$DOCroot/$DATfile", "a");
    -
    -$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='" . mysql_real_escape_string($group) . "' and start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' order by timex;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
    -	$row[6] = intval($row[6] * $HIGHmulti);
    -	fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
    -	$i++;
    -	}
    -fclose($DATfp);
    -
    -$rows_to_max = ($rows_to_print + 100);
    -
    -
    -
    -$HTMcontent  = '';
    -$HTMcontent .= "#proc page\n";
    -$HTMcontent .= "#if @DEVICE in png,gif\n";
    -$HTMcontent .= "   scale: 0.6\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#endif\n";
    -$HTMcontent .= "#proc getdata\n";
    -$HTMcontent .= "file: $DOCroot/$DATfile\n";
    -$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc areadef\n";
    -$HTMcontent .= "title: Server $group   $query_date_BEGIN to $query_date_END\n";
    -$HTMcontent .= "titledetails: size=14  align=C\n";
    -$HTMcontent .= "rectangle: 1 1 14 7\n";
    -$HTMcontent .= "xscaletype: time hh:mm:ss\n";
    -$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
    -$HTMcontent .= "yrange: 0 $HIGHload\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc xaxis\n";
    -$HTMcontent .= "stubs: inc 30 minutes\n";
    -$HTMcontent .= "minorticinc: 5 minutes\n";
    -$HTMcontent .= "stubformat: hh:mm:ssa\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc yaxis\n";
    -$HTMcontent .= "stubs: inc 50\n";
    -$HTMcontent .= "grid: color=yellow\n";
    -$HTMcontent .= "gridskip: min\n";
    -$HTMcontent .= "ticincrement: 100 1000\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: userproc\n";
    -$HTMcontent .= "linedetails: color=purple width=.5\n";
    -$HTMcontent .= "fill: lavender\n";
    -$HTMcontent .= "legendlabel: user proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: sysproc\n";
    -$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
    -$HTMcontent .= "fill: dullyellow\n";
    -$HTMcontent .= "legendlabel: system proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: load\n";
    -$HTMcontent .= "linedetails: color=blue width=.5\n";
    -$HTMcontent .= "legendlabel: load\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: processes\n";
    -$HTMcontent .= "linedetails: color=red width=.5\n";
    -$HTMcontent .= "legendlabel: processes\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: channels\n";
    -$HTMcontent .= "linedetails: color=green width=.5\n";
    -$HTMcontent .= "legendlabel: channels\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc legend\n";
    -$HTMcontent .= "location: max-2 max\n";
    -$HTMcontent .= "seglen: 0.2\n";
    -$HTMcontent .= "\n";
    -
    -fwrite ($HTMfp, "$HTMcontent");
    -fclose($HTMfp);
    -
    -
    -passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
    -
    -sleep(1);
    -
    -echo "
    \n"; -echo "\n"; -echo "\n"; - - -echo ""; - -} - - - -?> - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDAD.php deleted file mode 100644 index cc3fb242..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDAD.php +++ /dev/null @@ -1,255 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 60620-1040 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Mittel Setzen Bei den Anrufen Zeit fest        $NOW_TIME    REPORTS\n\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL    | STATUS | START TIME          | MINUTES |\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	$agentcount=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- WARTEND -';
    -			$row[6]=$row[7];
    -			}
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$sessionid =		sprintf("%-9s", $row[2]);
    -		$channel =			sprintf("%-10s", $row[3]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[4]);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 5) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 10) {$G=''; $EG='';}
    -		if (eregi("PAUSED",$row[4])) 
    -			{
    -			if ($call_time_M_int >= 1) 
    -				{$i++; continue;} 
    -			else
    -				{$G=''; $EG='';}
    -			}
    -
    -		$agentcount++;
    -		echo "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -		echo "  $agentcount Mittel geloggt innen auf Bediener $server_ip\n\n";
    -
    -		echo "             - Pausierte Mittel\n";
    -		echo "             - 5 Minuten oder mehr beim Anruf\n";
    -		echo "             - Über 10 Minuten beim Anruf\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "*********************************KEINE MITTEL BEI DEN ANRUFEN*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -echo "| CHANNEL    | STATUS | CAMPAIGN | PHONE NUMBER       | START TIME          | MINUTES |\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-8s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -		echo "  $i Anrufe, die auf Bediener gesetzt werden $server_ip\n\n";
    -
    -		echo "             - PHASENCANKLOPFEN\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "*******************************KEIN PHASENCANKLOPFEN*********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDAD_closer.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDAD_closer.php deleted file mode 100644 index b7e87d02..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDAD_closer.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# CHANGES -# -# 60620-1037 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - -\n"; -echo " - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Mittel Setzen Bei den Anrufen Zeit fest        $NOW_TIME    REPORTS\n\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL             | STATUS | CALLTIME | MINUTES | CAMPAIGN     | FRONT  |\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED|CLOSER",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- WAIT -';
    -			$row[6]=$row[7];
    -			}
    -		$extension[$i] =		sprintf("%-10s", $row[0]);
    -		$user[$i] =				sprintf("%-6s", $row[1]);
    -		$sessionid[$i] =		sprintf("%-9s", $row[2]);
    -		$channel[$i] =			sprintf("%-19s", $row[3]);
    -			$cc[$i]=0;
    -		while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
    -			{
    -			$channel[$i] = eregi_replace(".$","",$channel[$i]);   
    -			$cc[$i]++;
    -			if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
    -			}
    -		$status[$i] =			sprintf("%-6s", $row[4]);
    -		$start_time[$i] =		sprintf("%-8s", $row[5]);
    -			$cd[$i]=0;
    -		while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
    -			{
    -			$start_time[$i] = eregi_replace("^.","",$start_time[$i]);   
    -			$cd[$i]++;
    -			if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
    -			}
    -		$uniqueid[$i] =			$row[8];
    -		$lead_id[$i] =			$row[9];
    -		$closer[$i] =			$row[1];
    -		$call_time_S[$i] = ($STARTtime - $row[6]);
    -
    -		$call_time_M[$i] = ($call_time_S[$i] / 60);
    -		$call_time_M[$i] = round($call_time_M[$i], 2);
    -		$call_time_M_int[$i] = intval("$call_time_M[$i]");
    -		$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
    -		$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
    -		$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
    -		if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
    -		$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
    -		$call_time_MS[$i] =		sprintf("%7s", $call_time_MS[$i]);
    -		$i++;
    -		}
    -		$ext_count = $i;
    -		$i=0;
    -	while ($i < $ext_count)
    -		{
    -
    -		$stmt="select campaign_id from vicidial_auto_calls where uniqueid='$uniqueid[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "';";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$camp_to_print = mysql_num_rows($rslt);
    -		if ($camp_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$campaign = sprintf("%-12s", $row[0]);
    -			$camp_color = $row[0];
    -			}
    -		else
    -			{$campaign = 'DEAD        ';   	$camp_color = 'DEAD';}
    -		if (eregi("READY|PAUSED|CLOSER",$status[$i]))
    -			{$campaign = '            ';   	$camp_color = '';}
    -
    -		$stmt="select user from vicidial_xfer_log where lead_id='$lead_id[$i]' and closer='$closer[$i]' order by call_date desc limit 1;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$xfer_to_print = mysql_num_rows($rslt);
    -		if ($xfer_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$fronter = sprintf("%-6s", $row[0]);
    -			}
    -		else
    -			{$fronter = '      ';}
    -
    -		$G = '';		$EG = '';
    -		$G=""; $EG='';
    -	#	if ($call_time_M_int[$i] >= 5) {$G=''; $EG='';}
    -	#	if ($call_time_M_int[$i] >= 10) {$G=''; $EG='';}
    -
    -		echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -		echo "  $i Mittel geloggt innen auf Bediener $server_ip\n\n";
    -
    -	#	echo "             - 5 Minuten oder mehr beim Anruf\n";
    -	#	echo "             - Über 10 Minuten beim Anruf\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "*********************************KEINE MITTEL BEI DEN ANRUFEN*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -#echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -echo "| CHANNEL             | STATUS | CAMPAIGN     | PHONE NUMBER       | CALLTIME | MINUTES |\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id desc;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-19s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 19) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 19) {$cc=101;}
    -			}
    -		$start_time =		sprintf("%-8s", $row[5]);
    -			$cd=0;
    -		while ( (strlen($start_time) > 8) and ($cd < 100) )
    -			{
    -			$start_time = eregi_replace("^.","",$start_time);   
    -			$cd++;
    -			if (strlen($start_time) <= 8) {$cd=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-12s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -		echo "  $i Anrufe, die auf Bediener gesetzt werden $server_ip\n\n";
    -
    -		echo "             - PHASENCANKLOPFEN\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "*******************************KEIN PHASENCANKLOPFEN*********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDADall.php deleted file mode 100644 index 4ad6fb65..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDADall.php +++ /dev/null @@ -1,349 +0,0 @@ - LICENSE: GPLv2 -# -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60511-1343 - Added leads and drop info at the top of the screen -# 60608-1539 - Fixed CLOSER tallies for active calls -# 60619-1658 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["RR"])) {$RR=$_GET["RR"];} - elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($group)) {$group='';} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$NOW_DAY = date("Y-m-d"); -$NOW_HOUR = date("H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns where active='Y';"; -$rslt=mysql_query($stmt, $link); -if (!isset($DB)) {$DB=0;} -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!isset($RR)) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if (!isset($reset_counter)) {$reset_counter=0;} -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD Kampagne: $group\n"; -echo "
    \n"; -echo "VICIDIAL: Realtime Kampagne: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         ÄNDERN Sie | REPORTS \n"; -echo "\n\n"; - - -if (!$group) {echo "

    please select a campaign from the pulldown above\n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$HOPlev = $row[8]; - -echo "
    "; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; - -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$VDhop = $row[0]; - -$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$DAleads = $row[0]; -$callsTODAY = $row[1]; -$dropsTODAY = $row[2]; -$drpctTODAY = $row[3]; - -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "
    DIAL LEVEL:  $row[0]    STATUSES:  $row[1], $row[2], $row[3], $row[4], $row[5]     ORDER:  $row[6]     FILTER:  $row[7]    
    HOPPER LEVEL:  $HOPlev     LEADS IN HOPPER:  $VDhop     DIALABLE LEADS:  $DAleads       TIME:
    CALLS TODAY:  $callsTODAY     CALLS DROPPED:  $dropsTODAY     DROPPED PERCENT:  $drpctTODAY%       $NOW_TIME
    "; - - -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - { - $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );"; - } -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo "KEIN PHASENCANKLOPFEN\n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Kampagne: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | BEDIENERIP | CALL BEDIENERIP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n\n"; - - $Aecho .= " - Pausierte Mittel\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo "KEINE MITTEL BEI DEN ANRUFEN\n";
    -	}
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDADall_SIPmonitor.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDADall_SIPmonitor.php deleted file mode 100644 index dff474ef..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonVDADall_SIPmonitor.php +++ /dev/null @@ -1,301 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60504-2023 - Modified click-to-listen for SIP phones by Angelito Manansala -# 60619-1708 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];} -$RR=$_GET["RR"]; if (!$RR) {$RR=$_POST["RR"];} -$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];} -$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];} -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!$RR) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VF DIALER: Time On VDAD Kampagne: $group\n"; -echo "
    \n"; -echo "VF DIALER: Realtime Kampagne: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         ÄNDERN Sie | REPORTS \n"; -echo "\n\n"; - -if (!$group) {echo "

    please select a campaign from the pulldown above
    \n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); - -echo "
    "; -echo "DIAL LEVEL: $row[0]         "; -echo "STATUSES: $row[1], $row[2], $row[3], $row[4], $row[5]         "; -echo "ORDER: $row[6]"; -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and (campaign_id='" . mysql_real_escape_string($group) . "' or campaign_id LIKE \"CL_%\");";} -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo "KEIN PHASENCANKLOPFEN\n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VF DIALER: Agents Time On Calls Kampagne: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | BEDIENERIP | CALL BEDIENERIP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - $sessionid = trim($sessionid); - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG LISTEN | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n"; - $Aecho .= " NOTE: Click LISTERN to monitor agent call, you must have installed softphone on you machine.\n\n"; - - - $Aecho .= " - Pausierte Mittel\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo "KEINE MITTEL BEI DEN ANRUFEN\n";
    -	}
    -
    -?>
    -
    - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeoncall.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeoncall.php deleted file mode 100644 index 4227f836..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeoncall.php +++ /dev/null @@ -1,180 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Call\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Call                                          $NOW_TIME\n\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -echo "| STATION    | SESSIONID | CHANNEL   | NUMBER DIALED    | START TIME          | MINUTES |\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -
    -$stmt="SELECT count(*) from live_sip_channels where server_ip='$server_ip';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="select extension from live_channels where server_ip='$server_ip';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$ext_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_zap_counter=0;
    -	$sessions = '';
    -	while ($i < $ext_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if (preg_match("/^8600/i",$row[0]))
    -			{
    -			$sessions .= "$row[0]|";
    -			}
    -		$i++;
    -		}
    -	$sessions = preg_replace("/\|$/",'',$sessions);
    -
    -	if ($DB) {echo "SESSIONS: -$sessions-\n";}
    -
    -	$stmt="select * from live_sip_channels where server_ip='$server_ip' order by channel;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_calls_counter=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ( (preg_match("/Zap\/|internal|ring/i",$row[3])) or (preg_match("/Local\//i",$row[0])) )
    -			{
    -			if ($DB) {echo "NOT STATION |$row[0]|$row[3]|\n";}
    -			$session_id = '';
    -			}
    -		else 
    -			{
    -			if (preg_match("/$row[3]/i",$sessions))
    -				{
    -				if ($DB) {echo "LIVE STATION|$row[0]|$row[3]|\n";}
    -				$session_id = $row[3];
    -				$station = preg_replace("/SIP\//",'',$row[0]);
    -				$station = preg_replace("/-.*/",'',$station);
    -			
    -				$LIVE_sessions[$live_calls_counter] =			"$session_id";
    -				$LIVE_sessions_FORMAT[$live_calls_counter] =	sprintf("%-9s", $session_id);
    -				$LIVE_stations[$live_calls_counter] =			"$station";
    -				$LIVE_stations_FORMAT[$live_calls_counter] =	sprintf("%-10s", $station);
    -
    -		#		echo "| $station | $session_id | \n";
    -
    -				$live_calls_counter++;
    -				}
    -			else
    -				{
    -				if ($DB) {echo "NOT STATIONZ|$row[0]|$row[3]|\n";}
    -				$session_id = '';
    -				}
    -			}
    -
    -		$i++;
    -		}
    -
    -		if ($live_calls_counter > 0)
    -		{
    -		$i=0;
    -		$LC_counter = $live_calls_counter;
    -
    -		while ($i < $live_calls_counter)
    -			{
    -			$stmt="select channel,extension,number_dialed,start_time,start_epoch from call_log where extension='$LIVE_stations[$i]' and server_ip='$server_ip' order by uniqueid desc LIMIT 1;";
    -			$rslt=mysql_query($stmt, $link);
    -			if ($DB) {echo "$stmt\n";}
    -			$parked_to_print = mysql_num_rows($rslt);
    -			$row=mysql_fetch_row($rslt);
    -
    -			$channel =			sprintf("%-9s", $row[0]);
    -			$number_dialed =	sprintf("%-16s", $row[2]);
    -			$start_time =		sprintf("%-19s", $row[3]);
    -			$call_time_S = ($STARTtime - $row[4]);
    -
    -			$call_time_M = ($call_time_S / 60);
    -			$call_time_M = round($call_time_M, 2);
    -			$call_time_M_int = intval("$call_time_M");
    -			$call_time_SEC = ($call_time_M - $call_time_M_int);
    -			$call_time_SEC = ($call_time_SEC * 60);
    -			$call_time_SEC = round($call_time_SEC, 0);
    -			if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -			$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -			$call_time_MS =		sprintf("%7s", $call_time_MS);
    -			$G = '';		$EG = '';
    -			if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -			if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -			echo "| $G$LIVE_stations_FORMAT[$i]$EG | $G$LIVE_sessions_FORMAT[$i]$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -			$i++;
    -			}
    -
    -		echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -		echo "  $i stations on live calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on live call\n";
    -		echo "             - Over 30 minutes on live call\n";
    -
    -		}
    -		else
    -		{
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*************************************** NO LIVE STATIONS ********************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*************************************** NO LIVE STATIONS ********************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	}
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonpark.php b/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonpark.php deleted file mode 100644 index 46aee71b..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/AST_timeonpark.php +++ /dev/null @@ -1,197 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$timeONEhoursAGO = ($STARTtime - 3600); -$epochHALFhoursAGO = ($STARTtime - 1860); -$timeONEhoursAGO = date("Y-m-d H:i:s",$timeONEhoursAGO); -$timeHALFhoursAGO = date("Y-m-d H:i:s",$epochHALFhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where status='TALKING' and grab_time < '$timeONEhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - $stmt="delete from park_log where status='PARKED' and parked_time < '$timeHALFhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Park\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select extension,user,channel,channel_group,parked_time,UNIX_TIMESTAMP(parked_time) from park_log where status ='PARKED' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 1) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i callers waiting on server $server_ip\n\n";
    -
    -		echo "             - 1 minute or more on hold\n";
    -		echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	echo "********************KEIN PHASENCANKLOPFEN*********************\n";
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	}
    -
    -###################################################################################
    -###### TIME ON INBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Agents Time On Inbound Calls                             $NOW_TIME\n\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,channel,channel_group,grab_time,UNIX_TIMESTAMP(grab_time) from park_log where status ='TALKING' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -		echo "| $G$extension$EG | $G$user$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i agents on calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on call\n";
    -		echo "             - Over 30 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "*********************************KEINE MITTEL BEI DEN ANRUFEN*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/admin.php b/agc_2-X/trunk/LANG_admin/vicidial_de/admin.php deleted file mode 100644 index 67d396e3..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/admin.php +++ /dev/null @@ -1,6514 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} - elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} -if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} - elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];} - elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];} - elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];} -if (isset($_GET["park_file_name"])) {$park_file_name=$_GET["park_file_name"];} - elseif (isset($_POST["park_file_name"])) {$park_file_name=$_POST["park_file_name"];} -if (isset($_GET["web_form_address"])) {$web_form_address=$_GET["web_form_address"];} - elseif (isset($_POST["web_form_address"])) {$web_form_address=$_POST["web_form_address"];} -if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} - elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} -if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} - elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["next_agent_call"])) {$next_agent_call=$_GET["next_agent_call"];} - elseif (isset($_POST["next_agent_call"])) {$next_agent_call=$_POST["next_agent_call"];} -if (isset($_GET["local_call_time"])) {$local_call_time=$_GET["local_call_time"];} - elseif (isset($_POST["local_call_time"])) {$local_call_time=$_POST["local_call_time"];} -if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} - elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];} - elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];} -if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} - elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];} - elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} -if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} - elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["dial_status_a"])) {$dial_status_a=$_GET["dial_status_a"];} - elseif (isset($_POST["dial_status_a"])) {$dial_status_a=$_POST["dial_status_a"];} -if (isset($_GET["dial_status_b"])) {$dial_status_b=$_GET["dial_status_b"];} - elseif (isset($_POST["dial_status_b"])) {$dial_status_b=$_POST["dial_status_b"];} -if (isset($_GET["dial_status_c"])) {$dial_status_c=$_GET["dial_status_c"];} - elseif (isset($_POST["dial_status_c"])) {$dial_status_c=$_POST["dial_status_c"];} -if (isset($_GET["dial_status_d"])) {$dial_status_d=$_GET["dial_status_d"];} - elseif (isset($_POST["dial_status_d"])) {$dial_status_d=$_POST["dial_status_d"];} -if (isset($_GET["dial_status_e"])) {$dial_status_e=$_GET["dial_status_e"];} - elseif (isset($_POST["dial_status_e"])) {$dial_status_e=$_POST["dial_status_e"];} -if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} - elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["campaign_vdad_exten"])) {$campaign_vdad_exten=$_GET["campaign_vdad_exten"];} - elseif (isset($_POST["campaign_vdad_exten"])) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];} -if (isset($_GET["campaign_rec_exten"])) {$campaign_rec_exten=$_GET["campaign_rec_exten"];} - elseif (isset($_POST["campaign_rec_exten"])) {$campaign_rec_exten=$_POST["campaign_rec_exten"];} -if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} - elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} -if (isset($_GET["campaign_rec_filename"])) {$campaign_rec_filename=$_GET["campaign_rec_filename"];} - elseif (isset($_POST["campaign_rec_filename"])) {$campaign_rec_filename=$_POST["campaign_rec_filename"];} -if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} - elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} -if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} - elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} -if (isset($_GET["old_campaign_id"])) {$old_campaign_id=$_GET["old_campaign_id"];} - elseif (isset($_POST["old_campaign_id"])) {$old_campaign_id=$_POST["old_campaign_id"];} -if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} - elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} -if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} - elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];} -if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} - elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} -if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} - elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];} - elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} -if (isset($_GET["delete_user_groups"])) {$delete_user_groups=$_GET["delete_user_groups"];} - elseif (isset($_POST["delete_user_groups"])) {$delete_user_groups=$_POST["delete_user_groups"];} -if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} - elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} -if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} - elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} -if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} - elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} -if (isset($_GET["delete_remote_agents"])) {$delete_remote_agents=$_GET["delete_remote_agents"];} - elseif (isset($_POST["delete_remote_agents"])) {$delete_remote_agents=$_POST["delete_remote_agents"];} -if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];} - elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} -if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} - elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} -if (isset($_GET["ast_admin_access"])) {$ast_admin_access=$_GET["ast_admin_access"];} - elseif (isset($_POST["ast_admin_access"])) {$ast_admin_access=$_POST["ast_admin_access"];} -if (isset($_GET["ast_delete_phones"])) {$ast_delete_phones=$_GET["ast_delete_phones"];} - elseif (isset($_POST["ast_delete_phones"])) {$ast_delete_phones=$_POST["ast_delete_phones"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} -if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} - elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} -if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];} - elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];} -if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];} - elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];} -if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} - elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} -if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];} - elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} -if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} - elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} -if (isset($_GET["get_call_launch"])) {$get_call_launch=$_GET["get_call_launch"];} - elseif (isset($_POST["get_call_launch"])) {$get_call_launch=$_POST["get_call_launch"];} -if (isset($_GET["am_message_exten"])) {$am_message_exten=$_GET["am_message_exten"];} - elseif (isset($_POST["am_message_exten"])) {$am_message_exten=$_POST["am_message_exten"];} -if (isset($_GET["amd_send_to_vmx"])) {$amd_send_to_vmx=$_GET["amd_send_to_vmx"];} - elseif (isset($_POST["amd_send_to_vmx"])) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];} -if (isset($_GET["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"];} - elseif (isset($_POST["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];} -if (isset($_GET["xferconf_a_number"])) {$xferconf_a_number=$_GET["xferconf_a_number"];} - elseif (isset($_POST["xferconf_a_number"])) {$xferconf_a_number=$_POST["xferconf_a_number"];} -if (isset($_GET["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"];} - elseif (isset($_POST["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];} -if (isset($_GET["xferconf_b_number"])) {$xferconf_b_number=$_GET["xferconf_b_number"];} - elseif (isset($_POST["xferconf_b_number"])) {$xferconf_b_number=$_POST["xferconf_b_number"];} -if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} - elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} -if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} - elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} -if (isset($_GET["change_agent_campaign"])) {$change_agent_campaign=$_GET["change_agent_campaign"];} - elseif (isset($_POST["change_agent_campaign"])) {$change_agent_campaign=$_POST["change_agent_campaign"];} -if (isset($_GET["agent_choose_ingroups"])) {$agent_choose_ingroups=$_GET["agent_choose_ingroups"];} - elseif (isset($_POST["agent_choose_ingroups"])) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];} -if (isset($_GET["alt_number_dialing"])) {$alt_number_dialing=$_GET["alt_number_dialing"];} - elseif (isset($_POST["alt_number_dialing"])) {$alt_number_dialing=$_POST["alt_number_dialing"];} -if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} - elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} -if (isset($_GET["lead_filter_id"])) {$lead_filter_id=$_GET["lead_filter_id"];} - elseif (isset($_POST["lead_filter_id"])) {$lead_filter_id=$_POST["lead_filter_id"];} -if (isset($_GET["lead_filter_name"])) {$lead_filter_name=$_GET["lead_filter_name"];} - elseif (isset($_POST["lead_filter_name"])) {$lead_filter_name=$_POST["lead_filter_name"];} -if (isset($_GET["lead_filter_comments"])) {$lead_filter_comments=$_GET["lead_filter_comments"];} - elseif (isset($_POST["lead_filter_comments"])) {$lead_filter_comments=$_POST["lead_filter_comments"];} -if (isset($_GET["lead_filter_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} - elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} -if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} - elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} -if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} - elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} -if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];} - elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];} -if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];} - elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];} -if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} - elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} -if (isset($_GET["alter_agent_interface_options"])) {$alter_agent_interface_options=$_GET["alter_agent_interface_options"];} - elseif (isset($_POST["alter_agent_interface_options"])) {$alter_agent_interface_options=$_POST["alter_agent_interface_options"];} -if (isset($_GET["closer_default_blended"])) {$closer_default_blended=$_GET["closer_default_blended"];} - elseif (isset($_POST["closer_default_blended"])) {$closer_default_blended=$_POST["closer_default_blended"];} -if (isset($_GET["drop_call_seconds"])) {$drop_call_seconds=$_GET["drop_call_seconds"];} - elseif (isset($_POST["drop_call_seconds"])) {$drop_call_seconds=$_POST["drop_call_seconds"];} -if (isset($_GET["safe_harbor_message"])) {$safe_harbor_message=$_GET["safe_harbor_message"];} - elseif (isset($_POST["safe_harbor_message"])) {$safe_harbor_message=$_POST["safe_harbor_message"];} -if (isset($_GET["safe_harbor_exten"])) {$safe_harbor_exten=$_GET["safe_harbor_exten"];} - elseif (isset($_POST["safe_harbor_exten"])) {$safe_harbor_exten=$_POST["safe_harbor_exten"];} -if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} - elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} -if (isset($_GET["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} - elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} -if (isset($_GET["call_time_id"])) {$call_time_id=$_GET["call_time_id"];} - elseif (isset($_POST["call_time_id"])) {$call_time_id=$_POST["call_time_id"];} -if (isset($_GET["call_time_name"])) {$call_time_name=$_GET["call_time_name"];} - elseif (isset($_POST["call_time_name"])) {$call_time_name=$_POST["call_time_name"];} -if (isset($_GET["call_time_comments"])) {$call_time_comments=$_GET["call_time_comments"];} - elseif (isset($_POST["call_time_comments"])) {$call_time_comments=$_POST["call_time_comments"];} -if (isset($_GET["ct_default_start"])) {$ct_default_start=$_GET["ct_default_start"];} - elseif (isset($_POST["ct_default_start"])) {$ct_default_start=$_POST["ct_default_start"];} -if (isset($_GET["ct_default_stop"])) {$ct_default_stop=$_GET["ct_default_stop"];} - elseif (isset($_POST["ct_default_stop"])) {$ct_default_stop=$_POST["ct_default_stop"];} -if (isset($_GET["ct_sunday_start"])) {$ct_sunday_start=$_GET["ct_sunday_start"];} - elseif (isset($_POST["ct_sunday_start"])) {$ct_sunday_start=$_POST["ct_sunday_start"];} -if (isset($_GET["ct_sunday_stop"])) {$ct_sunday_stop=$_GET["ct_sunday_stop"];} - elseif (isset($_POST["ct_sunday_stop"])) {$ct_sunday_stop=$_POST["ct_sunday_stop"];} -if (isset($_GET["ct_monday_start"])) {$ct_monday_start=$_GET["ct_monday_start"];} - elseif (isset($_POST["ct_monday_start"])) {$ct_monday_start=$_POST["ct_monday_start"];} -if (isset($_GET["ct_monday_stop"])) {$ct_monday_stop=$_GET["ct_monday_stop"];} - elseif (isset($_POST["ct_monday_stop"])) {$ct_monday_stop=$_POST["ct_monday_stop"];} -if (isset($_GET["ct_tuesday_start"])) {$ct_tuesday_start=$_GET["ct_tuesday_start"];} - elseif (isset($_POST["ct_tuesday_start"])) {$ct_tuesday_start=$_POST["ct_tuesday_start"];} -if (isset($_GET["ct_tuesday_stop"])) {$ct_tuesday_stop=$_GET["ct_tuesday_stop"];} - elseif (isset($_POST["ct_tuesday_stop"])) {$ct_tuesday_stop=$_POST["ct_tuesday_stop"];} -if (isset($_GET["ct_wednesday_start"])) {$ct_wednesday_start=$_GET["ct_wednesday_start"];} - elseif (isset($_POST["ct_wednesday_start"])) {$ct_wednesday_start=$_POST["ct_wednesday_start"];} -if (isset($_GET["ct_wednesday_stop"])) {$ct_wednesday_stop=$_GET["ct_wednesday_stop"];} - elseif (isset($_POST["ct_wednesday_stop"])) {$ct_wednesday_stop=$_POST["ct_wednesday_stop"];} -if (isset($_GET["ct_thursday_start"])) {$ct_thursday_start=$_GET["ct_thursday_start"];} - elseif (isset($_POST["ct_thursday_start"])) {$ct_thursday_start=$_POST["ct_thursday_start"];} -if (isset($_GET["ct_thursday_stop"])) {$ct_thursday_stop=$_GET["ct_thursday_stop"];} - elseif (isset($_POST["ct_thursday_stop"])) {$ct_thursday_stop=$_POST["ct_thursday_stop"];} -if (isset($_GET["ct_friday_start"])) {$ct_friday_start=$_GET["ct_friday_start"];} - elseif (isset($_POST["ct_friday_start"])) {$ct_friday_start=$_POST["ct_friday_start"];} -if (isset($_GET["ct_friday_stop"])) {$ct_friday_stop=$_GET["ct_friday_stop"];} - elseif (isset($_POST["ct_friday_stop"])) {$ct_friday_stop=$_POST["ct_friday_stop"];} -if (isset($_GET["ct_saturday_start"])) {$ct_saturday_start=$_GET["ct_saturday_start"];} - elseif (isset($_POST["ct_saturday_start"])) {$ct_saturday_start=$_POST["ct_saturday_start"];} -if (isset($_GET["ct_saturday_stop"])) {$ct_saturday_stop=$_GET["ct_saturday_stop"];} - elseif (isset($_POST["ct_saturday_stop"])) {$ct_saturday_stop=$_POST["ct_saturday_stop"];} -if (isset($_GET["state_call_time_state"])) {$state_call_time_state=$_GET["state_call_time_state"];} - elseif (isset($_POST["state_call_time_state"])) {$state_call_time_state=$_POST["state_call_time_state"];} -if (isset($_GET["state_rule"])) {$state_rule=$_GET["state_rule"];} - elseif (isset($_POST["state_rule"])) {$state_rule=$_POST["state_rule"];} -if (isset($_GET["delete_call_times"])) {$delete_call_times=$_GET["delete_call_times"];} - elseif (isset($_POST["delete_call_times"])) {$delete_call_times=$_POST["delete_call_times"];} -if (isset($_GET["modify_call_times"])) {$modify_call_times=$_GET["modify_call_times"];} - elseif (isset($_POST["modify_call_times"])) {$modify_call_times=$_POST["modify_call_times"];} -if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} - elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} -if (isset($_GET["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} - elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} -if (isset($_GET["attempt_delay"])) {$attempt_delay=$_GET["attempt_delay"];} - elseif (isset($_POST["attempt_delay"])) {$attempt_delay=$_POST["attempt_delay"];} -if (isset($_GET["attempt_maximum"])) {$attempt_maximum=$_GET["attempt_maximum"];} - elseif (isset($_POST["attempt_maximum"])) {$attempt_maximum=$_POST["attempt_maximum"];} - - if (isset($script_id)) {$script_id= strtoupper($script_id);} - if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS ONLY ### -$user_level = ereg_replace("[^0-9]","",$user_level); -$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); -$xferconf_a_number = ereg_replace("[^0-9]","",$xferconf_a_number); -$xferconf_b_number = ereg_replace("[^0-9]","",$xferconf_b_number); -$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); -$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); -$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); -$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); -$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); -$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); -$drop_exten = ereg_replace("[^0-9]","",$drop_exten); -$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); -$park_ext = ereg_replace("[^0-9]","",$park_ext); -$hopper_level = ereg_replace("[^0-9]","",$hopper_level); -$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); -$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); -$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); -$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); -$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); -$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); -$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); -$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); -$delete_users = ereg_replace("[^0-9]","",$delete_users); -$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); -$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); -$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); -$delete_lists = ereg_replace("[^0-9]","",$delete_lists); -$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); -$delete_filters = ereg_replace("[^0-9]","",$delete_filters); -$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); -$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); -$load_leads = ereg_replace("[^0-9]","",$delete_call_times); -$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); -$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); -$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); -$modify_leads = ereg_replace("[^0-9]","",$modify_leads); -$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); -$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); -$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); -$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); -$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); -$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); -$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); -$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); -$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); -$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); -$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); -$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); -$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); -$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); -$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); -$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); -$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); -$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); -$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); -$user_start = ereg_replace("[^0-9]","",$user_start); -$phone_number = ereg_replace("[^0-9]","",$phone_number); -$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); -$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); -$hotkey = ereg_replace("[^0-9]","",$hotkey); -$list_id = ereg_replace("[^0-9]","",$list_id); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); -$allow_closers = ereg_replace("[^NY]","",$allow_closers); -$reset_hopper = ereg_replace("[^NY]","",$reset_hopper); -$amd_send_to_vmx = ereg_replace("[^NY]","",$amd_send_to_vmx); -$alt_number_dialing = ereg_replace("[^NY]","",$alt_number_dialing); -$safe_harbor_message = ereg_replace("[^NY]","",$safe_harbor_message); -$selectable = ereg_replace("[^NY]","",$selectable); -$reset_list = ereg_replace("[^NY]","",$reset_list); -$fronter_display = ereg_replace("[^NY]","",$fronter_display); -$drop_message = ereg_replace("[^NY]","",$drop_message); -$use_internal_dnc = ereg_replace("[^NY]","",$use_internal_dnc); - -### ALPHA-NUMERIC ONLY ### -$user = ereg_replace("[^0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^0-9a-zA-Z]","",$pass); -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$script_id = ereg_replace("[^0-9a-zA-Z]","",$script_id); -$submit = ereg_replace("[^0-9a-zA-Z]","",$submit); -$CoNfIrM = ereg_replace("[^0-9a-zA-Z]","",$CoNfIrM); -$campaign_cid = ereg_replace("[^0-9a-zA-Z]","",$campaign_cid); -$get_call_launch = ereg_replace("[^0-9a-zA-Z]","",$get_call_launch); -$campaign_recording = ereg_replace("[^0-9a-zA-Z]","",$campaign_recording); -$ADD = ereg_replace("[^0-9a-zA-Z]","",$ADD); -$dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$dial_prefix); -$state_call_time_state = ereg_replace("[^0-9a-zA-Z]","",$state_call_time_state); -$scheduled_callbacks = ereg_replace("[^0-9a-zA-Z]","",$scheduled_callbacks); - -### DIGITS and Dots -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); - -### DIGITS and spaces and hash and star and comma -$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_a_dtmf); -$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_b_dtmf); - -### ALPHA-NUMERIC and underscore and dash -$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); -$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); -$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); -$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); -$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); -$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); -$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); -$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); -$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); -$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); -$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); -$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); -$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); -$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); -$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); -$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); -$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); -$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); -$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); - -### ALPHA-NUMERIC and spaces -$lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); -### ALPHA-NUMERIC and hash -$group_color = ereg_replace("[^\#0-9a-zA-Z]","",$group_color); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); -$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); -$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); -$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); -$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); -$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); -$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); -$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); -$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); -$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); -$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); -$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); -$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); - -### remove semi-colons ### -$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); - -### VARIABLES TO BE mysql_real_escape_string ### -# $web_form_address -# $script_text - -##### END VARIABLE FILTERING FOR SECURITY ##### - - -# AST GUI database administration -# admin.php -# -# CHANGES -# 50315-1110 - Added Custom Campaign Statuses -# 50317-1438 - Added Fronter Display var to inbound groups -# 50322-1355 - Added custom callerID per campaign -# 50517-1356 - Added user_groups sections and user_group to vicidial_users -# 50517-1440 - Added ability to logout (must click OK with empty user/pass) -# 50602-1622 - Added lead loader pages to load new files into vicidial_list -# 50620-1351 - Added custom vdad transfer AGI extension per campaign -# 50810-1414 - modified in groups to kick out spaces and dashes -# 50908-2136 - Added Custom Campaign HotKeys -# 50914-0950 - Fixed user search by user_group -# 50926-1358 - Modified to allow for language translation -# 50926-1615 - Added WeBRooTWritablE write controls -# 51020-1008 - Added editable web address and park ext - NEW dial campaigns -# 51020-1056 - Added fields and help for campaign recording control -# 51123-1335 - Altered code to function in php globals=off -# 51208-1038 - Added user_level changes, function controls and default user phones -# 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents -# 51213-1706 - Added add/delete/modify vicidial scripts -# 51214-1737 - Added preview of vicidial script in popup window -# 51219-1225 - Added campaign and ingroups script selector and get_call_launch field -# 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button -# 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug -# 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen -# 60204-0659 - Fixed hopper reset bug -# 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets -# 60213-1100 - Added several vicidial_users permissions fields -# 60215-1319 - Added On-hold CallBacks display and links -# 60227-1226 - Fixed vicidial_inbound_groups insert bug -# 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables -# - Added status name in selected dial statuses in campaign screen -# 60417-1416 - Added vicidial_lead_filters sections -# - Changed the header links to color-coded sectional with sublinks below -# - Added filter name and script name to campaign and in-group modify sections -# - Added callback and alt dial options to campaigns section -# - Added callback, alt dial and other options to users section -# 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered -# 60421-1441 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60425-2355 - Added agent options to vicidial_users, reformatted user page -# 60502-1627 - Added drop_call_seconds and safe_harbor_ fields to campaign screen -# 60503-1228 - Added drop_call_seconds and drop_ fields to inbound groups screen -# 60505-1117 - Added initial framework for new local_call_times tables and definitions -# 60506-1033 - More revisions to the local_call_time section -# 60508-1354 - Finished call_times and state_call_times sections -# - Added modify/delete options for call_times -# 60509-1311 - Functionalize campaign dialable leads calculation -# - Change state_call_times selection from call_times to only allow one per state -# - Added dialable leads count popup to campaign screen if auto-calc is disabled -# - Added test dialable leads count popup to filter screen -# 60510-1050 - Added Wrapup seconds and Wrapup message to campaigns screen -# 60608-1401 - Added allowable inbound_groups checkboxes to CLOSER campaign detail screen -# 60609-1051 - Added add-to-dnc in LISTS section -# 60613-1415 - Added lead recycling options to campaign detail screen -# 60619-1523 - Added variable filtering to eliminate SQL injection attack threat -# 60622-1216 - Fixed HotKey addition form issues and variable filtering -# 60623-1159 - Fixed Scheduled Callbacks over-filtering bug -# - -# 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 - -$version = '1.1.12-3'; -$build = '60623-1159'; - -$STARTtime = date("U"); - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Sie haben jetzt heraus geloggt. Danke\n"; - exit; -} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGuser_level =$row[4]; - $LOGdelete_users =$row[8]; - $LOGdelete_user_groups =$row[9]; - $LOGdelete_lists =$row[10]; - $LOGdelete_campaigns =$row[11]; - $LOGdelete_ingroups =$row[12]; - $LOGdelete_remote_agents =$row[13]; - $LOGload_leads =$row[14]; - $LOGcampaign_detail =$row[15]; - $LOGdelete_scripts =$row[18]; - $LOGdelete_filters =$row[29]; - $LOGalter_agent_interface =$row[30]; - $LOGdelete_call_times =$row[32]; - $LOGmodify_call_times =$row[33]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN: "; - -if (!isset($ADD)) {$ADD=0;} - -if ($ADD==1) {$hh='users'; echo "Addieren Sie Neuen Benutzer";} -if ($ADD==11) {$hh='campaigns'; echo "Addieren Sie Neue Kampagne";} -if ($ADD==111) {$hh='lists'; echo "Addieren Sie Neue Liste";} -if ($ADD==121) {$hh='lists'; echo "Addieren Sie Neues DNC";} -if ($ADD==1111) {$hh='ingroups'; echo "Addieren Sie Neue In-Gruppe";} -if ($ADD==11111) {$hh='remoteagent'; echo "Addieren Sie Neue Remotemittel";} -if ($ADD==111111) {$hh='usergroups'; echo "Addieren Sie Neue Benutzer-Gruppe";} -if ($ADD==1111111) {$hh='scripts'; echo "Addieren Sie Neuen Index";} -if ($ADD==11111111) {$hh='filters'; echo "Addieren Sie Neuen Filter";} -if ($ADD==111111111) {$hh='times'; echo "Füge neue Anrufzeit hinzu";} -if ($ADD==1111111111) {$hh='times'; echo "Füge neue landesspezifische Anrufzeit hinzu";} -if ($ADD==2) {$hh='users'; echo "Neue Benutzer-Hinzufügung";} -if ($ADD==21) {$hh='campaigns'; echo "Neue Kampagne Hinzufügung";} -if ($ADD==22) {$hh='campaigns'; echo "Neue Kampagne Status-Hinzufügung";} -if ($ADD==23) {$hh='campaigns'; echo "Neue Kampagne HotKey Hinzufügung";} -if ($ADD==25) {$hh='campaigns'; echo "Neue Kampagne Leitung Bereiten Hinzufügung Auf";} -if ($ADD==211) {$hh='lists'; echo "Neue Liste Hinzufügung";} -if ($ADD==2111) {$hh='ingroups'; echo "Neue In-Gruppe Hinzufügung";} -if ($ADD==21111) {$hh='remoteagent'; echo "Neue Remotemittel-Hinzufügung";} -if ($ADD==211111) {$hh='usergroups'; echo "Neue Benutzer-Gruppe Hinzufügung";} -if ($ADD==2111111) {$hh='scripts'; echo "Neue Index-Hinzufügung";} -if ($ADD==21111111) {$hh='filters'; echo "Neue Filter-Hinzufügung";} -if ($ADD==211111111) {$hh='times'; echo "Neue Anrufzeit hinzufügen";} -if ($ADD==2111111111) {$hh='times'; echo "Neue landesspezifische Anrufzeit hinzufügen";} -if ($ADD==3) {$hh='users'; echo "Ändern Sie Benutzer";} -if ($ADD==31) {$hh='campaigns'; echo "Ändern Sie Kampagne";} -if ($ADD==34) {$hh='campaigns'; echo "Ändern Sie Kampagne - Grundlegende Ansicht";} -if ($ADD==311) {$hh='lists'; echo "Ändern Sie Liste";} -if ($ADD==3111) {$hh='ingroups'; echo "Ändern Sie In-Gruppe";} -if ($ADD==31111) {$hh='remoteagent'; echo "Ändern Sie Remotemittel";} -if ($ADD==311111) {$hh='usergroups'; echo "Ändern Sie Benutzer-Gruppen";} -if ($ADD==3111111) {$hh='scripts'; echo "Ändern Sie Index";} -if ($ADD==31111111) {$hh='filters'; echo "Ändern Sie Filter";} -if ($ADD==311111111) {$hh='times'; echo "Bearbeite Anrufzeit";} -if ($ADD==321111111) {$hh='times'; echo "Bearbeite Anrufzeit Landdefinitions-Liste";} -if ($ADD==3111111111) {$hh='times'; echo "Bearbeite landesspezifische Anrufzeit";} -if ($ADD=="4A") {$hh='users'; echo "Ändern Sie Benutzer - Admin";} -if ($ADD=="4B") {$hh='users'; echo "Ändern Sie Benutzer - Admin";} -if ($ADD==4) {$hh='users'; echo "Ändern Sie Benutzer";} -if ($ADD==41) {$hh='campaigns'; echo "Ändern Sie Kampagne";} -if ($ADD==42) {$hh='campaigns'; echo "Ändern Sie Kampagne Status";} -if ($ADD==43) {$hh='campaigns'; echo "Ändern Sie Kampagne HotKey";} -if ($ADD==44) {$hh='campaigns'; echo "Ändern Sie Kampagne - Grundlegende Ansicht";} -if ($ADD==45) {$hh='campaigns'; echo "Ändern Sie Kampagne Leitung Aufbereiten";} -if ($ADD==411) {$hh='lists'; echo "Ändern Sie Liste";} -if ($ADD==4111) {$hh='ingroups'; echo "Ändern Sie In-Gruppe";} -if ($ADD==41111) {$hh='remoteagent'; echo "Ändern Sie Remotemittel";} -if ($ADD==411111) {$hh='usergroups'; echo "Ändern Sie Benutzer-Gruppen";} -if ($ADD==4111111) {$hh='scripts'; echo "Ändern Sie Index";} -if ($ADD==41111111) {$hh='filters'; echo "Ändern Sie Filter";} -if ($ADD==411111111) {$hh='times'; echo "Bearbeite Anrufzeit";} -if ($ADD==4111111111) {$hh='times'; echo "Bearbeite landesspezifische Anrufzeit";} -if ($ADD==5) {$hh='users'; echo "Delete User";} -if ($ADD==51) {$hh='campaigns'; echo "Delete Kampagne";} -if ($ADD==52) {$hh='campaigns'; echo "Logout-Mittel";} -if ($ADD==511) {$hh='lists'; echo "Delete List";} -if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==51111) {$hh='remoteagent'; echo "Löschung-Direktübertragung Mittel";} -if ($ADD==511111) {$hh='usergroups'; echo "Löschung-Benutzer Group";} -if ($ADD==5111111) {$hh='scripts'; echo "Löschung-Index";} -if ($ADD==51111111) {$hh='filters'; echo "Löschung-Filter";} -if ($ADD==511111111) {$hh='times'; echo "Lösche Anrufzeit";} -if ($ADD==5111111111) {$hh='times'; echo "Lösche landesspezifische Anrufzeit";} -if ($ADD==6) {$hh='users'; echo "Delete User";} -if ($ADD==61) {$hh='campaigns'; echo "Delete Kampagne";} -if ($ADD==62) {$hh='campaigns'; echo "Logout-Mittel";} -if ($ADD==65) {$hh='campaigns'; echo "Löschung-Leitung Bereiten Auf";} -if ($ADD==611) {$hh='lists'; echo "Delete List";} -if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==61111) {$hh='remoteagent'; echo "Löschung-Direktübertragung Mittel";} -if ($ADD==611111) {$hh='usergroups'; echo "Löschung-Benutzer Group";} -if ($ADD==6111111) {$hh='scripts'; echo "Löschung-Index";} -if ($ADD==61111111) {$hh='filters'; echo "Löschung-Filter";} -if ($ADD==611111111) {$hh='times'; echo "Lösche Anrufzeit";} -if ($ADD==6111111111) {$hh='times'; echo "Lösche landesspezifische Anrufzeit";} -if ($ADD==73) {$hh='campaigns'; echo "Anzahl anrufbarer Anschlüsse";} -if ($ADD==7111111) {$hh='scripts'; echo "Vorbetrachtung-Index";} -if ($ADD==0) {$hh='users'; echo "Benutzer-Liste";} -if ($ADD==8) {$hh='users'; echo "Wiederholungsbesuche Innerhalb Des Mittels";} -if ($ADD==81) {$hh='campaigns'; echo "Wiederholungsbesuche Innerhalb Der Kampagne";} -if ($ADD==811) {$hh='campaigns'; echo "Wiederholungsbesuche Innerhalb Der Liste";} -if ($ADD==10) {$hh='campaigns'; echo "Kampagnen";} -if ($ADD==100) {$hh='lists'; echo "Listen";} -if ($ADD==1000) {$hh='ingroups'; echo "In-Gruppen";} -if ($ADD==10000) {$hh='remoteagent'; echo "Remotemittel";} -if ($ADD==100000) {$hh='usergroups'; echo "Benutzer-Gruppen";} -if ($ADD==1000000) {$hh='scripts'; echo "Indexe";} -if ($ADD==10000000) {$hh='filters'; echo "Filter";} -if ($ADD==100000000) {$hh='times'; echo "Anrufzeiten";} -if ($ADD==1000000000) {$hh='times'; echo "Landesspezische Anrufzeiten";} -if ($ADD==55) {$hh='users'; echo "Suchform";} -if ($ADD==66) {$hh='users'; echo "Suchresultate";} -if ($ADD==99999) {$hh='users'; echo "HILFE";} - -if ( ($ADD>9) && ($ADD < 99998) ) - { - ##### get scripts listing for dynamic pulldown - $stmt="SELECT script_id,script_name from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $scripts_to_print = mysql_num_rows($rslt); - $scripts_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($scripts_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $scripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $scriptname_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - ##### get filters listing for dynamic pulldown - $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_sql from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - $filters_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($filters_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $filters_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $filtername_list["$rowx[0]"] = "$rowx[1]"; - $filtersql_list["$rowx[0]"] = "$rowx[2]"; - $o++; - } - - ##### get call_times listing for dynamic pulldown - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $times_to_print = mysql_num_rows($rslt); - - $o=0; - while ($times_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $call_times_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $call_timename_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - } - -if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD==21) or ($ADD==31) or ($ADD==41) or ($ADD=="4A") or ($ADD=="4B") ) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ($ADD==31) - { - $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ($ADD==3) - { - $stmt="SELECT closer_campaigns from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_value\""; - $p=0; - while ($p<100) - { - if ($group_id_value == $groups[$p]) - { - $groups_list .= " CHECKED"; - $groups_value .= " $group_id_value"; - } - $p++; - } - $groups_list .= "> $group_id_value - $group_name_value<BR>\n"; - $o++; - } - if (strlen($groups_value)>2) {$groups_value .= " -";} - } - - - - - -$NWB = "   <a href=\"javascript:openNewWindow('$PHP_SELF?ADD=99999"; -$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 Border=0 ALT=\"HILFE\" ALIGN=TOP></A>"; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    VICIDIAL ADMIN: HILFE


    \n"; - -?> -VICIDIAL_BENUTZERTABELLE

    - -
    -Benutzernummer - Dieses fangen ist, wohin Sie dieVICIDIAL Benutzernummer Zahl setzen, kann bis 8 Stellen in der Längesein, muß mindestens 2 Buchstaben lang sein auf. - -
    -
    -
    -Kennwort - Dieses fangen ist auf, wohin Sie das VICIDIALBenutzerkennwort setzen. Sein mindestens müssen 2 Buchstaben lang. - -
    -
    -
    -Voller Name - Dieses fangen ist auf, wohin Sie den vollenNamen der VICIDIAL Benutzer setzen. Sein mindestens müssen 2Buchstaben lang. - -
    -
    -
    -Benutzer-Niveau - Dieses Menü ist, wo Sie das VICIDIALBenutzer-Benutzerniveau vorwählen. Sein muß ein Niveau von inVICIDIAL zu loggen 1,, muß waagerecht ausgerichtet grösser sein, alsals genaueres innen zu loggen 2, Benutzerniveau 8 oder grösser seinmüssen, in admin Netzabschnitt zu erhalten. - -
    -
    -
    -Benutzer-Gruppe - Dieses Menü ist, wo Sie die VICIDIALBenutzergruppe vorwählen, daß dieser Benutzer gehört. Dieses hatkeine Beschränkungen diesmal, ist dieses gerecht, Benutzer zuunterteilen und die zukünftigen Eigenschaften zuzulassen, die nachihm gegründet werden. - -
    -
    -
    -Telefon-LOGON - Für hier ist, wo Sie einen RückstellungTelefon-LOGON-Wert wenn die Benutzermaschinenbordbücher invicidial.php einstellen können. Dieser Wert bevölkert dasphone_login automatisch wenn die Benutzermaschinenbordbücher innenmit ihrer Benutzer-überschreiten-Kampagne auf dem vicidial.phpLOGON-Schirm. - -
    -
    -
    -Telefon-Durchlauf - Für hier ist, wo Sie einen RückstellungTelefon-Durchlaufwert wenn die Benutzermaschinenbordbücher invicidial.php einstellen können. Dieser Wert bevölkert die phone_passautomatisch wenn die Benutzermaschinenbordbücher innen mit ihrerBenutzer-überschreiten-Kampagne auf dem vicidial.php LOGON-Schirm. - -
    -
    -
    -HotKeys aktiv - Diese Wahl, wenn Satz bis 1 dem Benutzer erlaubt,die HotKeys schnelle-dispositioning Funktion innen zu verwenden vicidial.php. - -
    -
    -
    -Mittel wählen Ingroups - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, die ingroups zu wählen, denen sie Anrufe von wenn sie LOGONzu einer GENAUEREN oder INBOUND Kampagne empfangen. Andernfalls mußder Manager dieses auf ihrem Benutzersonderkommandoschirm der adminSeite einstellen. - -
    -
    -
    -Inbound Gruppen - Ist hier, wo Sie die inbound Gruppen vorwählen,die Sie Anrufe von empfangen möchten, wenn Sie die GENAUERE Kampagnevorgewählt haben. - -
    -
    -
    -Zeitlich geplante Wiederholungsbesuche - Diese Wahl erlaubt einemMittel zur Einteilung einen Anruf als CALLBK und wählt die Daten unddie Zeit, an denen die Leitung reaktiviert wird. - -
    -
    -
    -Mittel-Nur Wiederholungsbesuche - Diese Wahl erlaubt einemVertreter, einen Wiederholungsbesuch einzustellen, damit sie daseinzige Mittel sind, das die Kunde Rückseite benennen kann. Dieseserlaubt auch dem Vertreter, ihre Wiederholungsbesuch Auflistungen zusehen und sie zurück zu benennen, immer wenn sie zu wünschen. - -
    -
    -
    -Vertreter-Anruf-Handbuch - Diese Wahl erlaubt einem Vertreter,eine neue Leitung in das System manuell einzutragen und sie zubenennen. Dieses auch erlaubt das Benennen jeder möglicherTelefonnummer von ihrem vicidial Schirm und setzt diesen Anruf inihren Lernabschnitt. Verwenden Sie diese Wahl mit Vorsicht. - -
    -
    -
    -Vicidial Aufnahme - Diese Wahl kann verhindern, daß ein Mittelalle mögliche Aufnahmen tut, nachdem sie innen in vicidialprotokollieren. Diese Wahl muß eingeschaltet sein, damit vicidial demKampagne Aufnahmelernabschnitt folgt. - -
    -
    -
    -Vicidial Übertragungen - Diese Wahl kann verhindern, daß einMittel die Übertragung - Konferenzlernabschnitt von vicidial öffnet.Wenn dieses untauglich ist, kann das Mittel nicht dritterParteianruf, oder blinde Übertragung irgendeine benennt. - -
    -
    -
    -Genauere Rückstellung gemischt - Diese Wahl fällt einfach dasgemischte checkbox auf einem GENAUEREN LOGON-Schirm zurück. - -
    -
    -
    -Ändern Sie Mittel-Schnittstelle Wahlen - diese Wahl, wenn Satzbis 1 dem administrativen Benutzer erlaubt, die MittelschnittstelleWahlen in admin.php zu ändern. - -
    -
    -
    -Löschung-Benutzer - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, andere Benutzer des Gleichgestellten oder wenigenBenutzerniveaus aus dem System zu löschen. - -
    -
    -
    -Löschung-Benutzer-Gruppen - Diese Wahl, wenn Satz bis 1 demBenutzer erlaubt, Benutzergruppen aus dem System zu löschen. - -
    -
    -
    -Löschung verzeichnet - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, vicidial Listen aus dem System zu löschen. - -
    -
    -
    -Löschung wirbt - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, vicidial Kampagnen aus dem System zu löschen. - -
    -
    -
    -Löschung In-Gruppen - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, vicidial In-Gruppen aus dem System zu löschen. - -
    -
    -
    -Löschung-Remotemittel - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, vicidial Remotemittel aus dem System zu löschen. - -
    -
    -
    -Last führt - Diese Wahl, wenn Satz bis 1 dem Benutzer erlaubt,vicidial Leitungen in die vicidial_list Tabelle über die Netzgegründete Leitung Ladevorrichtung zu laden. - -
    -
    -
    -Kampagne Detail - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, die Kampagne Detail-Schirmelemente anzusehen und zu ändern. - -
    -
    -
    -AGC Admin Zugang - Diese Wahl, wenn Satz bis 1 den Benutzer zumLOGON zu den astGUIclient admin Seiten erlaubt. - -
    -
    -
    -AGC Löschung-Telefone - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, Telefoneintragungen in den astGUIclient admin Seiten zulöschen. - -
    -
    -
    -Löschung-Indexe - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, Kampagne Indexe auf dem Indexänderung Schirm zu löschen. - -
    -
    -
    -Ändern Sie Leitungen - Diese Wahl, wenn Satz bis 1 dem Benutzererlaubt, Leitungen in der admin Abschnittleitung Suchresultate Seitezu ändern. - -
    -
    -
    -Ändern Sie Vertreter-Kampagne - Diese Wahl, wenn Satz bis 1 demBenutzer erlaubt, die Kampagne zu ändern, daß ein Mittel in geloggtwird, während sie in es geloggt werden. - -
    -
    -
    -Löschung filtert - Diese Wahl erlaubt dem Benutzer, in der LagezuSEIN, vicidial Leitung Filter aus dem System zu löschen. - -
    -
    -
    -Löschen Anrufzeiten - Diese Option erlaubt dem Nutzer die Vicidial Anrufzeiten Aufzeichnungen und Vicidial Status Anrufzeiten Aufzeichnungen vom System zu löschen. - -
    -
    -
    -Ändere Anrufzeiten - Diese Option erlaubt dem Nutzer das Ansehen und Ändern der Anrufzeiten und Status Anrufzeiten Aufzeichnungen. Ein Nutzer braucht diese Option nicht aktiviert, wenn er nur die Anrufzeit Option auf der Kampagnen-Sicht ändern können muss. - - - - -



    - -VICIDIAL_KAMPAGNENTABELLE

    -
    -
    -Kampagne Identifikation - Dieses ist der kurze Name der Kampagne,es ist nicht editable nach Ausgangsunterordnung, kann nicht Räumeenthalten und muß zwischen 2 und 8 Buchstaben im lengt seinh. - -
    -
    -
    -Kampagne Name - Dieses ist die Beschreibung der Kampagne, muß eszwischen 6 und 40 Buchstaben lang sein. - -
    -
    -
    -Aktiv - Dieses ist, wohin Sie die Kampagne auf aktives oderunaktiviertes einstellen. Wenn unaktiviert, kann noone in es loggen. - -
    -
    -
    -Park-Verlängerung - Dieses ist, wo Sie besonders anfertigenkönnen auf-halten Musik für VICIDIAL. Stellen Sie sicher, daß dieVerlängerung im Platz im extensions.conf ist und das, das es auf denDateinamen unten zeigt. - -
    -
    -
    -Park-Dateiname - Dieses ist, wo Sie besonders anfertigen könnenauf-halten Musik für VICIDIAL. Stellen Sie sicher, daß der Dateiname10 Buchstaben lang oder kleiner ist und daß die Akte im Platz im/var/lib/asterisk/sounds Verzeichnis ist. - -
    -
    -
    -Netz-Form - Dieses ist, wo Sie die kundenspezifische Webseiteeinstellen können, die geöffnet ist, wenn der Benutzer an dieNETZ-FORM-Taste klickt. - -
    -
    -
    -Erlauben Sie Closers - Dieses ist, wo Sie einstellen können, obdie Benutzer dieser Kampagne die Wahl haben, zum des Anrufs zu einemgenauerem zu schicken. - -
    -
    -
    -Vorwahlknopf-Status - Dieses ist, wohin Sie die Status einstellen,die Sie an innerhalb der Listen wählen wünschen, die für dieKampagne unten aktiv sind - -
    -
    -
    -Liste Auftrag - Dieses Menü ist, wo Sie vorwählen, wie dieLeitungen, die die Status zusammenbringen, die oben vorgewähltwerden, in den Leitung Zufuhrbehälter eingesetzt werden: -
      - DOWN: wählen Sie die ersten Leitungen vor, die in die vicidial_list Tabellegeladen werden -
      - UP: wählen Sie die letzten Leitungen vor, die in die vicidial_listTabelle geladen werden -
      - UP PHONE: wählen Sie die höchste Telefonnummer und die Arbeiten seine Weiseunten vor -
      - DOWN PHONE: wählen Sie die niedrigste Telefonnummer und die Arbeiten seine Weiseoben vor -
      - UP LAST NAME: Anfänge mit letzten Namen beginnend mit Z und Arbeiten seine Weiseunten -
      - DOWN LAST NAME: Anfänge mit letzten Namen beginnend mit A und Arbeiten seine Weiseoben -
      - UP COUNT: Anfänge mit benannten Leitungen und Arbeiten seine Weise unten -
      - DOWN COUNT: Anfänge mit wenigen benannten Leitungen und Arbeiten seine Weiseoben -
      - DOWN COUNT 2nd NEW: Anfänge mit wenigen benannten Leitungen und Arbeiten seine Weise, dieoben eine NEUE Leitung in jeder anderen Leitung einsetzt - dürfenNICHT NEUES haben vorgewählt in den Vorwahlknopfstatus -
      - DOWN COUNT 3nd NEW: Anfänge mit wenigen benannten Leitungen und Arbeiten seine Weise, dieoben eine NEUE Leitung in jeder dritten Leitung einsetzt - dürfenNICHT NEUES haben vorgewählt in den Vorwahlknopfstatus -
      - DOWN COUNT 4th NEW: Anfänge mit wenigen benannten Leitungen und Arbeiten seine Weise, dieoben eine NEUE Leitung in jedem einsetzt weiter, führen Sie - darfNICHT NEUES haben vorgewählt in den Vorwahlknopfstatus - -
    -
    -
    -Zufuhrbehälter waagerecht ausgerichtet - Dieses ist, wieviele dieVDhopper Indexversuche führt, um in der vicidial_hopper Tabelle fürdiese Kampagne zu halten. Wenn Sie VDhopper Index jede Minute laufenlassen, bilden Sie dieses etwas grösser als die Zahl Leitungen, dieSie in eine Minute durchmachen. - -
    -
    -
    -Leitung Filter - Dieses ist eine Methode der Entstörung IhrerLeitungen mit einem Fragment einer SQL Frage. Benutzen Sie dieseFunktion mit Vorsicht, es ist einfach mit, der geringfügigstenÄnderung zur SQL Aussage versehentlich zu wählen zu stoppen.Rückstellung ist KEINE. - -
    -
    -
    -Kraft-Zurückstellen des Zufuhrbehälters - erlaubt dieses Ihnen,aus dem Zufuhrbehälterinhalt nach Formunterordnung abzuwischen. Essollte wieder gefüllt werden, wenn der VDhopper Index läuft. - -
    -
    -
    -Selbstvorwahlknopf-Niveau - Dieses ist, wohin Sie einstellen,wieviele VICIDIAL sollte pro Mittel 0 verwenden des aktiven Mittelsnull zeichnet, Automobil, daswählen aus ist und die Mittel klicken,um jede Nummer zu wählen. Andernfalls hält VICIDIALWählverbindungen gleich den aktiven Mitteln, die mit demVorwahlknopfniveau multipliziert werden, um zu, wievielen Linien zukommen diese Kampagne auf jedem Bediener erlauben sollte. - -
    -
    -
    -Folgender Vertreter-Anruf - Dieses stellt fest, welches Mittel denfolgenden Anruf empfängt, der vorhanden ist: -
      - random: Aufträge durch den gelegentlichen Updatewert in dervicidial_live_agents Tabelle -
      - oldest_call_start: Aufträge bis zum dem letzten Mal ein Mittel wurden einem Anrufgeschickt. Resultate in den Mitteln, die insgesamt ungefähr gleicheZahl von Anrufen empfangen. -
      - oldest_call_finish: Aufträge bis zum dem letzten Mal ein Mittel beendeten einen Anruf.Das AKA Mittel, das am längsten wartet, empfängt ersten Anruf. -
      - overall_user_level: Aufträge durch das user_level des Mittels, wie inden vicidial_users definiert legen ein höheres user_level empfangenmehr Anrufe ver. - -
    -
    -
    -Ortsgespräch-Zeit - Dieses ist, wohin Sie während welcherStunden Sie wählen möchten, wie bis zum der lokalen Zeit infestgestellt sind einstellten in, welchem Sie benennen. Dieses wirddurch Ortsnetzkennzahl gesteuert und wird auf Tageslicht-SparungenZeit eingestellt, wenn anwendbar. Allgemeine Richtlinien in den USAfür Geschäft zum Geschäft ist 9am bis 5pm und Geschäft zu denVerbraucheranrufen ist 9am bis 9pm. - -
    -
    -
    -Vorwahlknopf-Abschaltung - Wenn Sie, Anrufe, die normalerweiseHängezustand wurden, nachdem die Abschaltung, die in extensions.confanstatt Abschaltung an dieser Menge Sekunden definiert wurde wurde,wenn sie kleiner ist, als die extensions.conf Abschaltung definiertwerden. Dieses läßt schnell ändernde Vorwahlknopfabschaltungen vomBediener zum Bediener und zum Begrenzen der Effekte zu einer einzelnenKampagne zu. Wenn Sie eine Menge antwortende Maschine oder VoicemailAnrufe haben, können Sie diesen Wert, bis zwischen 21-26 zu ändernversuchen und sehen wünschen, wenn Resultate verbessern. - -
    -
    -
    -Vorwahlknopf-Präfix - Dieses fangen zuläßt einen Wegdes Wählens leicht ändern auf, zum durch eine andere Methode zuerlöschen, ohne ein Umladen im Sternchen zu tun. Rückstellung ist 9gegründet nach einem 91NXXNXXXXXX im dialplan - extensions.conf. - -
    -
    -
    -Kampagne CallerID - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service(RBS) circuits. This will also work through most VOIP(SIP or IAX trunks) providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. - -
    -
    -
    -Kampagne VDAD Verlängerung - Dieses fangen zuläßt eineGewohnheit VDAD Übergangsverlängerung auf. Dieses erlaubt Ihnen,unterschiedliche VDADtransfer... agi Indexe zu benutzen, abhängendnach Ihrer Kampagne. Die Rückstellung Übertragung AGI - exten 8365agi-VDADtransfer.agi - gerade sendet sofort ersucht zu den Mitteln,sobald sie aufgehoben werden. Eine zusätzliches BeispielpolitischeÜbersicht AGI ist auch jetzt eingeschlossenes - 8366agi-VDADtransferSURVEY.agi - dieses Spiele eine Anzeige zurangerufenen Person und läßt sie eine Wahl treffen, indem sie Tastenbetätigt - effektiv Vorsiebung die Leitung -. Merken Sie bitte dasaußer Übersichten, politische Anrufe und Nächstenliebe diese Formdes Benennens ist in den Vereinigten Staaten ungültig. - -
    -
    -
    -Kampagne Rec Verlängerung - Dieses fangen darf auf,damit eine kundenspezifische Aufnahmeverlängerung mit VICIDIALverwendet werden kann. Dieses erlaubt Ihnen, unterschiedlicheVerlängerungen zu verwenden, abhängend nach, wie lang Sie einemaximale Aufnahme erlauben möchten und welcher Art von Codec Sieinnen notieren möchten. Die Rückstellung exten ist 8309, die, wennSie folgen die SCRATCH_INSTALL Beispiele im WAV Format bis zu einerStunde lang notieren. Eine andere Wahl, die in den Beispieleneingeschlossen ist, ist 8310, die im G/M Format bis zu einer Stundelang notieren. - -
    -
    -
    -Kampagne Aufnahme - Dieses Menü erlaubt Ihnen, zu wählen,welches Niveau der Aufnahme auf dieser Kampagne erlaubt wird. NIEsperrt Aufnahme auf dem Klienten. ONDEMAND ist die Rückstellung underlaubt dem Vertreter zu notieren zu beginnen und, zu stoppen, wiegebraucht. ALLCALLS beginnt Aufnahme auf dem Klienten, wann immer einAnruf zu einem Mittel geschickt wird. - -
    -
    -
    -Kampagne Rec Dateiname - Dieses fangen erlaubt Ihnen, denNamen der Aufnahme besonders anzufertigen auf, wenn Kampagne AufnahmeONDEMAND oder ALLCALLS ist. Die erlaubten Variablen sind KAMPAGNECUSTPHONE FULLDATE TINYDATE EPOCHE-MITTEL. Die Rückstellung istFULLDATE_MITTELund würde wie dieses 20051020-103108_6666 aussehen.Ein anderes Beispiel ist CAMPAIGN_TINYDATE_CUSTPHONE, das wie diesesTESTCAMP_51020103108_3125551212 aussehen würde. 50 char max. - -
    -
    -
    -Kampagne Index - Dieses Menü erlaubt Ihnen, den Index zu wählen,der auf dem Mittelschirm für diese Kampagne erscheint. Wählen SieKEINE vor, keinen Index für diese Kampagne zu zeigen. - -
    -
    -
    -Erhalten Sie Anruf-Produkteinführung - Dieses Menü erlaubt Ihnenzu wählen, ob Sie Automobil-ausstoßen die Netz-Form Seite in einemunterschiedlichen Fenster, Auto-switch zum INDEX-Vorsprung oder tunnichts wünschen, wenn ein Anruf zum Mittel für diese Kampagnegeschickt wird. - -
    -
    -
    -Antwortende Maschine Anzeige - Dieses fangen ist für dasHereinkommen auf, in eine Verlängerung, zum von von Übergangsanrufenzu blind zu machen, wenn das Mittel eine antwortende Maschine erhältund an die antwortende Maschine Anzeige Taste imÜbergangskonferenzrahmen klickt. Sie müssen dieses einstellen extenoben im dialplan - extensions.conf - und sicherstellen, daß esspielt, eine Audioakte dann oben hängt. - -
    -
    -
    -AMD senden zu VM exten - erlaubt dieses Menü Ihnen zu definieren,ob eine Anzeige auf einer antwortenden Maschine gelassen wird, wennihr der Anruf wird sofort nachgeschickt zur Antworten-Maschine-AnzeigeVerlängerung ermittelt wird, wenn AMD aktiv ist und es festgestelltwird, daß der Anruf eine antwortende Maschine ist. - -
    -
    -
    -Xfer-Conf DTMF - Diese vier fängt dürfen auf, damit Siezwei Sätze Übergangskonferenz und DTMF Voreinstellungen haben. Wennder Anruf oder die Kampagne geladen wird, stellt der vicidial.phpIndex dar, daß zwei Tasten auf dem Bringenkonferenz Rahmen und denZahl-zu-Vorwahlknopf und senden-dtmf Automobil-zu bevölkernauffängt, wenn sie betätigt werden. - -
    -
    -
    -Numerisches Wählen des Mittel-Alt - erlaubt diese Wahl einemVertreter, die wechselnde Telefonnummer manuell zu wählen, oderaddress3 fangen auf, nachdem die Hauptzahl benannt wordenist. - -
    -
    -
    -Zeitlich geplante Wiederholungsbesuche - Diese Wahl erlaubt einemMittel zur Einteilung einen Anruf als CALLBK und wählt die Daten unddie Zeit, an denen die Leitung reaktiviert wird. - -
    -
    -
    -Sekunden zur Verbindung - Anzahl der Sekunden vom Abnehmen des Kunden bis zur Erkennung als Verbindung, betrifft nur abgehende Verbindungen. - -
    -
    -
    -Voicemail - Wenn sie definiert werden, würden Anrufe, dienormalerweise FALLEN würden, anstatt auf diesen voicemail Kastenverwiesen, um eine Anzeige zu hören und zu lassen. - -
    -
    -
    -Sicherheitsnachricht - Wenn auf Y gesetzt wird dem Kunden nach Ablauf der Sekunden zur Verbindung, ohne zu einem Agenten verbunden worden zu sein, eine Nachricht abgespielt. Diese Einstellung setzt die Option Senden zu einer Voicemail Kasten ausser Kraft, wenn diese auf Y steht. - -
    -
    -
    -Sicherheitsnebenstelle - Dies ist die Wählplan Nebenstelle, wo sich die gewünschte Sicherheits-Audiodatei auf Ihrem Server befindet. - -
    -
    -
    -Sekunden Nachbereitung - Anzahl der Sekunden, die ein Agent bis zum nächsten erhaltenen Anruf oder Wählen eines anderen Anrufs warten muss. Die Zeit beginnt, sobald ein Agent bei seinem Kunden aufgelegt hat - oder im Fall der alternativen Nummernwahl, wenn ein Agent das Telefonat beendet - Standard ist 0 Sekunden. Wenn die Zeit abgelaufen ist bevor der Agent den Anruf eingeordnet hat, wird der Agent dennoch nicht zum nächsten Anruf kommen, bevor er eine Einteilung gewählt hat. - -
    -
    -
    -Nachbereitungsnachricht - Dies ist eine Kampagnen-spezifische Nachricht, die bei gesetzten Sekunden Nachbereitung auf dem Nachbereitungsbildschirm angezeigt wird. - -
    -
    -
    -Nachbereitungsnachricht - Dies ist eine Kampagnen-spezifische Nachricht, die bei gesetzten Sekunden Nachbereitung auf dem Nachbereitungsbildschirm angezeigt wird. - -
    -
    -
    -Interne DNC Liste des Gebrauch-- definiert dieses, ob dieseKampagne Leitungen gegen die interne DNC Liste filtern soll. Wenn esauf Y eingestellt wird, sucht der Zufuhrbehälter nach jederTelefonnummer in der DNC Liste, bevor er sie in den Zufuhrbehälterlegt. Wenn er in der DNC Liste ist, dann, das sie dieses führt Statuszu DNCL also ändert, kann sie nicht gewählt werden. Rückstellungist N. - -
    -
    -
    -Gewährte Inbound Gruppen - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound/outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. - - - -



    - -VICIDIAL_LISTENTABELLE

    -
    -
    -Liste Identifikation - Dieses ist der numerische Name der Liste,es ist nicht editable nach Ausgangsunterordnung, muß nur Zahlenenthalten und muß zwischen 2 und 8 Buchstaben lang sein. - -
    -
    -
    -Liste Name - This is the description of the list, it must be between 2 and 20 characters in length. - -
    -
    -
    -Kampagne - This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time. - -
    -
    -
    -Aktiv - Dieses definiert, ob die Liste an oder nicht gewähltwerden soll. - -
    -
    -
    -Stellen Sie Führen-Benennen-Status für diese Liste - zurückstellt dieses alle Leitungen in dieser Liste zu N für das benannte\"not da letztes Zurückstellen \" zurück und bedeutet, daß jedemögliche Leitung jetzt benannt werden kann, wenn es der rechte Statusist, wie auf dem Kampagne Schirm definiert. - -
    -
    -
    -VICIDIAL DNC Liste - Dieses benennen nicht Liste enthält jedeLeitung, die auf einen Status von DNC im System eingestellt wordenist. Durch die LISTEN - FÜGEN Sie ZAHL DNC Seite hinzu, die Sie inder LageSIND, eine Zahl dieser Liste manuell hinzuzufügen, damit sienicht durch Kampagnen benannt wird, die die interne DNC Listebenutzen. - - - -



    - -VICIDIAL_INBOUND_GROUPSTABELLE

    -
    -
    -Gruppe Identifikation - Dieses ist der kurze Name der inboundGruppe, es ist nicht editable nach Ausgangsunterordnung, darf keineRäume enthalten und muß zwischen 2 und 20 Buchstaben lang sein. - -
    -
    -
    -Gruppe Name - Dieses ist die Beschreibung der Gruppe, muß eszwischen 2 und 30 Buchstaben lang sein. Kann nicht Schläge, plussesoder Räume einschließen . - -
    -
    -
    -Gruppe Farbe - Dieses ist die Farbe, die in der VICIDIAL KlientAPP anzeigt, wenn ein Anruf auf diese Gruppe hereinkommt. Es mußzwischen 2 und 7 Buchstaben lang sein. Wenn dieses eine HexagonfarbeDefinition ist, müssen Sie sich erinnern, sich a # am Anfang derZeichenkette zu setzen, oder VICIDIAL arbeitet nicht richtig. - -
    -
    -
    -Aktiv - Dieses stellt fest, ob diese Gruppe oben imVorwählerkasten wenn Maschinenbordbücher eines VICIDIAL Mittelsinnen zeigen. - -
    -
    -
    -Netz-Form - Dieses ist die kundenspezifische Adresse, die dasKlicken auf der NETZ-FORM-Taste in VICIDIAL Ihnen für zu den Anrufennimmt, die auf diese Gruppe hereinkommen. - -
    -
    -
    -Folgender Vertreter-Anruf - Dieses stellt fest, welches Mittel denfolgenden Anruf empfängt, der vorhanden ist: -
      - random: Aufträge durch den gelegentlichen Updatewert in dervicidial_live_agents Tabelle -
      - oldest_call_start: Aufträge bis zum dem letzten Mal ein Mittel wurden einem Anrufgeschickt. Resultate in den Mitteln, die insgesamt ungefähr gleicheZahl von Anrufen empfangen. -
      - oldest_call_finish: Aufträge bis zum dem letzten Mal ein Mittel beendeten einen Anruf.Das AKA Mittel, das am längsten wartet, empfängt ersten Anruf. -
      - overall_user_level: Aufträge durch das user_level des Mittels, wie inden vicidial_users definiert legen ein höheres user_level empfangenmehr Anrufe ver. - -
    -
    -
    -Fronter Anzeige - Dieses fangen feststellt auf, ob dasinbound VICIDIAL Mittel den fronter Namen - wenn es einen gibt -angezeigt im Status auffangen haben würde, wann der Anrufzum Mittel kommt. - -
    -
    -
    -Kampagne Index - Dieses Menü erlaubt Ihnen, den Index zu wählen,der auf dem Mittelschirm für diese Kampagne erscheint. Wählen SieKEINE vor, keinen Index für diese Kampagne zu zeigen. - -
    -
    -
    -Erhalten Sie Anruf-Produkteinführung - Dieses Menü erlaubt Ihnenzu wählen, ob Sie Automobil-ausstoßen die Netz-Form Seite in einemunterschiedlichen Fenster, Auto-switch zum INDEX-Vorsprung oder tunnichts wünschen, wenn ein Anruf zum Mittel für diese Kampagnegeschickt wird. - -
    -
    -
    -Xfer-Conf DTMF - Diese vier fängt dürfen auf, damit Siezwei Sätze Übergangskonferenz und DTMF Voreinstellungen haben. Wennder Anruf oder die Kampagne geladen wird, stellt der vicidial.phpIndex dar, daß zwei Tasten auf dem Bringenkonferenz Rahmen und denZahl-zu-Vorwahlknopf und senden-dtmf Automobil-zu bevölkernauffängt, wenn sie betätigt werden. - -
    -
    -
    -Sekunden zur Verbindung - Anzahl der Sekunden vom Abnehmen des Kunden bis zur Erkennung als Verbindung, betrifft nur abgehende Verbindungen. - -
    -
    -
    -Voicemail - Wenn sie definiert werden, würden Anrufe, dienormalerweise FALLEN würden, anstatt auf diesen voicemail Kastenverwiesen, um eine Anzeige zu hören und zu lassen. - -
    -
    -
    -Verbindungs-Nachricht- Wenn auf Y gesetzt wird dem Kunden nach Ablauf der Sekunden zur Verbindung, ohne zu einem Agenten verbunden worden zu sein, eine Nachricht abgespielt. Diese Einstellung setzt die Option Senden zu einer Voicemail Kasten ausser Kraft, wenn diese auf Y steht. - -
    -
    -
    -Verbindungs-Nebenstelle - Dies ist die Wählplan-Nebenstelle, wo sich die gewünschte Audiodatei für die aufgebaute Verbindung auf Ihrem Server befindet. - - - -



    - -VICIDIAL_REMOTE_AGENTSTABELLE

    -
    -
    -Benutzernummer Anfang - Dieses ist die beginnende Benutzernummer,die verwendet wird, wenn die Remotemitteleintragungen in das Systemeingesetzt werden. Wenn die Zeilenzahl in hohem Grade als 1eingestellt wird, wird diese Zahl durch eine erhöht, bis jede Linieeine Eintragung hat. Stellen Sie, ein neues VICIDIAL Benutzerkonto miteinem Benutzerniveau von 4 zu verursachen oder groß sicher, wenn Siesie in der LageSEIN wünschen, die vdremote.php Seite fürRemotenetzzugang dieses Kontos zu benutzen. - -
    -
    -
    -Zeilenzahl - Dieses definiert, wievieles Remotemittel Eintragungendas System verursacht, und stellt fest, wieviele Linien es denkt, daßes zur Zahl unter sicher senden kann. - -
    -
    -
    -Bediener IP - Eine Remotemitteleintragung ist für einenspezifischen Bediener, ist hier nur gut, wo Sie vorwählen, dasBediener Sie wünschen. - -
    -
    -
    -Externe Verlängerung - Dieses ist die Zahl, daß Sie die Anrufewünschen, die zu nachgeschickt werden. Überprüfen Sie, ob es einevolle dialplan Zahl ist und daß, wenn Sie 9 am Anfang benötigen, Sieihn innen hier setzen. Prüfen Sie, indem Sie diese Nummer von einemTelefon auf dem System wählen. - -
    -
    -
    -Status - Ist hier, wo Sie das Remotemittel an und abstellen.Sobald das Mittel aktiv ist, nimmt das System an, daß es Anrufe zuihm schicken kann. Es kann bis 30 Sekunden dauern, sobald Sie denStatus zu unaktiviertem ändern, um Anrufe, zu empfangen zu stoppen. - -
    -
    -
    -Kampagne - Ist hier, wo Sie die Kampagne vorwählen, daß dieseRemotemittel in geloggt werden. Inbound Notwendigkeiten, die GENAUEREKampagne zu verwenden und die inbound Kampagnen unter dervorzuwählen, die Sie Anrufe von empfangen möchten. - -
    -
    -
    -Inbound Gruppen - Ist hier, wo Sie die inbound Gruppen vorwählen,die Sie Anrufe von empfangen möchten, wenn Sie die GENAUERE Kampagnevorgewählt haben. - - -



    - -VICIDIAL_CAMPAIGN_LISTEN

    -
    -
    -Die Listen innerhalb dieser Kampagne werden hier verzeichnet, ob siewerden bezeichnet durch das Y aktiv sind, oder N und Sie zum ListeSchirm gehen können, indem sie auf der Liste Identifikation in derersten Spalte klicken. - - -



    - -VICIDIAL_CAMPAIGN_STATUSESTABELLE

    -
    -
    -Durch den Gebrauch von kundenspezifischen Kampagne Status, können SieStatus haben, die nur für eine spezifische Kampagne bestehen. DerStatus muß 1-8 Buchstaben lang sein, muß die Beschreibung 2-30Buchstaben lang sein und auswählbar definiert, ob es oben in VICIDIALals Einteilung zeigt. - - - -



    - -VICIDIAL_CAMPAIGN_HOTKEYSTABELLE

    -
    -
    -Durch den Gebrauch von kundenspezifischen Kampagne hotkeys, benenntVertreter, die verwenden, der vicidial Netz-Klient Dose Hängezustandund Einteilung, gerade indem sie einen einzelnen Schlüssel auf ihrerTastatur betätigen. - - - - -



    - -VICIDIAL_LEAD_RECYCLETABELLE

    -
    -
    -Durch den Gebrauch von Leitung aufbereitend, können Sie spezifischeStatus der Leitungen in einem spezifizierten Abstand wieder benennen,ohne die gesamte Liste zurückzustellen. Die Leitung Wiederverwertungist Kampagne-spezifisch und muß nicht ein vorgewählter dialableStatus in Ihrer Kampagne sein. Der Versuch verzögertauffangen ist die Zahl Sekunden, bis die Leitung in denZufuhrbehälter zurück gelegt sein kann, diese Zahl muß mindestens120 Sekunden sein. Das Versuch Maximum fangen ist dieHöchstzahl der Zeiten auf, die eine Leitung dieses Status versuchtwerden kann, bevor die Liste zurückgestellt werden muß, diese Zahlkann von 1 bis 10 sein. Sie können aktivieren und eine Leitung zuentaktivieren bereiten Sie Eintragung mit den zur Verfügunggestellten Verbindungen auf. Diese Eigenschaft arbeitet nur imAutomobil-Vorwahlknopf Modus, in dem Vorwahlknopfniveau grösser als 0ist. - - - - - -



    - -VICIDIAL_USER_GROUPSTABELLE

    -
    -
    -Benutzer-Gruppe - Dieses ist der kurze Name einer VicidialBenutzergruppe, der Versuch, zum keiner Räume zu benutzen, oderInterpunktion für dieses fangen Maximum 20 Buchstaben,Minimum von 2 Buchstaben auf. - -
    -
    -
    -Gruppe Name - Dieses ist die Beschreibung des vicidialBenutzergruppe Maximums von 40 Buchstaben. - - - - - -



    - -VICIDIAL_INDEXETABELLE

    -
    -
    -Index Identifikation - Dieses ist der kurze Name eines VicidialIndexes. Dieser muß ein einzigartiger Bezeichner sein. Der Versuch,zum keiner Räume oder die Interpunktion für dieses zu benutzenfangen Maximum 10 Buchstaben, Minimum von 2 Buchstaben auf. - -
    -
    -Index-Name - Dieses ist der Titel einem Vicidial Index. Dieses isteine kurze Zusammenfassung der Indexmaximum 50 Buchstaben, Minimum von2 Buchstaben. Es sollte keine Räume geben, oder Interpunktionirgendwie der Art in den theis fangen auf. - -
    -
    -Index kommentiert - Dieses ist, wo Sie Anmerkungen für einenVicidial Index wie - geändert, um Aufsteigen an Sept. 23 freizugeben-. Maximum 255 Buchstaben setzen können, Minimum von 2 Buchstaben. - -
    -
    -Index-Text - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments. For example, this sentence would print the persons name in it----

    Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

    This would read----

    Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today? - -
    -
    -
    -Aktiv - Dieses stellt fest, ob dieser Index vorgewählt werdenkann, durch eine Kampagne verwendet zu werden. - - - - - -



    - -VICIDIAL_LEAD_FILTERTABELLE

    -
    -
    -Filter Identifikation - Dieses ist der kurze Name eines VicidialLeitung Filter. Dieser muß ein einzigartiger Bezeichner sein.Benutzen Sie keine Räume, oder Interpunktion für diesesfangen Maximum 10 Buchstaben, Minimum von 2 Buchstaben auf. - -
    -
    -Filter-Name - Dieses ist ein beschreibenderer Name des Filter.Dieses ist eine kurze Zusammenfassung der Filtermaximum 30 Buchstaben,Minimum von 2 Buchstaben. - -
    -
    -Filter kommentiert - Dieses ist, wo Sie Anmerkungen für einenVicidial Filter wie - Anrufe alle Kalifornien Leitungen -. Maximum 255Buchstaben setzen können, Minimum von 2 Buchstaben. - -
    -
    -Filter SQL - Dieses ist, wohin Sie das SQL Frage Fragment setzen,das Sie vorbei filtern möchten anfangen nicht, oder Ende mit UND, dasdurch den Zufuhrbehälter cron Index automatisch hinzugefügt wird.eine Beispiel SQL Frage, die hier arbeiten würde, ist called_count \4 und called_count \. - - - - - -



    - -VICIDIAL_AnrufzeitenTABELLE

    -
    -
    -Anrufzeit ID - Dies ist der kurze Name von einer Vicidial Anrufzeit Definition. Es muss ein eindeutiger Bezeichner sein. Leerzeichen und Punkte sind in diesem Feld nicht erlaubt. Maximal 10 Zeichen, mindestens 2. - -
    -
    -Anrufzeit Name - Dies ist ein besser beschreibender Name für die Anrufzeit Definition. Es ist eine kurze Zusammenfassung der Anrufzeit Definition. Maximal 30 Zeichen, mindestens 2. - -
    -
    -Anrufzeit Kommentare - Hier können Sie Kommentare für eine Vicidial Anrufzeit Definition wie -10 bis 14 Uhr mit eigenen Beschränkungen für das angerufene Land- machen. Maximal 255 Zeichen. - -
    -
    -Standard Start and Stop Zeiten - Dies ist die Standardzeit, zu der Anrufe innerhalb der Anrufzeitdefinition gestartet oder gestoppt werden dürfen, wenn die Wochentag Startzeit nicht definiert ist. 0 ist Mitternacht. Um Anrufe komplett zu verhindern den Wert auf 2400 und die Standard Stopzeit ebenfalls auf 2400 setzen. Um Anrufe für 24 Stunden am Tag zu erlauben die Startzeit auf 0 und die Stopzeit auf 2400 setzen. - -
    -
    -Wochentag Start and Stop Zeit - Dies sind die speziellen Zeiten pro Tag, welche für die Anrufzeit Definition gesetzt werden können. Es gelten die selben Regeln wie für Start und Stop Zeiten. - -
    -
    -Land Anrufzeit Definition - Dies ist die Liste der landspezifischen Anrufzeit Definitionen, die von dieser Anrufzeit Definition beachtet werden. - -
    -
    -Landesspezifische Anrufzeit Definition - Dies ist der zwei Buchstaben Code für das Land, für das die Anrufzeit Definition gilt. Damit diese ausgeführt wird muss die in der Kampagne gesetzte lokale Anrufzeit diese landesspezifische Anrufzeit Aufzeichnung enthalten, genauso wie alle anzurufenden Anschlüsse den landesspezifischen zwei Buchstaben Code enthalten müssen . - - - - -



    - -VICIDIAL LISTE LADEVORRICHTUNG FUNKTIONALITÄT

    -
    -
    -Die VICIDIAL grundlegende Netz-gegründete Leitung Ladevorrichtung isteinfach entworfen, um eine Leitung Akte zu nehmen - bis zu 8MB in derGröße - die entweder Vorsprung oder das abgegrenzte Rohr und es indie vicidial_list Tabelle zu laden ist. Es gibt auch eine neueBetaversionsuperleitung Ladevorrichtung, das auffangen dasWählen zuläßt und TXT- deutlich Text, CSV- Komma getrennte Werteund XLS- übertreffen Akte Formate. Die Leitung Ladevorrichtung tutnicht Datenprüfung, oder Überprüfung auf Duplikate in sich oder inanderen Listen, damit etwas Sie ist, muß vor Ihnen Last tun dieLeitungen. Auch überprüfen Sie, ob Sie die Liste erstellt haben,daß diese Leitungen darunter sein sollen, damit Sie sie benutzenkönnen. Es gibt auch die Angelegenheit der Zeit-Zone-Kodierung dieseLeitungen. Sie können die Frequenz erhöhen wünschen, daß dasADMIN_adjust_GMTnow_on_leads.pl in das cron auf IhremSternchenbediener gelaufen wird, damit alle mögliche geladenenLeitungen schneller kodiert werden können. Ist hier eine Liste vonauffängt in ihrem korrekten Auftrag für die Leitung Akten: -
      -
    1. Verkäufer-Leitung Code - zeigt oben im Verkäufer, den Identifikationvom GUI auffangen -
    2. Quellenprogramm - interner Gebrauch nur für admins und DBAs -
    3. Liste Identifikation - die Liste Zahl, die diese Leitungen obendarunter zeigen -
    4. Telefon-Code - das Präfix für die Telefonnummer - 1 für US, 01144für Großbritannien, 01161 für AUS, usw. -
    5. Telefonnummer - muß mindestens 8 Stellen lang sein -
    6. Titel - Titel dem Kunden - Herr Ms Mrs, usw.... -
    7. Vorname -
    8. Mittlere Initiale -
    9. Letzter Name -
    10. Adresse Linie 1 -
    11. Adresse Linie 2 -
    12. Adresse Linie 3 -
    13. Stadt -
    14. Zustand - begrenzt auf 2 Buchstaben -
    15. Provinz -
    16. Postcode -
    17. Land -
    18. Geschlecht -
    19. Geburtsdatum -
    20. Wechselnde Telefonnummer - Sicherheit Phrase -
    21. Anmerkungen -
    - -
    ANMERKUNGEN: Die übertreffenleitung Ladevorrichtung Funktionalitätwird durch eine Reihe Perl Indexe ermöglicht und muß eine richtigzusammengebaute /home/cron/AST_SERVER_conf.pl Akte im Platz auf demweb server haben. Auch ein Paarperl Module müssen für sie, umaußerdem zu arbeiten - OLE-Storage_Lite-Storage_Lite undVerteilungsbogen-ParseExcel geladen werden. Sie können aufLaufzeitfehler in diesen überprüfen, indem Sie Ihre Apache error_logAkte betrachten. - -







    -







    -DAS ENDE -
    -\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$dial_status_a = $row[3]; -$dial_status_b = $row[4]; -$dial_status_c = $row[5]; -$dial_status_d = $row[6]; -$dial_status_e = $row[7]; -$local_call_time = $row[16]; -if ($lead_filter_id=='') - { - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') - { - $lead_filter_id='NONE'; - } - } - -$stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; -$rslt=mysql_query($stmt, $link); -$lists_to_print = mysql_num_rows($rslt); -$camp_lists=''; -$o=0; -while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; -if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";} -} -$camp_lists = eregi_replace(".$","",$camp_lists); - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - -echo "

    \n"; -echo "Zeige Anzahl anrufbarer Anschlüsse -

    \n"; -echo "CAMPAIGN: $campaign_id
    \n"; -echo "LISTEN: $camp_lists
    \n"; -echo "STATUSES: $dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e
    \n"; -echo "FILTER: $lead_filter_id
    \n"; -echo "CALL TIME: $local_call_time

    \n"; - -### call function to calculate and print dialable leads -dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - -echo "

    \n"; -echo "\n"; - -exit; -} - - -###################### -# ADD=7111111 view sample script with test variables -###################### - -if ($ADD==7111111) -{ - ##### TEST VARIABLES ##### - $vendor_lead_code = 'VENDORLEADCODE'; - $list_id = 'LISTID'; - $gmt_offset_now = 'GMTOFFSET'; - $phone_code = '1'; - $phone_number = '7275551212'; - $title = 'Mr.'; - $first_name = 'JOHN'; - $middle_initial = 'Q'; - $last_name = 'PUBLIC'; - $address1 = '1234 Main St.'; - $address2 = 'Apt. 3'; - $address3 = 'ADDRESS3'; - $city = 'CHICAGO'; - $state = 'IL'; - $province = 'PROVINCE'; - $postal_code = '33760'; - $country_code = 'USA'; - $gender = 'M'; - $date_of_birth = '1970-01-01'; - $alt_phone = '3125551212'; - $email = 'test@test.com'; - $security_phrase = 'SECUTIRY'; - $comments = 'COMMENTS FIELD'; - $RGfullname = 'JOE AGENT'; - $RGuser = '6666'; - -echo "\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$script_name = $row[1]; -$script_text = $row[3]; - -$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); -$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text); -$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text); -$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text); -$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text); -$script_text = eregi_replace('--A--title--B--',"$title",$script_text); -$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text); -$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text); -$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text); -$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text); -$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text); -$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text); -$script_text = eregi_replace('--A--city--B--',"$city",$script_text); -$script_text = eregi_replace('--A--state--B--',"$state",$script_text); -$script_text = eregi_replace('--A--province--B--',"$province",$script_text); -$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text); -$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text); -$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text); -$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text); -$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text); -$script_text = eregi_replace('--A--email--B--',"$email",$script_text); -$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text); -$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text); -$script_text = eregi_replace('--A--fullname--B--',"$RGfullname",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace("\n","
    ",$script_text); - - -echo ""; - -echo "Vorbetrachtung-Index: $script_id
    \n"; -echo "
    \n"; -echo "
    $script_name
    \n"; -echo "$script_text\n"; -echo "
    \n"; - -echo "\n"; - -exit; -} - - - - -######################### HTML HEADER BEGIN ####################################### -if ($hh=='users') {$users_hh='bgcolor ="#FFFF99"'; $users_fc='BLACK';} # yellow - else {$users_hh=''; $users_fc='WHITE';} -if ($hh=='campaigns') {$campaigns_hh='bgcolor ="#FFCC99"'; $campaigns_fc='BLACK';} # orange - else {$campaigns_hh=''; $campaigns_fc='WHITE';} -if ($hh=='lists') {$lists_hh='bgcolor ="#FFCCCC"'; $lists_fc='BLACK';} # red - else {$lists_hh=''; $lists_fc='WHITE';} -if ($hh=='ingroups') {$ingroups_hh='bgcolor ="#CC99FF"'; $ingroups_fc='BLACK';} # purple - else {$ingroups_hh=''; $ingroups_fc='WHITE';} -if ($hh=='remoteagent') {$remoteagent_hh='bgcolor ="#CCFFCC"'; $remoteagent_fc='BLACK';} # green - else {$remoteagent_hh=''; $remoteagent_fc='WHITE';} -if ($hh=='usergroups') {$usergroups_hh='bgcolor ="#CCFFFF"'; $usergroups_fc='BLACK';} # cyan - else {$usergroups_hh=''; $usergroups_fc='WHITE';} -if ($hh=='scripts') {$scripts_hh='bgcolor ="#99FFCC"'; $scripts_fc='BLACK';} # light teal - else {$scripts_hh=''; $scripts_fc='WHITE';} -if ($hh=='filters') {$filters_hh='bgcolor ="#CCCCCC"'; $filters_fc='BLACK';} # grey - else {$filters_hh=''; $filters_fc='WHITE';} -if ($hh=='times') {$times_hh='bgcolor ="#99FF33"'; $times_fc='BLACK';} # hard teal - else {$times_hh=''; $times_fc='WHITE';} - -?> - - - - -\n"; -echo "
    English Deutsch
    - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - - - - -
      VICIDIAL ADMIN - Logout  
    > SIZE=1> BENUTZER > SIZE=1> KAMPAGNEN > SIZE=1> LISTEN > SIZE=1> INDEXE > SIZE=1> FILTER > SIZE=1> IN-GROUPS > SIZE=1> Anrufzeiten > SIZE=1> BENUTZER-GRUPPEN > SIZE=1> REMOTEMITTEL > REPORTS
      LISTE BENUTZER     |     ADDIEREN Sie Einen NEUEN BENUTZER     |     SUCHE NACH Einem BENUTZER
      ADDIEREN SIE KAMPAGNE     |     LISTE KAMPAGNEN
      ZEIGEN SIE LISTEN     |     ADDIEREN SIE NEUE LISTE     |     SUCHE NACH Einer LEITUNG |     FÜGEN SIE ZAHL DNC HINZU           |     LAST NEUE LEITUNGEN
      ADDIEREN SIE INDEX     |     ANSICHT-INDEXE
      ADDIEREN SIE FILTER     |     ANSICHT-FILTER
      ZEIGEN SIE IN-GROUPS     |     ADDIEREN SIE NEUES IN-GROUP
      Zeige Anrufzeiten     |     Hinzufügen neuer Anrufzeiten     |     Zeige landesspezifische Anrufzeiten     |     Hinzufügen neuer landesspezifischer Anrufzeiten  
      ADDIEREN SIE BENUTZER-GRUPPE     |     LISTE BENUTZER-GRUPPEN     |     GRUPPE STÜNDLICH
      ZEIGEN SIE REMOTEMITTEL     |     ADDIEREN SIE NEUE REMOTEMITTEL
     
    -
    \n"; -echo ""; - -echo "
    ADDIEREN Sie Einen NEUEN BENUTZER
    \n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "$NWB#vicidial_users-user_group$NWE\n"; -echo "\n"; -echo "
    Benutzer-Zahl: $NWB#vicidial_users-user$NWE
    Kennwort:$NWB#vicidial_users-pass$NWE
    Voller Name: $NWB#vicidial_users-full_name$NWE
    Benutzer-Niveau: $NWB#vicidial_users-user_level$NWE
    Benutzer-Gruppe:
    Telefon-LOGON: $NWB#vicidial_users-phone_login$NWE
    Telefon-Durchlauf: $NWB#vicidial_users-phone_pass$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN -###################### - -if ($ADD==11) -{ -echo "
    \n"; -echo ""; - -echo "
    ADDIEREN Sie Eine NEUE KAMPAGNE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Kampagne Identifikation: $NWB#vicidial_campaigns-campaign_id$NWE
    Kampagne Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Aktiv:$NWB#vicidial_campaigns-active$NWE
    Park-Verlängerung: $NWB#vicidial_campaigns-park_ext$NWE
    Park-Dateiname: $NWB#vicidial_campaigns-park_file_name$NWE
    Netz-Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Erlauben Sie Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Zufuhrbehälter-Niveau: $NWB#vicidial_campaigns-hopper_level$NWE
    Selbstvorwahlknopf-Niveau: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Folgender Vertreter-Anruf: $NWB#vicidial_campaigns-next_agent_call$NWE
    Ortsgespräch-Zeit: $NWB#vicidial_campaigns-local_call_time$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Index: $NWB#vicidial_campaigns-campaign_script$NWE
    Erhalten Sie Anruf-Produkteinführung: $NWB#vicidial_campaigns-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW LIST FORM SCREEN -###################### - -if ($ADD==111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Liste Identifikation: (nur Stellen)$NWB#vicidial_lists-list_id$NWE
    Liste Name: $NWB#vicidial_lists-list_name$NWE
    Kampagne: $NWB#vicidial_lists-campaign_id$NWE
    Aktiv:$NWB#vicidial_lists-active$NWE
    \n"; - -} - - -###################### -# ADD=121 display the ADD NUMBER TO DNC FORM SCREEN and add a new number -###################### - -if ($ADD==121) -{ -echo "
    \n"; -echo ""; - -if (strlen($phone_number) > 2) - { - $stmt="SELECT count(*) from vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    DNC NICHT ADDIERT - diese Telefonnummer ist bereits in benennen nichtListe: $phone_number

    \n";} - else - { - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$phone_number');"; - $rslt=mysql_query($stmt, $link); - - echo "
    DNC FÜGTE HINZU: $phone_number

    \n"; - - ### LOG INSERTION TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW DNC NUMBER|$PHP_AUTH_USER|$ip|'$phone_number'|\n"); - fclose($fp); - } - } - } - -echo "
    FÜGEN Sie Eine ZAHL Der DNC LISTE Hinzu\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    Telefonnummer: (nur Stellen)$NWB#vicidial_list-dnc$NWE
    \n"; - -} - - -###################### -# ADD=1111 display the ADD NEW INBOUND GROUP SCREEN -###################### - -if ($ADD==1111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADDIEREN Sie Eine NEUE INBOUND GRUPPE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Gruppe Identifikation: (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE
    Gruppe Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Gruppe Farbe: $NWB#vicidial_inbound_groups-group_color$NWE
    Aktiv:$NWB#vicidial_inbound_groups-active$NWE
    Netz-Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Folgender Vertreter-Anruf: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Anzeige: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Index: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Erhalten Sie Anruf-Produkteinführung: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN -###################### - -if ($ADD==11111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADDIEREN SIE NEUE REMOTEMITTEL\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Benutzernummer Anfang: (nur Zahlen, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Zeilenzahl: (nur Zahlen)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Bediener IP: $NWB#vicidial_remote_agents-server_ip$NWE
    Externe Verlängerung: (dialplan Zahl wählte, um Mittel zu erreichen)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status:$NWB#vicidial_remote_agents-status$NWE
    Kampagne: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Gruppen: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "ANMERKUNG: Sie kann bis 30 Sekunden für die Änderungen dauern, dieauf diesem Schirm eingereicht werden, um Phasen zu gehen\n"; - -} - - -###################### -# ADD=111111 display the ADD NEW USERS GROUP SCREEN -###################### - -if ($ADD==111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADDIEREN SIE NEUE BENUTZER-GRUPPE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Gruppe: (keine Räume oder Interpunktion)$NWB#vicidial_user_groups-user_group$NWE
    Beschreibung: (Beschreibung der Gruppe)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -} - - -###################### -# ADD=1111111 display the ADD NEW SCRIPT SCREEN -###################### - -if ($ADD==1111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW SCRIPT\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Index Identifikation: (keine Räume oder Interpunktion)$NWB#vicidial_scripts-script_id$NWE
    Index-Name: (Titel dem Index)$NWB#vicidial_scripts-script_name$NWE
    Index-Anmerkungen: $NWB#vicidial_scripts-script_comments$NWE
    Aktiv:$NWB#vicidial_scripts-active$NWE
    Index-Text: $NWB#vicidial_scripts-script_text$NWE
    \n"; - -} - - -###################### -# ADD=11111111 display the ADD NEW FILTER SCREEN -###################### - -if ($ADD==11111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADDIEREN SIE NEUEN FILTER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Filter Identifikation: (keine Räume oder Interpunktion)$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Filter-Name: (kurze Beschreibung des Filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Filter-Anmerkungen: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filter Sql: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; -} - - -###################### -# ADD=111111111 display the ADD NEW CALL TIME SCREEN -###################### - -if ($ADD==111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    Hinzufügen neuer Anrufzeiten\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    Anrufzeit ID: (keine Räume oder Interpunktion)$NWB#vicidial_call_times-call_time_id$NWE
    Anrufzeit Name: (Kurze Beschreibung der Anrufzeit)$NWB#vicidial_call_times-call_time_name$NWE
    Anrufzeit Kommentare: $NWB#vicidial_call_times-call_time_comments$NWE
    Datums und Zeitoptionen erscheinen, wenn die Anrufzeitdefinition angelegt wurde
    \n"; -} - - -###################### -# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN -###################### - -if ($ADD==1111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    Hinzufügen neuer landesspezifischer Anrufzeiten\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    Landesspezifische Anrufzeiten ID: (keine Räume oder Interpunktion)$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: (keine Räume oder Interpunktion)$NWB#vicidial_call_times-state_call_time_state$NWE
    Landesspezifischer Anrufzeiten Name: (Kurze Beschreibung der Anrufzeit)$NWB#vicidial_call_times-call_time_name$NWE
    Landesspezifischer Anrufzeiten Kommentar: $NWB#vicidial_call_times-call_time_comments$NWE
    Datums und Zeitoptionen erscheinen, wenn die Anrufzeitdefinition angelegt wurde
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 2 series, validates form data and inserts the new record into the database -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=2 adds the new user to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    BENUTZER NICHT ADDIERT - es gibt bereits einen Benutzer im System mitdieser Benutzerzahl\n";} - else - { - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) - { - echo "
    BENUTZER NICHT ADDIERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n"; - echo "
    Teilnehmerbezeichnung muß zwischen 2 und 8 Buchstaben lang sein\n"; - echo "
    voller Name und Kennwort müssen mindestens 2 Buchstaben lang sein\n"; - } - else - { - echo "
    BENUTZER FÜGTE HINZU: $user\n"; - - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass) values('$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A USER |$PHP_AUTH_USER|$ip|'$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass'|\n"); - fclose($fp); - } - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new campaign to the system -###################### - -if ($ADD==21) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    KAMPAGNE NICHT ADDIERT - es gibt bereits eine Kampagne im System mitdieser Identifikation\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) - { - echo "
    KAMPAGNE NICHT ADDIERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n"; - echo "
    Kampagne Identifikation muß zwischen 2 und 8 Buchstaben lang sein\n"; - echo "
    Kampagne Name muß zwischen 6 und 40 Buchstaben lang sein\n"; - } - else - { - echo "
    KAMPAGNE ADDIERT: $campaign_id\n"; - - $stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,active,dial_status_a,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,campaign_script,get_call_launch) values('$campaign_id','$campaign_name','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - echo ""; - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADDIEREN Sie Eine NEUE KAMPAGNE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - - } - } -$ADD=31; -} - -###################### -# ADD=22 adds the new campaign status to the system -###################### - -if ($ADD==22) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    KAMPAGNE STATUS NICHT ADDIERT - es gibt bereits einen Kampagne-Statusim System mit diesem Namen\n";} - else - { - $stmt="SELECT count(*) from vicidial_statuses where status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    KAMPAGNE STATUS NICHT ADDIERT - es gibt bereits einen Globalstatus imSystem mit diesem Namen\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) - { - echo "
    KAMPAGNE STATUS NICHT ADDIERT - gehen Sie bitte zurück und betrachtenSie die Daten, die Sie eingaben\n"; - echo "
    Status muß zwischen 1 und 8 Buchstaben lang sein\n"; - echo "
    Statusname muß zwischen 2 und 30 Buchstaben lang sein\n"; - } - else - { - echo "
    KAMPAGNE STATUS ADDIERT: $campaign_id - $status\n"; - - $stmt="INSERT INTO vicidial_campaign_statuses values('$status','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADDIEREN Sie Eine NEUE KAMPAGNE STATUS |$PHP_AUTH_USER|$ip|'$status','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } - } -$ADD=31; -} - - -###################### -# ADD=23 adds the new campaign hotkey to the system -###################### - -if ($ADD==23) -{ - $HKstatus_data = explode('-----',$HKstatus); - $status = $HKstatus_data[0]; - $status_name = $HKstatus_data[1]; - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_hotkeys where campaign_id='$campaign_id' and hotkey='$hotkey' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    KAMPAGNE HOTKEY NICHT ADDIERT worden - es gibt bereits eineKampagne-hotkey im System mit diesem hotkey\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    KAMPAGNE HOTKEY NICHT ADDIERT - gehen Sie bitte zurück und betrachtenSie die Daten, die Sie eingaben\n"; - echo "
    hotkey muß ein einzelner Buchstabe zwischen 1 und 9 sein \n"; - echo "
    Status muß zwischen 1 und 8 Buchstaben lang sein\n"; - } - else - { - echo "
    KAMPAGNE HOTKEY FÜGTE HINZU: $campaign_id - $status - $hotkey\n"; - - $stmt="INSERT INTO vicidial_campaign_hotkeys values('$status','$hotkey','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADDIEREN Sie Eine NEUE KAMPAGNE HOTKEY |$PHP_AUTH_USER|$ip|'$status','$hotkey','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=25 adds the new campaign lead recycle entry to the system -###################### - -if ($ADD==25) -{ - $status = eregi_replace("-----.*",'',$status); - echo ""; - $stmt="SELECT count(*) from vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    KAMPAGNE LEITUNG BEREITEN NICHT HINZUGEFÜGT auf - es gibt bereitseine Führenwiederverwertung für diese Kampagne mit diesem Status\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    KAMPAGNE LEITUNG BEREITEN NICHT HINZUGEFÜGT auf - gehen Sie bittezurück und betrachten Sie die Daten, die Sie eingaben\n"; - echo "
    Status muß zwischen 1 und 6 Buchstaben lang sein\n"; - echo "
    Versuch verzögert muß mindestens 120 Sekunden sein\n"; - echo "
    maximale Versuche müssen von 1 bis 10 sein\n"; - } - else - { - echo "
    KAMPAGNE LEITUNG BEREITEN HINZUGEFÜGT AUF: $campaign_id - $status - $attempt_delay\n"; - - $stmt="INSERT INTO vicidial_lead_recycle(campaign_id,status,attempt_delay,attempt_maximum,active) values('$campaign_id','$status','$attempt_delay','$attempt_maximum','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new list to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    LISTE NICHT ADDIERT - es gibt bereits eine Liste im System mit dieserIdentifikation\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or (strlen($list_id) < 2) or (strlen($list_id) > 8) ) - { - echo "
    LISTE NICHT ADDIERT - gehen Sie bitte zurück und betrachten Sie dieDaten, die Sie eingaben\n"; - echo "
    Liste Identifikation muß zwischen 2 und 8 Buchstaben lang sein\n"; - echo "
    Liste Name muß mindestens 2 Buchstaben lang sein\n"; - } - else - { - echo "
    LISTE ADDIERT: $list_id\n"; - - $stmt="INSERT INTO vicidial_lists values('$list_id','$list_name','$campaign_id','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LIST |$PHP_AUTH_USER|$ip|'$list_id','$list_name','$campaign_id','$active'|\n"); - fclose($fp); - } - } - } -$ADD=311; -} - - - -###################### -# ADD=2111 adds the new inbound group to the system -###################### - -if ($ADD==2111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    GRUPPE NICHT ADDIERT - es gibt bereits eine Gruppe im System mitdieser Identifikation\n";} - else - { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) - { - echo "
    GRUPPE NICHT ADDIERT - gehen Sie bitte zurück und betrachten Sie dieDaten, die Sie eingaben\n"; - echo "
    Gruppe Identifikation muß zwischen 2 und 20 Buchstaben lang sein undNr. enthalten ' -+'.\n"; - echo "
    Gruppe Name und Gruppe Farbe muß mindestens 2 Buchstaben lang sein\n"; - } - else - { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - echo "
    GRUPPE FÜGTE HINZU: $group_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW GROUP |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000; -} - - -###################### -# ADD=21111 adds new remote agents to the system -###################### - -if ($ADD==21111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    REMOTEMITTEL NICHT ADDIERT - es gibt bereits eineRemotemitteleintragung beginnend mit diesem userID\n";} - else - { - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTEMITTEL NICHT ADDIERT - gehen Sie bitte zurück und betrachtenSie die Daten, die Sie eingaben\n"; - echo "
    Benutzernummer Anfang und externe Verlängerung müssen mindestens 2Buchstaben lang sein\n"; - } - else - { - $stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTEMITTEL FÜGTEN HINZU: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW REMOTEMITTEL ENTRY |$PHP_AUTH_USER|$ip|'$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value'|\n"); - fclose($fp); - } - } - } -$ADD=10000; -} - -###################### -# ADD=211111 adds new user group to the system -###################### - -if ($ADD==211111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    BENUTZER-GRUPPE NICHT ADDIERT - es gibt bereits eine BenutzergruppeEintragung mit diesem Namen\n";} - else - { - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    BENUTZER-GRUPPE NICHT ADDIERT - gehen Sie bitte zurück und betrachtenSie die Daten, die Sie eingaben\n"; - echo "
    Gruppe Name und Beschreibung müssen mindestens 2 Buchstaben langsein\n"; - } - else - { - $stmt="INSERT INTO vicidial_user_groups values('$user_group','$group_name');"; - $rslt=mysql_query($stmt, $link); - - echo "
    BENUTZER-GRUPPE ADDIERT: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADDIEREN Sie Einen NEUEN BENUTZER GROUP ENTRY |$PHP_AUTH_USER|$ip|'$user_group','$group_name'|\n"); - fclose($fp); - } - } - } -$ADD=100000; -} - -###################### -# ADD=2111111 adds new script to the system -###################### - -if ($ADD==2111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    INDEX NICHT ADDIERT - es gibt bereits eine Indexeintragung mit diesem Namen\n";} - else - { - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    INDEX NICHT ADDIERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Indexname, -beschreibung und -text müssen mindestens 2 Buchstabenlang sein\n"; - } - else - { - $stmt="INSERT INTO vicidial_scripts values('$script_id','$script_name','$script_comments','" . mysql_real_escape_string($script_text) . "','$active');"; - $rslt=mysql_query($stmt, $link); - - echo "
    INDEX FÜGTE HINZU: $script_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000000; -} - - -###################### -# ADD=21111111 adds new filter to the system -###################### - -if ($ADD==21111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    FILTER NICHT ADDIERT - es gibt bereits eine Filtereintragung mitdieser Identifikation\n";} - else - { - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTER NICHT ADDIERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Filtern Sie Identifikation, Namen und SQL muß mindestens 2 Buchstabenlang sein\n"; - } - else - { - $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTER ADDIERT: $lead_filter_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=10000000; -} - - -###################### -# ADD=211111111 adds new call time definition to the system -###################### - -if ($ADD==211111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Anrufzeit Definition nicht hinzugefügt - Es existiert bereits ein Anrufzeiteintrag mit dieser ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    Anrufzeit Definition nicht hinzugefügt - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Anrufzeit ID und Name müssen mindestens 2 Zeichen Länge haben\n"; - } - else - { - $stmt="INSERT INTO vicidial_call_times SET call_time_id='$call_time_id',call_time_name='$call_time_name',call_time_comments='$call_time_comments';"; - $rslt=mysql_query($stmt, $link); - - echo "
    Anrufzeit hinzugefügt: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111; -} - - -###################### -# ADD=2111111111 adds new state call time definition to the system -###################### - -if ($ADD==2111111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Landesspezifische Anrufzeitdefinition nicht hinzugefügt - Es existiert bereits ein Anrufzeiteintrag mit dieser ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    Landesspezifische Anrufzeitdefinition nicht hinzugefügt - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Landesspezifische Anrufzeit ID, Name und Land müssen mindestens 2 Zeichen Länge haben\n"; - } - else - { - $stmt="INSERT INTO vicidial_state_call_times SET state_call_time_id='$call_time_id',state_call_time_name='$call_time_name',state_call_time_comments='$call_time_comments',state_call_time_state='$state_call_time_state';"; - $rslt=mysql_query($stmt, $link); - - echo "
    landesspezifische Anrufzeiten hinzugefügt: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=3111111111; -} - - - - -###################################################################################################### -###################################################################################################### -####### 4 series, record modifications submitted and DB is modified, then on to 3 series forms below -###################################################################################################### -###################################################################################################### - - - -###################### -# ADD=4A submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4A") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    BENUTZER NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n"; - echo "
    Kennwort und voller Name jedes Notwendigkeit ot sind mindestens 2Buchstaben lang\n"; - } - else - { - echo "
    BENUTZER ÄNDERTE - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - -###################### -# ADD=4B submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4B") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    BENUTZER NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n"; - echo "
    Kennwort und voller Name jedes Notwendigkeit ot sind mindestens 2Buchstaben lang\n"; - } - else - { - echo "
    BENUTZER ÄNDERTE - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - - -###################### -# ADD=4 submit user modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    BENUTZER NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n"; - echo "
    Kennwort und voller Name jedes Notwendigkeit ot sind mindestens 2Buchstaben lang\n"; - } - else - { - echo "
    BENUTZER ÄNDERTE: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - -###################### -# ADD=41 submit campaign modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    KAMPAGNE NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n"; - echo "
    der Kampagne Name muß mindestens 6 Buchstaben lang sein\n"; - } - else - { - echo "
    KAMPAGNE ÄNDERTE: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    ZURÜCKSTELLEN DES KAMPAGNE LEITUNG ZUFUHRBEHÄLTERS\n"; - echo "
    - Wartezeit 1 Minute, bevor folgende Nummer gewählt wird\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=42 delete campaign status in the system -###################### - -if ($ADD==42) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    KAMPAGNE STATUS NICHT GEÄNDERT - gehen Sie bitte zurück undbetrachten Sie die Daten, die Sie eingaben\n"; - echo "
    die Kampagne Kennzeichnung muß mindestens 2 Buchstaben lang sein\n"; - echo "
    der Kampagne Status muß mindestens Buchstaben 1 lang sein\n"; - } - else - { - echo "
    KUNDENSPEZIFISCHER KAMPAGNE STATUS GELÖSCHT: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=43 delete campaign hotkey in the system -###################### - -if ($ADD==43) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    KAMPAGNE HOTKEY NICHT GEÄNDERT - gehen Sie bitte zurück undbetrachten Sie die Daten, die Sie eingaben\n"; - echo "
    die Kampagne Kennzeichnung muß mindestens 2 Buchstaben lang sein\n"; - echo "
    der Kampagne Status muß mindestens Buchstaben 1 lang sein\n"; - echo "
    das Kampagne hotkey muß mindestens Buchstaben 1 lang sein\n"; - } - else - { - echo "
    KUNDENSPEZIFISCHE KAMPAGNE HOTKEY LÖSCHTE: $campaign_id - $status - $hotkey\n"; - - $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=44 submit campaign modifications to the system - Basic View -###################### - -if ($ADD==44) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    KAMPAGNE NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n"; - echo "
    der Kampagne Name muß mindestens 6 Buchstaben lang sein\n"; - } - else - { - echo "
    KAMPAGNE ÄNDERTE: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level',lead_filter_id='$lead_filter_id' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    ZURÜCKSTELLEN DES KAMPAGNE LEITUNG ZUFUHRBEHÄLTERS\n"; - echo "
    - Wartezeit 1 Minute, bevor folgende Nummer gewählt wird\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG HOPPER RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=34; # go to campaign modification form below -} - -###################### -# ADD=45 modify campaign lead recycle in the system -###################### - -if ($ADD==45) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT MODIFIED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Status muß zwischen 1 und 6 Buchstaben lang sein\n"; - echo "
    Versuch verzögert muß mindestens 120 Sekunden sein\n"; - echo "
    maximale Versuche müssen von 1 bis 10 sein\n"; - } - else - { - echo "
    CAMPAIGN LEAD MODIFIED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=411 submit list modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) - { - echo "
    LISTE NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Sie dieDaten, die Sie eingaben\n"; - echo "
    Liste Name muß mindestens 2 Buchstaben lang sein\n"; - } - else - { - echo "
    LISTE ÄNDERTE: $list_id\n"; - - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - if ($reset_list == 'Y') - { - echo "
    ZURÜCKSTELLEN VON VON LIST-CALLED-STATUS\n"; - $stmt="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|RESET LIST CALLED |$PHP_AUTH_USER|$ip|list_name='$list_name'|\n"); - fclose($fp); - } - } - if ($campaign_id != "$old_campaign_id") - { - echo "
    ENTFERNEN DER LISTE ZUFUHRBEHÄLTER-LEITUNGEN VOM ALTEN KAMPAGNEZUFUHRBEHÄLTER ($old_campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LIST INFO |$PHP_AUTH_USER|$ip|list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id'|\n"); - fclose($fp); - } - } - -$ADD=311; # go to list modification form below -} - - -###################### -# ADD=4111 modify in-group info in the system -###################### - -if ($ADD==4111) -{ - echo ""; - - if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) - { - echo "
    GRUPPE NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n"; - echo "
    Gruppe Name und Gruppe Farbe muß mindestens 2 Buchstaben lang sein\n"; - } - else - { - echo "
    GRUPPE GEÄNDERT: $group_id\n"; - - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_message='$drop_message',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten' where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY GROUP INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111; # go to in-group modification form below -} - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTEMITTEL NICHT GEÄNDERT - gehen Sie bitte zurück und betrachtenSie die Daten, die Sie eingaben\n"; - echo "
    Benutzernummer Anfang und externe Verlängerung müssen mindestens 2Buchstaben lang sein\n"; - } - else - { - $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTEMITTEL GEÄNDERT\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTEMITTEL ENTRY |$PHP_AUTH_USER|$ip|set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - } - -$ADD=31111; # go to remote agents modification form below -} - - - -###################### -# ADD=411111 modify user group info in the system -###################### - -if ($ADD==411111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    BENUTZER-GRUPPE NICHT GEÄNDERT - gehen Sie bitte zurück undbetrachten Sie die Daten, die Sie eingaben\n"; - echo "
    Gruppe Name und Beschreibung müssen mindestens 2 Buchstaben langsein\n"; - } - else - { - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group';"; - $rslt=mysql_query($stmt, $link); - - echo "
    BENUTZER-GRUPPE GEÄNDERT\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER GROUP ENTRY |$PHP_AUTH_USER|$ip|UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group'|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    INDEX NICHT GEÄNDERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Indexname, -beschreibung und -text müssen mindestens 2 Buchstabenlang sein\n"; - } - else - { - $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    INDEX ÄNDERTE\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111; # go to script modification form below -} - - -###################### -# ADD=41111111 modify filter in the system -###################### - -if ($ADD==41111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTER NICHT GEÄNDERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Filtern Sie Identifikation, Namen und SQL muß mindestens 2 Buchstabenlang sein\n"; - } - else - { - $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTER GEÄNDERT\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31111111; # go to filter modification form below -} - - -###################### -# ADD=411111111 modify call time in the system -###################### - -if ($ADD==411111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    Anrufzeit nicht geändert - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Anrufzeit ID und Name müssen mindestens 2 Zeichen Länge haben\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    Anrufzeit geändert\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111; # go to call time modification form below -} - - -###################### -# ADD=4111111111 modify state call time in the system -###################### - -if ($ADD==4111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    Landesspezifische Anrufzeit nicht geändert - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Landesspezifische Anrufzeit ID, Name und Land müssen mindestens 2 Zeichen Länge haben\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    Landesspezifische Anrufzeit geändert\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111111; # go to state call time modification form below -} - - - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of user -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) - { - echo "
    BENUTZER NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - echo "
    BENUTZER-AUSLASSUNG BESTÄTIGUNG: $user\n"; - echo "

    Klicken Sie hier, um Benutzer zu löschen $user


    \n"; - } - -$ADD='3'; # go to user modification below -} - -###################### -# ADD=51 confirmation before deletion of campaign -###################### - -if ($ADD==51) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) - { - echo "
    KAMPAGNE NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Kampagne_id be at least 2 characters in length\n"; - } - else - { - echo "
    KAMPAGNE AUSLASSUNG BESTÄTIGUNG: $campaign_id\n"; - echo "

    Klicken Sie hier, um Kampagne zu löschen $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=52 confirmation before logging all agents out of campaign of campaign -###################### - -if ($ADD==52) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    MITTEL GELOGGT NICHT AUS KAMPAGNE HERAUS - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Kampagne_id be at least 2 characters in length\n"; - } - else - { - echo "
    MITTELLOGOUT-BESTÄTIGUNG: $campaign_id\n"; - echo "

    Klicken Sie hier, um alle Mittel aus zu loggen $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=511 confirmation before deletion of list -###################### - -if ($ADD==511) -{ - echo ""; - - if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) - { - echo "
    LISTE NICHT GELÖSCHT WORDEN - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - echo "
    LISTE AUSLASSUNG BESTÄTIGUNG: $list_id\n"; - echo "

    Klicken Sie hier, um Liste und alle seine Leitungen zu löschen $list_id


    \n"; - } - -$ADD='311'; # go to campaign modification below -} - -###################### -# ADD=5111 confirmation before deletion of in-group -###################### - -if ($ADD==5111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) - { - echo "
    IN-GROUP NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - echo "
    IN-GROUP AUSLASSUNG BESTÄTIGUNG: $group_id\n"; - echo "

    Klicken Sie hier, um Ingruppe zu löschen $group_id


    \n"; - } - -$ADD='3111'; # go to in-group modification below -} - -###################### -# ADD=51111 confirmation before deletion of remote agent record -###################### - -if ($ADD==51111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) - { - echo "
    REMOTEMITTEL NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - echo "
    REMOTEMITTEL-AUSLASSUNG BESTÄTIGUNG: $remote_agent_id\n"; - echo "

    Klicken Sie hier, um Remotemittel zu löschen $remote_agent_id


    \n"; - } - -$ADD='31111'; # go to remote agent modification below -} - -###################### -# ADD=511111 confirmation before deletion of user group record -###################### - -if ($ADD==511111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) - { - echo "
    BENUTZER-GRUPPE NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - echo "
    BENUTZER-GRUPPE AUSLASSUNG BESTÄTIGUNG: $user_group\n"; - echo "

    Klicken Sie hier, um Benutzergruppe zu löschen $user_group


    \n"; - } - -$ADD='311111'; # go to user group modification below -} - -###################### -# ADD=5111111 confirmation before deletion of script record -###################### - -if ($ADD==5111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) - { - echo "
    INDEX NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Script_id must be at least 2 characters in length\n"; - } - else - { - echo "
    INDEX-AUSLASSUNG BESTÄTIGUNG: $script_id\n"; - echo "

    Klicken Sie hier, um Index zu löschen $script_id


    \n"; - } - -$ADD='3111111'; # go to script modification below -} - -###################### -# ADD=51111111 confirmation before deletion of filter record -###################### - -if ($ADD==51111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) - { - echo "
    FILTER NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Filter Identifikation muß mindestens 2 Buchstaben lang sein\n"; - } - else - { - echo "
    FILTER DELETION CONFIRMATION: $lead_filter_id\n"; - echo "

    Klicken Sie hier, um Filter zu löschen$lead_filter_id


    \n"; - } - -$ADD='31111111'; # go to filter modification below -} - -###################### -# ADD=511111111 confirmation before deletion of call time record -###################### - -if ($ADD==511111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    Anrufzeit nicht gelöscht - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Anrufzeit ID muss mindestens 2 Zeichen lang sein\n"; - } - else - { - echo "
    Löschen der Anrufzeit bestätigen: $call_time_id\n"; - echo "

    Click here to delete call time $call_time_id


    \n"; - } - -$ADD='311111111'; # go to call time modification below -} - -###################### -# ADD=5111111111 confirmation before deletion of call time record -###################### - -if ($ADD==5111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    Landesspezifische Anrufzeit nicht gelöscht - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Anrufzeit ID muss mindestens 2 Zeichen lang sein\n"; - } - else - { - echo "
    Löschen der landesspezifischen Anrufzeit bestätigen: $call_time_id\n"; - echo "

    Click here to delete state call time $call_time_id


    \n"; - } - -$ADD='3111111111'; # go to state call time modification below -} - - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete user record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) ) - { - echo "
    BENUTZER NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_users where user='$user' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|user='$user'|\n"); - fclose($fp); - } - echo "
    BENUTZER-AUSLASSUNG FÜHRTE DURCH: $user\n"; - echo "

    \n"; - } - -$ADD='0'; # go to user list -} - -###################### -# ADD=61 delete campaign record -###################### - -if ($ADD==61) -{ - echo ""; - - if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) ) - { - echo "
    KAMPAGNE NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Kampagne_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_campaigns where campaign_id='$campaign_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    ENTFERNEN DER LISTE ZUFUHRBEHÄLTER-LEITUNGEN VOM ALTEN KAMPAGNEZUFUHRBEHÄLTER ($campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!DELETING CAMPAIGN!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    KAMPAGNE AUSLASSUNG FÜHRTE DURCH: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='10'; # go to campaigns list -} - -###################### -# ADD=62 Logout all agents fro a campaign -###################### - -if ($ADD==62) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    MITTEL GELOGGT NICHT AUS KAMPAGNE HERAUS - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Kampagne_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_live_agents where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!MITTELLOGOUT!!!!!!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    MITTELLOGOUT FÜHRTE DURCH: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='31'; # go to campaign modification below -} - - -###################### -# ADD=65 delete campaign lead recycle in the system -###################### - -if ($ADD==65) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    KAMPAGNE LEITUNG BEREITEN NICHT GELÖSCHT AUF - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Status muß zwischen 1 und 6 Buchstaben lang sein\n"; - echo "
    Versuch verzögert muß mindestens 120 Sekunden sein\n"; - echo "
    maximale Versuche müssen von 1 bis 10 sein\n"; - } - else - { - echo "
    KAMPAGNE LEITUNG BEREITEN GELÖSCHT AUF: $campaign_id - $status - $attempt_delay\n"; - - $stmt="DELETE FROM vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=611 delete list record and all leads within it -###################### - -if ($ADD==611) -{ - echo ""; - - if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) ) - { - echo "
    LISTE NICHT GELÖSCHT WORDEN - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lists where list_id='$list_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    ENTFERNEN DER LISTE ZUFUHRBEHÄLTER-LEITUNGEN VOM ALTEN KAMPAGNEZUFUHRBEHÄLTER ($list_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ENTFERNEN DER LISTE LEITUNGEN VON DER VICIDIAL_LIST TABELLE\n"; - $stmt="DELETE from vicidial_list where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING LIST!!!!|$PHP_AUTH_USER|$ip|list_id='$list_id'|\n"); - fclose($fp); - } - echo "
    LISTE AUSLASSUNG DURCHGEFÜHRT: $list_id\n"; - echo "

    \n"; - } - -$ADD='100'; # go to lists list -} - -###################### -# ADD=6111 delete in-group record -###################### - -if ($ADD==6111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_ingroups < 1) ) - { - echo "
    IN-GROUP NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_inbound_groups where group_id='$group_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING IN-GROUP!!|$PHP_AUTH_USER|$ip|group_id='$group_id'|\n"); - fclose($fp); - } - echo "
    IN-GROUP AUSLASSUNG FÜHRTE DURCH: $group_id\n"; - echo "

    \n"; - } - -$ADD='1000'; # go to in-group list -} - -###################### -# ADD=61111 delete remote agent record -###################### - -if ($ADD==61111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) ) - { - echo "
    REMOTEMITTEL NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_remote_agents where remote_agent_id='$remote_agent_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING RMTAGENT!!|$PHP_AUTH_USER|$ip|remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - echo "
    REMOTEMITTEL-AUSLASSUNG FÜHRTE DURCH: $remote_agent_id\n"; - echo "

    \n"; - } - -$ADD='10000'; # go to remote agents list -} - -###################### -# ADD=611111 delete user group record -###################### - -if ($ADD==611111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_user_groups < 1) ) - { - echo "
    BENUTZER-GRUPPE NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_user_groups where user_group='$user_group' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING USRGROUP!!|$PHP_AUTH_USER|$ip|user_group='$user_group'|\n"); - fclose($fp); - } - echo "
    BENUTZER-GRUPPE AUSLASSUNG DURCHGEFÜHRT: $user_group\n"; - echo "

    \n"; - } - -$ADD='100000'; # go to user group list -} - -###################### -# ADD=6111111 delete script record -###################### - -if ($ADD==6111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_scripts < 1) ) - { - echo "
    INDEX NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Script_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_scripts where script_id='$script_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING SCRIPT!!!!|$PHP_AUTH_USER|$ip|script_id='$script_id'|\n"); - fclose($fp); - } - echo "
    INDEX-AUSLASSUNG FÜHRTE DURCH: $script_id\n"; - echo "

    \n"; - } - -$ADD='1000000'; # go to script list -} - - -###################### -# ADD=61111111 delete filter record -###################### - -if ($ADD==61111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) ) - { - echo "
    FILTER NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Filter Identifikation muß mindestens 2 Buchstaben lang sein\n"; - } - else - { - $stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING FILTER!!!!|$PHP_AUTH_USER|$ip|lead_filter_id='$lead_filter_id'|\n"); - fclose($fp); - } - echo "
    FILTER-AUSLASSUNG DURCHGEFÜHRT: $lead_filter_id\n"; - echo "

    \n"; - } - -$ADD='10000000'; # go to filter list -} - - -###################### -# ADD=611111111 delete call times record -###################### - -if ($ADD==611111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    Anrufzeit nicht gelöscht - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Anrufzeit ID muss mindestens 2 Zeichen lang sein\n"; - } - else - { - $stmt="DELETE from vicidial_call_times where call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    Löschen der Anrufzeiten beendet: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='100000000'; # go to call times list -} - - -###################### -# ADD=6111111111 delete call times record -###################### - -if ($ADD==6111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    Landesspezifische Anrufzeit nicht gelöscht - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
    Anrufzeit ID muss mindestens 2 Zeichen lang sein\n"; - } - else - { - $stmt="DELETE from vicidial_state_call_times where state_call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT call_time_id,ct_state_call_times from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\" order by call_time_id;"; - $rslt=mysql_query($stmt, $link); - $sct_to_print = mysql_num_rows($rslt); - $sct_list=''; - - $o=0; - while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_ids[$o] = "$rowx[0]"; - $sct_states[$o] = "$rowx[1]"; - $o++; - } - $o=0; - - while ($sct_to_print > $o) { - $sct_states[$o] = eregi_replace("\|$call_time_id\|",'|',$sct_states[$o]); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$sct_states[$o]' where call_time_id='$sct_ids[$o]';"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - echo "Landesrichlinie gelöscht: $sct_ids[$o]
    \n"; - $o++; - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|state_call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    Löschen der landesspezifischen Anrufzeit beendet: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='1000000000'; # go to call times list -} - - - - - - -###################################################################################################### -###################################################################################################### -####### 3 series, record modification forms -###################################################################################################### -###################################################################################################### - - - - -###################### -# ADD=3 modify user info in the system -###################### - -if ($ADD==3) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_level = $row[4]; - $user_group = $row[5]; - $phone_login = $row[6]; - $phone_pass = $row[7]; - $delete_users = $row[8]; - $delete_user_groups = $row[9]; - $delete_lists = $row[10]; - $delete_campaigns = $row[11]; - $delete_ingroups = $row[12]; - $delete_remote_agents = $row[13]; - $load_leads = $row[14]; - $campaign_detail = $row[15]; - $ast_admin_access = $row[16]; - $ast_delete_phones = $row[17]; - $delete_scripts = $row[18]; - $modify_leads = $row[19]; - $hotkeys_active = $row[20]; - $change_agent_campaign =$row[21]; - $agent_choose_ingroups =$row[22]; - $scheduled_callbacks = $row[24]; - $agentonly_callbacks = $row[25]; - $agentcall_manual = $row[26]; - $vicidial_recording = $row[27]; - $vicidial_transfers = $row[28]; - $delete_filters = $row[29]; - $alter_agent_interface_options =$row[30]; - $closer_default_blended = $row[31]; - $delete_call_times = $row[32]; - $modify_call_times = $row[33]; - -if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) - { - echo "
    Sie haben nicht Erlaubnis, diesen Benutzer zu ändern: $row[1]\n"; - } -else - { - echo "
    ÄNDERN Sie Einen BENUTZER-SATZ: $row[1]\n"; - if ($LOGuser_level > 8) - {echo "\n";} - else - { - if ($LOGalter_agent_interface == "1") - {echo "\n";} - else - {echo "\n";} - } - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") ) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($LOGuser_level > 8) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "\n"; - echo "
    Benutzer-Zahl: $row[1]$NWB#vicidial_users-user$NWE
    Kennwort:$NWB#vicidial_users-pass$NWE
    Voller Name: $NWB#vicidial_users-full_name$NWE
    Benutzer-Niveau: $NWB#vicidial_users-user_level$NWE
    Benutzer-Gruppe: $NWB#vicidial_users-user_group$NWE
    Telefon-LOGON: $NWB#vicidial_users-phone_login$NWE
    Telefon-Durchlauf: $NWB#vicidial_users-phone_pass$NWE
    MITTEL-SCHNITTSTELLE WAHLEN:
    Mittel Wählen Ingroups: $NWB#vicidial_users-agent_choose_ingroups$NWE
    HotKeys Aktiv: $NWB#vicidial_users-hotkeys_active$NWE
    Zeitlich geplante Wiederholungsbesuche: $NWB#vicidial_users-scheduled_callbacks$NWE
    Mittel-Nur Wiederholungsbesuche: $NWB#vicidial_users-agentonly_callbacks$NWE
    Vertreter-Anruf-Handbuch: $NWB#vicidial_users-agentcall_manual$NWE
    Vicidial Aufnahme: $NWB#vicidial_users-vicidial_recording$NWE
    Vicidial Übertragungen: $NWB#vicidial_users-vicidial_transfers$NWE
    Genauere Rückstellung Gemischt: $NWB#vicidial_users-closer_default_blended$NWE
    Inbound Gruppen: \n"; - echo "$groups_list"; - echo "$NWB#vicidial_users-closer_campaigns$NWE
    ADMIN SCHNITTSTELLE WAHLEN:
    Ändern Sie Mittel-Schnittstelle Wahlen:$NWB#vicidial_users-alter_agent_interface_options$NWE
    Löschung-Benutzer: $NWB#vicidial_users-delete_users$NWE
    Löschung-Benutzer-Gruppen: $NWB#vicidial_users-delete_user_groups$NWE
    Löschung-Listen: $NWB#vicidial_users-delete_lists$NWE
    Löschung-Kampagnen: $NWB#vicidial_users-delete_campaigns$NWE
    Löschung In-Gruppen: $NWB#vicidial_users-delete_ingroups$NWE
    Löschung-Direktübertragung Mittel: $NWB#vicidial_users-delete_remote_agents$NWE
    Löschung-Indexs: $NWB#vicidial_users-delete_scripts$NWE
    Last Leitungen: $NWB#vicidial_users-load_leads$NWE
    Kampagne Detail: $NWB#vicidial_users-campaign_detail$NWE
    AGC Admin Zugang: $NWB#vicidial_users-ast_admin_access$NWE
    AGC Löschung-Telefone: $NWB#vicidial_users-ast_delete_phones$NWE
    Ändern Sie Leitungen: $NWB#vicidial_users-modify_leads$NWE
    Ändern Sie Vertreter-Kampagne: $NWB#vicidial_users-change_agent_campaign$NWE
    Löschung-Filter: $NWB#vicidial_users-delete_filters$NWE
    Lösche Anrufzeits: $NWB#vicidial_users-delete_call_times$NWE
    Bearbeite Anrufzeits: $NWB#vicidial_users-modify_call_times$NWE
    \n"; - - if ($LOGdelete_users > 0) - { - echo "

    LÖSCHEN SIE DIESEN BENUTZER\n"; - } - echo "

    Klicken Sie hier für Benutzerzeitblatt\n"; - echo "

    Klicken Sie hier für Benutzerstatus\n"; - echo "

    Klicken Sie hier für Benutzernotfall\n"; - echo "

    Klicken Sie hier für Benutzer Wiederholungsbesuch Einflüsse\n"; - } - -} - - -###################### -# ADD=31 modify campaign info in the system - Detail view -###################### - -if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Basic if not allowed - -if ($ADD==31) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $campaign_rec_exten = $row[22]; - $campaign_recording = $row[23]; - $campaign_rec_filename = $row[24]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $am_message_exten = $row[27]; - $amd_send_to_vmx = $row[28]; - $xferconf_a_dtmf = $row[29]; - $xferconf_a_number = $row[30]; - $xferconf_b_dtmf = $row[31]; - $xferconf_b_number = $row[32]; - $alt_number_dialing = $row[33]; - $scheduled_callbacks = $row[34]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $drop_call_seconds = $row[36]; - $safe_harbor_message = $row[37]; - $safe_harbor_exten = $row[38]; - $display_dialable_count = $row[39]; - $wrapup_seconds = $row[40]; - $wrapup_message = $row[41]; -# $closer_campaigns = $row[42]; - $use_internal_dnc = $row[43]; - -echo "
    ÄNDERN Sie Einen KAMPAGNEN SATZ: $row[0] - Grundlegende Ansicht"; -echo " | Detail-Ansicht | "; -echo "Echtzeit Bildschirm\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -if (eregi("CLOSER", $campaign_id)) - { - echo "\n"; - } - - - -echo "\n"; -echo "
    Kampagne Identifikation: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Kampagne Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Aktiv:$NWB#vicidial_campaigns-active$NWE
    Park-Verlängerung: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
    Netz-Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Erlauben Sie Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Vorwahlknopfstatus1: $NWB#vicidial_campaigns-dial_status$NWE
    Vorwahlknopfstatus2: $NWB#vicidial_campaigns-dial_status$NWE
    Vorwahlknopfstatus3: $NWB#vicidial_campaigns-dial_status$NWE
    Vorwahlknopfstatus4: $NWB#vicidial_campaigns-dial_status$NWE
    Vorwahlknopfstatus5: $NWB#vicidial_campaigns-dial_status$NWE
    Liste Auftrag: $NWB#vicidial_campaigns-lead_order$NWE
    Leitung Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Zufuhrbehälter-Niveau: $NWB#vicidial_campaigns-hopper_level$NWE
    Kraft-Zurückstellen des Zufuhrbehälters: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Selbstvorwahlknopf-Niveau: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Folgender Vertreter-Anruf: $NWB#vicidial_campaigns-next_agent_call$NWE
    Ortsgespräch-Zeit: $NWB#vicidial_campaigns-local_call_time$NWE
    Vorwahlknopf-Abschaltung: in seconds$NWB#vicidial_campaigns-dial_timeout$NWE
    Vorwahlknopf-Präfix: for 91NXXNXXXXXX value would be 9, for no dial prefix use X$NWB#vicidial_campaigns-dial_prefix$NWE
    Kampagne CallerID: $NWB#vicidial_campaigns-campaign_cid$NWE
    Kampagne VDAD exten: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE
    Kampagne Rec exten: $NWB#vicidial_campaigns-campaign_rec_exten$NWE
    Kampagne Aufnahme: $NWB#vicidial_campaigns-campaign_recording$NWE
    Kampagne Rec Dateiname: $NWB#vicidial_campaigns-campaign_rec_filename$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Erhalten Sie Anruf-Produkteinführung: $NWB#vicidial_campaigns-get_call_launch$NWE
    Antwortende Maschine Anzeige: $NWB#vicidial_campaigns-am_message_exten$NWE
    AMD senden zu VM exten: $NWB#vicidial_campaigns-amd_send_to_vmx$NWE
    BringenSie DTMF 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    BringenSie Zahl 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    BringenSie DTMF 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    BringenSie Zahl 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Alternative Nummer wählen: $NWB#vicidial_campaigns-alt_number_dialing$NWE
    Zeitlich geplante Wiederholungsbesuche: $NWB#vicidial_campaigns-scheduled_callbacks$NWE
    Verbindungsaufbau Sekunden: $NWB#vicidial_campaigns-drop_call_seconds$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Benutze Sicherheitsnachricht: $NWB#vicidial_campaigns-safe_harbor_message$NWE
    Sicherheitsnebenstelle: $NWB#vicidial_campaigns-safe_harbor_exten$NWE
    Nachbereitung Sekunden $NWB#vicidial_campaigns-wrapup_seconds$NWE
    Nachbereitung Nachricht $NWB#vicidial_campaigns-wrapup_message$NWE
    Benutzen Sie Interne DNC Liste: $NWB#vicidial_campaigns-use_internal_dnc$NWE
    Gewährte Inbound Gruppen:
    "; - echo " $NWB#vicidial_campaigns-closer_campaigns$NWE
    \n"; - echo "$groups_list"; - echo "
    \n"; - -echo "
    \n"; -echo "
    LISTEN INNERHALB DIESER KAMPAGNE:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LISTE IDENTIFIKATIONLISTE NAMEAKTIV
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Diese Kampagne hat$active_lists aktive Listen und$inactive_lists unaktivierte Listen

    \n"; - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - Verberge

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - Zeige

    "; - } - - - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "Diese Kampagne hat$hopper_leads Leitungen im Vorwahlknopfzufuhrbehälter

    \n"; -echo "Klicken Sie hier, um zu sehen, welche Leitungen im Zufuhrbehälter imAugenblick sind

    \n"; -echo "Klicken Sie hier, um alle Wiederholungsbesuch Einflüsse in dieserKampagne zu sehen

    \n"; -echo "
    \n"; - - - - -echo "
    \n"; -echo "
    KUNDENSPEZIFISCHE STATUS INNERHALB DIESER KAMPAGNE:   $NWB#vicidial_campaign_statuses$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    STATUSBESCHREIBUNGAUSWÄHLBARLÖSCHUNG
    $rowx[0]$rowx[1]$rowx[2]LÖSCHUNG
    \n"; - -echo "
    ADDIEREN SIE NEUEN KUNDENSPEZIFISCHEN KAMPAGNE STATUS
    \n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Beschreibung:   \n"; -echo "Auswählbar:   \n"; -echo "
    \n"; - -echo "

    \n"; - - - -echo "
    GEWOHNHEIT HOTKEYS INNERHALB DIESER KAMPAGNE:   $NWB#vicidial_campaign_hotkeys$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    HOTKEYSTATUSBESCHREIBUNGLÖSCHUNG
    $rowx[1]$rowx[0]$rowx[2]LÖSCHUNG
    \n"; - -echo "
    ADDIEREN SIE NEUE KUNDENSPEZIFISCHE KAMPAGNE HOTKEY
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Hotkey:   \n"; -echo "Status:   \n"; -echo "
    \n"; -echo "

    \n"; - - - -echo "

    LEITUNG, DIE INNERHALB DIESER KAMPAGNE AUFBEREITET:   $NWB#vicidial_lead_recycle$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $recycle_to_print = mysql_num_rows($rslt); - $o=0; - while ($recycle_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - -echo "
    STATUSVERSUCH VERZÖGERTVERSUCH MAXIMUMAKTIV LÖSCHUNG
    $rowx[2]
    \n"; - echo "\n"; - echo "\n"; - echo "
    LÖSCHUNG
    \n"; - -echo "
    ADDIEREN SIE NEUE KAMPAGNE LEITUNG AUFBEREITEN
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Versuch Verzögert: \n"; -echo "Versuch Maximum: \n"; -echo "
    \n"; - -echo "

    \n"; - -echo "LOGGEN SIE ALLE MITTEL AUS DIESER KAMPAGNE HERAUS

    \n"; - -if ($LOGdelete_campaigns > 0) - { - echo "

    LÖSCHEN SIE DIESE KAMPAGNE\n"; - } - -} - - -###################### -# ADD=34 modify campaign info in the system - Basic View -###################### - -if ($ADD==34) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $display_dialable_count = $row[39]; - -echo "
    MODIFY A CAMPAIGN'S RECORD: $row[0] - Grundlegende Ansicht | "; -echo "Detail-Ansicht | "; -echo "Echtzeit Bildschirm\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; -echo "
    Kampagne Identifikation: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Kampagne Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Aktiv:$NWB#vicidial_campaigns-active$NWE
    Park-Verlängerung: $row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE
    Netz-Form: $row[11]$NWB#vicidial_campaigns-web_form_address$NWE
    Erlauben Sie Closers: $row[12] $NWB#vicidial_campaigns-allow_closers$NWE
    Vorwahlknopfstatus1: $NWB#vicidial_campaigns-dial_status$NWE
    Vorwahlknopfstatus2: $NWB#vicidial_campaigns-dial_status$NWE
    Vorwahlknopfstatus3: $NWB#vicidial_campaigns-dial_status$NWE
    Vorwahlknopfstatus4: $NWB#vicidial_campaigns-dial_status$NWE
    Vorwahlknopfstatus5: $NWB#vicidial_campaigns-dial_status$NWE
    Liste Auftrag: $NWB#vicidial_campaigns-lead_order$NWE
    Leitung Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Zufuhrbehälter-Niveau: $NWB#vicidial_campaigns-hopper_level$NWE
    Kraft-Zurückstellen des Zufuhrbehälters: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Selbstvorwahlknopf-Niveau: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Script: $script_id
    Erhalten Sie Anruf-Produkteinführung: $get_call_launch
    \n"; - -echo "
    \n"; -echo "
    LISTEN INNERHALB DIESER KAMPAGNE:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LISTE IDENTIFIKATIONLISTE NAMEAKTIV
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Diese Kampagne hat$active_lists aktive Listen und$inactive_lists unaktivierte Listen

    \n"; - - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - Verberge

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - Zeige

    "; - } - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "Diese Kampagne hat$hopper_leads Leitungen im Vorwahlknopfzufuhrbehälter

    \n"; -echo "Klicken Sie hier, um zu sehen, welche Leitungen im Zufuhrbehälter imAugenblick sind

    \n"; -echo "Klicken Sie hier, um alle Wiederholungsbesuch Einflüsse in dieserKampagne zu sehen

    \n"; -echo "
    \n"; - -echo "
    \n"; - -echo "LOGGEN SIE ALLE MITTEL AUS DIESER KAMPAGNE HERAUS

    \n"; - - -if ($LOGdelete_campaigns > 0) - { - echo "

    LÖSCHEN SIE DIESE KAMPAGNE\n"; - } - - -} - - -###################### -# ADD=311 modify list info in the system -###################### - -if ($ADD==311) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $campaign_id = $row[2]; - $active = $row[3]; - - # grab names of global statuses and statuses in the selected campaign - $stmt="SELECT * from vicidial_statuses order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $Cstatuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($Cstatuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - # end grab status names - - -echo "
    ÄNDERN Sie Einen LISTEN SATZ: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Liste Identifikation: $row[0]$NWB#vicidial_lists-list_id$NWE
    Liste Name: $NWB#vicidial_lists-list_name$NWE
    Kampagne: $NWB#vicidial_lists-campaign_id$NWE
    Aktiv:$NWB#vicidial_lists-active$NWE
    Stellen Sie Führen-Benennen-Status für diese Liste zurück: $NWB#vicidial_lists-reset_list$NWE
    \n"; - -echo "
    \n"; -echo "
    STATUS INNERHALB DIESER LISTE:
    \n"; -echo "\n"; -echo "\n"; - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by status,called_since_last_reset order by status,called_since_last_reset"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - $o=0; - if ($lead_list['count'] > 0) - { - while (list($dispo,) = each($lead_list[$since_reset])) - { - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($dispo == 'CBHOLD') - { - $CLB=""; - $CLE=""; - } - else - { - $CLB=''; - $CLE=''; - } - - echo "\n"; - $o++; - } - } - -echo "\n"; -echo "\n"; - -echo "
    STATUSSTATUS-NAMEBENANNTNICHT BENANNT
    $CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
    TEILSUMMEN$lead_list[Y_count]$lead_list[N_count]
    GESAMTMENGE$lead_list[count]

    \n"; -unset($lead_list); - - - - - -echo "
    \n"; -echo "
    ZEIT-ZONEN INNERHALB DIESER LISTE:
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT gmt_offset_now,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by gmt_offset_now,called_since_last_reset order by gmt_offset_now,called_since_last_reset"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $plus='+'; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - if ($lead_list['count'] > 0) - { - while (list($tzone,) = each($lead_list[$since_reset])) - { - $LOCALzone=3600 * $tzone; - $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); - - if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} - else {$DISPtzone = "$tzone";} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - } - -echo "\n"; -echo "\n"; - -echo "
    GMT VERSETZTE JETZT (lokale Zeit)BENANNTNICHT BENANNT
    ".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
    TEILSUMMEN$lead_list[Y_count]$lead_list[N_count]
    GESAMTMENGE$lead_list[count]

    \n"; -unset($lead_list); - - - - - - - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_count,count(*) from vicidial_list where list_id='$list_id' group by status,called_count order by status,called_count"; - $rslt=mysql_query($stmt, $link); - $status_called_to_print = mysql_num_rows($rslt); - - $o=0; - $sts=0; - $first_row=1; - $all_called_first=1000; - $all_called_last=0; - while ($status_called_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $leads_in_list = ($leads_in_list + $rowx[2]); - $count_statuses[$o] = "$rowx[0]"; - $count_called[$o] = "$rowx[1]"; - $count_count[$o] = "$rowx[2]"; - $all_called_count[$rowx[1]] = ($all_called_count[$rowx[1]] + $rowx[2]); - - if ( (strlen($status[$sts]) < 1) or ($status[$sts] != "$rowx[0]") ) - { - if ($first_row) {$first_row=0;} - else {$sts++;} - $status[$sts] = "$rowx[0]"; - $status_called_first[$sts] = "$rowx[1]"; - if ($status_called_first[$sts] < $all_called_first) {$all_called_first = $status_called_first[$sts];} - } - $leads_in_sts[$sts] = ($leads_in_sts[$sts] + $rowx[2]); - $status_called_last[$sts] = "$rowx[1]"; - if ($status_called_last[$sts] > $all_called_last) {$all_called_last = $status_called_last[$sts];} - - $o++; - } - - - - -echo "
    \n"; -echo "
    BENANNTE ZÄHLIMPULSE INNERHALB DIESER LISTE:
    \n"; -echo "\n"; -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - - $sts=0; - $statuses_called_to_print = count($status); - while ($statuses_called_to_print > $sts) - { - $Pstatus = $status[$sts]; - if (eregi("1$|3$|5$|7$|9$", $sts)) - {$bgcolor='bgcolor="#B9CBFD"'; $AB='bgcolor="#9BB9FB"';} - else - {$bgcolor='bgcolor="#9BB9FB"'; $AB='bgcolor="#B9CBFD"';} -# echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n"; -# echo "$status[$sts]|"; - echo ""; - - $first = $all_called_first; - while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $sts)) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - else - { - if (eregi("0$|2$|4$|6$|8$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - - $called_printed=0; - $o=0; - while ($status_called_to_print > $o) - { - if ( ($count_statuses[$o] == "$Pstatus") and ($count_called[$o] == "$first") ) - { - $called_printed++; - echo ""; - } - - - $o++; - } - if (!$called_printed) - {echo "";} - $first++; - } - echo "\n\n"; - - $sts++; - } - -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - -echo "
    STATUSSTATUS-NAME$firstTEILSUMME
    $Pstatus$statuses_list[$Pstatus] $count_count[$o]  $leads_in_sts[$sts]
    GESAMTMENGE$all_called_count[$first]$leads_in_list

    \n"; - - - - - -echo "
    \n"; - -if ($LOGdelete_lists > 0) - { - echo "

    LÖSCHEN SIE DIESE LISTE\n"; - } - -} - - - -###################### -# ADD=3111 modify in-group info in the system -###################### - -if ($ADD==3111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = $row[4]; - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - $script_id = $row[8]; - $get_call_launch = $row[9]; - $xferconf_a_dtmf = $row[10]; - $xferconf_a_number = $row[11]; - $xferconf_b_dtmf = $row[12]; - $xferconf_b_number = $row[13]; - $drop_call_seconds = $row[14]; - $drop_message = $row[15]; - $drop_exten = $row[16]; - -echo "
    ÄNDERN Sie Einen GRUPPEN SATZ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -echo "\n"; -echo "
    Gruppe Identifikation: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
    Gruppe Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Gruppe Farbe: $NWB#vicidial_inbound_groups-group_color$NWE
    Aktiv:$NWB#vicidial_inbound_groups-active$NWE
    Netz-Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Folgender Vertreter-Anruf: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Anzeige: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Erhalten Sie Anruf-Produkteinführung: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    BringenSie DTMF 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    BringenSie Zahl 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    BringenSie DTMF 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    BringenSie Zahl 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Verbindungsaufbau Sekunden: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Benutze Verbindungsaufbaunachricht: $NWB#vicidial_inbound_groups-drop_message$NWE
    Verbindungsaufbaunebenstelle: $NWB#vicidial_inbound_groups-drop_exten$NWE
    \n"; - -echo "

    \n"; - -echo "
    \n"; - -if ($LOGdelete_ingroups > 0) - { - echo "

    LÖSCHEN SIE DIESES IN-GROUP\n"; - } - -} - - - -###################### -# ADD=31111 modify remote agents info in the system -###################### - -if ($ADD==31111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    ÄNDERN Sie Eine REMOTEMITTEL-EINTRAGUNG: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Benutzernummer Anfang: (nur Zahlen, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Zeilenzahl: (nur Zahlen)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Bediener IP: $NWB#vicidial_remote_agents-server_ip$NWE
    Externe Verlängerung: (dialplan Zahl wählte, um Mittel zu erreichen)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status:$NWB#vicidial_remote_agents-status$NWE
    Kampagne: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Gruppen: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "ANMERKUNG: Sie kann bis 30 Sekunden für die Änderungen dauern, dieauf diesem Schirm eingereicht werden, um Phasen zu gehen\n"; - - -if ($LOGdelete_remote_agents > 0) - { - echo "

    LÖSCHEN SIE DIESES REMOTEMITTEL\n"; - } - -} - - -###################### -# ADD=311111 modify user group info in the system -###################### - -if ($ADD==311111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[0]; - $group_name = $row[1]; -echo ""; - -echo "
    ÄNDERN Sie Eine BENUTZER-GRUPPE EINTRAGUNG\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Gruppe: (keine Räume oder Interpunktion)$NWB#vicidial_user_groups-user_group$NWE
    Beschreibung: (Beschreibung der Gruppe)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -if ($LOGdelete_user_groups > 0) - { - echo "

    LÖSCHEN SIE DIESE BENUTZER-GRUPPE\n"; - } - -} - - -###################### -# ADD=3111111 modify script info in the system -###################### - -if ($ADD==3111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $script_name = $row[1]; - $script_comments = $row[2]; - $script_text = $row[3]; - $active = $row[4]; -echo ""; - -echo "
    ÄNDERN Sie Einen INDEX\n"; -echo "\n"; -echo "\n"; -echo "
    Index Identifikation: $script_id$NWB#vicidial_scripts-script_name$NWE
    Index-Name: (Titel dem Index)$NWB#vicidial_scripts-script_name$NWE
    Index-Anmerkungen: $NWB#vicidial_scripts-script_comments$NWE
    Aktiv:$NWB#vicidial_scripts-active$NWE
    Index-Text:

    Vorbetrachtung-Index
    $NWB#vicidial_scripts-script_text$NWE
    \n"; - -if ($LOGdelete_scripts > 0) - { - echo "

    LÖSCHEN SIE DIESEN INDEX\n"; - } - -} - - -###################### -# ADD=31111111 modify filter info in the system -###################### - -if ($ADD==31111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $lead_filter_name = $row[1]; - $lead_filter_comments = $row[2]; - $lead_filter_sql = $row[3]; -echo ""; - -echo "
    ÄNDERN Sie Einen FILTER\n"; -echo "\n"; -echo "\n"; -echo "
    Filter Identifikation:$lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Filter-Name: (kurze Beschreibung des Filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Filter-Anmerkungen: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filter Sql: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - -echo "

    "; -echo "
    Testen der Kampagne:
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -if ($LOGdelete_filters > 0) - { - echo "

    LÖSCHEN SIE DIESEN FILTER\n"; - } - -} - - -###################### -# ADD=321111111 modify call time definition info in the system -###################### - -if ($ADD==321111111) -{ -if ($LOGmodify_call_times==1) -{ - -if ( ($stage=="ADD") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - if (eregi("\|$",$ct_state_call_times)) - {$ct_state_call_times = "$ct_state_call_times$state_rule\|";} - else - {$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";} - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "Landesrichtlinie hinzugefügt: $state_rule
    \n"; - } -if ( ($stage=="REMOVE") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - $ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "Landesrichlinie gelöscht: $state_rule
    \n"; - } - -$ADD=311111111; -} -else -{ -echo "Sie haben nicht die Rechte, um diese Seite anzusehen. Bitte zurück gehen."; -} - -} - - -###################### -# ADD=311111111 modify call time definition info in the system -###################### - -if ($ADD==311111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -$ct_srs=1; -$b=0; -$srs_SQL =''; -if (strlen($ct_state_call_times)>2) - { - $state_rules = explode('|',$ct_state_call_times); - $ct_srs = ((count($state_rules)) - 1); - } -echo "\n"; -echo "\n"; -while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>0) - { - $stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - echo "\n"; - $srs_SQL .= "'$state_rules[$b]',"; - $srs_state_SQL .= "'$row[0]',"; - } - $b++; - } -if (strlen($srs_SQL)>2) - { - $srs_SQL = "$srs_SQL''"; - $srs_state_SQL = "$srs_state_SQL''"; - $srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)"; - } -else - {$srs_SQL='';} -$stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;"; -$rslt=mysql_query($stmt, $link); -$sct_to_print = mysql_num_rows($rslt); -$sct_list=''; - -$o=0; -while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_list .= "\n"; - $o++; -} -echo "\n"; -echo "\n"; - -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $call_time_name = $row[1]; - $call_time_comments = $row[2]; - $ct_default_start = $row[3]; - $ct_default_stop = $row[4]; - $ct_sunday_start = $row[5]; - $ct_sunday_stop = $row[6]; - $ct_monday_start = $row[7]; - $ct_monday_stop = $row[8]; - $ct_tuesday_start = $row[9]; - $ct_tuesday_stop = $row[10]; - $ct_wednesday_start = $row[11]; - $ct_wednesday_stop = $row[12]; - $ct_thursday_start = $row[13]; - $ct_thursday_stop = $row[14]; - $ct_friday_start = $row[15]; - $ct_friday_stop = $row[16]; - $ct_saturday_start = $row[17]; - $ct_saturday_stop = $row[18]; - $ct_state_call_times = $row[19]; - -echo ""; - -echo "
    Bearbeite eine Anrufzeit\n"; -echo "\n"; -echo "\n"; -echo "
    Anrufzeit ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    Anrufzeit Name: (Kurze Beschreibung der Anrufzeit)$NWB#vicidial_call_times-call_time_name$NWE
    Anrufzeit Kommentare: $NWB#vicidial_call_times-call_time_comments$NWE
    Standard Start Standard Stop $NWB#vicidial_call_times-ct_default_start$NWE
    Sonntag Start Sonntag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Montag Start Montag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Dienstag Start Dienstag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Mittwoch Start Mittwoch Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Donnerstag Start Donnerstag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Freitag Start Freitag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Sonnabend Start Sonnabend Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Aktive landesspezifische Anrufzeit Definitionen für diese Aufnahme:  
    $state_rules[$b] - REMOVE $row[0] - $row[1]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Add state call time rule:


    \n"; -echo "Kampagnen, die diese Anrufzeit nutzen:
    \n"; -echo "\n"; - - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - $CT_camp_id = $row[1]; - $CT_camp_name = $row[2]; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    Lösche diese Anrufzeit Definition\n"; - } -} -else -{ -echo "Sie haben nicht die Rechte, um diese Seite anzusehen. Bitte zurück gehen."; -} - -} - - -###################### -# ADD=3111111111 modify state call time definition info in the system -###################### - -if ($ADD==3111111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $state_call_time_state =$row[1]; - $call_time_name = $row[2]; - $call_time_comments = $row[3]; - $ct_default_start = $row[4]; - $ct_default_stop = $row[5]; - $ct_sunday_start = $row[6]; - $ct_sunday_stop = $row[7]; - $ct_monday_start = $row[8]; - $ct_monday_stop = $row[9]; - $ct_tuesday_start = $row[10]; - $ct_tuesday_stop = $row[11]; - $ct_wednesday_start = $row[12]; - $ct_wednesday_stop = $row[13]; - $ct_thursday_start = $row[14]; - $ct_thursday_stop = $row[15]; - $ct_friday_start = $row[16]; - $ct_friday_stop = $row[17]; - $ct_saturday_start = $row[18]; - $ct_saturday_stop = $row[19]; - -echo ""; - -echo "
    Bearbeite eine landesspezifische Anrufzeit
    \n"; -echo "\n"; -echo "\n"; -echo "
    Anrufzeit ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: $NWB#vicidial_call_times-state_call_time_state$NWE
    Landesspezifischer Anrufzeiten Name: (Kurze Beschreibung der Anrufzeit)$NWB#vicidial_call_times-call_time_name$NWE
    Landesspezifischer Anrufzeiten Kommentar: $NWB#vicidial_call_times-call_time_comments$NWE
    Standard Start Standard Stop $NWB#vicidial_call_times-ct_default_start$NWE
    Sonntag Start Sonntag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Montag Start Montag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Dienstag Start Dienstag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Mittwoch Start Mittwoch Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Donnerstag Start Donnerstag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Freitag Start Freitag Stop $NWB#vicidial_call_times-ct_sunday_start$NWE
    Sonnabend Start Sonnabend Stop $NWB#vicidial_call_times-ct_sunday_start$NWE


    \n"; -echo "Anrufzeiten, die diese landesspezifische Anrufzeit benutzen:
    \n"; -echo "\n"; - - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    Diese landesspezifische Anrufzeitdefinition löschen\n"; - } - -} -else -{ -echo "Sie haben nicht die Rechte, um diese Seite anzusehen. Bitte zurück gehen."; -} - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo "
    \n"; -echo ""; - -echo "
    SUCHE NACH Einem BENUTZER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    Benutzer-Zahl:
    Voller Name:
    Benutzer-Niveau:
    Benutzer-Gruppe:
    \n"; - -} - -###################### -# ADD=66 user search results -###################### - -if ($ADD==66) -{ -echo "
    \n"; - echo ""; - - $SQL = ''; - if ($user) {$SQL .= " user LIKE \"%$user%\" and";} - if ($full_name) {$SQL .= " full_name LIKE \"%$full_name%\" and";} - if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";} - if ($user_group) {$SQL .= " user_group = '$user_group' and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from vicidial_users $SQL order by full_name desc;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    SUCHRESULTATE:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]ÄNDERN Sie | Notfall | STATUS | TIME
    \n"; - -} - - -###################################################################################################### -###################################################################################################### -####### 8 series, Callback lists -###################################################################################################### -###################################################################################################### - -###################### -# ADD=8 find all callbacks on hold by a User -###################### -if ($ADD==8) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    USER CALLBACK HOLD LISTINGS: $user\n"; -$ADD='82'; -} - -###################### -# ADD=81 find all callbacks on hold within a Campaign -###################### -if ($ADD==81) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; -$ADD='82'; -} - -###################### -# ADD=811 find all callbacks on hold within a List -###################### -if ($ADD==811) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    LIST CALLBACK HOLD LISTINGS: $list_id\n"; -$ADD='82'; -} - -###################### -# ADD=82 display all callbacks on hold -###################### -if ($ADD==82) -{ -echo "
    \n"; -echo "
    \n"; -echo "\n"; - - $o=0; - while ($cb_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    LEADLISTCAMPAIGNENTRYDATUMCALLBACKDATUMUSERRECIPIENTSTATUS
    $row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 0 series, displays and searches -###################################################################################################### -###################################################################################################### - -###################### -# ADD=0 display all active users -###################### -if ($ADD==0) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users order by full_name"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    BENUTZER-AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]ÄNDERN Sie | Notfall | STATUS | TIME
    \n"; -} - -###################### -# ADD=10 display all campaigns -###################### -if ($ADD==10) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    KAMPAGNE AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3]$row[4]$row[5] $row[6]$row[7]  Ã„NDERN Sie
    \n"; -} - - -###################### -# ADD=100 display all lists -###################### -if ($ADD==100) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists order by list_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    LISTE AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  Ã„NDERN Sie
    \n"; -} - - - -###################### -# ADD=1000 display all inbound groups -###################### -if ($ADD==1000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    INBOUND GRUPPE AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[5]  Ã„NDERN Sie
    \n"; -} - - -###################### -# ADD=10000 display all remote agents -###################### -if ($ADD==10000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    REMOTEMITTEL-AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]ÄNDERN Sie
    \n"; -} - - -###################### -# ADD=100000 display all user groups -###################### -if ($ADD==100000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups order by user_group"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    BENUTZER-GRUPPEN AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]ÄNDERN Sie
    \n"; -} - - -###################### -# ADD=1000000 display all scripts -###################### -if ($ADD==1000000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    INDEX-AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]ÄNDERN Sie
    \n"; -} - - -###################### -# ADD=10000000 display all filters -###################### -if ($ADD==10000000) -{ -echo "\n";echo "\n";?> -
    -
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    LEITUNG FILTER-AUFLISTUNGEN:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]ÄNDERN Sie
    \n"; -} - - -###################### -# ADD=100000000 display all call times -###################### -if ($ADD==100000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    Anrufzeiten Liste:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[4] ÄNDERN Sie
    \n"; -} - -###################### -# ADD=1000000000 display all state call times -###################### -if ($ADD==1000000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_state_call_times order by state_call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    Liste der landesspezifische Anrufzeiten:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3] $row[4] ÄNDERN Sie
    \n"; -} - - - - - -echo "
    \n"; - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds"; -echo "             VERSION: $version"; -echo "             BAU: $build
    \n"; - - -?> - - -
    - - - -1) - { - $g=0; - $p='13'; - $GMT_gmt[0] = ''; - $GMT_hour[0] = ''; - $GMT_day[0] = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $pmin=(gmdate("i", time() + $pzone)); - $phour=( (gmdate("G", time() + $pzone)) * 100); - $pday=gmdate("w", time() + $pzone); - $tz = sprintf("%.2f", $p); - $GMT_gmt[$g] = "$tz"; - $GMT_day[$g] = "$pday"; - $GMT_hour[$g] = ($phour + $pmin); - $p = ($p - 0.25); - $g++; - } - - $stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $Gct_default_start = "$rowx[3]"; - $Gct_default_stop = "$rowx[4]"; - $Gct_sunday_start = "$rowx[5]"; - $Gct_sunday_stop = "$rowx[6]"; - $Gct_monday_start = "$rowx[7]"; - $Gct_monday_stop = "$rowx[8]"; - $Gct_tuesday_start = "$rowx[9]"; - $Gct_tuesday_stop = "$rowx[10]"; - $Gct_wednesday_start = "$rowx[11]"; - $Gct_wednesday_stop = "$rowx[12]"; - $Gct_thursday_start = "$rowx[13]"; - $Gct_thursday_stop = "$rowx[14]"; - $Gct_friday_start = "$rowx[15]"; - $Gct_friday_stop = "$rowx[16]"; - $Gct_saturday_start = "$rowx[17]"; - $Gct_saturday_stop = "$rowx[18]"; - $Gct_state_call_times = "$rowx[19]"; - - $ct_states = ''; - $ct_state_gmt_SQL = ''; - $ct_srs=0; - $b=0; - if (strlen($Gct_state_call_times)>2) - { - $state_rules = explode('|',$Gct_state_call_times); - $ct_srs = ((count($state_rules)) - 2); - } - while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>1) - { - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Gstate_call_time_id = "$row[0]"; - $Gstate_call_time_state = "$row[1]"; - $Gsct_default_start = "$row[4]"; - $Gsct_default_stop = "$row[5]"; - $Gsct_sunday_start = "$row[6]"; - $Gsct_sunday_stop = "$row[7]"; - $Gsct_monday_start = "$row[8]"; - $Gsct_monday_stop = "$row[9]"; - $Gsct_tuesday_start = "$row[10]"; - $Gsct_tuesday_stop = "$row[11]"; - $Gsct_wednesday_start = "$row[12]"; - $Gsct_wednesday_stop = "$row[13]"; - $Gsct_thursday_start = "$row[14]"; - $Gsct_thursday_stop = "$row[15]"; - $Gsct_friday_start = "$row[16]"; - $Gsct_friday_stop = "$row[17]"; - $Gsct_saturday_start = "$row[18]"; - $Gsct_saturday_stop = "$row[19]"; - - $ct_states .="'$Gstate_call_time_state',"; - - $r=0; - $state_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday lokale Zeit - { - if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday lokale Zeit - { - if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday lokale Zeit - { - if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday lokale Zeit - { - if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday lokale Zeit - { - if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday lokale Zeit - { - if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday lokale Zeit - { - if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - $state_gmt = "$state_gmt'99'"; - $ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) "; - } - - $b++; - } - if (strlen($ct_states)>2) - { - $ct_states = eregi_replace(",$",'',$ct_states); - $ct_statesSQL = "and state NOT IN($ct_states)"; - } - else - { - $ct_statesSQL = ""; - } - - $r=0; - $default_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday lokale Zeit - { - if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday lokale Zeit - { - if (($Gct_monday_start==0) and ($Gct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday lokale Zeit - { - if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday lokale Zeit - { - if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday lokale Zeit - { - if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday lokale Zeit - { - if (($Gct_friday_start==0) and ($Gct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday lokale Zeit - { - if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - - $default_gmt = "$default_gmt'99'"; - $all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL"; - - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and ($all_gmtSQL) $fSQL"; - #$DB=1; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rslt_rows = mysql_num_rows($rslt); - if ($rslt_rows) - { - $rowx=mysql_fetch_row($rslt); - $active_leads = "$rowx[0]"; - } - else {$active_leads = '0';} - - echo "Diese Kampagne hat$active_leads führt, in jenen Listen gewählt zu werden\n"; - } - else - { - echo "Keine aktiven Listen für diese Kampagne gewählt\n"; - } - } -else - { - echo "Keine aktiven Listen für diese Kampagne gewählt\n"; - } -##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ### -} -?> diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/admin_modify_lead.php b/agc_2-X/trunk/LANG_admin/vicidial_de/admin_modify_lead.php deleted file mode 100644 index d3fd2386..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/admin_modify_lead.php +++ /dev/null @@ -1,476 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"];} - elseif (isset($_POST["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];} -if (isset($_GET["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"];} - elseif (isset($_POST["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];} -if (isset($_GET["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"];} - elseif (isset($_POST["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["CBuser"])) {$CBuser=$_GET["CBuser"];} - elseif (isset($_POST["CBuser"])) {$CBuser=$_POST["CBuser"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Leitung notieren Änderung - - -
    - - 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Informationen geändert

    \n"; - echo "\n"; - - if ( ($dispo != $status) and ($dispo == 'CBHOLD') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status='ACTIVE';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - if ( ($dispo != $status) and ($dispo == 'CALLBK') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - - if ( ($dispo != $status) and ($status == 'DNC') ) - { - ### add lead to the internal DNC list - $stmt="INSERT INTO vicidial_dnc (phone_number) values('" . mysql_real_escape_string($phone_number) . "');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    Lead added to DNC List: $lead_id - $phone_number
    \n"; - } - -} -else -{ - - if ($CBchangeUSERtoANY == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set recipient='ANYONE' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to ANYONE
    \n"; - } - if ($CBchangeUSERtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record user changed to $CBuser
    \n"; - } - if ($CBchangeANYtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "',recipient='USERONLY' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to USERONLY, user: $CBuser
    \n"; - } - - - - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $dispo = "$row[3]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Anrufinformationen: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Lead ID: $lead_id
    Fronter: $tsr     Liste Identifikation: $list_id
    Vorname:   \n"; - echo " Letzter Name:
      \n"; - echo "Postcode:
    \n"; - echo "


    \n"; - - if ( ($dispo == 'CALLBK') or ($dispo == 'CBHOLD') ) - { - ### find any vicidial_callback records for this lead - $stmt="select * from vicidial_callbacks where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $CB_to_print = mysql_num_rows($rslt); - $rowx=mysql_fetch_row($rslt); - - if ($CB_to_print>0) - { - if ($rowx[9] == 'USERONLY') - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    \n"; - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - else - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - } - else - { - echo "
    No Callback records found
    \n"; - } - } - - - - - - - } - else - { - echo "Leitung Nachschlagen FIEL für lead_id aus $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - -echo "

    \n"; - -echo "
    \n"; - -echo "ANRUFE ZU DIESEM LEITUNG:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS TSR KAMPAGNE LIST LEAD
    $row[4] $row[7] $row[8] $row[11] $row[3] $row[2] $row[1]
    \n"; - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/admin_search_lead.php b/agc_2-X/trunk/LANG_admin/vicidial_de/admin_search_lead.php deleted file mode 100644 index 26e58758..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/admin_search_lead.php +++ /dev/null @@ -1,224 +0,0 @@ - LICENSE: GPLv2 -### -### AST GUI database administration search for lead info -### admin_modify_lead.php -# -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead -# -# changes: -# 60620-1055 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - Changed results to multi-record -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Leitung Suche - -Leitung Nachschlagen - - - -
    \n"; - echo "
    \n"; - echo "\n"; - echo "Tragen Sie bitte a ein:
    Vendor ID(Verkäuferleitung Code): or \n"; - echo "
    eine Haupttelefonnummer: or\n"; - echo "
    eine Leitung Identifikation:

    \n"; - echo "
    \n"; - echo "\n
    \n"; - echo "\n"; - exit; - } - -else - { - - if ($vendor_id) - { - $stmt="SELECT * from vicidial_list where vendor_lead_code='" . mysql_real_escape_string($vendor_id) . "' order by modify_date desc limit 1000"; - } - else - { - if ($phone) - { - $stmt="SELECT * from vicidial_list where phone_number='" . mysql_real_escape_string($phone) . "' order by modify_date desc limit 1000"; - } - else - { - if ($lead_id) - { - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "' order by modify_date desc limit 1000"; - } - else - { - print "ERROR: you must search for something! Go back and search for something"; - exit; - } - } - } - if ($DB) - { - echo "\n\n$stmt\n\n"; - } - - $rslt=mysql_query($stmt, $link); - $results_to_print = mysql_num_rows($rslt); - if ($results_to_print < 1) - { - echo date("l F j, Y G:i:s A"); - echo "\n

    \n"; - echo "Die Suchvariablen, die Sie eintrugen, sind nicht im System aktiv

    \n"; - echo "Bitte zurück und verdoppeln Überprüfung gehen die Informationen,die Sie eintrugen und reichen wieder ein\n"; - echo "
    \n"; - echo "\n"; - exit; - } - else - { - echo "RESULTS: $results_to_print

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $o=0; - while ($results_to_print > $o) - { - $row=mysql_fetch_row($rslt); - $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "
    #LEAD IDSTATUSVENDOR IDLAST AGENTLISTE IDENTIFIKATIONPHONENAMECITYSECURITYLAST CALL
    $o$row[0]$row[3]$row[5]$row[4]$row[7]$row[11]$row[13] $row[15]$row[19]$row[28]$row[2]
    \n"; - } - } - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \nNEUE SUCHE"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds"; - - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/count.htm b/agc_2-X/trunk/LANG_admin/vicidial_de/count.htm deleted file mode 100644 index 51f8a361..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/count.htm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/dbconnect.php b/agc_2-X/trunk/LANG_admin/vicidial_de/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/group_hourly_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_de/group_hourly_stats.php deleted file mode 100644 index 954f159c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/group_hourly_stats.php +++ /dev/null @@ -1,252 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1014 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["date_with_hour"])) {$date_with_hour=$_GET["date_with_hour"];} - elseif (isset($_POST["date_with_hour"])) {$date_with_hour=$_POST["date_with_hour"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$date_with_hour_default = date("Y-m-d H"); -$date_no_hour_default = $TODAY; - -if (!isset($date_with_hour)) {$date_with_hour = $date_with_hour_default;} - $date_no_hour = $date_with_hour; - $date_no_hour = eregi_replace(" ([0-9]{2})",'',$date_no_hour); -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - -# $stmt="SELECT full_name from vicidial_users where user='$user';"; -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: Gruppe Stündlicher Notfall -\n"; -?> - - -
    - - - - - -= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDtotal[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_no_hour) . " 00:00:00' and call_date <= '" . mysql_real_escape_string($date_no_hour) . " 23:59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDday[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDcount[$o] = "$row[0]"; - $o++; - } - -echo "
      VICIDIAL ADMIN: Gruppe Stündlicher Notfall  
    \n"; - -echo "
    \n"; - -echo "TSR STUNDE ZÄHLIMPULSE: $group | $status | $date_with_hour | $date_no_hour\n"; - -echo "
    \n"; -echo "\n"; - - $day_calls=0; - $hour_calls=0; - $total_calls=0; - $o=0; - while($o < $tsrs_to_print) - { - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $VDtotal[$o]); - $hour_calls = ($hour_calls + $VDcount[$o]); - $day_calls = ($day_calls + $VDday[$o]); - - $o++; - } - -echo "\n"; - - -} - -echo "
    TSR ID   $status   GESAMTANRUFE   $status DAY    
    $VDuser[$o] $VDname[$o] $VDcount[$o] $VDtotal[$o] $VDday[$o]ÄNDERN Sie | Notfall
    TOTAL $status $hour_calls $total_calls $day_calls
    \n"; -echo "

    \n"; - - - echo "
    Melden Sie bitte die Gruppe an, die Sie stündlichen Notfall fürerhalten möchten:
    \n"; - echo "\n"; - echo "group:
    \n"; - echo "status:   (example: XFER)
    \n"; - echo "date with hour:   (example: 2004-06-25 14)
    \n"; - echo "\n"; - echo "


    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/help.gif b/agc_2-X/trunk/LANG_admin/vicidial_de/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/listloader.php b/agc_2-X/trunk/LANG_admin/vicidial_de/listloader.php deleted file mode 100644 index 877ab1a4..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/listloader.php +++ /dev/null @@ -1,698 +0,0 @@ - LICENSE: GPLv2 -# -# AST Web GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1006 - added listID override and gmt_offset lookup while loading -# 60619-1652 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12'; -$build = '60619-1652'; - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -$submit_file=$_GET["submit_file"]; if (!$submit_file) {$submit_file=$_POST["submit_file"];} -$list_id_override=$_GET["list_id_override"]; if (!$list_id_override) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - - -#$DB=1; -#$DBX=1; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('listloader.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"HILFE\""; - - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -?> - - - - - - method=post enctype="multipart/form-data"> -
    - - - - - - - - - - - - - -
    Last Leitungen von dieser Akte:
    Liste Identifikation Override: (nur Zahlen or leave blank for values in the file)
    KLICKEN SIE HIER, UM ZUR SUPERLEITUNG LADEVORRICHTUNG ZU GEHEN (BETA VERSION)     ZURÜCK ZU ADMIN
    - -document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - $pulldate=date("Y-m-d H:i:s"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("./vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Verarbeitung$delim_name-delimited file... ($tab_count|$pipe_count)\n"; - - if (strlen($list_id_override)>0) - { - print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city = $row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) - { - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $gmt_offset = '0'; - $called_since_last_reset='N'; - - if (strlen($list_id_override)>0) - { - # print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =='1') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### MEXICO ### - if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### AUSTRALIA ### - if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    STÖRUNG: Die Akte hat nicht die erforderliche Zahl vonauffängt, um sie zu verarbeiten.
    "; - } - print ""; -} else if (filesize($leadfile)>8388608) { - print "
    STÖRUNG: Akte übersteigt die Begrenzung 8MB.
    "; -} -?> - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/listloaderMAIN.php b/agc_2-X/trunk/LANG_admin/vicidial_de/listloaderMAIN.php deleted file mode 100644 index dc41a8b0..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/listloaderMAIN.php +++ /dev/null @@ -1,79 +0,0 @@ - LICENSE: GPLv2 -# -# this is the main frame page for the lead loading section. This is where you -# would upload a file and have it inserted into vicidial_list -# -# changes: -# 60620-1149 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - -VICIDIAL: Leitung Ladevorrichtung Modul - - - - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/new_listloader_superL.php b/agc_2-X/trunk/LANG_admin/vicidial_de/new_listloader_superL.php deleted file mode 100644 index 2eb6171b..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/new_listloader_superL.php +++ /dev/null @@ -1,1364 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60113-1603 - Fixed a few bugs in Excel import -# 60421-1624 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1240 - added listID override -# 60616-1604 - added gmt lookup for each lead -# 60619-1651 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12-1'; -$build = '60619-1651'; - - -require("dbconnect.php"); - -### links used for testing -#$link=mysql_connect("10.10.10.15", "cron", "1234"); -#mysql_select_db("asterisk"); -#$WeBServeRRooT = '/home/www/htdocs'; - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];} - elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} - elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} -if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} - elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} -if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} - elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];} -if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];} - elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];} -if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];} - elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];} -if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];} - elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];} -if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];} - elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];} -if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];} - elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];} -if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];} - elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];} -if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];} - elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];} -if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];} - elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];} -if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];} - elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];} -if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];} - elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];} -if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];} - elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];} -if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];} - elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];} -if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];} - elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];} -if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];} - elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];} -if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];} - elseif (isset($_POST["province_field"])) {$province_field=$_POST["province_field"];} -if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];} - elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];} -if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];} - elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];} -if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];} - elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];} -if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];} - elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];} -if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];} - elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];} -if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];} - elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];} -if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];} - elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];} -if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];} - elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];} -if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];} - elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); - -# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"HILFE\""; - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -function macfontfix($fontsize) { - - $browser = getenv("HTTP_USER_AGENT"); - $pctype = explode("(", $browser); - if (ereg("Mac",$pctype[1])) { - /* Browser is a Mac. If not Netscape 6, raise fonts */ - - $blownbrowser = explode('/', $browser); - $ver = explode(' ', $blownbrowser[1]); - $ver = $ver[0]; - if ($ver >= 5.0) return $fontsize; else return ($fontsize+2); - - } else return $fontsize; /* Browser is not a Mac - don't touch fonts */ -} - -echo "\n"; - -?> - - - -VICIDIAL ADMIN: Super Lead Loader - - -
    method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> - - - - - - - - - - - - - - - - - - - - -
    Last Leitungen von dieser Akte:
    Liste Identifikation Override: (nur Zahlen or leave blank for values in the file)
    Zu verwenden Dateiaufbau:Standard-VICIDIAL    Kundenspezifischer Plan
            
    KLICKEN SIE HIER, UM ZUR BASIC LEITUNG LADEVORRICHTUNG ZU GEHEN         ZURÜCK ZU ADMIN
    SUPERLISTE LADEVORRICHTUNG-     VERSION:     BAU:
    - - -document.forms[0].leadfile.disabled=true;document.forms[0].list_id_override.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - $total=0; $good=0; $bad=0; - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Verarbeitung$delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - - if (strlen($list_id_override)>0) - { - # print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    STÖRUNG: Die Akte hat nicht die erforderliche Zahl vonauffängt, um sie zu verarbeiten.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - print "
    VerarbeitungExcel file... \n"; - if (strlen($list_id_override)>0) - { - print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    \n"; - } - # print "$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field"; - passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override"); - } else { - # copy($leadfile, "./vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    VerarbeitungCSV file... \n"; - if (strlen($list_id_override)>0) - { - print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - } - print ""; - } - -if ($leadfile && filesize($LF_path)<=8388608) { - $total=0; $good=0; $bad=0; - if ($file_layout=="standard") { - - print ""; - flush(); - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Verarbeitung$delim_name-delimited file... ($tab_count|$pipe_count)\n"; - if (strlen($list_id_override)>0) - { - print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    STÖRUNG: Die Akte hat nicht die erforderliche Zahl vonauffängt, um sie zu verarbeiten.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    VerarbeitungCSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } - print ""; - - } else { - print "
    "; - flush(); - print "\r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - - $rslt=mysql_query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1", $link); - - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Verarbeitung$delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    VerarbeitungCSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    LISTE IDENTIFIKATION OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - $total=0; $good=0; $bad=0; - $row=fgetcsv($file, 1000, ","); - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print "
    VICIDIAL SpalteAkte Daten
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
            
    \r\n"; - # } - print ""; - } -} else if (filesize($leadfile)>8388608) { - print "
    STÖRUNG: Akte übersteigt die Begrenzung 8MB.
    "; -} -?> - - - - - - - - - 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### MEXICO ### -if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### AUSTRALIA ### -if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### ALL OTHER COUNTRY CODES ### -if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - -### Find out if DST to raise the gmt offset ### -$AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); -$AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - -$AC_processed=0; -if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # lokale Zeit calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } -if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - -return $gmt_offset; -} \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/remote_dispo.php b/agc_2-X/trunk/LANG_admin/vicidial_de/remote_dispo.php deleted file mode 100644 index 01d5eb2d..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/remote_dispo.php +++ /dev/null @@ -1,327 +0,0 @@ - LICENSE: GPLv2 -### -# this is the remote agent disposition screen for calls sent to remote agents. This allows the remote agent to modify customer information and disposition the call - -# CHANGES -# -# 60619-1626 - Added variable filtering to eliminate SQL injection attack threat -# - - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - -$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 > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -VICIDIAL DIREKTÜBERTRAGUNG: Anruf-Einteilung -\n"; -?> - - -
    - -"; - -if ($end_call > 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="UPDATE vicidial_closer_log set end_epoch='$STARTtime', length_in_sec='" . mysql_real_escape_string($call_length) . "', status='" . mysql_real_escape_string($status) . "', user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by start_epoch desc limit 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "',user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Anruf ist dispositioned gewesen       $NOW_TIME\n

    \n"; - - echo "
    \n"; - -} -else -{ - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Anrufinformationen: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Kampagne Identifikation: $campaign_id
    Fronter: $tsr     Liste Identifikation: $list_id
    Vorname:   \n"; - echo " Letzter Name:
      \n"; - echo "Postcode:
    \n"; - echo "


    \n"; - - } - else - { - echo "Leitung Nachschlagen FIEL für lead_id aus $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/server_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_de/server_stats.php deleted file mode 100644 index eede94e1..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/server_stats.php +++ /dev/null @@ -1,96 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1037 - Added Link back to Admin section -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select * from servers;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$servers_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $servers_to_print) - { - $row=mysql_fetch_row($rslt); - $server_id[$i] = $row[0]; - $server_description[$i] = $row[1]; - $server_ip[$i] = $row[2]; - $active[$i] = $row[3]; - $i++; - } -?> - - - - - -VICIDIAL: Bediener-Notfall and Reports -VICIDIAL: Bediener-Notfall and Reports                           -ZURÜCK ZU ADMIN

    - - -
    
    -
    - $o)
    -	{
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	$o++;
    -	}
    -
    -?>
    -
    SERVERBESCHREIBUNGIP ADDRESSAKTIVVDAD timeVDcall timePARK timeCLOSER/INBOUND time
    $server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINKLINK
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/user_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_de/user_stats.php deleted file mode 100644 index a32851eb..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/user_stats.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1743 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: User Stats -\n"; -?> - - -
    - - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Stats for  
      \n"; - -echo "
    \n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_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' group by status order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - -echo "
    \n"; - -echo "GESPRÄCH ZEIT UND STATUS:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from vicidial_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'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - -echo "\n"; -echo "
    STATUSZÄHLIMPULSHOURS:MINUTES
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    GESAMTANRUFE $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "LOGIN/LOGOUT ZEIT:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT event,event_epoch,event_date,campaign_id from vicidial_user_log where user='" . mysql_real_escape_string($user) . "' and event_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("LOGIN", $row[0])) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if (ereg("LOGIN", $row[0])) - { - $event_start_seconds = $row[1]; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - if (ereg("LOGOUT", $row[0])) - { - if ($event_start_seconds) - { - $event_stop_seconds = $row[1]; - $event_seconds = ($event_stop_seconds - $event_start_seconds); - $total_login_time = ($total_login_time + $event_seconds); - $event_hours = ($event_seconds / 3600); - $event_hours = round($event_hours, 2); - $event_hours_int = intval("$event_hours"); - $event_minutes = ($event_hours - $event_hours_int); - $event_minutes = ($event_minutes * 60); - $event_minutes_int = round($event_minutes, 0); - if ($event_minutes_int < 10) {$event_minutes_int = "0$event_minutes_int";} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - $event_start_seconds=''; - $event_stop_seconds=''; - } - else - { - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - } - - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - -$total_login_hours = ($total_login_time / 3600); -$total_login_hours = round($total_login_hours, 2); -$total_login_hours_int = intval("$total_login_hours"); -$total_login_minutes = ($total_login_hours - $total_login_hours_int); -$total_login_minutes = ($total_login_minutes * 60); -$total_login_minutes_int = round($total_login_minutes, 0); -if ($total_login_minutes_int < 10) {$total_login_minutes_int = "0$total_login_minutes_int";} - -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "
    FALL DATUM KAMPAGNEHOURS:MINUTES
    $row[0] $row[2] $row[3]
    $row[0] $row[2] $row[3] $event_hours_int:$event_minutes_int
    $row[0] $row[2] $row[3]
    GESAMTMENGE $total_login_hours_int:$total_login_minutes_int
    \n"; - - -echo "

    \n"; - -echo "
    \n"; - -echo "ANRUFE DES LETZT-50:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where user='" . mysql_real_escape_string($user) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS PHONE KAMPAGNE LIST LEAD
    $row[4] $row[7] $row[8] $row[10] $row[3] $row[2] $row[1]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/user_status.php b/agc_2-X/trunk/LANG_admin/vicidial_de/user_status.php deleted file mode 100644 index b92d57bb..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/user_status.php +++ /dev/null @@ -1,238 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1738 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,change_agent_campaign from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $change_agent_campaign=$row[1]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $agents_to_print = mysql_num_rows($rslt); - $i=0; - while ($i < $agents_to_print) - { - $row=mysql_fetch_row($rslt); - $Aserver_ip = $row[2]; - $Asession_id = $row[3]; - $Aextension = $row[4]; - $Astatus = $row[5]; - $Acampaign = $row[7]; - $Alast_call = $row[14]; - $Acl_campaigns = $row[15]; - $i++; - } - - } - -$stmt="select * from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - - - -?> - - -VICIDIAL ADMIN: User Status -\n"; -?> - - -
    -
    - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Status for  
      \n"; - -if ($stage == "live_campaign_change") -{ - $stmt="UPDATE vicidial_live_agents set campaign_id='" . mysql_real_escape_string($group) . "' where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name changed to $group campaign
    \n"; - - exit; -} - -if ($stage == "log_agent_out") -{ - $stmt="DELETE from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name has been emergency logged out, make sure they close their web browser
    \n"; - - exit; -} - -if ($agents_to_print > 0) -{ - echo "
    ";
    -	echo "Agent Logged in at server:  $Aserver_ip\n";
    -	echo "               in session:  $Asession_id\n";
    -	echo "               from phone:  $Aextension\n";
    -	echo "Agent is in campaign:       $Acampaign\n";
    -	echo "              status:       $Astatus\n";
    -	echo " hungup last call at:       $Alast_call\n";
    -	echo "       Closer groups:       $Acl_campaigns\n\n";
    -
    -	echo "
    "; - - - if ($change_agent_campaign > 0) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "Current Kampagne: \n"; - echo "
    \n"; - - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - } -} - -else -{ - echo "Agent is not logged in\n
    "; - -} - - -echo "           $user - $full_name - \n"; - -echo "VICIDIAL Time Sheet\n"; - -echo "
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - -echo "|$stage|$group|"; - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_de/vdremote.php b/agc_2-X/trunk/LANG_admin/vicidial_de/vdremote.php deleted file mode 100644 index 58bcd035..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_de/vdremote.php +++ /dev/null @@ -1,602 +0,0 @@ - LICENSE: GPLv2 -# -# Changes -# 50307-1721 - First version -# 51123-1502 - removed requirement of PHP Globals=on -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1603 - Added variable filtering to eliminate SQL injection attack threat -# -# make sure you have added a user to the vicidial_users MySQL table with at least user_level 4 to access this page the first time - -$version = '1.1.12'; -$build = '60619-1603'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($force_logout)) {$force_logout = 0;} - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Sie haben jetzt heraus geloggt. Danke\n"; - exit; -} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -$popup_page = './closer_popup.php'; -$STARTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Unzulässiges Username/Kennwort:|$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - - $stmt="SELECT count(*) from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $authx=$row[0]; - - if($authx>0) - { - $stmt="SELECT remote_agent_id,server_ip,number_of_lines from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id=$row[0]; - $server_ip=$row[1]; - if (!$number_of_lines) {$number_of_lines=$row[2];} - - fwrite ($fp, "VDremote|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - echo "This remote agent does not exist: |$PHP_AUTH_USER|\n"; - exit; - } - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -if ($ADD==61111) - { - echo"\n"; - } -echo "\n"; -?> - -VICIDIAL DIREKTÜBERTRAGUNG MITTEL: $LOGfullname - $PHP_AUTH_USER "; - -if (!$ADD) {$ADD="31111";} -if ($ADD==31111) {echo "Ändern Sie Remotemittel";} -if ($ADD==41111) {echo "Ändern Sie Remotemittel";} -if ($ADD==61111) {echo "Remote Agent Status";} -if ($ADD==71111) {echo "Remote Agent Closer Stats";} - - -if (strlen($ADD)>4) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "2) {$groups_value .= " -";} - } - -?> - - - -
    -
    - - - -
      VICIDIAL DIREKTÜBERTRAGUNG MITTEL:   Logout  
      ÄNDERN Sie | ">STATUS | ">INBOUND NOTFALL
    -"; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    ÄNDERN Sie Eine REMOTEMITTEL-EINTRAGUNG: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Benutzernummer Anfang: $user_start
    Zeilenzahl: (nur Zahlen)
    Bediener IP: $row[3]
    Externe Verlängerung: (number dialed to reach agents [i.e. 913125551212])
    Status:
    Kampagne: $campaign_id
    Inbound Gruppen: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "ANMERKUNG: Sie kann bis 30 Sekunden für die Änderungen dauern, dieauf diesem Schirm eingereicht werden, um Phasen zu gehen\n"; - -} - - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($number_of_lines) < 1) or (strlen($conf_exten) < 2) ) - {echo "
    REMOTEMITTEL NICHT GEÄNDERT - gehen Sie bitte zurück und betrachtenSie die Daten, die Sie eingaben\n";} - else - { - $stmt="UPDATE vicidial_remote_agents set number_of_lines='" . mysql_real_escape_string($number_of_lines) . "', conf_exten='" . mysql_real_escape_string($conf_exten) . "', status='" . mysql_real_escape_string($status) . "', closer_campaigns='" . mysql_real_escape_string($groups_value) . "' where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - -# echo "$stmt\n"; - echo "
    REMOTEMITTEL GEÄNDERT\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTEMITTEL ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - - } - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    ÄNDERN Sie Eine REMOTEMITTEL-EINTRAGUNG: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Benutzernummer Anfang: $user_start
    Zeilenzahl: (nur Zahlen)
    Bediener IP: $row[3]
    Externe Verlängerung: (number dialed to reach agents [i.e. 913125551212])
    Status:
    Kampagne: $campaign_id
    Inbound Gruppen: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "ANMERKUNG: Sie kann bis 30 Sekunden für die Änderungen dauern, dieauf diesem Schirm eingereicht werden, um Phasen zu gehen\n"; - -} - - - - -###################### -# ADD=61111 status of remote agent in the system and active calls and queue -###################### - -if ($ADD==61111) -{ - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    REMOTEMITTEL-STÖRUNG - gehen Sie bitte zurück und betrachten Sie dieDaten, die Sie eingaben\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'" . mysql_real_escape_string($nextuser) . "',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - echo "VICIDIAL: Remote Agent Time On Calls $NOW_TIME\n\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo "| STATION | USER | LEADID | CHANNEL | STATUS | START TIME | MINUTES |\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select extension,user,lead_id,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' and user IN($users_list) order by extension;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $leadlink=0; - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[3]=''; - $row[5]='- WARTEND -'; - $row[6]=$row[7]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $leadid = sprintf("%-12s", $row[2]); - if ($row[2] > 0) - { - $leadidLINK=$row[2]; - $leadlink++; - if ( eregi("QUEUE",$row[4]) ) {$row[6]=$STARTtime;} - $leadid = "$leadid"; - } - $channel = sprintf("%-10s", $row[3]); - $cc=0; - while ( (strlen($channel) > 10) and ($cc < 100) ) - { - $channel = eregi_replace(".$","",$channel); - $cc++; - if (strlen($channel) <= 10) {$cc=101;} - } - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = ($STARTtime - $row[6]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} - if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$extension$EG | $G$user$EG | $G$leadid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo " $i Mittel geloggt innen auf Bediener $server_ip\n\n"; - - echo " - 5 Minuten oder mehr beim Anruf\n"; - echo " - Über 10 Minuten beim Anruf\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "*********************************KEINE MITTEL BEI DEN ANRUFEN*********************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - -###################### -# ADD=71111 stats for remote agents from closer logs(vicidial_closer_log) -###################### - -if ($ADD==71111) -{ - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n\n"; - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    REMOTEMITTEL-STÖRUNG - gehen Sie bitte zurück und betrachten Sie dieDaten, die Sie eingaben\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'$nextuser',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - $stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list);"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $in_calls = $row[0]; - $in_time = $row[1]; - $in_time_M = ($in_time / 60); - $in_time_M = round($in_time_M, 2); - $in_time_M_int = intval("$in_time_M"); - $in_time_SEC = ($in_time_M - $in_time_M_int); - $in_time_SEC = ($in_time_SEC * 60); - $in_time_SEC = round($in_time_SEC, 0); - if ($in_time_SEC < 10) {$in_time_SEC = "0$in_time_SEC";} - $in_time_MS = "$in_time_M_int:$in_time_SEC"; - $in_time_MS = sprintf("%7s", $in_time_MS); - - echo "VICIDIAL: Inbound Notfall des Remotemittels $NOW_TIME\n\n"; - echo "\n"; - echo "Gesamtanrufe genommen$query_date: $in_calls\n"; - echo "Gesamtgespräch Zeit an$query_date: $in_time_MS (minutes:seconds)\n"; - echo "\n"; - echo "\n"; - echo "Anrufliste für$query_date:\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - echo "| USER | LEADID | GROUP | PHONE NUM | STATUS | CALL TIME | MINUTES |\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select user,lead_id,campaign_id,phone_number,status,call_date,length_in_sec from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list) order by call_date;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - $user = sprintf("%-8s", $row[0]); - $leadid = sprintf("%-10s", $row[1]); - $group = sprintf("%-14s", $row[2]); - $phone = sprintf("%-10s", $row[3]); - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = $row[6]; - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - # if ($call_time_M_int >= 5) {$G=''; $EG='';} - # if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$user$EG | $G$leadid$EG | $G$group$EG | $G$phone$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - # echo " $i Mittel geloggt innen auf Bediener $server_ip\n\n"; - - # echo " - 5 Minuten oder mehr beim Anruf\n"; - # echo " - Über 10 Minuten beim Anruf\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "*********************************KEIN ERSUCHT UM DIESEN TAG*******************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nIndexlaufzeit: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_CLOSERstats.php deleted file mode 100644 index b8f2479e..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_CLOSERstats.php +++ /dev/null @@ -1,396 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1714 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select group_id from vicidial_inbound_groups;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Στατιστικά VDAD Closer\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           ΤΡΟΠΟΠΟΙΗΣΗ | ΑÎΑΦΟΡΕΣ \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "ΠΑΡΑΚΑΛΩ ΕΠΙΛΕΞΤΕ ΜΙΑ ΕΚΣΤΡΑΤΕΙΑ ΚΑΙ ΜΙΑ ΗΜΕΡΟΜΗÎΙΑ ΑÎΩΤΕΡΩ, ΚΑΙ ΠΑΤΗΣΤΕ ΕΠΙΒΕΒΑΙΩΣΗ\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Στατιστικά αυτόματης κλήσης Closer                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Συνολικά κλήσεις που τοποθετήθηκαν από την ΕκστÏατεία: $TOTALcalls\n";
    -echo "Μέσος ÏŒÏος σε δευτεÏόλεπτα για όλες τις κλήσεις: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- ΕΓΚΑΤΑΛ\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Συνολικά ΕΓΚΑΤΑΛΕΙΜΕÎΕΣ κλήσεις: $DROPcalls  $DROPpercent%\n";
    -echo "Μέσος ÏŒÏος σε δευτεÏόλεπτα για ΕΓΚΑΤΑΕΙΜΕÎΕΣ κλήσεις: $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΗΣΤΗ\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| ΧΡΗΣΤΗΣ                  | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΟÎΟΥ\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='$group';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "ΓΡΑΦΙΚΗ ΠΑΡΑΣΤΑΣΗ ΜΕ 15ΛΕΠΤΕΣ ΑΥΞΗΣΕΙΣ ΤΩΠΣΥÎΟΛΙΚΩΠΚΛΗΣΕΩΠΠΟΥ ΤΟΠΟΘΕΤΟΥÎΤΑΙ ΑΠΟ ΑΥΤΗΠΤΗΠΕΚΣΤΡΑΤΕΙΑ\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_VDADstats.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_VDADstats.php deleted file mode 100644 index c94aa544..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_VDADstats.php +++ /dev/null @@ -1,417 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1718 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           ΤΡΟΠΟΠΟΙΗΣΗ | ΑÎΑΦΟΡΕΣ \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "ΠΑΡΑΚΑΛΩ ΕΠΙΛΕΞΤΕ ΜΙΑ ΕΚΣΤΡΑΤΕΙΑ ΚΑΙ ΜΙΑ ΗΜΕΡΟΜΗÎΙΑ ΑÎΩΤΕΡΩ, ΚΑΙ ΠΑΤΗΣΤΕ ΕΠΙΒΕΒΑΙΩΣΗ\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Stats                             $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Συνολικά κλήσεις που τοποθετήθηκαν από την ΕκστÏατεία: $TOTALcalls\n";
    -echo "Μέσος ÏŒÏος σε δευτεÏόλεπτα για όλες τις κλήσεις: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- ΕΓΚΑΤΑΛ\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Συνολικά ΕΓΚΑΤΑΛΕΙΜΕÎΕΣ κλήσεις: $DROPcalls  $DROPpercent%\n";
    -echo "Μέσος ÏŒÏος σε δευτεÏόλεπτα για ΕΓΚΑΤΑΕΙΜΕÎΕΣ κλήσεις: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- ΜΗ ΑΠΑÎΤΗΜΕÎΕΣ ΑΥΤΟΜΑΤΕΣ ΚΛΗΣΕΙΣ\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$NAcalls =	sprintf("%10s", $row[0]);
    -$NApercent = (($NAcalls / $TOTALcalls) * 100);
    -$NApercent = round($NApercent, 0);
    -
    -$average_na_seconds = ($row[1] / $row[0]);
    -$average_na_seconds = round($average_na_seconds, 0);
    -$average_na_seconds =	sprintf("%10s", $average_na_seconds);
    -
    -echo "Συνολικά ÎΑ κλήσεις -Busy,Disconnect,BTvoicemail: $NAcalls  $NApercent%\n";
    -echo "Μέσος ÏŒÏος σε δευτεÏόλεπτα για ÎΑ κλήσεις: $average_na_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΗΣΤΗ\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| ΧΡΗΣΤΗΣ                  | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΟÎΟΥ\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "ΓΡΑΦΙΚΗ ΠΑΡΑΣΤΑΣΗ ΜΕ 15ΛΕΠΤΕΣ ΑΥΞΗΣΕΙΣ ΤΩΠΣΥÎΟΛΙΚΩΠΚΛΗΣΕΩΠΠΟΥ ΤΟΠΟΘΕΤΟΥÎΤΑΙ ΑΠΟ ΑΥΤΗΠΤΗΠΕΚΣΤΡΑΤΕΙΑ\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_VICIDIAL_hopperlist.php deleted file mode 100644 index 015b382b..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_VICIDIAL_hopperlist.php +++ /dev/null @@ -1,161 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1654 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.10.15';} - -$stmt="select campaign_id,campaign_name from vicidial_campaigns order by campaign_id;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $campaign_id[$i] =$row[0]; - $campaign_name[$i] =$row[1]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Λίστα Hopper\n"; -echo "
    \n"; -#echo "\n"; -#echo "\n"; -echo "\n"; -echo "\n"; -echo "           ΤΡΟΠΟΠΟΙΗΣΗ \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "ΠΑΡΑΚΑΛΩ ΕΠΙΛΕΞΤΕ ΜΙΑ ΕΚΣΤΡΑΤΕΙΑ ΑÎΩΤΕΡΩ ΚΑΙ ΠΑΤΗΣΤΕ ΕΠΙΒΕΒΑΙΩΣΗ\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: ΕνεÏγή Λίστα στον Hopper                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -
    -echo "ΑÏιθμός οδηγών στον hopper τώÏα::       $TOTALcalls\n";
    -
    -
    -##############################
    -#########  LEAD STATS
    -
    -echo "\n";
    -echo "---------- LEADS IN HOPPER\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$FMT_i =		sprintf("%-4s", $i);
    -	$lead_id =		sprintf("%-9s", $row[0]);
    -	$phone_number =	sprintf("%-10s", $row[1]);
    -	$state =		sprintf("%-5s", $row[2]);
    -	$status =		sprintf("%-6s", $row[3]);
    -	$count =		sprintf("%-5s", $row[4]);
    -	$gmt =			sprintf("%-6s", $row[5]);
    -
    -	echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_admin_log_display.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_admin_log_display.php deleted file mode 100644 index aab85960..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_admin_log_display.php +++ /dev/null @@ -1,118 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$query_date = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$query_date); - -# AST GUI database administration -# AST_admin_log_display.php -# -# CHANGES -# 50325-0932 - First build -# 51123-1443 - removed globals=on requirement -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1044 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '0.0.4'; -$build = '60620-1044'; - -$STARTtime = date("U"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "ΔΙΑΧΕΙΡΙΣΗ LOG DISPLAY"; -echo "\n"; - -# Fri, 25 Mar 2005 - -$DAY_DATE = date("j"); -if ($DAY_DATE < 10) -# {$GREP_DATE = date("D, j M Y");} - {$GREP_DATE = date("D, 0j M Y");} -else - {$GREP_DATE = date("D, j M Y");} - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!$query_date) {$query_date = $GREP_DATE;} - -$Gquery_date = eregi_replace(" ",'\ ',$query_date); -echo "\n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -echo "ΔΙΑΧΕΙΡΙΣΗ CHANGE LOG                             $NOW_TIME\n";
    -
    -#passthru("grep $Gquery_date /home/www/htdocs/vicidial/admin_changes_log.txt");
    -passthru("grep $Gquery_date $WeBServeRRooT/vicidial/admin_changes_log.txt");
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_performance.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_performance.php deleted file mode 100644 index 5ddd508c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_performance.php +++ /dev/null @@ -1,232 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1711 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["shift"])) {$shift=$_GET["shift"];} - elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Agent Performance\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           ΤΡΟΠΟΠΟΙΗΣΗ | ΑÎΑΦΟΡΕΣ \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A ΔΙΑΚΟΜΙΣΤΗΣ AND DATE-TIME ABOVE AND CLICK ΕΠΙΒΕΒΑΙΩΣΗ\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:33:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:33:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:33:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:33:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TALK   | TALKAVG| A    | B    | DC   | DNC  | N    | NI   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='" . mysql_real_escape_string($group) . "' group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_performance_detail.php
    deleted file mode 100644
    index b342c85f..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_performance_detail.php
    +++ /dev/null
    @@ -1,406 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1712 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]))				{$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];}
    -	elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"]))		{$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($group)) {$group = '';}
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -$stmt="select campaign_id from vicidial_campaigns;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$campaigns_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $campaigns_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           ΤΡΟΠΟΠΟΙΗΣΗ | ΑÎΑΦΟΡΕΣ \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK ΕΠΙΒΕΒΑΙΩΣΗ\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 03:45:00";   
    -	$query_date_END = "$query_date 15:15:00";
    -	$time_BEGIN = "03:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:15:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance Detail                        $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TIME   | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG| A    | B    | DC   | DNC  | N    | NI   | CB   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtime=($TOTtime + $row[1] + $row[5] + $row[7] + $row[9]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$TOTtotWAIT=($TOTtotWAIT + $row[7]);
    -	$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
    -	$TOTtotDISPO=($TOTtotDISPO + $row[9]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtime =	($row[1] + $row[5] + $row[7] + $row[9]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -	$USERtotPAUSE =	$row[5];
    -	$USERavgPAUSE =	$row[6];
    -	$USERtotWAIT =	$row[7];
    -	$USERavgWAIT =	$row[8];
    -	$USERtotDISPO =	$row[9];
    -	$USERavgDISPO =	$row[10];
    -
    -	$USERtime_M = ($USERtime / 60);
    -	$USERtime_M = round($USERtime_M, 2);
    -	$USERtime_M_int = intval("$USERtime_M");
    -	$USERtime_S = ($USERtime_M - $USERtime_M_int);
    -	$USERtime_S = ($USERtime_S * 60);
    -	$USERtime_S = round($USERtime_S, 0);
    -	if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
    -	$USERtime_MS = "$USERtime_M_int:$USERtime_S";
    -	$pfUSERtime_MS[$i] =		sprintf("%7s", $USERtime_MS);
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	$USERtotPAUSE_M = ($USERtotPAUSE / 60);
    -	$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
    -	$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
    -	$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
    -	$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
    -	$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
    -	if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
    -	$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
    -	$pfUSERtotPAUSE_MS[$i] =		sprintf("%6s", $USERtotPAUSE_MS);
    -
    -	$USERavgPAUSE_M = ($USERavgPAUSE / 60);
    -	$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
    -	$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
    -	$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
    -	$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
    -	$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
    -	if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
    -	$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
    -	$pfUSERavgPAUSE_MS[$i] =		sprintf("%6s", $USERavgPAUSE_MS);
    -
    -	$USERtotWAIT_M = ($USERtotWAIT / 60);
    -	$USERtotWAIT_M = round($USERtotWAIT_M, 2);
    -	$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
    -	$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
    -	$USERtotWAIT_S = ($USERtotWAIT_S * 60);
    -	$USERtotWAIT_S = round($USERtotWAIT_S, 0);
    -	if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
    -	$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
    -	$pfUSERtotWAIT_MS[$i] =		sprintf("%6s", $USERtotWAIT_MS);
    -
    -	$USERavgWAIT_M = ($USERavgWAIT / 60);
    -	$USERavgWAIT_M = round($USERavgWAIT_M, 2);
    -	$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
    -	$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
    -	$USERavgWAIT_S = ($USERavgWAIT_S * 60);
    -	$USERavgWAIT_S = round($USERavgWAIT_S, 0);
    -	if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
    -	$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
    -	$pfUSERavgWAIT_MS[$i] =		sprintf("%6s", $USERavgWAIT_MS);
    -	
    -	$USERtotDISPO_M = ($USERtotDISPO / 60);
    -	$USERtotDISPO_M = round($USERtotDISPO_M, 2);
    -	$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
    -	$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
    -	$USERtotDISPO_S = ($USERtotDISPO_S * 60);
    -	$USERtotDISPO_S = round($USERtotDISPO_S, 0);
    -	if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
    -	$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
    -	$pfUSERtotDISPO_MS[$i] =		sprintf("%6s", $USERtotDISPO_MS);
    -
    -	$USERavgDISPO_M = ($USERavgDISPO / 60);
    -	$USERavgDISPO_M = round($USERavgDISPO_M, 2);
    -	$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
    -	$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
    -	$USERavgDISPO_S = ($USERavgDISPO_S * 60);
    -	$USERavgDISPO_S = round($USERavgDISPO_S, 0);
    -	if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
    -	$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
    -	$pfUSERavgDISPO_MS[$i] =		sprintf("%6s", $USERavgDISPO_MS);
    -
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; $ctCB[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		if (($row[1] == 'CALLBK') || ($row[1] == 'CBHOLD') ) {$ctCB[$k]=sprintf("%-4s", $row[0]);	$TOT_CB = ($TOT_CB + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtime_MS[$k]| $pfUSERtotPAUSE_MS[$k] | $pfUSERavgPAUSE_MS[$k] | $pfUSERtotWAIT_MS[$k] | $pfUSERavgWAIT_MS[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $pfUSERtotDISPO_MS[$k] | $pfUSERavgDISPO_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctCB[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtime_M = ($TOTtime / 60);
    -	$TOTtime_M = round($TOTtime_M, 2);
    -	$TOTtime_M_int = intval("$TOTtime_M");
    -	$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
    -	$TOTtime_S = ($TOTtime_S * 60);
    -	$TOTtime_S = round($TOTtime_S, 0);
    -	if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
    -	$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
    -	$TOTtime_MS =		sprintf("%7s", $TOTtime_MS);
    -		while(strlen($TOTtime_MS)>7) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOTtotDISPO_M = ($TOTtotDISPO / 60);
    -	$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
    -	$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
    -	$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
    -	$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
    -	$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
    -	if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
    -	$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
    -	$TOTtotDISPO_MS =		sprintf("%7s", $TOTtotDISPO_MS);
    -		while(strlen($TOTtotDISPO_MS)>7) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
    -
    -	$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
    -	$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
    -	$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
    -	$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
    -	if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
    -	$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
    -	$TOTtotPAUSE_MS =		sprintf("%7s", $TOTtotPAUSE_MS);
    -		while(strlen($TOTtotPAUSE_MS)>7) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
    -
    -	$TOTtotWAIT_M = ($TOTtotWAIT / 60);
    -	$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
    -	$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
    -	$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
    -	$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
    -	$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
    -	if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
    -	$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
    -	$TOTtotWAIT_MS =		sprintf("%7s", $TOTtotWAIT_MS);
    -		while(strlen($TOTtotWAIT_MS)>7) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
    -
    -
    -	$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
    -	$TOTavgTALK_M = round($TOTavgTALK_M, 2);
    -	$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
    -	$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
    -	$TOTavgTALK_S = ($TOTavgTALK_S * 60);
    -	$TOTavgTALK_S = round($TOTavgTALK_S, 0);
    -	if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
    -	$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
    -	$TOTavgTALK_MS =		sprintf("%6s", $TOTavgTALK_MS);
    -		while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
    -
    -	$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
    -	$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
    -	$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
    -	$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
    -	$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
    -	$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
    -	if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
    -	$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
    -	$TOTavgDISPO_MS =		sprintf("%6s", $TOTavgDISPO_MS);
    -		while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
    -
    -	$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
    -	$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
    -	$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
    -	$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
    -	if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
    -	$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
    -	$TOTavgPAUSE_MS =		sprintf("%6s", $TOTavgPAUSE_MS);
    -		while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
    -
    -	$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
    -	$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
    -	$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
    -	$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
    -	$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
    -	$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
    -	if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
    -	$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
    -	$TOTavgWAIT_MS =		sprintf("%6s", $TOTavgWAIT_MS);
    -		while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
    -
    -	
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_CB = sprintf("%-5s", $TOT_CB);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtime_MS| $TOTtotPAUSE_MS| $TOTavgPAUSE_MS | $TOTtotWAIT_MS| $TOTavgWAIT_MS | $TOTtotTALK_MS| $TOTavgTALK_MS | $TOTtotDISPO_MS| $TOTavgDISPO_MS | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_CB| $TOT_SALE|\n";
    -echo "+--------------------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_time_sheet.php
    deleted file mode 100644
    index 75c707af..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_agent_time_sheet.php
    +++ /dev/null
    @@ -1,281 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1729 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
    -	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
    -	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]))				{$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];}
    -	elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"]))		{$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Time Sheet\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$agent)
    -{
    -echo "\n";
    -echo "PLEASE SELECT AN ΧΕΙΡΙΣΤΗΣID AND DATE-TIME ABOVE AND CLICK ΕΠΙΒΕΒΑΙΩΣΗ\n";
    -echo " NOTE: stats taken from available agent log data\n";
    -}
    -
    -else
    -{
    -$query_date_BEGIN = "$query_date 00:00:00";   
    -$query_date_END = "$query_date 23:59:59";
    -$time_BEGIN = "00:00:00";   
    -$time_END = "23:59:59";
    -
    -$stmt="select full_name from vicidial_users where user='$agent';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$full_name = $row[0];
    -
    -echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- ΧΕΙΡΙΣΤΗΣTIME SHEET: $agent - $full_name -------------\n\n";
    -
    -if ($calls_summary)
    -	{
    -	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -
    -	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
    -
    -		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
    -		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
    -		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
    -		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
    -		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
    -		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
    -		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
    -		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
    -		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
    -		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
    -		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
    -		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
    -		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
    -		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
    -
    -		$TALK_TIME_H = ($row[1] / 3600);
    -		$TALK_TIME_H = round($TALK_TIME_H, 2);
    -		$TALK_TIME_H_int = intval("$TALK_TIME_H");
    -		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
    -		$TALK_TIME_M = ($TALK_TIME_M * 60);
    -		$TALK_TIME_M = round($TALK_TIME_M, 2);
    -		$TALK_TIME_M_int = intval("$TALK_TIME_M");
    -		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
    -		$TALK_TIME_S = ($TALK_TIME_S * 60);
    -		$TALK_TIME_S = round($TALK_TIME_S, 0);
    -		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
    -		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
    -		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
    -		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
    -
    -		$PAUSE_TIME_H = ($row[3] / 3600);
    -		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
    -		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
    -		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
    -		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
    -		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
    -		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
    -		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
    -		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
    -		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
    -		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
    -		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
    -		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
    -		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
    -
    -		$WAIT_TIME_H = ($row[5] / 3600);
    -		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
    -		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
    -		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
    -		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
    -		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
    -		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
    -		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
    -		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
    -		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
    -		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
    -		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
    -		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
    -		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
    -
    -		$WRAPUP_TIME_H = ($row[7] / 3600);
    -		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
    -		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
    -		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
    -		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
    -		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
    -		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
    -		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
    -		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
    -		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
    -
    -		$TALK_AVG_M = ($row[2] / 60);
    -		$TALK_AVG_M = round($TALK_AVG_M, 2);
    -		$TALK_AVG_M_int = intval("$TALK_AVG_M");
    -		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
    -		$TALK_AVG_S = ($TALK_AVG_S * 60);
    -		$TALK_AVG_S = round($TALK_AVG_S, 0);
    -		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
    -		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
    -		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
    -
    -		$PAUSE_AVG_M = ($row[4] / 60);
    -		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
    -		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
    -		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
    -		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
    -		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
    -		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
    -		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
    -		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
    -
    -		$WAIT_AVG_M = ($row[6] / 60);
    -		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
    -		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
    -		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
    -		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
    -		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
    -		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
    -		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
    -		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
    -
    -		$WRAPUP_AVG_M = ($row[8] / 60);
    -		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
    -		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
    -		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
    -		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
    -		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
    -		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
    -
    -	echo "ΣΥÎΟΛΙΚΕΣ ΚΛΗΣΕΙΣTAKEN: $row[0]\n";
    -	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
    -	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
    -	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
    -	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
    -	echo "----------------------------------------------------------------\n";
    -	echo "TOTAL ACTIVE ΧΕΙΡΙΣΤΗΣTIME: $pfTOTAL_TIME_HMS\n";
    -
    -	echo "\n";
    -	}
    -else
    -	{
    -	echo "Call Activity Summary\n\n";
    -
    -	}
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "FIRST LOGIN:          $row[0]\n";
    -$start = $row[1];
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "LAST LOG ACTIVITY:    $row[0]\n";
    -$end = $row[1];
    -
    -$login_time = ($end - $start);
    -	$LOGIN_TIME_H = ($login_time / 3600);
    -	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
    -	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
    -	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
    -	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
    -	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
    -	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
    -	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
    -	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
    -	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
    -	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
    -	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
    -	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
    -	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
    -
    -echo "-----------------------------------------\n";
    -echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_server_performance.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_server_performance.php
    deleted file mode 100644
    index 0a266f00..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_server_performance.php
    +++ /dev/null
    @@ -1,310 +0,0 @@
    -    LICENSE: GPLv2
    -#
    -# CHANGES
    -#
    -# 60619-1732 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))	{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))	{$submit=$_POST["submit"];}
    -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]))				{$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];}
    -	elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"]))	{$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -# path from root to where ploticus files will be stored
    -$DOCroot = "$WeBServeRRooT/vicidial/ploticus/";
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -if (!isset($group)) {$group = '';}
    -
    -$stmt="select server_ip from servers;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$servers_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $servers_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Server Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "             ΑÎΑΦΟΡΕΣ \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A ΔΙΑΚΟΜΙΣΤΗΣ AND DATE-TIME ABOVE AND CLICK ΕΠΙΒΕΒΑΙΩΣΗ\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:32:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:32:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Server Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- TOTALS, PEAKS and AVERAGES\n";
    -
    -$stmt="select sysload from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by sysload desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$HIGHload =	sprintf("%10s", $row[0]);
    -$HIGHmulti = intval($HIGHload / 100);
    -#$HIGHmulti = ($HIGHload / 100);
    -
    -$stmt="select AVG(sysload),AVG(channels_total) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGload =	sprintf("%10s", $row[0]);
    -$AVGchannels =	sprintf("%10s", $row[1]);
    -
    -$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGcpuUSER =	sprintf("%10s", $row[0]);
    -$AVGcpuSYSTEM =	sprintf("%10s", $row[1]);
    -$AVGcpuIDLE =	sprintf("%10s", $row[2]);
    -
    -$stmt="select usedram from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by usedram desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$USEDram =	sprintf("%10s", $row[0]);
    -
    -$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365','8366','8367') and  start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$OFFHOOKtime =	sprintf("%10s", $row[1]);
    -
    -
    -echo "Total Calls in/out on this server:        $TOTALcalls\n";
    -echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
    -echo "Average channels in use for server:       $AVGchannels\n";
    -echo "Average load for server:                  $AVGload\n";
    -echo "Peak load for server:                     $HIGHload\n";
    -#echo "Peak used memory for server (in MB):      $USEDram\n";
    -echo "Average USER process cpu percentage:      $AVGcpuUSER %\n";
    -echo "Average SYSTEM process cpu percentage:    $AVGcpuSYSTEM %\n";
    -echo "Average IDLE process cpu percentage:      $AVGcpuIDLE %\n";
    -
    -echo "\n";
    -echo "---------- LINE GRAPH:\n";
    -
    -
    -
    -##############################
    -#########  Graph stats
    -
    -$DAT = '.dat';
    -$HTM = '.htm';
    -$PNG = '.png';
    -$filedate = date("Y-m-d_His");
    -$DATfile = "$group$query_date$shift$filedate$DAT";
    -$HTMfile = "$group$query_date$shift$filedate$HTM";
    -$PNGfile = "$group$query_date$shift$filedate$PNG";
    -
    -$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
    -$DATfp = fopen ("$DOCroot/$DATfile", "a");
    -
    -$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='" . mysql_real_escape_string($group) . "' and start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' order by timex;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
    -	$row[6] = intval($row[6] * $HIGHmulti);
    -	fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
    -	$i++;
    -	}
    -fclose($DATfp);
    -
    -$rows_to_max = ($rows_to_print + 100);
    -
    -
    -
    -$HTMcontent  = '';
    -$HTMcontent .= "#proc page\n";
    -$HTMcontent .= "#if @DEVICE in png,gif\n";
    -$HTMcontent .= "   scale: 0.6\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#endif\n";
    -$HTMcontent .= "#proc getdata\n";
    -$HTMcontent .= "file: $DOCroot/$DATfile\n";
    -$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc areadef\n";
    -$HTMcontent .= "title: Server $group   $query_date_BEGIN to $query_date_END\n";
    -$HTMcontent .= "titledetails: size=14  align=C\n";
    -$HTMcontent .= "rectangle: 1 1 14 7\n";
    -$HTMcontent .= "xscaletype: time hh:mm:ss\n";
    -$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
    -$HTMcontent .= "yrange: 0 $HIGHload\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc xaxis\n";
    -$HTMcontent .= "stubs: inc 30 minutes\n";
    -$HTMcontent .= "minorticinc: 5 minutes\n";
    -$HTMcontent .= "stubformat: hh:mm:ssa\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc yaxis\n";
    -$HTMcontent .= "stubs: inc 50\n";
    -$HTMcontent .= "grid: color=yellow\n";
    -$HTMcontent .= "gridskip: min\n";
    -$HTMcontent .= "ticincrement: 100 1000\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: userproc\n";
    -$HTMcontent .= "linedetails: color=purple width=.5\n";
    -$HTMcontent .= "fill: lavender\n";
    -$HTMcontent .= "legendlabel: user proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: sysproc\n";
    -$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
    -$HTMcontent .= "fill: dullyellow\n";
    -$HTMcontent .= "legendlabel: system proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: load\n";
    -$HTMcontent .= "linedetails: color=blue width=.5\n";
    -$HTMcontent .= "legendlabel: load\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: processes\n";
    -$HTMcontent .= "linedetails: color=red width=.5\n";
    -$HTMcontent .= "legendlabel: processes\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: channels\n";
    -$HTMcontent .= "linedetails: color=green width=.5\n";
    -$HTMcontent .= "legendlabel: channels\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc legend\n";
    -$HTMcontent .= "location: max-2 max\n";
    -$HTMcontent .= "seglen: 0.2\n";
    -$HTMcontent .= "\n";
    -
    -fwrite ($HTMfp, "$HTMcontent");
    -fclose($HTMfp);
    -
    -
    -passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
    -
    -sleep(1);
    -
    -echo "
    \n"; -echo "\n"; -echo "\n"; - - -echo ""; - -} - - - -?> - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDAD.php deleted file mode 100644 index 6414148b..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDAD.php +++ /dev/null @@ -1,255 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 60620-1040 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: ΧÏόνος ΧειÏιστών σε κλήσεις        $NOW_TIME    ΑÎΑΦΟΡΕΣ\n\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL    | STATUS | START TIME          | MINUTES |\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	$agentcount=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- ΑÎΑΜΟÎΗ -';
    -			$row[6]=$row[7];
    -			}
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$sessionid =		sprintf("%-9s", $row[2]);
    -		$channel =			sprintf("%-10s", $row[3]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[4]);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 5) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 10) {$G=''; $EG='';}
    -		if (eregi("PAUSED",$row[4])) 
    -			{
    -			if ($call_time_M_int >= 1) 
    -				{$i++; continue;} 
    -			else
    -				{$G=''; $EG='';}
    -			}
    -
    -		$agentcount++;
    -		echo "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -		echo "  $agentcount ΧειÏιστές συνδεμένοι στον διακομιστή $server_ip\n\n";
    -
    -		echo "             - ΧειÏιστές σε παÏση\n";
    -		echo "             - 5 λεπτά ή παÏαπάνω σε κλήση\n";
    -		echo "             - Πάνω από 10 λεπτά σε κλήση\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* ΚΑÎΕÎΑΣ ΧΕΙΡΙΣΤΗΣ ΣΕ ΚΛΗΣΕΙΣ*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -echo "| CHANNEL    | STATUS | CAMPAIGN | PHONE NUMBER       | START TIME          | MINUTES |\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-8s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -		echo "  $i κλήσεις που τοποθετήθηκαν στον διακομιστή $server_ip\n\n";
    -
    -		echo "             - ΑÎΑΜΟÎΗ ΕÎΕΡΓΗΣ ΚΛΗΣΗΣ\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "*******************************ΔΕΠΥΠΑΡΧΟΥΠΕÎΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑÎΑΜΟÎΗ*********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDAD_closer.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDAD_closer.php deleted file mode 100644 index 07234545..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDAD_closer.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# CHANGES -# -# 60620-1037 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - -\n"; -echo " - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: ΧÏόνος ΧειÏιστών σε κλήσεις        $NOW_TIME    ΑÎΑΦΟΡΕΣ\n\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL             | STATUS | CALLTIME | MINUTES | CAMPAIGN     | FRONT  |\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED|CLOSER",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- WAIT -';
    -			$row[6]=$row[7];
    -			}
    -		$extension[$i] =		sprintf("%-10s", $row[0]);
    -		$user[$i] =				sprintf("%-6s", $row[1]);
    -		$sessionid[$i] =		sprintf("%-9s", $row[2]);
    -		$channel[$i] =			sprintf("%-19s", $row[3]);
    -			$cc[$i]=0;
    -		while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
    -			{
    -			$channel[$i] = eregi_replace(".$","",$channel[$i]);   
    -			$cc[$i]++;
    -			if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
    -			}
    -		$status[$i] =			sprintf("%-6s", $row[4]);
    -		$start_time[$i] =		sprintf("%-8s", $row[5]);
    -			$cd[$i]=0;
    -		while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
    -			{
    -			$start_time[$i] = eregi_replace("^.","",$start_time[$i]);   
    -			$cd[$i]++;
    -			if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
    -			}
    -		$uniqueid[$i] =			$row[8];
    -		$lead_id[$i] =			$row[9];
    -		$closer[$i] =			$row[1];
    -		$call_time_S[$i] = ($STARTtime - $row[6]);
    -
    -		$call_time_M[$i] = ($call_time_S[$i] / 60);
    -		$call_time_M[$i] = round($call_time_M[$i], 2);
    -		$call_time_M_int[$i] = intval("$call_time_M[$i]");
    -		$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
    -		$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
    -		$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
    -		if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
    -		$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
    -		$call_time_MS[$i] =		sprintf("%7s", $call_time_MS[$i]);
    -		$i++;
    -		}
    -		$ext_count = $i;
    -		$i=0;
    -	while ($i < $ext_count)
    -		{
    -
    -		$stmt="select campaign_id from vicidial_auto_calls where uniqueid='$uniqueid[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "';";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$camp_to_print = mysql_num_rows($rslt);
    -		if ($camp_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$campaign = sprintf("%-12s", $row[0]);
    -			$camp_color = $row[0];
    -			}
    -		else
    -			{$campaign = 'DEAD        ';   	$camp_color = 'DEAD';}
    -		if (eregi("READY|PAUSED|CLOSER",$status[$i]))
    -			{$campaign = '            ';   	$camp_color = '';}
    -
    -		$stmt="select user from vicidial_xfer_log where lead_id='$lead_id[$i]' and closer='$closer[$i]' order by call_date desc limit 1;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$xfer_to_print = mysql_num_rows($rslt);
    -		if ($xfer_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$fronter = sprintf("%-6s", $row[0]);
    -			}
    -		else
    -			{$fronter = '      ';}
    -
    -		$G = '';		$EG = '';
    -		$G=""; $EG='';
    -	#	if ($call_time_M_int[$i] >= 5) {$G=''; $EG='';}
    -	#	if ($call_time_M_int[$i] >= 10) {$G=''; $EG='';}
    -
    -		echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -		echo "  $i ΧειÏιστές συνδεμένοι στον διακομιστή $server_ip\n\n";
    -
    -	#	echo "             - 5 λεπτά ή παÏαπάνω σε κλήση\n";
    -	#	echo "             - Πάνω από 10 λεπτά σε κλήση\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* ΚΑÎΕÎΑΣ ΧΕΙΡΙΣΤΗΣ ΣΕ ΚΛΗΣΕΙΣ*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -#echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -echo "| CHANNEL             | STATUS | CAMPAIGN     | PHONE NUMBER       | CALLTIME | MINUTES |\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id desc;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-19s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 19) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 19) {$cc=101;}
    -			}
    -		$start_time =		sprintf("%-8s", $row[5]);
    -			$cd=0;
    -		while ( (strlen($start_time) > 8) and ($cd < 100) )
    -			{
    -			$start_time = eregi_replace("^.","",$start_time);   
    -			$cd++;
    -			if (strlen($start_time) <= 8) {$cd=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-12s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -		echo "  $i κλήσεις που τοποθετήθηκαν στον διακομιστή $server_ip\n\n";
    -
    -		echo "             - ΑÎΑΜΟÎΗ ΕÎΕΡΓΗΣ ΚΛΗΣΗΣ\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "*******************************ΔΕΠΥΠΑΡΧΟΥΠΕÎΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑÎΑΜΟÎΗ*********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDADall.php deleted file mode 100644 index ac70cbdc..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDADall.php +++ /dev/null @@ -1,349 +0,0 @@ - LICENSE: GPLv2 -# -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60511-1343 - Added leads and drop info at the top of the screen -# 60608-1539 - Fixed CLOSER tallies for active calls -# 60619-1658 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["RR"])) {$RR=$_GET["RR"];} - elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -if (!isset($group)) {$group='';} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$NOW_DAY = date("Y-m-d"); -$NOW_HOUR = date("H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns where active='Y';"; -$rslt=mysql_query($stmt, $link); -if (!isset($DB)) {$DB=0;} -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!isset($RR)) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if (!isset($reset_counter)) {$reset_counter=0;} -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD ΕκστÏατεία: $group\n"; -echo "
    \n"; -echo "VICIDIAL: Realtime ΕκστÏατεία: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         ΤΡΟΠΟΠΟΙΗΣΗ | ΑÎΑΦΟΡΕΣ \n"; -echo "\n\n"; - - -if (!$group) {echo "

    please select a campaign from the pulldown above\n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$HOPlev = $row[8]; - -echo "
    "; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; - -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$VDhop = $row[0]; - -$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$DAleads = $row[0]; -$callsTODAY = $row[1]; -$dropsTODAY = $row[2]; -$drpctTODAY = $row[3]; - -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "
    DIAL LEVEL:  $row[0]    STATUSES:  $row[1], $row[2], $row[3], $row[4], $row[5]     ORDER:  $row[6]     FILTER:  $row[7]    
    HOPPER LEVEL:  $HOPlev     LEADS IN HOPPER:  $VDhop     DIALABLE LEADS:  $DAleads       TIME:
    CALLS TODAY:  $callsTODAY     CALLS DROPPED:  $dropsTODAY     DROPPED PERCENT:  $drpctTODAY%       $NOW_TIME
    "; - - -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - { - $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );"; - } -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo "ΔΕΠΥΠΑΡΧΟΥΠΕÎΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑÎΑΜΟÎΗ\n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls ΕκστÏατεία: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | ΔΙΑΚΟΜΙΣΤΗΣ IP | CALL ΔΙΑΚΟΜΙΣΤΗΣ IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n\n"; - - $Aecho .= " - ΧειÏιστές σε παÏση\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo " ΚΑÎΕÎΑΣ ΧΕΙΡΙΣΤΗΣ ΣΕ ΚΛΗΣΕΙΣ\n";
    -	}
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDADall_SIPmonitor.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDADall_SIPmonitor.php deleted file mode 100644 index 7bcf0cde..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonVDADall_SIPmonitor.php +++ /dev/null @@ -1,282 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60504-2023 - Modified click-to-listen for SIP phones by Angelito Manansala -# -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];} -$RR=$_GET["RR"]; if (!$RR) {$RR=$_POST["RR"];} -$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];} -$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];} -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$ΥΠΟΒΑΛΛΩ=$_GET["ΥΠΟΒΑΛΛΩ"]; if (!$ΥΠΟΒΑΛΛΩ) {$ΥΠΟΒΑΛΛΩ=$_POST["ΥΠΟΒΑΛΛΩ"];} - - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!$RR) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VF DIALER: Time On VDAD ΕκστÏατείας: $group\n"; -echo "
    \n"; -echo "VF DIALER: Realtime ΕκστÏατείας: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "                   \n"; -echo "STOP | GO \n"; -echo "\n\n"; - -if (!$group) {echo "

    please select a campaign from the pulldown above
    \n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order from vicidial_campaigns where campaign_id='$group';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); - -echo "
    "; -echo "DIAL LEVEL: $row[0]         "; -echo "STATUSES: $row[1], $row[2], $row[3], $row[4], $row[5]         "; -echo "ORDER: $row[6]"; -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and (campaign_id='$group' or campaign_id LIKE \"CL_%\");";} -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='$group';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo "ΔΕΠΥΠΑΡΧΟΥΠΕÎΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑÎΑΜΟÎΗ\n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VF DIALER: Agents Time On Calls ΕκστÏατείας: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | ΚΕÎΤΡΙΚΟΣΥΠΟΛΟΓΙΣΤΉΣ IP | CALL ΚΕÎΤΡΙΚΟΣΥΠΟΛΟΓΙΣΤΉΣ IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='$group' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - $sessionid = trim($sessionid); - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG LISTEN | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n"; - $Aecho .= " NOTE: Click LISTERN to monitor agent call, you must have installed softphone on you machine.\n\n"; - - - $Aecho .= " - ΧÏήστες σε παÏση\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo " ΚΑÎΕÎΑΣ ΧΡΗΣΤΗΣ ΣΕ ΚΛΗΣΕΙΣ\n";
    -	}
    -
    -?>
    -
    - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeoncall.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeoncall.php deleted file mode 100644 index 7c648199..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeoncall.php +++ /dev/null @@ -1,180 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΥΠΟΒΑΛΛΩ"])) {$ΥΠΟΒΑΛΛΩ=$_GET["ΥΠΟΒΑΛΛΩ"];} - elseif (isset($_POST["ΥΠΟΒΑΛΛΩ"])) {$ΥΠΟΒΑΛΛΩ=$_POST["ΥΠΟΒΑΛΛΩ"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Call\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Call                                          $NOW_TIME\n\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -echo "| STATION    | SESSIONID | CHANNEL   | NUMBER DIALED    | START TIME          | MINUTES |\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -
    -$stmt="SELECT count(*) from live_sip_channels where server_ip='$server_ip';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="select extension from live_channels where server_ip='$server_ip';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$ext_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_zap_counter=0;
    -	$sessions = '';
    -	while ($i < $ext_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if (preg_match("/^8600/i",$row[0]))
    -			{
    -			$sessions .= "$row[0]|";
    -			}
    -		$i++;
    -		}
    -	$sessions = preg_replace("/\|$/",'',$sessions);
    -
    -	if ($DB) {echo "SESSIONS: -$sessions-\n";}
    -
    -	$stmt="select * from live_sip_channels where server_ip='$server_ip' order by channel;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_calls_counter=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ( (preg_match("/Zap\/|internal|ring/i",$row[3])) or (preg_match("/Local\//i",$row[0])) )
    -			{
    -			if ($DB) {echo "NOT STATION |$row[0]|$row[3]|\n";}
    -			$session_id = '';
    -			}
    -		else 
    -			{
    -			if (preg_match("/$row[3]/i",$sessions))
    -				{
    -				if ($DB) {echo "LIVE STATION|$row[0]|$row[3]|\n";}
    -				$session_id = $row[3];
    -				$station = preg_replace("/SIP\//",'',$row[0]);
    -				$station = preg_replace("/-.*/",'',$station);
    -			
    -				$LIVE_sessions[$live_calls_counter] =			"$session_id";
    -				$LIVE_sessions_FORMAT[$live_calls_counter] =	sprintf("%-9s", $session_id);
    -				$LIVE_stations[$live_calls_counter] =			"$station";
    -				$LIVE_stations_FORMAT[$live_calls_counter] =	sprintf("%-10s", $station);
    -
    -		#		echo "| $station | $session_id | \n";
    -
    -				$live_calls_counter++;
    -				}
    -			else
    -				{
    -				if ($DB) {echo "NOT STATIONZ|$row[0]|$row[3]|\n";}
    -				$session_id = '';
    -				}
    -			}
    -
    -		$i++;
    -		}
    -
    -		if ($live_calls_counter > 0)
    -		{
    -		$i=0;
    -		$LC_counter = $live_calls_counter;
    -
    -		while ($i < $live_calls_counter)
    -			{
    -			$stmt="select channel,extension,number_dialed,start_time,start_epoch from call_log where extension='$LIVE_stations[$i]' and server_ip='$server_ip' order by uniqueid desc LIMIT 1;";
    -			$rslt=mysql_query($stmt, $link);
    -			if ($DB) {echo "$stmt\n";}
    -			$parked_to_print = mysql_num_rows($rslt);
    -			$row=mysql_fetch_row($rslt);
    -
    -			$channel =			sprintf("%-9s", $row[0]);
    -			$number_dialed =	sprintf("%-16s", $row[2]);
    -			$start_time =		sprintf("%-19s", $row[3]);
    -			$call_time_S = ($STARTtime - $row[4]);
    -
    -			$call_time_M = ($call_time_S / 60);
    -			$call_time_M = round($call_time_M, 2);
    -			$call_time_M_int = intval("$call_time_M");
    -			$call_time_SEC = ($call_time_M - $call_time_M_int);
    -			$call_time_SEC = ($call_time_SEC * 60);
    -			$call_time_SEC = round($call_time_SEC, 0);
    -			if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -			$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -			$call_time_MS =		sprintf("%7s", $call_time_MS);
    -			$G = '';		$EG = '';
    -			if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -			if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -			echo "| $G$LIVE_stations_FORMAT[$i]$EG | $G$LIVE_sessions_FORMAT[$i]$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -			$i++;
    -			}
    -
    -		echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -		echo "  $i stations on live calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on live call\n";
    -		echo "             - Over 30 minutes on live call\n";
    -
    -		}
    -		else
    -		{
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*************************************** NO LIVE STATIONS ********************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*************************************** NO LIVE STATIONS ********************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	}
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonpark.php b/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonpark.php deleted file mode 100644 index 8aabf8a5..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/AST_timeonpark.php +++ /dev/null @@ -1,197 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΥΠΟΒΑΛΛΩ"])) {$ΥΠΟΒΑΛΛΩ=$_GET["ΥΠΟΒΑΛΛΩ"];} - elseif (isset($_POST["ΥΠΟΒΑΛΛΩ"])) {$ΥΠΟΒΑΛΛΩ=$_POST["ΥΠΟΒΑΛΛΩ"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$timeONEhoursAGO = ($STARTtime - 3600); -$epochHALFhoursAGO = ($STARTtime - 1860); -$timeONEhoursAGO = date("Y-m-d H:i:s",$timeONEhoursAGO); -$timeHALFhoursAGO = date("Y-m-d H:i:s",$epochHALFhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where status='TALKING' and grab_time < '$timeONEhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - $stmt="delete from park_log where status='PARKED' and parked_time < '$timeHALFhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Park\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select extension,user,channel,channel_group,parked_time,UNIX_TIMESTAMP(parked_time) from park_log where status ='PARKED' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 1) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i callers waiting on server $server_ip\n\n";
    -
    -		echo "             - 1 minute or more on hold\n";
    -		echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	echo "********************ΔΕΠΥΠΑΡΧΟΥΠΕÎΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑÎΑΜΟÎΗ*********************\n";
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	}
    -
    -###################################################################################
    -###### TIME ON INBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Agents Time On Inbound Calls                             $NOW_TIME\n\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,channel,channel_group,grab_time,UNIX_TIMESTAMP(grab_time) from park_log where status ='TALKING' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -		echo "| $G$extension$EG | $G$user$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i agents on calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on call\n";
    -		echo "             - Over 30 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* ΚΑÎΕÎΑΣ ΧΡΗΣΤΗΣ ΣΕ ΚΛΗΣΕΙΣ*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/admin.php b/agc_2-X/trunk/LANG_admin/vicidial_el/admin.php deleted file mode 100644 index 1419fe6e..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/admin.php +++ /dev/null @@ -1,6514 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} - elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} -if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} - elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];} - elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];} - elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];} -if (isset($_GET["park_file_name"])) {$park_file_name=$_GET["park_file_name"];} - elseif (isset($_POST["park_file_name"])) {$park_file_name=$_POST["park_file_name"];} -if (isset($_GET["web_form_address"])) {$web_form_address=$_GET["web_form_address"];} - elseif (isset($_POST["web_form_address"])) {$web_form_address=$_POST["web_form_address"];} -if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} - elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} -if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} - elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["next_agent_call"])) {$next_agent_call=$_GET["next_agent_call"];} - elseif (isset($_POST["next_agent_call"])) {$next_agent_call=$_POST["next_agent_call"];} -if (isset($_GET["local_call_time"])) {$local_call_time=$_GET["local_call_time"];} - elseif (isset($_POST["local_call_time"])) {$local_call_time=$_POST["local_call_time"];} -if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} - elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];} - elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];} -if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} - elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];} - elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} -if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} - elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["dial_status_a"])) {$dial_status_a=$_GET["dial_status_a"];} - elseif (isset($_POST["dial_status_a"])) {$dial_status_a=$_POST["dial_status_a"];} -if (isset($_GET["dial_status_b"])) {$dial_status_b=$_GET["dial_status_b"];} - elseif (isset($_POST["dial_status_b"])) {$dial_status_b=$_POST["dial_status_b"];} -if (isset($_GET["dial_status_c"])) {$dial_status_c=$_GET["dial_status_c"];} - elseif (isset($_POST["dial_status_c"])) {$dial_status_c=$_POST["dial_status_c"];} -if (isset($_GET["dial_status_d"])) {$dial_status_d=$_GET["dial_status_d"];} - elseif (isset($_POST["dial_status_d"])) {$dial_status_d=$_POST["dial_status_d"];} -if (isset($_GET["dial_status_e"])) {$dial_status_e=$_GET["dial_status_e"];} - elseif (isset($_POST["dial_status_e"])) {$dial_status_e=$_POST["dial_status_e"];} -if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} - elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["campaign_vdad_exten"])) {$campaign_vdad_exten=$_GET["campaign_vdad_exten"];} - elseif (isset($_POST["campaign_vdad_exten"])) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];} -if (isset($_GET["campaign_rec_exten"])) {$campaign_rec_exten=$_GET["campaign_rec_exten"];} - elseif (isset($_POST["campaign_rec_exten"])) {$campaign_rec_exten=$_POST["campaign_rec_exten"];} -if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} - elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} -if (isset($_GET["campaign_rec_filename"])) {$campaign_rec_filename=$_GET["campaign_rec_filename"];} - elseif (isset($_POST["campaign_rec_filename"])) {$campaign_rec_filename=$_POST["campaign_rec_filename"];} -if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} - elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} -if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} - elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} -if (isset($_GET["old_campaign_id"])) {$old_campaign_id=$_GET["old_campaign_id"];} - elseif (isset($_POST["old_campaign_id"])) {$old_campaign_id=$_POST["old_campaign_id"];} -if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} - elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} -if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} - elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];} -if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} - elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} -if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} - elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];} - elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} -if (isset($_GET["delete_user_groups"])) {$delete_user_groups=$_GET["delete_user_groups"];} - elseif (isset($_POST["delete_user_groups"])) {$delete_user_groups=$_POST["delete_user_groups"];} -if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} - elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} -if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} - elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} -if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} - elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} -if (isset($_GET["delete_remote_agents"])) {$delete_remote_agents=$_GET["delete_remote_agents"];} - elseif (isset($_POST["delete_remote_agents"])) {$delete_remote_agents=$_POST["delete_remote_agents"];} -if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];} - elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} -if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} - elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} -if (isset($_GET["ast_admin_access"])) {$ast_admin_access=$_GET["ast_admin_access"];} - elseif (isset($_POST["ast_admin_access"])) {$ast_admin_access=$_POST["ast_admin_access"];} -if (isset($_GET["ast_delete_phones"])) {$ast_delete_phones=$_GET["ast_delete_phones"];} - elseif (isset($_POST["ast_delete_phones"])) {$ast_delete_phones=$_POST["ast_delete_phones"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} -if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} - elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} -if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];} - elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];} -if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];} - elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];} -if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} - elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} -if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];} - elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} -if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} - elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} -if (isset($_GET["get_call_launch"])) {$get_call_launch=$_GET["get_call_launch"];} - elseif (isset($_POST["get_call_launch"])) {$get_call_launch=$_POST["get_call_launch"];} -if (isset($_GET["am_message_exten"])) {$am_message_exten=$_GET["am_message_exten"];} - elseif (isset($_POST["am_message_exten"])) {$am_message_exten=$_POST["am_message_exten"];} -if (isset($_GET["amd_send_to_vmx"])) {$amd_send_to_vmx=$_GET["amd_send_to_vmx"];} - elseif (isset($_POST["amd_send_to_vmx"])) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];} -if (isset($_GET["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"];} - elseif (isset($_POST["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];} -if (isset($_GET["xferconf_a_number"])) {$xferconf_a_number=$_GET["xferconf_a_number"];} - elseif (isset($_POST["xferconf_a_number"])) {$xferconf_a_number=$_POST["xferconf_a_number"];} -if (isset($_GET["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"];} - elseif (isset($_POST["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];} -if (isset($_GET["xferconf_b_number"])) {$xferconf_b_number=$_GET["xferconf_b_number"];} - elseif (isset($_POST["xferconf_b_number"])) {$xferconf_b_number=$_POST["xferconf_b_number"];} -if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} - elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} -if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} - elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} -if (isset($_GET["change_agent_campaign"])) {$change_agent_campaign=$_GET["change_agent_campaign"];} - elseif (isset($_POST["change_agent_campaign"])) {$change_agent_campaign=$_POST["change_agent_campaign"];} -if (isset($_GET["agent_choose_ingroups"])) {$agent_choose_ingroups=$_GET["agent_choose_ingroups"];} - elseif (isset($_POST["agent_choose_ingroups"])) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];} -if (isset($_GET["alt_number_dialing"])) {$alt_number_dialing=$_GET["alt_number_dialing"];} - elseif (isset($_POST["alt_number_dialing"])) {$alt_number_dialing=$_POST["alt_number_dialing"];} -if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} - elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} -if (isset($_GET["lead_filter_id"])) {$lead_filter_id=$_GET["lead_filter_id"];} - elseif (isset($_POST["lead_filter_id"])) {$lead_filter_id=$_POST["lead_filter_id"];} -if (isset($_GET["lead_filter_name"])) {$lead_filter_name=$_GET["lead_filter_name"];} - elseif (isset($_POST["lead_filter_name"])) {$lead_filter_name=$_POST["lead_filter_name"];} -if (isset($_GET["lead_filter_comments"])) {$lead_filter_comments=$_GET["lead_filter_comments"];} - elseif (isset($_POST["lead_filter_comments"])) {$lead_filter_comments=$_POST["lead_filter_comments"];} -if (isset($_GET["lead_filter_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} - elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} -if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} - elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} -if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} - elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} -if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];} - elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];} -if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];} - elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];} -if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} - elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} -if (isset($_GET["alter_agent_interface_options"])) {$alter_agent_interface_options=$_GET["alter_agent_interface_options"];} - elseif (isset($_POST["alter_agent_interface_options"])) {$alter_agent_interface_options=$_POST["alter_agent_interface_options"];} -if (isset($_GET["closer_default_blended"])) {$closer_default_blended=$_GET["closer_default_blended"];} - elseif (isset($_POST["closer_default_blended"])) {$closer_default_blended=$_POST["closer_default_blended"];} -if (isset($_GET["drop_call_seconds"])) {$drop_call_seconds=$_GET["drop_call_seconds"];} - elseif (isset($_POST["drop_call_seconds"])) {$drop_call_seconds=$_POST["drop_call_seconds"];} -if (isset($_GET["safe_harbor_message"])) {$safe_harbor_message=$_GET["safe_harbor_message"];} - elseif (isset($_POST["safe_harbor_message"])) {$safe_harbor_message=$_POST["safe_harbor_message"];} -if (isset($_GET["safe_harbor_exten"])) {$safe_harbor_exten=$_GET["safe_harbor_exten"];} - elseif (isset($_POST["safe_harbor_exten"])) {$safe_harbor_exten=$_POST["safe_harbor_exten"];} -if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} - elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} -if (isset($_GET["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} - elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} -if (isset($_GET["call_time_id"])) {$call_time_id=$_GET["call_time_id"];} - elseif (isset($_POST["call_time_id"])) {$call_time_id=$_POST["call_time_id"];} -if (isset($_GET["call_time_name"])) {$call_time_name=$_GET["call_time_name"];} - elseif (isset($_POST["call_time_name"])) {$call_time_name=$_POST["call_time_name"];} -if (isset($_GET["call_time_comments"])) {$call_time_comments=$_GET["call_time_comments"];} - elseif (isset($_POST["call_time_comments"])) {$call_time_comments=$_POST["call_time_comments"];} -if (isset($_GET["ct_default_start"])) {$ct_default_start=$_GET["ct_default_start"];} - elseif (isset($_POST["ct_default_start"])) {$ct_default_start=$_POST["ct_default_start"];} -if (isset($_GET["ct_default_stop"])) {$ct_default_stop=$_GET["ct_default_stop"];} - elseif (isset($_POST["ct_default_stop"])) {$ct_default_stop=$_POST["ct_default_stop"];} -if (isset($_GET["ct_sunday_start"])) {$ct_sunday_start=$_GET["ct_sunday_start"];} - elseif (isset($_POST["ct_sunday_start"])) {$ct_sunday_start=$_POST["ct_sunday_start"];} -if (isset($_GET["ct_sunday_stop"])) {$ct_sunday_stop=$_GET["ct_sunday_stop"];} - elseif (isset($_POST["ct_sunday_stop"])) {$ct_sunday_stop=$_POST["ct_sunday_stop"];} -if (isset($_GET["ct_monday_start"])) {$ct_monday_start=$_GET["ct_monday_start"];} - elseif (isset($_POST["ct_monday_start"])) {$ct_monday_start=$_POST["ct_monday_start"];} -if (isset($_GET["ct_monday_stop"])) {$ct_monday_stop=$_GET["ct_monday_stop"];} - elseif (isset($_POST["ct_monday_stop"])) {$ct_monday_stop=$_POST["ct_monday_stop"];} -if (isset($_GET["ct_tuesday_start"])) {$ct_tuesday_start=$_GET["ct_tuesday_start"];} - elseif (isset($_POST["ct_tuesday_start"])) {$ct_tuesday_start=$_POST["ct_tuesday_start"];} -if (isset($_GET["ct_tuesday_stop"])) {$ct_tuesday_stop=$_GET["ct_tuesday_stop"];} - elseif (isset($_POST["ct_tuesday_stop"])) {$ct_tuesday_stop=$_POST["ct_tuesday_stop"];} -if (isset($_GET["ct_wednesday_start"])) {$ct_wednesday_start=$_GET["ct_wednesday_start"];} - elseif (isset($_POST["ct_wednesday_start"])) {$ct_wednesday_start=$_POST["ct_wednesday_start"];} -if (isset($_GET["ct_wednesday_stop"])) {$ct_wednesday_stop=$_GET["ct_wednesday_stop"];} - elseif (isset($_POST["ct_wednesday_stop"])) {$ct_wednesday_stop=$_POST["ct_wednesday_stop"];} -if (isset($_GET["ct_thursday_start"])) {$ct_thursday_start=$_GET["ct_thursday_start"];} - elseif (isset($_POST["ct_thursday_start"])) {$ct_thursday_start=$_POST["ct_thursday_start"];} -if (isset($_GET["ct_thursday_stop"])) {$ct_thursday_stop=$_GET["ct_thursday_stop"];} - elseif (isset($_POST["ct_thursday_stop"])) {$ct_thursday_stop=$_POST["ct_thursday_stop"];} -if (isset($_GET["ct_friday_start"])) {$ct_friday_start=$_GET["ct_friday_start"];} - elseif (isset($_POST["ct_friday_start"])) {$ct_friday_start=$_POST["ct_friday_start"];} -if (isset($_GET["ct_friday_stop"])) {$ct_friday_stop=$_GET["ct_friday_stop"];} - elseif (isset($_POST["ct_friday_stop"])) {$ct_friday_stop=$_POST["ct_friday_stop"];} -if (isset($_GET["ct_saturday_start"])) {$ct_saturday_start=$_GET["ct_saturday_start"];} - elseif (isset($_POST["ct_saturday_start"])) {$ct_saturday_start=$_POST["ct_saturday_start"];} -if (isset($_GET["ct_saturday_stop"])) {$ct_saturday_stop=$_GET["ct_saturday_stop"];} - elseif (isset($_POST["ct_saturday_stop"])) {$ct_saturday_stop=$_POST["ct_saturday_stop"];} -if (isset($_GET["state_call_time_state"])) {$state_call_time_state=$_GET["state_call_time_state"];} - elseif (isset($_POST["state_call_time_state"])) {$state_call_time_state=$_POST["state_call_time_state"];} -if (isset($_GET["state_rule"])) {$state_rule=$_GET["state_rule"];} - elseif (isset($_POST["state_rule"])) {$state_rule=$_POST["state_rule"];} -if (isset($_GET["delete_call_times"])) {$delete_call_times=$_GET["delete_call_times"];} - elseif (isset($_POST["delete_call_times"])) {$delete_call_times=$_POST["delete_call_times"];} -if (isset($_GET["modify_call_times"])) {$modify_call_times=$_GET["modify_call_times"];} - elseif (isset($_POST["modify_call_times"])) {$modify_call_times=$_POST["modify_call_times"];} -if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} - elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} -if (isset($_GET["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} - elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} -if (isset($_GET["attempt_delay"])) {$attempt_delay=$_GET["attempt_delay"];} - elseif (isset($_POST["attempt_delay"])) {$attempt_delay=$_POST["attempt_delay"];} -if (isset($_GET["attempt_maximum"])) {$attempt_maximum=$_GET["attempt_maximum"];} - elseif (isset($_POST["attempt_maximum"])) {$attempt_maximum=$_POST["attempt_maximum"];} - - if (isset($script_id)) {$script_id= strtoupper($script_id);} - if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS ONLY ### -$user_level = ereg_replace("[^0-9]","",$user_level); -$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); -$xferconf_a_number = ereg_replace("[^0-9]","",$xferconf_a_number); -$xferconf_b_number = ereg_replace("[^0-9]","",$xferconf_b_number); -$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); -$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); -$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); -$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); -$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); -$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); -$drop_exten = ereg_replace("[^0-9]","",$drop_exten); -$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); -$park_ext = ereg_replace("[^0-9]","",$park_ext); -$hopper_level = ereg_replace("[^0-9]","",$hopper_level); -$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); -$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); -$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); -$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); -$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); -$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); -$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); -$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); -$delete_users = ereg_replace("[^0-9]","",$delete_users); -$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); -$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); -$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); -$delete_lists = ereg_replace("[^0-9]","",$delete_lists); -$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); -$delete_filters = ereg_replace("[^0-9]","",$delete_filters); -$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); -$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); -$load_leads = ereg_replace("[^0-9]","",$delete_call_times); -$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); -$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); -$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); -$modify_leads = ereg_replace("[^0-9]","",$modify_leads); -$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); -$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); -$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); -$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); -$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); -$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); -$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); -$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); -$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); -$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); -$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); -$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); -$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); -$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); -$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); -$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); -$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); -$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); -$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); -$user_start = ereg_replace("[^0-9]","",$user_start); -$phone_number = ereg_replace("[^0-9]","",$phone_number); -$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); -$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); -$hotkey = ereg_replace("[^0-9]","",$hotkey); -$list_id = ereg_replace("[^0-9]","",$list_id); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); -$allow_closers = ereg_replace("[^NY]","",$allow_closers); -$reset_hopper = ereg_replace("[^NY]","",$reset_hopper); -$amd_send_to_vmx = ereg_replace("[^NY]","",$amd_send_to_vmx); -$alt_number_dialing = ereg_replace("[^NY]","",$alt_number_dialing); -$safe_harbor_message = ereg_replace("[^NY]","",$safe_harbor_message); -$selectable = ereg_replace("[^NY]","",$selectable); -$reset_list = ereg_replace("[^NY]","",$reset_list); -$fronter_display = ereg_replace("[^NY]","",$fronter_display); -$drop_message = ereg_replace("[^NY]","",$drop_message); -$use_internal_dnc = ereg_replace("[^NY]","",$use_internal_dnc); - -### ALPHA-NUMERIC ONLY ### -$user = ereg_replace("[^0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^0-9a-zA-Z]","",$pass); -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$script_id = ereg_replace("[^0-9a-zA-Z]","",$script_id); -$submit = ereg_replace("[^0-9a-zA-Z]","",$submit); -$CoNfIrM = ereg_replace("[^0-9a-zA-Z]","",$CoNfIrM); -$campaign_cid = ereg_replace("[^0-9a-zA-Z]","",$campaign_cid); -$get_call_launch = ereg_replace("[^0-9a-zA-Z]","",$get_call_launch); -$campaign_recording = ereg_replace("[^0-9a-zA-Z]","",$campaign_recording); -$ADD = ereg_replace("[^0-9a-zA-Z]","",$ADD); -$dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$dial_prefix); -$state_call_time_state = ereg_replace("[^0-9a-zA-Z]","",$state_call_time_state); -$scheduled_callbacks = ereg_replace("[^0-9a-zA-Z]","",$scheduled_callbacks); - -### DIGITS and Dots -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); - -### DIGITS and spaces and hash and star and comma -$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_a_dtmf); -$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_b_dtmf); - -### ALPHA-NUMERIC and underscore and dash -$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); -$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); -$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); -$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); -$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); -$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); -$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); -$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); -$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); -$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); -$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); -$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); -$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); -$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); -$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); -$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); -$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); -$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); -$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); - -### ALPHA-NUMERIC and spaces -$lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); -### ALPHA-NUMERIC and hash -$group_color = ereg_replace("[^\#0-9a-zA-Z]","",$group_color); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); -$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); -$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); -$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); -$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); -$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); -$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); -$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); -$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); -$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); -$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); -$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); -$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); - -### remove semi-colons ### -$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); - -### VARIABLES TO BE mysql_real_escape_string ### -# $web_form_address -# $script_text - -##### END VARIABLE FILTERING FOR SECURITY ##### - - -# AST GUI database administration -# admin.php -# -# CHANGES -# 50315-1110 - Added Custom Campaign Statuses -# 50317-1438 - Added Fronter Display var to inbound groups -# 50322-1355 - Added custom callerID per campaign -# 50517-1356 - Added user_groups sections and user_group to vicidial_users -# 50517-1440 - Added ability to logout (must click OK with empty user/pass) -# 50602-1622 - Added lead loader pages to load new files into vicidial_list -# 50620-1351 - Added custom vdad transfer AGI extension per campaign -# 50810-1414 - modified in groups to kick out spaces and dashes -# 50908-2136 - Added Custom Campaign HotKeys -# 50914-0950 - Fixed user search by user_group -# 50926-1358 - Modified to allow for language translation -# 50926-1615 - Added WeBRooTWritablE write controls -# 51020-1008 - Added editable web address and park ext - NEW dial campaigns -# 51020-1056 - Added fields and help for campaign recording control -# 51123-1335 - Altered code to function in php globals=off -# 51208-1038 - Added user_level changes, function controls and default user phones -# 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents -# 51213-1706 - Added add/delete/modify vicidial scripts -# 51214-1737 - Added preview of vicidial script in popup window -# 51219-1225 - Added campaign and ingroups script selector and get_call_launch field -# 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button -# 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug -# 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen -# 60204-0659 - Fixed hopper reset bug -# 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets -# 60213-1100 - Added several vicidial_users permissions fields -# 60215-1319 - Added On-hold CallBacks display and links -# 60227-1226 - Fixed vicidial_inbound_groups insert bug -# 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables -# - Added status name in selected dial statuses in campaign screen -# 60417-1416 - Added vicidial_lead_filters sections -# - Changed the header links to color-coded sectional with sublinks below -# - Added filter name and script name to campaign and in-group modify sections -# - Added callback and alt dial options to campaigns section -# - Added callback, alt dial and other options to users section -# 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered -# 60421-1441 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60425-2355 - Added agent options to vicidial_users, reformatted user page -# 60502-1627 - Added drop_call_seconds and safe_harbor_ fields to campaign screen -# 60503-1228 - Added drop_call_seconds and drop_ fields to inbound groups screen -# 60505-1117 - Added initial framework for new local_call_times tables and definitions -# 60506-1033 - More revisions to the local_call_time section -# 60508-1354 - Finished call_times and state_call_times sections -# - Added modify/delete options for call_times -# 60509-1311 - Functionalize campaign dialable leads calculation -# - Change state_call_times selection from call_times to only allow one per state -# - Added dialable leads count popup to campaign screen if auto-calc is disabled -# - Added test dialable leads count popup to filter screen -# 60510-1050 - Added Wrapup seconds and Wrapup message to campaigns screen -# 60608-1401 - Added allowable inbound_groups checkboxes to CLOSER campaign detail screen -# 60609-1051 - Added add-to-dnc in LISTS section -# 60613-1415 - Added lead recycling options to campaign detail screen -# 60619-1523 - Added variable filtering to eliminate SQL injection attack threat -# 60622-1216 - Fixed HotKey addition form issues and variable filtering -# 60623-1159 - Fixed Scheduled Callbacks over-filtering bug -# - -# 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 - -$version = '1.1.12-3'; -$build = '60623-1159'; - -$STARTtime = date("U"); - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Έχετε αποσυνδεθεί. Σας ευχαÏιστοÏμε\n"; - exit; -} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGuser_level =$row[4]; - $LOGdelete_users =$row[8]; - $LOGdelete_user_groups =$row[9]; - $LOGdelete_lists =$row[10]; - $LOGdelete_campaigns =$row[11]; - $LOGdelete_ingroups =$row[12]; - $LOGdelete_remote_agents =$row[13]; - $LOGload_leads =$row[14]; - $LOGcampaign_detail =$row[15]; - $LOGdelete_scripts =$row[18]; - $LOGdelete_filters =$row[29]; - $LOGalter_agent_interface =$row[30]; - $LOGdelete_call_times =$row[32]; - $LOGmodify_call_times =$row[33]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); -echo "\n"; -echo "\n"; -echo "\n"; -echo "ΔΙΑΧΕΙΡΙΣΗ: "; - -if (!isset($ADD)) {$ADD=0;} - -if ($ADD==1) {$hh='users'; echo "ΠÏόσθεσε Îέο ΧÏήστη";} -if ($ADD==11) {$hh='campaigns'; echo "ΠÏόσθεσε Îέα ΕκστÏατεία";} -if ($ADD==111) {$hh='lists'; echo "ΠÏόσθεσε Îέα Λίστα";} -if ($ADD==121) {$hh='lists'; echo "ΠÏοσθέστε νέο DNC";} -if ($ADD==1111) {$hh='ingroups'; echo "ΠÏόσθεσε Îέα Εισ-Ομάδα";} -if ($ADD==11111) {$hh='remoteagent'; echo "ΠÏόσθεσε Îέους ΑπομακÏυσμένους ΧειÏιστές";} -if ($ADD==111111) {$hh='usergroups'; echo "ΠÏόσθεσε Îέα Ομάδα ΧÏηστών";} -if ($ADD==1111111) {$hh='scripts'; echo "ΠÏόσθεσε Îέο Βοηθό";} -if ($ADD==11111111) {$hh='filters'; echo "ΠÏόσθεσε ΦίλτÏο";} -if ($ADD==111111111) {$hh='times'; echo "ΠÏόσθεσε Îέο ΧÏόνο Κλήσης";} -if ($ADD==1111111111) {$hh='times'; echo "ΠÏόσθεσε Îέο ΧÏόνο Κλήσης Κατάστασης";} -if ($ADD==2) {$hh='users'; echo "ΠÏοσθήκη Îέου ΧÏήστη";} -if ($ADD==21) {$hh='campaigns'; echo "ΠÏοσθήκη Îέας ΕκστÏατείας";} -if ($ADD==22) {$hh='campaigns'; echo "ΠÏοσθήκη Îέας Κατάστασης ΕκστÏατείας";} -if ($ADD==23) {$hh='campaigns'; echo "ΠÏοσθήκη Îέου ÎšÎ»ÎµÎ¹Î´Î¹Î¿Ï Î•ÎºÏƒÏ„Ïατείας";} -if ($ADD==25) {$hh='campaigns'; echo "Îέα ανακÏκλωσης Ï€Ïοσθήκη μολÏβδου εκστÏατείας";} -if ($ADD==211) {$hh='lists'; echo "ΠÏοσθήκη Îέας Λίστας";} -if ($ADD==2111) {$hh='ingroups'; echo "ΠÏοσθήκη Îέας Εισ-Ομάδας";} -if ($ADD==21111) {$hh='remoteagent'; echo "ΠÏοσθήκη Îέων ΑπομακÏυσμένων ΧειÏιστών";} -if ($ADD==211111) {$hh='usergroups'; echo "ΠÏοσθήκη Îέας Ομάδας ΧÏηστών";} -if ($ADD==2111111) {$hh='scripts'; echo "Îέα Ï€Ïοσθήκη ΒοηθοÏ";} -if ($ADD==21111111) {$hh='filters'; echo "ΠÏοσθήκη Îέου ΦίλτÏου";} -if ($ADD==211111111) {$hh='times'; echo "ΠÏοσθήκη Îέου ΧÏόνου Κλήσης";} -if ($ADD==2111111111) {$hh='times'; echo "ΠÏοσθήκη Îέου ΧÏόνου Κλήσης Κατάστασης";} -if ($ADD==3) {$hh='users'; echo "ΤÏοποποίηση ΧÏήστη";} -if ($ADD==31) {$hh='campaigns'; echo "ΤÏοποποίηση ΕκστÏατείας";} -if ($ADD==34) {$hh='campaigns'; echo "ΤÏοποποίηση ΕκστÏατείας - Βασική Επισκόπηση";} -if ($ADD==311) {$hh='lists'; echo "ΤÏοποποίηση Λίστας";} -if ($ADD==3111) {$hh='ingroups'; echo "ΤÏοποποίηση Εισ-Ομάδων";} -if ($ADD==31111) {$hh='remoteagent'; echo "ΤÏοποποίηση ΑπομακÏυσμένων ΧειÏιστών";} -if ($ADD==311111) {$hh='usergroups'; echo "ΤÏοποποίηση Ομάδων ΧÏηστών";} -if ($ADD==3111111) {$hh='scripts'; echo "ΤÏοποποιήστε τον Βοηθό";} -if ($ADD==31111111) {$hh='filters'; echo "ΤÏοποποίηση ΦίλτÏου";} -if ($ADD==311111111) {$hh='times'; echo "ΤÏοποποίηση ΧÏόνου Κλήσης";} -if ($ADD==321111111) {$hh='times'; echo "ΤÏοποποίηση Λίστας ΟÏισμών ΧÏόνου Κλήσης Κατάστασης ";} -if ($ADD==3111111111) {$hh='times'; echo "ΤÏοποπίηση ΧÏόνου Κλήσης Κατάστασης";} -if ($ADD=="4A") {$hh='users'; echo "ΤÏοποποίηση ΧÏήστη - Admin";} -if ($ADD=="4B") {$hh='users'; echo "ΤÏοποποίηση ΧÏήστη - Admin";} -if ($ADD==4) {$hh='users'; echo "ΤÏοποποίηση ΧÏήστη";} -if ($ADD==41) {$hh='campaigns'; echo "ΤÏοποποίηση ΕκστÏατείας";} -if ($ADD==42) {$hh='campaigns'; echo "ΤÏοποποίηση ΕκστÏατείας Status";} -if ($ADD==43) {$hh='campaigns'; echo "ΤÏοποποίηση ΕκστÏατείας HotKey";} -if ($ADD==44) {$hh='campaigns'; echo "ΤÏοποποίηση ΕκστÏατείας - Βασική Επισκόπηση";} -if ($ADD==45) {$hh='campaigns'; echo "ΤÏοποποιήστε το μόλυβδο εκστÏατείας ανακÏκλωσης";} -if ($ADD==411) {$hh='lists'; echo "ΤÏοποποίηση Λίστας";} -if ($ADD==4111) {$hh='ingroups'; echo "ΤÏοποποίηση Εισ-Ομάδων";} -if ($ADD==41111) {$hh='remoteagent'; echo "ΤÏοποποίηση ΑπομακÏυσμένων ΧειÏιστών";} -if ($ADD==411111) {$hh='usergroups'; echo "ΤÏοποποίηση Ομάδων ΧÏηστών";} -if ($ADD==4111111) {$hh='scripts'; echo "ΤÏοποποιήστε τον Βοηθό";} -if ($ADD==41111111) {$hh='filters'; echo "ΤÏοποποίηση ΦίλτÏου";} -if ($ADD==411111111) {$hh='times'; echo "ΤÏοποποίηση ΧÏόνου Κλήσης";} -if ($ADD==4111111111) {$hh='times'; echo "ΤÏοποπίηση ΧÏόνου Κλήσης Κατάστασης";} -if ($ADD==5) {$hh='users'; echo "Delete User";} -if ($ADD==51) {$hh='campaigns'; echo "Delete ΕκστÏατεία";} -if ($ADD==52) {$hh='campaigns'; echo "Αποσυνδεμένοι ΧειÏιστές";} -if ($ADD==511) {$hh='lists'; echo "Delete List";} -if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==51111) {$hh='remoteagent'; echo "ΔιάγÏαψε τους ΑπομακÏυσμένους ΧειÏιστές";} -if ($ADD==511111) {$hh='usergroups'; echo "ΔιάγÏαψε τους χÏήστες Group";} -if ($ADD==5111111) {$hh='scripts'; echo "ΔιάγÏαψε τον Βοηθό";} -if ($ADD==51111111) {$hh='filters'; echo "ΔιαγÏαφή ΦίλτÏου";} -if ($ADD==511111111) {$hh='times'; echo "ΔιαγÏαφή ΧÏόνου Κλήσης";} -if ($ADD==5111111111) {$hh='times'; echo "ΔιαγÏαφή ΧÏόνου Κλήσης Κατάστασης";} -if ($ADD==6) {$hh='users'; echo "Delete User";} -if ($ADD==61) {$hh='campaigns'; echo "Delete ΕκστÏατεία";} -if ($ADD==62) {$hh='campaigns'; echo "Αποσυνδεμένοι ΧειÏιστές";} -if ($ADD==65) {$hh='campaigns'; echo "ΔιαγÏάψτε το μόλυβδο ανακÏκλωσης";} -if ($ADD==611) {$hh='lists'; echo "Delete List";} -if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==61111) {$hh='remoteagent'; echo "ΔιάγÏαψε τους ΑπομακÏυσμένους ΧειÏιστές";} -if ($ADD==611111) {$hh='usergroups'; echo "ΔιάγÏαψε τους χÏήστες Group";} -if ($ADD==6111111) {$hh='scripts'; echo "ΔιάγÏαψε τον Βοηθό";} -if ($ADD==61111111) {$hh='filters'; echo "ΔιαγÏαφή ΦίλτÏου";} -if ($ADD==611111111) {$hh='times'; echo "ΔιαγÏαφή ΧÏόνου Κλήσης";} -if ($ADD==6111111111) {$hh='times'; echo "ΔιαγÏαφή ΧÏόνου Κλήσης Κατάστασης";} -if ($ADD==73) {$hh='campaigns'; echo "ΜετÏητής Κληθέντων Οδηγών";} -if ($ADD==7111111) {$hh='scripts'; echo "ΠÏοεπισκόπιση ΒοηθοÏ";} -if ($ADD==0) {$hh='users'; echo "Λίστα ΧÏηστών";} -if ($ADD==8) {$hh='users'; echo "Επανακλήσεις μέσα στον χειÏιστή";} -if ($ADD==81) {$hh='campaigns'; echo "Επανακλήσεις μέσα στην εκστÏατεία";} -if ($ADD==811) {$hh='campaigns'; echo "Επανακλήσεις μέσα στην λίστα";} -if ($ADD==10) {$hh='campaigns'; echo "ΕκστÏατείες";} -if ($ADD==100) {$hh='lists'; echo "Λίστες";} -if ($ADD==1000) {$hh='ingroups'; echo "Εισ-Ομάδες";} -if ($ADD==10000) {$hh='remoteagent'; echo "ΑπομακÏυσμένοι ΧειÏιστές";} -if ($ADD==100000) {$hh='usergroups'; echo "Ομάδες ΧÏήστη";} -if ($ADD==1000000) {$hh='scripts'; echo "Βοηθοί";} -if ($ADD==10000000) {$hh='filters'; echo "ΦίλτÏα";} -if ($ADD==100000000) {$hh='times'; echo "ΧÏόνοι Κλήσεων";} -if ($ADD==1000000000) {$hh='times'; echo "";} -if ($ADD==55) {$hh='users'; echo "ΦόÏμα Αναζήτησης";} -if ($ADD==66) {$hh='users'; echo "Αποτελέσματα Αναζήτησης";} -if ($ADD==99999) {$hh='users'; echo "ΒΟΗΘΕΙΑ";} - -if ( ($ADD>9) && ($ADD < 99998) ) - { - ##### get scripts listing for dynamic pulldown - $stmt="SELECT script_id,script_name from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $scripts_to_print = mysql_num_rows($rslt); - $scripts_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($scripts_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $scripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $scriptname_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - ##### get filters listing for dynamic pulldown - $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_sql from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - $filters_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($filters_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $filters_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $filtername_list["$rowx[0]"] = "$rowx[1]"; - $filtersql_list["$rowx[0]"] = "$rowx[2]"; - $o++; - } - - ##### get call_times listing for dynamic pulldown - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $times_to_print = mysql_num_rows($rslt); - - $o=0; - while ($times_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $call_times_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $call_timename_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - } - -if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD==21) or ($ADD==31) or ($ADD==41) or ($ADD=="4A") or ($ADD=="4B") ) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ($ADD==31) - { - $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ($ADD==3) - { - $stmt="SELECT closer_campaigns from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_value\""; - $p=0; - while ($p<100) - { - if ($group_id_value == $groups[$p]) - { - $groups_list .= " CHECKED"; - $groups_value .= " $group_id_value"; - } - $p++; - } - $groups_list .= "> $group_id_value - $group_name_value<BR>\n"; - $o++; - } - if (strlen($groups_value)>2) {$groups_value .= " -";} - } - - - - - -$NWB = "   <a href=\"javascript:openNewWindow('$PHP_SELF?ADD=99999"; -$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 Border=0 ALT=\"ΒΟΗΘΕΙΑ\" ALIGN=TOP></A>"; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    ΔΙΑΧΕΙΡΙΣΗ: ΒΟΗΘΕΙΑ


    \n"; - -?> -VICIDIAL_ΧΡΗΣΤΕΣ ΠΙÎΑΚΑΣ

    - -
    -ID ΧÏήστη - Σε αυτό το πεδίο τοποθετείται ο αÏιθμός ID του χÏήστη, μποÏεί να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 8 ψηφία. - -
    -
    -
    -Κωδικός - Σε αυτό το πεδίο τοποθετείται ο κωδικός του χÏήστη στο VICIDIAL. ΠÏέπει να είναι τουλάχιστον 2 χαÏακτήÏες. - -
    -
    -
    -ΠλήÏες Ονομα - Αυτό το πεδίο είναι που μποÏείτε να οÏίσετε το πλήÏες όνομα των χÏηστών VICIDIAL. ΠÏέπει να είναι τουλάχιστον 2 χαÏακτήÏες. - -
    -
    -
    -Επίπεδο ΧÏήστη - Αυτός ο κατάλογος επιλογών είναι που μποÏείτε να επιλέξετε το επίπεδο χÏήστη των VICIDIAL χÏηστών. ΠÏέπει να έχει επίπεδο 1 για να συνδεθεί στο σÏστημα. ΠÏέπει να έχει επίπεδο μεγαλÏτεÏο από 2 για να συνδεθεί ως closer. ΠÏέπει να έχει επίπεδο 8 ή μεγαλÏεÏο για ενέÏγειες διαχειÏιστή. - -
    -
    -
    -Ομάδα ΧÏήστη - Αυτός ο κατάλογος επιλογών είναι που μποÏείτε να επιλέξετε την ομάδα χÏηστών που ανήκει ο χÏήστης. - -
    -
    -
    -ΣÏνδεση Τηλεφώνου - εδώ μποÏείτε να θέσετε μία Ï€ÏοκαθοÏισμένη σÏνδεση τηλεφώνου κατά την είσοδο του χειÏιστή στο vicidial.php. - -
    -
    -
    -Κωδικός Τηλεφώνου - εδώ μποÏείτε να θέσετε ένα Ï€ÏοκαθοÏισμένο κωδικό τηλεφώνου κατά την είσοδο του χειÏιστή στο vicidial.php. - -
    -
    -
    -HotKeys ενεÏγός - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να χÏησιμοποιήσει τα πλήκτÏα γÏήγοÏου τεÏÎ¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï vicidial.php. - -
    -
    -
    -Ο Ï€ÏάκτοÏας επιλέγει Ingroups - εάν θέσετε σε 1 αυτή την επιλογή επιτÏέπει στο χÏήστη να επιλέξει τις εισ-ομάδες που θα λάβουν τις κλήσεις. ΔιαφοÏετικά ο Manager θα Ï€Ïέπει να το θέσει αυτό στην σελίδα διαχείÏισης. - -
    -
    -
    -ΕισεÏχόμενες Ομάδες - Εδώ μποÏείτε να επιλέξετε τις εισεÏχόμενες ομάδες που θέλετε να λαμβάνουν τις κλήσεις , εάν έχετε επιλέξει την εκστÏατεία CLOSER. - -
    -
    -
    -ΠÏογÏαμματισμένες Επανακλήσεις - Αυτή η επιλογή επιτÏέπει στον χειÏιστή να τεÏματίσει μία κλήση ως CALLBK και να επιλέξει τα δεδομένα και την ÏŽÏα κατά την οποία ο οδηγός θα ξανα-ενεÏγοποιηθεί. - -
    -
    -
    -Μόνο του ΧÏήστη Επανακλήσεις- Αυτή η επιλογή επιτÏέπει στον χÏήστη να θέσει μία επανάκληση με τέτοιο Ï„Ïόπο, ώστε μόνο αυτός να μποÏεί να καλέσει τον πελάτη. Επίσης, επιτÏέπει στον χÏήστη να δει τις λίστες των επανακλήσεων και να τις καλέσει οποιαδήποτε στιγμή. - -
    -
    -
    -ΧειÏοκίνητη Κλήση ΧÏήστη - Αυτή η επιλογή επιτÏέπει στον χειÏιστή να καταχωÏήσει χειÏοκίνητα ένα νέο οδηγό στο σÏστημα και να τον καλέσει. - -
    -
    -
    -ΗχογÏάφηση - Αυτή η επιλογή μποÏεί να απαγοÏεÏσει σε έναν χειÏιστή να κάνει ηχογÏαφήσεις και θα Ï€Ïέπει να ακολουθεί την διαδικασία ηχογÏάφησης της εκστÏατείας. - -
    -
    -
    -ΜεταφοÏές- Αυτή η επιλογή μποÏεί να απαγοÏεÏσει σε έναν χειÏιστή να ανοίξει την διαδικασία μεταφοÏά-συνδιάσκεψη. Αν είναι απενεÏγοποιημένη, ο χÏήστης δεν μποÏεί να μεταφέÏει κλήσεις ή να κάνει κλήση σε Ï„Ïίτο. - -
    -
    -
    -Πιό στενή Ï€Ïοεπιλογή που συνδυάζεται - αυτή η επιλογή Ï€ÏοκαθοÏίζει απλά το συνδυασμένο τετÏαγωνίδιο σε μια ΠΙΟ ΣΤΕÎΉ οθόνη σÏνδεσης. - -
    -
    -
    -Αλλάξτε τις επιλογές διεπαφών ΧειÏιστών - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο διαχειÏιστή να Ï„Ïοποποιήσει τις επιλογές διεπαφών χειÏιστών στην admin.php. - -
    -
    -
    -ΔιαγÏαφή ΧÏηστών - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να διαγÏάψει άλλους χÏήστες ίσου ή μικÏότεÏου επιπέδου από το σÏστημα. - -
    -
    -
    -ΔιαγÏαφή Ομάδων ΧÏηστών - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να διαγÏάψει τις ομάδες χÏηστών από το σÏστημα. - -
    -
    -
    -ΔιαγÏαφή Λιστών - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να διαγÏάψει τις λίστες από το σÏστημα. - -
    -
    -
    -ΔιαγÏαφή ΕκστÏατειών - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να διαγÏάψει τις εκστÏατείες από το σÏστημα. - -
    -
    -
    -ΔιαγÏαφή Εισ-Ομάδων - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να διαγÏάψει τις Εισ-Ομάδες από το σÏστημα. - -
    -
    -
    -ΔιαγÏάψτε τους ΑπομακÏυσμένους ΧειÏιστές - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να διαγÏάψει τους απομακÏυσμένους χειÏιστές από το σÏστημα. - -
    -
    -
    -Εισαγωγή Οδηγών - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να εισάγει τους οδηγοÏÏ‚ στον πίνακα vicidial_list μέσω του βασισμένου σε Ιστοσελίδα Εισαγωγέα οδηγών. - -
    -
    -
    -ΛεπτομέÏειες ΕκστÏατείας - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να δει και να Ï„Ïοποποιήσει τα λεπτομεÏή στοιχεία της εκστÏατείας. - -
    -
    -
    -AGC ΠÏόσβαση ΔιαχειÏιστή - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να συνδεθεί στις σελίδες του astGUIclient ως διαχειÏιστής. - -
    -
    -
    -AGC διαγÏαφή τηλεφώνων - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να διαγÏάψει τα τηλέφωνα στις σελίδες του διαχειÏιστή του astGUIclient. - -
    -
    -
    -ΔιαγÏαφή Î’Î¿Î·Î¸Î¿Ï - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να διαγÏάψει τους οδηγοÏÏ‚ της εκστÏατείας . - -
    -
    -
    -ΤÏοποποιήστε τους οδηγοÏÏ‚ - αυτή η επιλογή εάν τη θέσετε σε 1, επιτÏέπει στο χÏήστη να Ï„Ïοποποιήσει τους οδηγοÏÏ‚ στη σελίδα αποτελεσμάτων αναζήτησης οδηγών. - -
    -
    -
    -Αλλαγή ΕκστÏατείας ΧειÏÎ¹ÏƒÏ„Î¿Ï - εάν θέσετε σε 1 αυτή την επιλογή, επιτÏέπει στο χÏήστη να αλλάξει την εκτÏατεία όπου ένας Ï€ÏάκτοÏας έχει συνδεθεί . - -
    -
    -
    -ΔιαγÏαφή ΦίλτÏων - Αυτή η επιλογή επιτÏέπει στον χειÏιστή να διαγÏάφει φίλτÏα από το σÏστημα. - -
    -
    -
    -ΔιαγÏαφή ΧÏόνων Κλήσεων - Αυτή η επιλογή επιτÏέπει στον χÏήστη να διαγÏάφει εγγÏαφές χÏόνων κλήσεων και καταστάσεων από το σÏστημα. - -
    -
    -
    -ΤÏοποποίηση ΧÏόνων Κλήσεων - Αυτή η επιλογή επιτÏέπει στον χÏήστη εμφανίσει και να Ï„Ïοποποιήσει τους χÏόνους κλήσεων και τις εγγÏαφές χÏόνων κλήσεων κατάστασης. Δεν χÏειάζεται να είναι ενεÏγή αυτή η επιλογή εάν μόνο χÏειάζεται η αλλαγή της επιλογής των χÏόνων κλήσεων στην οθόνη των εκστÏατειών. - - - - -



    - -VICIDIAL_ΕΚΣΤΡΑΤΕΙΕΣ ΠΙÎΑΚΑΣ

    -
    -
    -ID ΕκστÏατείας - Αυτό είναι το σÏντομο όνομα της εκστÏατείας, δεν μποÏεί να διοÏθωθεί μετά από την αÏχική παÏάδοση, δεν μποÏεί να πεÏιέχει κενά και Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 8 χαÏακτήÏεςh. - -
    -
    -
    -Ονομα ΕκστÏατείας - Αυτό είναι η πεÏιγÏαφή της εκστÏατείας, Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 6 και 40 χαÏακτήÏες. - -
    -
    -
    -ΕνεÏγοποίηση - Εδώ μποÏείτε να θέσετε την εκστÏατεία ενεÏγή ή μη ενεÏγή. Εάν είναι μη ενεÏγή, κανένας δεν μποÏεί να συνδεθεί σε αυτήν. - -
    -
    -
    -Τηλ.ΣÏνδεση Στάθμευσης - Εδώ μποÏείτε να οÏίσετε την μουσική αναμονής για το VICIDIAL. Επιβεβαιώστε, ότι η εσωτ.σÏνδεση βÏίσκεται στο extensions.conf και ότι δείχνει το αÏχείο παÏακάτω. - -
    -
    -
    -ν ΑÏχείου Στάθμευσης - Εδώ μποÏείτε να Ï€ÏοσαÏμόσετε την μουσική αναμονής για το VICIDIAL. Επιβεβαιώστε ότι το αÏχείο έχει 10 χαÏακτήÏες ή λιγότεÏους και ότι το αÏχείο βÏίσκεται στον κατάλογο /var/lib/asterisk/sounds. - -
    -
    -
    -Ιστοσελίδα - Αυτή είναι η Ï€ÏοσαÏμοσμένη διεÏθυνση που θα σας κατευθÏνει για κλήσεις που έÏχονται σε αυτήν την ομάδα. - -
    -
    -
    -ΕπιτÏέπει τους Closers - Εδώ οÏίζετε εάν οι χÏήστες της εκστÏατείας θα έχουν την επιλογή να στείλουν την κλήση σε έναν closer. - -
    -
    -
    -Κατάσταση Κλήσης - Εδώ οÏίζετε τις καταστάσεις που θέλετε να κληθοÏν μέσα στις λίστες, οι οποίες είναι ενεÏγές για την εκστÏατεία παÏακάτω - -
    -
    -
    -Ταξινόμηση Λίστας - Σε αυτόν τον κατάλογο επιλογών μποÏείτε να επιλέξετε πώς οι οδηγοί, που ταιÏιάζουν με τις καταστάσεις που επιλέξατε παÏαπάνω, θα τοποθετηθοÏν στον hopper: -
      - DOWN: επιλογή των Ï€Ïώτων οδηγών που εισήχθησαν στον πίνακα vicidial_list -
      - UP: επιλογή των τελευταίων οδηγών που εισήχθησαν στον πίνακα vicidial_list -
      - UP PHONE: επιλογή του υψηλότεÏου Ï„Î·Î»ÎµÏ†Ï‰Î½Î¹ÎºÎ¿Ï Î±ÏÎ¹Î¸Î¼Î¿Ï ÎºÎ±Î¹ συνεχίζει Ï€Ïος τα κάτω -
      - DOWN PHONE: επιλογή του χαμηλότεÏου Ï„Î·Î»ÎµÏ†Ï‰Î½Î¹ÎºÎ¿Ï Î±ÏÎ¹Î¸Î¼Î¿Ï ÎºÎ±Î¹ συνεχίζει Ï€Ïος τα πάνω -
      - UP LAST NAME: έναÏξη με τα επίθετα να ξεκινάνε με Ζ και συνεχίζει Ï€Ïος τα κάτω -
      - DOWN LAST NAME: έναÏξη με τα επίθετα να ξεκινάνε με Α και συνεχίζει Ï€Ïος τα πάνω -
      - UP COUNT: έναÏξη με τους λιγότεÏους σε κλήση οδηγοÏÏ‚ και συνεχίζει Ï€Ïος τα κάτω -
      - DOWN COUNT: έναÏξη με τους λιγότεÏους σε κλήση οδηγοÏÏ‚ και συνεχίζει -
      - DOWN COUNT 2nd NEW: έναÏξη με τους λιγότεÏους σε κλήση οδηγοÏÏ‚ και συνεχίζει Ï€Ïος τα πάνω με την εισαγωγή ενός ÎΕΟΥ Î¿Î´Î·Î³Î¿Ï Î³Î¹Î± κάθε άλλο οδηγό - ΠÏέπει να ΜΗΠέχει νέα επιλεγμένα στις καταστάσεις κλήσεων -
      - DOWN COUNT 3nd NEW: έναÏξη με τους λιγότεÏους σε κλήση οδηγοÏÏ‚ και συνεχίζει Ï€Ïος τα πάνω με την εισαγωγή ενός ÎΕΟΥ Î¿Î´Î·Î³Î¿Ï Î³Î¹Î± κάθε Ï„Ïίτο οδηγό - ΠÏέπει να ΜΗΠέχει νέα επιλεγμένα στις καταστάσεις κλήσεων -
      - DOWN COUNT 4th NEW: έναÏξη με τους λιγότεÏους σε κλήση οδηγοÏÏ‚ και συνεχίζει Ï€Ïος τα πάνω με την εισαγωγή ενός ÎΕΟΥ Î¿Î´Î·Î³Î¿Ï Î³Î¹Î± κάθε τέταÏτο οδηγό - ΠÏέπει να ΜΗΠέχει νέα επιλεγμένα στις καταστάσεις κλήσεων - -
    -
    -
    -Επίπεδο Hopper - Αυτό είναι το πόσους οδηγοÏÏ‚ η διαδικασία VDhopper, Ï€Ïοσπαθεί να διατηÏήσει στον πίνακα vicidial_hopper για αυτήν την εκστÏατεία. Εάν η διαδικασία VDhopper Ï„Ïέχει κάθε λεπτό, Ïυθμίστε αυτό λίγο πεÏισσότεÏο από τον αÏιθμό των οδηγών που πεÏνοÏν σε ένα λεπτό. - -
    -
    -
    -ΦίλτÏο ÎŸÎ´Î·Î³Î¿Î¹Ï - αυτή είναι μία μέθοδος για να δημιουÏγήτε φίλτÏα για την SQL εÏώτηση. ΧÏησιμοποιήστε αυτό το χαÏακτηÏιστικό με Ï€Ïοσοχή, είναι εÏκολο να σταματήσει το σÏστημα με μία μικÏή αλλαγή στη δήλωση SQL. Η Ï€Ïοεπιλογή είναι ΚΑΜΙΑ. - -
    -
    -
    -ΥποχÏεωτική ΕπαναφοÏά του Hopper - Αυτό σας επιτÏέπει καθαÏίσετε τα πεÏιεχόμενα κατά την επιβεβαίωση της φόÏμας. Αυτό θα συμβεί πάλι όταν η διαδικασία VDhopper θα Ï„Ïέξει. - -
    -
    -
    -Επίπεδο Αυτόματης Κλήσης - Εδώ είναι που καθοÏίζεται πόσες γÏαμμές θα χÏησιμοποιοÏνται ανά ενεÏγό χÏήστη. Μηδέν (0) σημαίνει ότι η αυτόματη κλήση είναι μη ενεÏγή και οι χÏήστες πατοÏν το πλήκτÏο για την κλήση κάθε αÏιθμοÏ. ΔιαφοÏετικά, το σÏστημα καλεί γÏαμμές ίσες με τους ενεÏγοÏÏ‚ χÏήστες, πολλαπλασιασμένους με το επίπεδο κλήσης και σÏμφωνα με το πόσες γÏαμμές η εκστÏατεία σε κάθε διακομιστή επιτÏέπει. - -
    -
    -
    -Επόμενη Κλήση ΧÏήστη - Αυτό Ï€ÏοσδιοÏίζει ποιος χÏήστης λαμβάνει την επόμενη κλήση που είναι διαθέσιμη: -
      - random: ταξινομημένο με τυχαία τιμή ενημέÏωσης στον πίνακα vicidial_live_agents -
      - oldest_call_start: ταξινομημένο με την τελευταία φοÏά που σε ένα χÏήστη στάλθηκε μία κλήση. Με αποτέλεσμα, ο χÏήστης να λαμβάνει συνολικά το ίδιο αÏιθό κλήσεων. -
      - oldest_call_finish: ταξινομημένο με την τελευταία φοÏά που ένας χÏήστης τελείωσε μία κλήση. Ο χÏήστης που πεÏιμένει πεÏισσότεÏο λαμβάνει την Ï€Ïώτη κλήση. -
      - overall_user_level: οι διαταγές από το user_level του χειÏιστή όπως καθοÏίζεται στα vicidial_users παÏουσιάζουν ένα υψηλότεÏο user_level θα άβουν πεÏισσότεÏες κλήσεις. - -
    -
    -
    -Τοπική ΩÏα Κλήσης - Εδώ, μποÏείτε να οÏίσετε τις ÏŽÏες που θα θέλατε να γίνουν οι κλήσεις. Αυτό ελέγχετε από τον κωδικό πεÏις και Ïυθμίζεται για Daylight Savings εάν είναι εφαÏμόσιμο. - -
    -
    -
    -Κλήση Εκτός ΧÏόνου - Εάν έχει οÏιστεί, οι κλήσεις που φυσιολογικά θα έκλειναν μετά το χÏόνο που έχει οÏιστεί στο extensions.conf, θα κλείσουν σε αυτόν τον χÏόνο εάν είναι μικÏότεÏος του extensions.conf. Αυτό επιτÏέπει στην γÏήγοÏη αλλαγή των χÏόνων από διακομιστή σε διακομιστή και πεÏιοÏίζοντας τα αοτελέσματα σε μία εκστÏατεία. Εάν έχετε πολλές κλήσεις με Αυτόματους Τηλεφωνητές ή Φωνητικών ΤαχυδÏομείων, μποÏείτε να αλλάξετε αυτή την τιμή Î¼ÎµÏ„Î±Î¾Ï 21-26 και να δείτε αν τα αποτελέσματα είναι καλÏτεÏα. - -
    -
    -
    -ΠÏόθεμα Κλήσης - Αυτό το ο επιτÏέπει την πιο εÏκολη αλλαγή της διαδÏομής της κλήσης να βγει έξω μέσω διαφοÏετικής μεθόδου, χωÏίς να γίνει επαναφόÏτωση στο Asterisk. ΠÏοκαθοÏισμένο είναι το 9 βασισμένο σÏμφωνα με το 91NXXNXXXXXX στο σχέδιο κλήσεων - extensions.conf. - -
    -
    -
    -CallerID ΕκστÏατείας - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service(RBS) circuits. This will also work through most VOIP(SIP or IAX trunks) providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. - -
    -
    -
    -Τηλ.ΣÏνδεση ΕκστÏατείας VDAD - Αυτό το πεδίο επιτÏέπει γαι μία Ï€ÏοσαÏμόσιμη VDAD εσωτ.σÏνδεση μεταφοÏάς. Αυτό σας επιτÏέπει να χÏησιμοποιήσετε διαφοÏετικές διαδικασίες VDADtransfer.agi, σÏμφωνα με την εκστÏατεία. Η Ï€ÏοκαθοÏισμένη AGI μεταφοÏά - εσωτ.σÏνδ. 8365 agi VDADtransfer.agi - στέλνει αμέσως τις κλήσεις στον χÏήστη, μόλις το σηκώσουν. Ενα Ï€Ïόσθετο AGI παÏάεα πολιτικής έÏευνας συμπεÏιλαμβάνεται - 8366 agi - VDADtransferSURVEY.agi - όπου παίζει ένα μήνυμα στο κληθέν Ï€Ïόσωπο και επιτÏέπει να κάνουν επιλογές με τα πλήκτÏα. - -
    -
    -
    -Τηλ.Επέκταση εκστÏατείας Î—Ï‡Î¿Î³Ï - αυτό το πεδίο επιτÏέπει να οÏίσετε μία επέκταση ηχογÏάφησης που χÏησιμοποιείται με το VICIDIAL. Αυτό επιτÏέπει να χÏησιμοποιήσετε διαφοÏετικές επεκτάσεις ανάλογα με πόσο χÏόνο θέλετε να επιτÏέψετε μία ηχογÏάφηση και ποιο Ï„Ïπος κωδικοποιητή-αποκωδικοποιητή θα χÏησιμοποιηθεί. Η Ï€Ïοεπιλογή είναι 8309 και θα καταγÏάψει με το σχήμα WAV μέχÏι μια ÏŽÏα. Μια άλλη επιλογή που πεÏιλαμβάνεται στα παÏαδείγματα είναι 8310 που θα καταγÏάψουν με το σχήμα GSM για μέχÏι μια ÏŽÏα. - -
    -
    -
    -ΗχογÏάφηση εκστÏατείας - αυτή η επιλογή επιτÏέπει να επιλέξετε το επίπεδο ηχογÏάφησης σε αυτήν την εκστÏατεία. NEVER θα θέσει εκτός λειτουÏγίας την ηχογÏάφηση στον πελάτη. ONDEMAND είναι η Ï€Ïοεπιλογή και επιτÏέπει στον χειÏιστή να αÏχίσει και να σταματήσει όπως απαιτείται. ALLCALLS θα αÏχίσει την καταγÏαφή στον πελάτη όποτε μια κλήση στέλνεται σε έναν χειÏιστή. - -
    -
    -
    -Όνομα αÏχείου Î·Ï‡Î¿Î³Ï ÎµÎºÏƒÏ„Ïατείας - αυτό το πεδίο επιτÏέπει να Ï€ÏοσαÏμόσετε το όνομα της ηχογÏάφησης, όταν η ηχογÏάφηση της εκστÏατείας είναι ONDEMAND ή ALLCALLS. Οι μεταβλητές είναι CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. Η Ï€Ïοεπιλογή είναι FULLDATE_ΧΕΙΡΙΣΤΗΣκαι θα μοιάζει με το 20051020-103108_6666. Ένα άλλο παÏάδειγμα είναι CAMPAIGN_TINYDATE_CUSTPHONE που θα μοιάζει με το TESTCAMP_51020103108_3125551212. 50 char max. - -
    -
    -
    -Βοηθός εκστÏατείας - αυτές οι επιλογές επιτÏέπουν να επιλέξετε τον Βοηθό που θα εμφανιστεί στην οθόνη των χειÏιστών για αυτήν την εκστÏατεία. Επιλέξτε NONE για να μην παÏουσιάσετε κανένα χειÏόγÏαφο για αυτήν την εκστÏατεία. - -
    -
    -
    -Κατά την έναÏξη κλήσης - αυτές οι επιλογές επιτÏέπουν να επιλέξετε εάν θέλετε την αυτόματη έναÏξη μίας ιστο σελίδας σε ένα διαφοÏετικό παÏάθυÏο, αυτόματη μετάβαση στον Βοηθό ή τίποτα. - -
    -
    -
    -Μήνυμα αυτόματου Ï„Î·Î»ÎµÏ†Ï‰Î½Î·Ï„Î¿Ï - αυτός το πεδίο χÏησιμοποιείτε για τις τυφλές κλήσεις μεταφοÏάς όταν παίÏνει ο χειÏιστής έναν αυτόματο τηλεφωνητή και χτυπά στο πλήκτÏο μηνυμάτων αυτόματων τηλεφωνητών στο πλαίσιο διασκέψεων μεταφοÏάς. ΠÏέπει το θέσετε αυτό στο dialplan - extensions.conf - και σιγουÏευτείτε ότι παίζει ένα αÏχείο μουσικής κατόπιν κλείνει το τηλέφωνο. - -
    -
    -
    -AMD στέλνει στο VM - αυτές οι επιλογές επιτÏέπουν να καθοÏίσετε εάν ένα μήνυμα αφήνεται σε έναν αυτόματο τηλεφωνητή όταν ανιχνεÏεται ότι η κλήση είναι ένας αυτόματος τηλεφωνητής και εάν το AMD είναι ενεÏγό. - -
    -
    -
    -Xfer- Συνδ DTMF - αυτά τα τέσσεÏα πεδία επιτÏέπουν να έχετε δÏο σÏνολα συνδιάσκεψης μεταφοÏάς και DTMF. Όταν η κλήση ή η εκστÏατεία φοÏτώνεται, ο Βοηθός θα παÏουσιάσει δÏο πλήκτÏα στο πλαίσιο μεταφοÏά-διασκέψεων και αυτόματα θα παÏουσιάσει τα πεδία αÏιθμό για κλήση και στείλε DTMF όταν πατηθεί. - -
    -
    -
    -Κλήση Εναλ Î‘Ï Î§Ïήστη - Αυτή η επιλογή επιτÏέπει στον χειÏιστή να κάνει χειÏοκίνητη κλήση του ÎµÎ½Î±Î»Î»Î±ÎºÏ„Î¹ÎºÎ¿Ï Î±ÏÎ¹Î¸Î¼Î¿Ï Ï„Î·Î»ÎµÏ†ÏŽÎ½Î¿Ï… ή το πεδίο address3 μετά την κλήση του κυÏίου αÏιθμοÏ. - -
    -
    -
    -ΠÏογÏαμματισμένες Επανακλήσεις - Αυτή η επιλογή επιτÏέπει στον χειÏιστή να τεÏματίσει μία κλήση ως CALLBK και να επιλέξει τα δεδομένα και την ÏŽÏα κατά την οποία ο οδηγός θα ξανα-ενεÏγοποιηθεί. - -
    -
    -
    -ΔευτεÏ. Εγκαταλ. Κλήσης - Ο αÏιθμός των δευτεÏολέπτων από την στιγμή που ο πελάτης σηκώνει το τηλ μέχÏι η κλήση να θεωÏηθεί εγκαταλειμένη. Μόνο για εξεÏχόμενες κλήσεις . - -
    -
    -
    -Φωνητικό ΤαχυδÏομείο - Εάν έχει οÏιστεί, οι κλήσεις που φυσιολογικά θα ΕΓΚΑΤΑΛΕΙΠΟÎΤΑÎ, θα κατευθυνθοÏν σε αυό το φωνητικό ταχυδÏομείο, ώστε να ακοÏσετε και να αφήσετε ένα μήνυμα. - -
    -
    -
    -Μήνυμα ΑσφαλοÏÏ‚ ΦÏλαξης - Εάν είναι Î¥ θα παίξει ένα μήνυμα στον πελάτη μετά το πέÏας των δευτεÏολέπτων ασφαλοÏÏ‚ εγκατάλειψης, χωÏίς να μεταφεÏθεί σε έναν χειÏιστή. Αυτή η επιλογή υπεÏβαίνει την αποστολή σε θυÏίδα Î·Ï‡Î·Ï„Î¹ÎºÎ¿Ï Î¼Î·Î½Ïματος εάν είναι Î¥. - -
    -
    -
    -Εσωτ.σÏνδεση ΑσφαλοÏÏ‚ ΦÏλαξης - Αυτή είναι η εσωτ.σÏνδεση του πλάνου κλήσεων, όπου βÏίσκεται το ηχητικό αÏχείο της Ασφαλής ΦÏλαξης στον διακομιστή. - -
    -
    -
    -ΔευτεÏ. Τυλίγματος - Ο αÏιθμός των δευτεÏολέπτων που αναγκάζει έναν χειÏιστή να πεÏιμένει Ï€Ïιν του επιτÏαπεί να λάβει ή να κάνει άλλη κλήση. Ο χÏόνος ξεκινάει μόλις τεÏματίσει μία κλήση. ΠÏοκαθοÏισμένα είναι 0 δευτεÏ. Αν ο χÏόνος πεÏάσει Ï€Ïιν ο χειÏιστής τεÏματίσει την κλήση, δεν θα μετακινηθεί στην άλλη κλήση Ï€Ïιν συμβεί αυτό. - -
    -
    -
    -Μήνυμα Τυλίγματος - Αυτό είναι ένα συγκεκÏιμένο μήνυμα εκστÏατείας που εμφανίζεται στην οθόνη τυλίγματος όταν έχει οÏιστεί ο χÏόνος τυλίγματος. - -
    -
    -
    -Μήνυμα Τυλίγματος - Αυτό είναι ένα συγκεκÏιμένο μήνυμα εκστÏατείας που εμφανίζεται στην οθόνη τυλίγματος όταν έχει οÏιστεί ο χÏόνος τυλίγματος. - -
    -
    -
    -ΕσωτεÏικός κατάλογος DNC χÏήσης - αυτό καθοÏίζει εάν αυτή ηεκστÏατεία είναι στους μολÏβδους φίλτÏων ενάντια στον εσωτεÏικόκατάλογο DNC. Εάν τίθεται το Î¥, η χοάνη θα ψάξει κάθετηλεφωνικό αÏιθμό στον κατάλογο DNC Ï€Ïίν τοποθετεί τον στηχοάνη. Εάν είναι στον κατάλογο DNC έπειτα θα αλλάξει ότιθέση μολÏβδου σε DNCL έτσι που δεν μποÏεί να σχηματιστεί. ΗπÏοεπιλογή είναι ν. - -
    -
    -
    -ΕισεÏχόμενες ομάδες - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound/outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. - - - -



    - -VICIDIAL_ΛΙΣΤΕΣ ΠΙÎΑΚΑΣ

    -
    -
    -ID Λίστας - Αυτό είναι το αÏιθμητικό όνομα της λίστας, δεν μποÏεί να διοÏθωθεί μετά από την αÏχική εισαγωγή, Ï€Ïέπει να πεÏιέχει μόνο αÏιθμοÏÏ‚ και Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 8 χαÏακτήÏες. - -
    -
    -
    -Ονομα Λίστας - Αυτή είναι η πεÏιγÏαφή της λίστας, Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 20 χαÏακτήÏες. - -
    -
    -
    -ΕκστÏατεία - Αυτή είναι η εκστÏατεία όπου ανήκει η λίστα. Μία λίστα μποÏεί μόνο να κληθεί από μία εκστÏατεία κάθε φοÏά. - -
    -
    -
    -ΕνεÏγή - Αυτό οÏίζει κατά πόσον η λίστα Ï€Ïόκειται να κληθεί ή όχι. - -
    -
    -
    -ΕπαναφοÏά Κατάστασης-Κλήσης-Καθοδήγησης για την λίστα - Αυτό επαναφέÏει τους οδηγοÏÏ‚ σε αυτή την λίστα στο Πσε \"μη κληθέντα από την τελευταία επαναφοÏά\" και σημαίνει ότι για οποιαδήποτε καθοδήγηση μποÏεί να γίνει κλήση εάν είναι η σωστή κατάσταση, όπως οÏίσθηκε στην οθόνη τις εκστÏατείας. - -
    -
    -
    -Κατάλογος VICIDIAL DNC - αυτό δεν καλεί τον κατάλογοπεÏιέχει κάθε μόλυβδο που έχει τεθεί μια θέση DNC στοσÏστημα. Μέσω των ΚΑΤΑΛΟΓΩΠ- ΠΡΟΣΘΕΣΤΕ τον ΑΡΙΘΜΟ στη σελίδαDNC που είστε σε θέση να Ï€Ïοσθέσετε με το χέÏι έναν αÏιθμό σεαυτόν τον κατάλογο έτσι ώστε δεν θα κληθεί από τις εκστÏατείεςπου χÏησιμοποιοÏν τον εσωτεÏικό κατάλογο DNC. - - - -



    - -VICIDIAL_INBOUND_GROUPS ΠΙÎΑΚΑΣ

    -
    -
    -ID Ομάδας - Αυτό είναι το σÏντομο όνομα της εισεÏχόμενης ομάδας, δεν μποÏεί να διοÏθωθεί μετά από την αÏχική παÏάδοση, δεν μποÏεί να πεÏιέχει κενά και Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 20χαÏακτήÏες. - -
    -
    -
    -Ονομα Ομάδας - Αυτή είναι η πεÏιγÏαφή της ομάδας, Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 30 χαÏακτήÏες. Δεν μποÏεί να συμπεÏιαμβάνει παÏλες, συν ή κενά . - -
    -
    -
    -ΧÏώμα Ομάδας - Αυτό είναι το χÏώμα που εμφανίζεται στην VICIDIAL εφαÏμογή όταν η κλήση έÏχεται σε αυτή την ομάδα. ΠÏέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 7 χαÏακτήÏες. Εάν αυτό είναι οÏισμένο ως hex , θα Ï€Ïέπει να τοποθετήσετε ένα # στην αÏχή του κειμένου ή το VICIDIAL δεν θα δουλεÏει σωστά. - -
    -
    -
    -ΕνεÏγοποίηση - Αυτό καθοÏίζει κατά πόσον αυτή η ομάδα εμφανίζεται στο κουτί επιλογής όταν ένας χÏήστης συνδέεται. - -
    -
    -
    -Ιστοσελίδα - Αυτή είναι η Ï€ÏοσαÏμοσμένη διεÏθυνση που θα σας κατευθÏνει για κλήσεις που έÏχονται σε αυ την ομάδα. - -
    -
    -
    -Επόμενη Κλήση ΧÏήστη - Αυτό Ï€ÏοσδιοÏίζει ποιος χÏήστης λαμβάνει την επόμενη κλήση που είναι διαθέσιμη: -
      - random: ταξινομημένο με τυχαία τιμή ενημέÏωσης στον πίνακα vicidial_live_agents -
      - oldest_call_start: ταξινομημένο με την τελευταία φοÏά που σε ένα χÏήστη στάλθηκε μία κλήση. Με αποτέλεσμα, ο χÏήστης να λαμβάνει συνολικά το ίδιο αÏιθό κλήσεων. -
      - oldest_call_finish: ταξινομημένο με την τελευταία φοÏά που ένας χÏήστης τελείωσε μία κλήση. Ο χÏήστης που πεÏιμένει πεÏισσότεÏο λαμβάνει την Ï€Ïώτη κλήση. -
      - overall_user_level: οι διαταγές από το user_level του χειÏιστή όπως καθοÏίζεται στα vicidial_users παÏουσιάζουν ένα υψηλότεÏο user_level θα άβουν πεÏισσότεÏες κλήσεις. - -
    -
    -
    -Οθόνη ΜπÏÎ¿ÏƒÏ„Î¹Î½Î¿Ï - Αυτό το πεδίο καθοÏίζει κατά πόσον στον VICIDIAL χόμενος χÏήστης θα εμφανίζεται το όνομα του μπÏÎ¿ÏƒÏ„Î¹Î½Î¿Ï - εάν υπάÏχει κάποιο - στο πεδίο κατάστασης όταν η κλήση έÏχεται στον χÏήστη. - -
    -
    -
    -Βοηθός εκστÏατείας - αυτές οι επιλογές επιτÏέπουν να επιλέξετε τον Βοηθό που θα εμφανιστεί στην οθόνη των χειÏιστών για αυτήν την εκστÏατεία. Επιλέξτε NONE για να μην παÏουσιάσετε κανένα χειÏόγÏαφο για αυτήν την εκστÏατεία. - -
    -
    -
    -Κατά την έναÏξη κλήσης - αυτές οι επιλογές επιτÏέπουν να επιλέξετε εάν θέλετε την αυτόματη έναÏξη μίας ιστο σελίδας σε ένα διαφοÏετικό παÏάθυÏο, αυτόματη μετάβαση στον Βοηθό ή τίποτα. - -
    -
    -
    -Xfer- Συνδ DTMF - αυτά τα τέσσεÏα πεδία επιτÏέπουν να έχετε δÏο σÏνολα συνδιάσκεψης μεταφοÏάς και DTMF. Όταν η κλήση ή η εκστÏατεία φοÏτώνεται, ο Βοηθός θα παÏουσιάσει δÏο πλήκτÏα στο πλαίσιο μεταφοÏά-διασκέψεων και αυτόματα θα παÏουσιάσει τα πεδία αÏιθμό για κλήση και στείλε DTMF όταν πατηθεί. - -
    -
    -
    -ΔευτεÏ. Εγκαταλ. Κλήσης - Ο αÏιθμός των δευτεÏολέπτων από την στιγμή που ο πελάτης σηκώνει το τηλ μέχÏι η κλήση να θεωÏηθεί εγκαταλειμένη. Μόνο για εξεÏχόμενες κλήσεις . - -
    -
    -
    -Φωνητικό ΤαχυδÏομείο - Εάν έχει οÏιστεί, οι κλήσεις που φυσιολογικά θα ΕΓΚΑΤΑΛΕΙΠΟÎΤΑÎ, θα κατευθυνθοÏν σε αυό το φωνητικό ταχυδÏομείο, ώστε να ακοÏσετε και να αφήσετε ένα μήνυμα. - -
    -
    -
    -Μήνυμα Εγκατάλειψης - Εάν είναι Î¥ θα παίξει ένα μήνυμα στον πελάτη μετά το πέÏας των δευτεÏολέπτων Εγκατάλειψης, χωÏίς να μεταφεÏθεί σε έναν χειÏιστή. Αυτή η επιλογή υπεÏβαίνει την αποστολή σε θυÏίδα Î·Ï‡Î·Ï„Î¹ÎºÎ¿Ï Î¼Î·Î½Ïματος εάν είναι Î¥. - -
    -
    -
    -Εσωτ.ΣÏνδεση Εγκατάλειψης - Αυτή είναι η εσωτ.σÏνδεση του πλάνου κλήσεων, όπου βÏίσκεται το ηχητικό αÏχείο της Εγκατάλειψης στον διακομιστή. - - - -



    - -VICIDIAL_REMOTE_AGENTS ΠΙÎΑΚΑΣ

    -
    -
    -ΑÏχή ID ΧÏήστη - Αυτό είναι η αÏχή του ID ΧÏήστη που χÏησιμοποιείται όταν οι καταχωÏήσεις των απομακÏυσμένων χÏηστών παÏεμβάλλονται στο σÏστημα. Εάν ο αÏιθμός των γÏαμμών είναι μεγαλÏτεÏος από 1, αυτός ο αÏιθμός αυξάνει κατά ένα μέχÏι κάθε γÏαμμή να έχει μία καταχώÏηση. Επιβεβαιώστε, ότι δημιουÏγήσατε ένα νέο VICIDIAL λογαÏιασμό η με επίπεδο χÏήσης 4 ή μεγαλÏτεÏο, εάν θέλετε να μποÏεί να χÏησιμοποιήσει την σελίδα vdremote για απομακÏυσμένη Ï€Ïόσβαση του λογαÏÎ¹Î±ÏƒÎ¼Î¿Ï Ï„Î¿Ï…. - -
    -
    -
    -ΑÏιθμός ΓÏαμμών - Αυτό οÏίζει πόσες καταχωÏήσεις απομακÏυσμένων χÏηστών το σÏστημα δημιουÏ, και καθοÏίζει πόσες γÏαμμές μποÏεί με ασφάλεια να στείλει στον αÏιθμό παÏακάτω. - -
    -
    -
    -IP Διακομιστή - Μία καταχώÏηση απομακÏυσμένου χÏήστη είναι μόνο καλό για ένα συγκεκÏιμένο διακομιστή, εδώ επιλέγετε τον διακομιστή που ανήκει. - -
    -
    -
    -ΕξωτεÏική Τηλ.ΣÏνδεση - Αυτός είναι ο αÏιθμός που θέλετε οι κλήσεις να Ï€ÏοωθοÏνται. Επιβεβαιώστε ότι είναι ένας πλήÏης αÏιθμός από το σχέδιο κλήσεων και εάν θέλετε ένα 9 στην αÏχή το βάζετε εδώ. Κάντε μία δοκιμή καλώντας αυτόν τον αÏιθμό από ένα τηλέφωνο του συστήματος. - -
    -
    -
    -Κτάσταση - Εδώ μποÏείτε να θέσετε τον απομακÏυσμένο χÏήστη σε ενεÏγό και μη ενεÏγό. Μόλις ο χÏήστης γίνει ενεÏγός το σÏστημα μποÏεί να στείλει κλήσεις σε αυτόν. ΜποÏεί να διαÏκέσει μέχÏι 30 δευτεÏόλεπτα μετά την αλλαγή της κατάστασης σε μη ενεÏγός, ώστε να σταματήσει να δέχεται κ. - -
    -
    -
    -ΕκστÏατεία - Εδώ μποÏείτε να επιλέξετε την εκστÏατεία όπου οι απομακÏυσμένοι χÏήστες θα συνδεθοÏν. Για εισεÏχόμενες Ï€Ïέπει να χÏησιμοποιηθεί η εκστÏατεία CLOSER και επιλέξτε τις εισεÏχόμενες εκστÏατείες παÏακάτω, από που θέλετε να λαμβάνεται τις κλήσεις. - -
    -
    -
    -ΕισεÏχόμενες Ομάδες - Εδώ μποÏείτε να επιλέξετε τις εισεÏχόμενες ομάδες που θέλετε να λαμβάνουν τις κλήσεις , εάν έχετε επιλέξει την εκστÏατεία CLOSER. - - -



    - -VICIDIAL_CAMPAIGN_ΛΙΣΤΕΣ

    -
    -
    -Οι λίστες της εκστÏατείας παÏουσιάζονται εδώ, και εάν είναι ενεÏγές (Î¥ ή Î) μποÏείτε να πάτε στην οθόνη λίστας με το να πατήσετε στο ID λίστας, στην Ï€Ïώτη στήλη. - - -



    - -VICIDIAL_CAMPAIGN_STATUSES ΠΙÎΑΚΑΣ

    -
    -
    -Με την χÏήση Ï€ÏοσαÏμοσμένων καταστάσεων εκστÏατείας, μποÏείτε να έχετε καταστάσεις μόνο για συγκεκÏιμένες εκστÏατείες. Η κατάσταση Ï€Ïέπει να είναι 1-8 χαÏακτήÏες, η πεÏιγÏαφή 2-30 χαÏακτήÏες και Επιλέξιμα καθοÏίζεται αν εμφανίζεται στο VICIDIAL ως τεÏματισμός. - - - -



    - -VICIDIAL_CAMPAIGN_HOTKEYS ΠΙÎΑΚΑΣ

    -
    -
    -Με την χÏήση Ï€ÏοσαÏμοσμένων κλειδιών εκστÏατείας, οι χÏήστες που χÏησιμοποιοÏν την εφαÏμογή vicidial μποÏοÏν να κλείσουν και να τεÏματίσουν την κλήση, με ένα μόνο πάτημα πλήκτÏου. - - - - -



    - -VICIDIAL_LEAD_RECYCLE ΠΙÎΑΚΑΣ

    -
    -
    -Μέσω της χÏήσης της ανακÏκλωσης μολÏβδου, μποÏείτε να καλέσετετις συγκεκÏιμένες θέσεις των μολÏβδων πάλι σε ένα διευκÏινισμένοδιάστημα χωÏίς επαναÏÏθμιση του ολόκληÏου καταλόγου. ΗανακÏκλωση μολÏβδου είναι εκστÏατεία-συγκεκÏιμένη και δεν ειναιαπαÏαίτητο να είναι μια επιλεγμένη dialable θέση στηνεκστÏατεία σας. Ο τομέας καθυστέÏησης Ï€Ïοσπάθειας είναι οαÏιθμός δευτεÏολέπτων έως ότου μποÏεί ο μόλυβδος να τοποθετηθείπίσω στη χοάνη, αυτός ο αÏιθμός Ï€Ïέπει να είναι τουλάχιστον120 δευτεÏόλεπτα. Ο μέγιστος τομέας Ï€Ïοσπάθειας είναι ομέγιστος αÏιθμός χÏόνων ότι ένας μόλυβδος αυτής της θέσηςμποÏεί να Ï€Ïοσπαθηθεί Ï€ÏÎ¿Ï„Î¿Ï Î½Î± Ï€Ïέπει να επαναÏυθμιστεί οκατάλογος, αυτός ο αÏιθμός μποÏεί να είναι από 1 έως 10.ΜποÏείτε να ενεÏγοποιήσετε και να απενεÏγοποιήσετε μια ανακÏκλωσηςείσοδο μολÏβδου με τις παÏεχόμενες συνδέσεις. Αυτό τοχαÏακτηÏιστικό γνώÏισμα λειτουÏγεί μόνο στον Ï„Ïόποαυτόματος-πινάκων, όπου το επίπεδο πινάκων είναι μεγαλÏτεÏοαπό 0. - - - - - -



    - -VICIDIAL_USER_GROUPS ΠΙÎΑΚΑΣ

    -
    -
    -Ομάδα ΧÏήστη - Αυτό είναι το σÏντομο όνομα της Vicidial ομάδας χÏήστη, Ï€Ïσπαθήστε να μην χÏησιμοποιήσετε κενά ή στίξεις για αυτό το πεδίο. Από 2 μέχÏι 20 χαÏακτήÏες. - -
    -
    -
    -Ονομα Ομάδας- Αυτή είναι η πεÏιγÏαφή της vicidial ομάδας χÏήστη μέχÏι 40 χαÏακτήÏες. - - - - - -



    - -VICIDIAL_ΒΟΗΘΟΙ ΠΙÎΑΚΑΣ

    -
    -
    -Ταυτότητα Î’Î¿Î·Î¸Î¿Ï - αυτό είναι το σÏντομο όνομα ενός ΒοπηθοÏ. ΠÏέπει να είναι ένα μοναδικό Ï€ÏοσδιοÏιστικό. ΠÏοσπαθήστε να μην χÏησιμοποιήσετε οποιαδήποτε διαστήμα ή στίξη για τους 10 χαÏακτήÏες Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… πεδίου, ελάχιστο 2 χαÏακτήÏων. - -
    -
    -Όνομα Î’Î¿Î·Î¸Î¿Ï - αυτός είναι ο τίτλος ενός ΒοηθοÏ. Αυτή είναι μια σÏντομη πεÏίληψη. 2-50 χαÏακτήÏες. Δεν Ï€Ïέπει να υπάÏξουν διάστηματα ή στίξεις σε αυτό το πεδίο. - -
    -
    -Σχόλια Î’Î¿Î·Î¸Î¿Ï - εδώ μποÏείτε να τοποθετήσετε τα σχόλια για έναν Βοηθό. 2-255 χαÏακτήÏες . - -
    -
    -Κείμενο χειÏόγÏαφου - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments. For example, this sentence would print the persons name in it----

    Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

    This would read----

    Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today? - -
    -
    -
    -ΕνεÏγός - αυτό καθοÏίζει εάν αυτός ο οδηγός μποÏεί να επιλεχτεί για να χÏησιμοποιηθεί από μια εκστÏατεία. - - - - - -



    - -VICIDIAL_LEAD_ΦΙΛΤΡΑ ΠΙÎΑΚΑΣ

    -
    -
    -ID ΦίλτÏου - Αυτό είναι το σÏντομο όνομα ενός ΦίλτÏου ΟδηγοÏ. ΠÏέπει να είναι ένας μοναδικός κωδικός. Μην χÏησιμοποιήσετε κενά ή στίξη για αυτό το πεδίο. ΧαÏακτήÏες 2 με 10. - -
    -
    -Ονομα ΦίλτÏου - Αυτό είναι ένα πιο πεÏιγÏαφικό όνομα για το ΦίλτÏο. Είναι μία σÏντομη πεÏιγÏφή του φίλτÏου. ΧαÏακτήÏες 2 με 30. - -
    -
    -Σχόλια ΦίλτÏου - Εδώ μποÏείτε σχολιάσετε το φίλτÏο. ΧαÏακτήÏες 2 με 255. - -
    -
    -SQL ΦίλτÏου - Εδώ μποÏείτε να οÏίσετε SQL εÏώτημα για το φίλτÏο. Μην ξεκινήσετε ή τελειώσετε με ένα AND, αυτό θα γίνει αυτόματα από τον hopper. Ένα παÏάδειγμα είναι- called_count > 4 and called_count < 8 -. - - - - - -



    - -VICIDIAL_ΧΡΟÎΟΙ ΚΛΗΣΕΩΠΠΙÎΑΚΑΣ

    -
    -
    -ID ΧÏόνου Κλήσης - Αυτό είναι το σÏντομο όνομα του ΟÏÎ¹ÏƒÎ¼Î¿Ï Î§Ïόνου Κλήσης. ΠÏέπει να είναι ένα μοναδικό στοιχείο. Μην χÏησιμοποιηθοÏν διαστήματα ή στίξεις. 2-10 χαÏακτήÏες. - -
    -
    -Ονομα ΧÏόνου Κλήσης - Αυτό είναι ένα πιο πεÏιγÏαφικό όνομα του ΟÏÎ¹ÏƒÎ¼Î¿Ï Î§Ïόνου Κλήσης. Είναι μία σÏντομη πεÏιγÏαφή. 2-30 χαÏακτήÏεςΣχόλια ΧÏόνου Κλήσης - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters. - -
    -
    -Σχόλια ΧÏόνου Κλήσης - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters. - -
    -
    -ΠÏοκαθοÏισμένοι ΧÏόνοι Εκκίνησης και ΠαÏσης - Αυτός είναι ο Ï€ÏοκαθοÏισμένος χÏόνος όπου θα επιτÏέπετε οι κλήσεις εάν δεν έχει οÏιστεί ο χÏόνος εκκίνησης της ημέÏας-της-εβδομάδας. 0 είναι μεσάνυχτα. Εάν δεν θέλετε καμία κλήση θέστε αυτό το πεδίο σε 2400 και το Ï€ÏοκαθοÏισμένο χÏόνο ΠαÏσης σε 2400. Για να επιτÏέψετε την 24ωÏη κλήση την ημέÏα θέστε σε 0 τον χÏόνο εκκίνησης και σε 2400 τον χÏόνο παÏσηςWeekday Start and Stop Times -
    These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times. - -
    -
    -Weekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times. - -
    -
    -ΟÏισμοί ΧÏόνων Κλήσεων Καταστάσεων - Είναι η λίστα συγκεκÏιμένων ΟÏισμών ΧÏόνων Κλήσεων Καταστάσεων. - -
    -
    -Κατάσταση ΧÏόνου Κλήσης Κατάστασης - Αυτό είναι ο δÏο γÏαμμάτων κωδικός για την κατάσταση όπου ο οÏισμός χÏόνου κλήσης είναι για. Θα Ï€Ïέπει και οι Οδηγοί της εκστÏατείας να έχουν δÏο γÏάμματα κωδικοÏÏ‚ κατάστασης για τον χÏόνο κλήσης κατάστασης. - - - - -



    - -ΛΕΙΤΟΥΡΓΙΑ ΕΙΣΑΓΩΓΗΣ ΛΙΣΤΑΣ

    -
    -
    -Ο VICIDIAL εισαγωγέας οδηγών είναι απλά σχεδιασμένος, ώστε να παίÏνει ένα αÏχείο - μέχÏι 8ΜΒ - που είναι διαχωÏισμένο με tab ή pipe και να το φοÏτώνει στον πίνακα vicidial_list. ΥπάÏχει επίσης ένας νέος βήτα φοÏτωτής οδηγών έκδοσης έξοχος που επιτÏέπει τον τομέα επιλέγοντας και TXT - σαφές κείμενο, CSV - κόμμα χώÏισε τις τιμέ και XLS - σχήματα αÏχείων Excel. Ο φοÏτωτής δεν κάνει εξακÏίβωση δεδομένων ή έλεγχο σε διπλές καταχωÏήσεις, το οποί είναι κάτι που Ï€Ïέπει να κάνετε Ï€Ïιν την φόÏτωση. Επίσης, διευκÏινίστε ότι έχετε δημιουÏγήσει την λίστα όπου οι οδηγοί θα είναι από κάτω, ώστε να τους χÏησιμοποιήστε.ΥπάÏχει επίσης το θέμα με τις ζώνες κωδικοποίησης χÏόνου των οδηγών. ΜποÏεί να θέλετε να αυξήσετε την συχνότητα όπου το ADMIN_adjust_GMTnow_on_leads.pl Ï„Ïέχει στον cron, ώστε οποιαδήποτε φόÏτωση οδηγών να κωδικοποιείται πιο γÏήγοÏα. Εδώ είναι μία λίστα από πεδία στην Ï€Ïέπουσα ταξινόμηση για τα αÏχεία καθοδήγησης.: -
      -
    1. Κωδικός ÎŸÎ´Î·Î³Î¿Ï Î ÏÎ¿Î¼Î·Î¸ÎµÏ…Ï„Î¿Ï -
    2. Πηγαίος Κώδικας - εσωτεÏική χÏήση μόνο από διαχειÏιστές και DBAs -
    3. ID λίστας - ο αÏιθμός λίστας που οι οδηγοί θα παÏουσιαστοÏν κάτω από -
    4. Κωδικός τηλεφώνου - το Ï€Ïόθεμα του Ï„Î·Î»ÎµÏ†Ï‰Î½Î¹ÎºÎ¿Ï Î±ÏÎ¹Î¸Î¼Î¿Ï (1 για ΗΠΑ, 01144 για Î’Ïετανία κλπ) -
    5. Ο αÏιθμός τηλεφώνου - Ï€Ïέπει να είναι τουλάχιστον 8 ψηφία -
    6. Τίτλος - ο τίτλος του πελάτη (κος. κα. κλπ) -
    7. Ονομα -
    8. Μεσαίο ΑÏχικό -
    9. Επίθετο -
    10. 1 ΓÏαμμή ΔιεÏθυνσης -
    11. 2 ΓÏαμμή ΔιεÏθυνσης -
    12. 3 ΓÏαμμή ΔιεÏθυνσης -
    13. Πόλη -
    14. ΚÏάτος - πεÏιοÏισμός σε 2 χαÏακτήÏες -
    15. ΕπαÏχία -
    16. Ταχ.Κωδ. -
    17. ΧώÏα -
    18. ΦÏλο -
    19. ΗμεÏ. Γέννησης -
    20. Εναλ. ΑÏιθμός Τηλ. -
    21. ΔιεÏθυνση ΗλεκτÏ.ΤαχυδÏομείου -
    22. ΦÏάση Ασφαλείας -
    23. Σχόλια -
    - -
    ΣΗΜΕΙΩΣΕΙΣ: Η λειτουÏγία εισαγωγής οδηγών Excel επιτÏέπεται από μια σειÏά Ï€ÏογÏαμμάτων και Ï€Ïέπει να έχει κατάλληλα διαμοÏφωμένο ένα αÏχείο home/cron/AST_SERVER_conf.pl στον κεντÏικό υπολογιστή δικτÏου. Επίσης, κάποια υπο-Ï€ÏογÏάμματα Ï€Ïέπει να φοÏτωθοÏν για να εÏγαστοÏν επίσης - OLE- τα Storage_Lite και Spreadsheet-ParseExcel. ΜποÏείτε να ελέγξετε για λάθη χÏόνου εκτέλεσης στο αÏχείο error_log του apache σας . - -







    -







    -ΤΕΛΟΣ -
    -\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$dial_status_a = $row[3]; -$dial_status_b = $row[4]; -$dial_status_c = $row[5]; -$dial_status_d = $row[6]; -$dial_status_e = $row[7]; -$local_call_time = $row[16]; -if ($lead_filter_id=='') - { - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') - { - $lead_filter_id='NONE'; - } - } - -$stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; -$rslt=mysql_query($stmt, $link); -$lists_to_print = mysql_num_rows($rslt); -$camp_lists=''; -$o=0; -while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; -if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";} -} -$camp_lists = eregi_replace(".$","",$camp_lists); - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - -echo "

    \n"; -echo "Εμφάνιση ΜετÏητή Κληθέντων Οδηγών -

    \n"; -echo "CAMPAIGN: $campaign_id
    \n"; -echo "ΛΙΣΤΕΣ: $camp_lists
    \n"; -echo "STATUSES: $dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e
    \n"; -echo "FILTER: $lead_filter_id
    \n"; -echo "CALL TIME: $local_call_time

    \n"; - -### call function to calculate and print dialable leads -dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - -echo "

    \n"; -echo "\n"; - -exit; -} - - -###################### -# ADD=7111111 view sample script with test variables -###################### - -if ($ADD==7111111) -{ - ##### TEST VARIABLES ##### - $vendor_lead_code = 'VENDORLEADCODE'; - $list_id = 'LISTID'; - $gmt_offset_now = 'GMTOFFSET'; - $phone_code = '1'; - $phone_number = '7275551212'; - $title = 'Mr.'; - $first_name = 'JOHN'; - $middle_initial = 'Q'; - $last_name = 'PUBLIC'; - $address1 = '1234 Main St.'; - $address2 = 'Apt. 3'; - $address3 = 'ADDRESS3'; - $city = 'CHICAGO'; - $state = 'IL'; - $province = 'PROVINCE'; - $postal_code = '33760'; - $country_code = 'USA'; - $gender = 'M'; - $date_of_birth = '1970-01-01'; - $alt_phone = '3125551212'; - $email = 'test@test.com'; - $security_phrase = 'SECUTIRY'; - $comments = 'COMMENTS FIELD'; - $RGfullname = 'JOE AGENT'; - $RGuser = '6666'; - -echo "\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$script_name = $row[1]; -$script_text = $row[3]; - -$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); -$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text); -$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text); -$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text); -$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text); -$script_text = eregi_replace('--A--title--B--',"$title",$script_text); -$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text); -$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text); -$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text); -$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text); -$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text); -$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text); -$script_text = eregi_replace('--A--city--B--',"$city",$script_text); -$script_text = eregi_replace('--A--state--B--',"$state",$script_text); -$script_text = eregi_replace('--A--province--B--',"$province",$script_text); -$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text); -$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text); -$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text); -$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text); -$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text); -$script_text = eregi_replace('--A--email--B--',"$email",$script_text); -$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text); -$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text); -$script_text = eregi_replace('--A--fullname--B--',"$RGfullname",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace("\n","
    ",$script_text); - - -echo ""; - -echo "ΠÏοεπισκόπιση ΒοηθοÏ: $script_id
    \n"; -echo "
    \n"; -echo "
    $script_name
    \n"; -echo "$script_text\n"; -echo "
    \n"; - -echo "\n"; - -exit; -} - - - - -######################### HTML HEADER BEGIN ####################################### -if ($hh=='users') {$users_hh='bgcolor ="#FFFF99"'; $users_fc='BLACK';} # yellow - else {$users_hh=''; $users_fc='WHITE';} -if ($hh=='campaigns') {$campaigns_hh='bgcolor ="#FFCC99"'; $campaigns_fc='BLACK';} # orange - else {$campaigns_hh=''; $campaigns_fc='WHITE';} -if ($hh=='lists') {$lists_hh='bgcolor ="#FFCCCC"'; $lists_fc='BLACK';} # red - else {$lists_hh=''; $lists_fc='WHITE';} -if ($hh=='ingroups') {$ingroups_hh='bgcolor ="#CC99FF"'; $ingroups_fc='BLACK';} # purple - else {$ingroups_hh=''; $ingroups_fc='WHITE';} -if ($hh=='remoteagent') {$remoteagent_hh='bgcolor ="#CCFFCC"'; $remoteagent_fc='BLACK';} # green - else {$remoteagent_hh=''; $remoteagent_fc='WHITE';} -if ($hh=='usergroups') {$usergroups_hh='bgcolor ="#CCFFFF"'; $usergroups_fc='BLACK';} # cyan - else {$usergroups_hh=''; $usergroups_fc='WHITE';} -if ($hh=='scripts') {$scripts_hh='bgcolor ="#99FFCC"'; $scripts_fc='BLACK';} # light teal - else {$scripts_hh=''; $scripts_fc='WHITE';} -if ($hh=='filters') {$filters_hh='bgcolor ="#CCCCCC"'; $filters_fc='BLACK';} # grey - else {$filters_hh=''; $filters_fc='WHITE';} -if ($hh=='times') {$times_hh='bgcolor ="#99FF33"'; $times_fc='BLACK';} # hard teal - else {$times_hh=''; $times_fc='WHITE';} - -?> - - - - -\n"; -echo "
    English Ελληνικά
    - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - - - - -
      ΔΙΑΧΕΙΡΙΣΗ - ΑποσÏνδεση  
    > SIZE=1> ΧΡΗΣΤΕΣ > SIZE=1> ΕΚΣΤΡΑΤΕΙΕΣ > SIZE=1> ΛΙΣΤΕΣ > SIZE=1> ΒΟΗΘΟΙ > SIZE=1> ΦΙΛΤΡΑ > SIZE=1> ΕΙΣΕΡΧΟΜΕÎΕΣ ΟΜΑΔΕΣ > SIZE=1> ΧΡΟÎΟΙ ΚΛΗΣΕΩΠ> SIZE=1> ΟΜΑΔΕΣ ΧΡΗΣΤΗ > SIZE=1> ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ > ΑÎΑΦΟΡΕΣ
      ΛΙΣΤΑ ΧΡΗΣΤΩΠ    |     ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΧΡΗΣΤΗ     |     ΑÎΑΖΗΤΗΣΗ ΧΡΗΣΤΗ
      ΠΡΟΣΘΗΚΗ ΕΚΣΤΡΑΤΕΙΑΣ     |     ΛΙΣΤΑ ΕΚΣΤΡΑΤΕΙΩÎ
      ΕΜΦΑÎΙΣΗ ΛΙΣΤΩΠ    |     ΠΡΟΣΘΗΚΗ ÎΕΑΣ ΛΙΣΤΑΣ     |     ΑÎΑΖΗΤΗΣΗ ΟΔΗΓΟΥ |     ΠΡΟΣΘΕΣΤΕ ΤΟΠΑΡΙΘΜΟ ΣΕ DNC           |     ΕΙΣΑΓΩΓΗ ÎΕΩΠΟΔΗΓΩÎ
      ΠΡΟΣΘΕΣΕ ΒΟΗΘΟ     |     ΕΜΦΑÎΙΣΗ ΒΟΗΘΩÎ
      ΠΡΟΣΘΕΣΕ ΦΙΛΤΡΟ     |     ΕΜΦΑÎΙΣΗ ΦΙΛΤΡΩÎ
      ΕΜΦΑÎΙΣΗ ΕΙΣΕΡΧΟΜΕÎΩΠΟΜΑΔΩΠ    |     ΠΡΟΣΘΗΚΗ ÎΕΑΣ ΕΙΣΕΡΜΟΜΕÎΗΣ ΟΜΑΔΑΣ
      ΕΜΦΑÎΙΣΗ ΧΡΟÎΩΠΚΛΗΣΕΩΠ    |     ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΧΡΟÎΟΥ ΚΛΗΣΗΣ     |     ΕΜΦΑÎΙΣΗ ΧΡΟÎΩΠΚΛΗΣΕΩΠΚΑΤΑΣΤΑΣΕΩΠ    |     ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ  
      ΠΡΟΣΘΗΚΗ ΟΜΑΔΑΣ ΧΡΗΣΤΗ     |     ΛΙΣΤΑ ΟΜΑΔΩΠΧΡΗΣΤΗ     |     ΩΡΙΑΙΑ ΟΜΔΟΠΟΙΗΣΗ
      ΕΜΦΑÎΙΣΗ ΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩΠ    |     ΠΡΟΣΘΗΚΗ ÎΕΩΠΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩÎ
     
    -
    \n"; -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΧΡΗΣΤΗ
    \n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "$NWB#vicidial_users-user_group$NWE\n"; -echo "\n"; -echo "
    ΑÏιθμός ΧÏήστη: $NWB#vicidial_users-user$NWE
    Κωδικός:$NWB#vicidial_users-pass$NWE
    ΠλήÏες Ονομα: $NWB#vicidial_users-full_name$NWE
    Επίπεδο ΧÏήστη: $NWB#vicidial_users-user_level$NWE
    Ομάδα ΧÏήστη:
    Τηλέφωνο ΣÏνδεσης: $NWB#vicidial_users-phone_login$NWE
    Κωδικός ΠÏόσβασης Τηλεφώνου: $NWB#vicidial_users-phone_pass$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN -###################### - -if ($ADD==11) -{ -echo "
    \n"; -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ÎΕΑΣ ΕΚΣΤΡΑΤΕΙΑΣ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID ΕκστÏατείας: $NWB#vicidial_campaigns-campaign_id$NWE
    Ονομα ΕκστÏατείας: $NWB#vicidial_campaigns-campaign_name$NWE
    ΕνεÏγή:$NWB#vicidial_campaigns-active$NWE
    Τηλ.σÏνδ. Στάθμευσης: $NWB#vicidial_campaigns-park_ext$NWE
    Ονομα ΑÏχείου Στάθμευσης: $NWB#vicidial_campaigns-park_file_name$NWE
    Ιστο-σελίδα: $NWB#vicidial_campaigns-web_form_address$NWE
    ΕπιτÏέπω τους Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Επίπεδο Hopper: $NWB#vicidial_campaigns-hopper_level$NWE
    ΕΠΙΠΕΔΟ ΑΥΤΟΜΑΤΗΣ ΚΛΗΣΗΣ: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Επόμενη Κλήση ΧειÏιστή: $NWB#vicidial_campaigns-next_agent_call$NWE
    ΧÏόνος Τοπικής Κλήσης: $NWB#vicidial_campaigns-local_call_time$NWE
    ΦΩÎΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Βοηθός: $NWB#vicidial_campaigns-campaign_script$NWE
    Κατά την έναÏξη κλήσης: $NWB#vicidial_campaigns-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW LIST FORM SCREEN -###################### - -if ($ADD==111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Λίστας: (μόνο αÏιθμοί)$NWB#vicidial_lists-list_id$NWE
    Ονομα Λίστας: $NWB#vicidial_lists-list_name$NWE
    ΕκστÏατεία: $NWB#vicidial_lists-campaign_id$NWE
    ΕνεÏγή:$NWB#vicidial_lists-active$NWE
    \n"; - -} - - -###################### -# ADD=121 display the ADD NUMBER TO DNC FORM SCREEN and add a new number -###################### - -if ($ADD==121) -{ -echo "
    \n"; -echo ""; - -if (strlen($phone_number) > 2) - { - $stmt="SELECT count(*) from vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    DNC ΠΡΟΣΤΙΘΈΜΕÎΟ - αυτός ο τηλεφωνικός αÏιθμός είναι ήδη δενκαλεί τον κατάλογο: $phone_number

    \n";} - else - { - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$phone_number');"; - $rslt=mysql_query($stmt, $link); - - echo "
    DNC ΠΡΟΣΤΙΘΈΜΕÎΟ: $phone_number

    \n"; - - ### LOG INSERTION TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW DNC NUMBER|$PHP_AUTH_USER|$ip|'$phone_number'|\n"); - fclose($fp); - } - } - } - -echo "
    ΠΡΟΣΘΕΣΤΕ έναν ΑΡΙΘΜΟ στον ΚΑΤΑΛΟΓΟ DNC\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    Τηλεφωνικός αÏιθμός: (μόνο αÏιθμοί)$NWB#vicidial_list-dnc$NWE
    \n"; - -} - - -###################### -# ADD=1111 display the ADD NEW INBOUND GROUP SCREEN -###################### - -if ($ADD==1111) -{ -echo "
    \n"; -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ΕΙΣΕΡΧΟΜΕÎΗΣ ΟΜΑΔΑΣ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Ομάδας: (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE
    Ονομα Ομάδας: $NWB#vicidial_inbound_groups-group_name$NWE
    ΧÏώμα Ομάδας: $NWB#vicidial_inbound_groups-group_color$NWE
    ΕνεÏγή:$NWB#vicidial_inbound_groups-active$NWE
    Ιστο-σελίδα: $NWB#vicidial_inbound_groups-web_form_address$NWE
    ΦΩÎΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Επόμενη Κλήση ΧειÏιστή: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    ΜπÏοστινή Οθόνη: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Βοηθός: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Κατά την έναÏξη κλήσης: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN -###################### - -if ($ADD==11111) -{ -echo "
    \n"; -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ÎΕΩΠΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩÎ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID ΧÏήστη Ξεκινά: (μόνο αÏιθμοί, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    ΑÏιθμός ΓÏαμμών: (μόνο αÏιθμοί)$NWB#vicidial_remote_agents-number_of_lines$NWE
    IP Διακομιστή: $NWB#vicidial_remote_agents-server_ip$NWE
    ΕξωτεÏική Τηλ. ΣÏνδεση: (ο αÏιθμός που κλήθηκε από το πλάνο κλήσεων για να καλέσει τους χειÏιστές)$NWB#vicidial_remote_agents-conf_exten$NWE
    Κατάσταση:$NWB#vicidial_remote_agents-status$NWE
    ΕκστÏατεία: $NWB#vicidial_remote_agents-campaign_id$NWE
    ΕισεÏχόμενες Ομάδες: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "ΣΗΜΕΙΩΣΗ: ΜποÏεί να διαÏκέσει και 30 δευτεÏόλεπτα για να καταχωÏηθοÏν οι αλλαγές της οθόνης\n"; - -} - - -###################### -# ADD=111111 display the ADD NEW USERS GROUP SCREEN -###################### - -if ($ADD==111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ΟΜΑΔΑΣ ΧΡΗΣΤΩÎ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Ομάδα: (όχι κενά ή στίξη)$NWB#vicidial_user_groups-user_group$NWE
    ΠεÏιγÏαφή: (πεÏιγÏαφή ομάδας)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -} - - -###################### -# ADD=1111111 display the ADD NEW SCRIPT SCREEN -###################### - -if ($ADD==1111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW SCRIPT\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Ταυτότητα χειÏογÏάφων:: (όχι κενά ή στίξη)$NWB#vicidial_scripts-script_id$NWE
    Όνομα χειÏογÏάφων: (τίτλος του βοηθοÏ)$NWB#vicidial_scripts-script_name$NWE
    Σχόλια χειÏόγÏαφου: $NWB#vicidial_scripts-script_comments$NWE
    ΕνεÏγή:$NWB#vicidial_scripts-active$NWE
    Κείμενο χειÏόγÏαφου: $NWB#vicidial_scripts-script_text$NWE
    \n"; - -} - - -###################### -# ADD=11111111 display the ADD NEW FILTER SCREEN -###################### - -if ($ADD==11111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ΠΡΟΣΘΕΣΕ ΦΙΛΤΡΟ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID ΦίλτÏου: (όχι κενά ή στίξη)$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Όνομα ΦίλτÏου: (σÏντομη πεÏιγÏαφή του φίλτÏου)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Σχόλια ΦίλτÏου: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    SQL ΦίλτÏου: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; -} - - -###################### -# ADD=111111111 display the ADD NEW CALL TIME SCREEN -###################### - -if ($ADD==111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΧΡΟÎΟΥ ΚΛΗΣΗΣ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    ID ΧÏόνου Κλήσης: (όχι κενά ή στίξη)$NWB#vicidial_call_times-call_time_id$NWE
    Ονομα ΧÏόνου Κλήσης: (σÏντομη πεÏιγÏαφή του χÏόνου κλήσης)$NWB#vicidial_call_times-call_time_name$NWE
    Σχόλια ΧÏόνου Κλήσης: $NWB#vicidial_call_times-call_time_comments$NWE
    Οι επιλογές ΗμέÏας και ÏŽÏας θα εμφανιστοÏν όταν θα δημιουÏγήσετε τον ΟÏισμό ΧÏόνου Κλήσης
    \n"; -} - - -###################### -# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN -###################### - -if ($ADD==1111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    ID ΧÏόνου Κλήσης Κατάστασης: (όχι κενά ή στίξη)$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: (όχι κενά ή στίξη)$NWB#vicidial_call_times-state_call_time_state$NWE
    Ονομα ΧÏόνου Κλήσης Κατάτασης: (σÏντομη πεÏιγÏαφή του χÏόνου κλήσης)$NWB#vicidial_call_times-call_time_name$NWE
    Σχόλια ΧÏόνου Κλήσης Κατάστασης: $NWB#vicidial_call_times-call_time_comments$NWE
    Οι επιλογές ΗμέÏας και ÏŽÏας θα εμφανιστοÏν όταν θα δημιουÏγήσετε τον ΟÏισμό ΧÏόνου Κλήσης
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 2 series, validates form data and inserts the new record into the database -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=2 adds the new user to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Ο ΧΡΗΣΤΗΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη ένας χÏήστης με αυτό τον αÏιθμό\n";} - else - { - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) - { - echo "
    Ο ΧΡΗΣΤΗΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    το id χÏήστη Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 8 χαÏακτήÏες\n"; - echo "
    το πλήÏες όνομα και κωδικός Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - echo "
    ΧΡΗΣΤΗΣ ΠΡΟΣΤΕΘΗΚΕ: $user\n"; - - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass) values('$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A USER |$PHP_AUTH_USER|$ip|'$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass'|\n"); - fclose($fp); - } - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new campaign to the system -###################### - -if ($ADD==21) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Η ΕΚΣΤΡΑΤΕΙΑ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη μία εκστÏατεία με αυτό το ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) - { - echo "
    Η ΕΚΣΤΡΑΤΕΙΑ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    το ID της εκστÏατείας Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 8 χαÏακτήÏες\n"; - echo "
    το όνομα της εκστÏατείας Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 6 και 40 χαÏακτήÏες\n"; - } - else - { - echo "
    ΕΚΣΤΡΑΤΕΙΑ ΠΡΟΣΤΕΘΗΚΕ: $campaign_id\n"; - - $stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,active,dial_status_a,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,campaign_script,get_call_launch) values('$campaign_id','$campaign_name','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - echo ""; - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ΠΡΟΣΘΗΚΗ ÎΕΑΣ ΕΚΣΤΡΑΤΕΙΑΣ |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - - } - } -$ADD=31; -} - -###################### -# ADD=22 adds the new campaign status to the system -###################### - -if ($ADD==22) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη κατάσταση-εκστÏατείας με αυτό το όνομα\n";} - else - { - $stmt="SELECT count(*) from vicidial_statuses where status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη μία καθολική-κατάσταση με αυτό το όνομα\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) - { - echo "
    Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    η κατάσταση Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 1 και 8 χαÏακτήÏÏες\n"; - echo "
    το όνομα της κατάστασης Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 30 χαÏακτήÏÏες\n"; - } - else - { - echo "
    ΚΑΤΑΣΤΑΣΗ ΕΚΣΤΡΑΤΕΙΑΣ ΠΡΟΣΤΕΘΗΚΕ: $campaign_id - $status\n"; - - $stmt="INSERT INTO vicidial_campaign_statuses values('$status','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ΠΡΟΣΘΗΚΗ ÎΕΑΣ ΕΚΣΤΡΑΤΕΙΑΣ STATUS |$PHP_AUTH_USER|$ip|'$status','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } - } -$ADD=31; -} - - -###################### -# ADD=23 adds the new campaign hotkey to the system -###################### - -if ($ADD==23) -{ - $HKstatus_data = explode('-----',$HKstatus); - $status = $HKstatus_data[0]; - $status_name = $HKstatus_data[1]; - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_hotkeys where campaign_id='$campaign_id' and hotkey='$hotkey' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ΤΟ ΚΛΕΙΔΙ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη ένα κλειδί-εκστÏατείας με αυτό το κλειδί\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    ΤΟ ΚΛΕΙΔΙ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    το κλειδί Ï€Ïέπει να είναι ένας χαÏακτηÏάς Î¼ÎµÏ„Î±Î¾Ï 1 και 9 \n"; - echo "
    η κατάσταση Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 1 και 8 χαÏακτήÏÏες\n"; - } - else - { - echo "
    ΚΛΕΙΔΙ ΕΚΣΤΡΑΤΕΙΑΣ ΠΡΟΣΤΕΘΗΚΕ: $campaign_id - $status - $hotkey\n"; - - $stmt="INSERT INTO vicidial_campaign_hotkeys values('$status','$hotkey','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ΠΡΟΣΘΗΚΗ ÎΕΑΣ ΕΚΣΤΡΑΤΕΙΑΣ HOTKEY |$PHP_AUTH_USER|$ip|'$status','$hotkey','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=25 adds the new campaign lead recycle entry to the system -###################### - -if ($ADD==25) -{ - $status = eregi_replace("-----.*",'',$status); - echo ""; - $stmt="SELECT count(*) from vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ΑÎΑΚΥΚΛΩΣΗΣ ΜΟΛΥΒΔΟΥ ΕΚΣΤΡΑΤΕΙΑΣ ΠΡΟΣΤΙΘΕΜΕÎΟΣ - υπάÏχει ήδη έναςμόλυβδος-ανακÏκλωσης για αυτήν την εκστÏατεία με αυτήν την θέση\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    ΑÎΑΚΥΚΛΩΣΗΣ ΜΟΛΥΒΔΟΥ ΕΚΣΤΡΑΤΕΙΑΣ ΠΡΟΣΤΙΘΕΜΕÎΟΣ - παÏακαλώ επιστÏέψτεκαι εξετάστε τα στοιχεία που εισαγάγατε\n"; - echo "
    η θέση Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 1 και 6 χαÏακτήÏων στο μήκος\n"; - echo "
    η καθυστέÏηση Ï€Ïοσπάθειας Ï€Ïέπει να είναι τουλάχιστον 120δευτεÏόλεπτα\n"; - echo "
    οι μέγιστες Ï€Ïοσπάθειες Ï€Ïέπει να είναι από 1 έως 10\n"; - } - else - { - echo "
    ΑÎΑΚΥΚΛΩΣΗΣ ΜΟΛΥΒΔΟΥ ΕΚΣΤΡΑΤΕΙΑΣ ΠΡΟΣΤΙΘΕΜΕÎΟΣ: $campaign_id - $status - $attempt_delay\n"; - - $stmt="INSERT INTO vicidial_lead_recycle(campaign_id,status,attempt_delay,attempt_maximum,active) values('$campaign_id','$status','$attempt_delay','$attempt_maximum','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new list to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Η ΛΙΣΤΑ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη μία λίστα με αυτό το ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or (strlen($list_id) < 2) or (strlen($list_id) > 8) ) - { - echo "
    Η ΛΙΣΤΑ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Το ID λίστας Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 8 χαÏακτήÏες\n"; - echo "
    Το όνομα λίστας Ï€Ïέπει να είναι 2 χαÏακτήÏες\n"; - } - else - { - echo "
    ΛΙΣΤΑ ΠΡΟΣΤΕΘΗΚΕ: $list_id\n"; - - $stmt="INSERT INTO vicidial_lists values('$list_id','$list_name','$campaign_id','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LIST |$PHP_AUTH_USER|$ip|'$list_id','$list_name','$campaign_id','$active'|\n"); - fclose($fp); - } - } - } -$ADD=311; -} - - - -###################### -# ADD=2111 adds the new inbound group to the system -###################### - -if ($ADD==2111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Η ΟΜΑΔΑ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη μία ομάδα με αυτό το ID\n";} - else - { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) - { - echo "
    Η ΟΜΑΔΑ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Το ID ομάδας Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 2 και 20 χαÏακτήÏες ' -+'.\n"; - echo "
    Το όνομα και χÏώμα ομάδας Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΟΜΑΔΑ ΠΡΟΣΤΕΘΗΚΕ: $group_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW GROUP |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000; -} - - -###################### -# ADD=21111 adds new remote agents to the system -###################### - -if ($ADD==21111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ΟΙ ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ΔΕΠΠΡΟΣΤΕΘΗΚΑΠ- υπάÏχει ήδη καταχώÏηση απομακÏυσμένων χειÏιστών που ξεκινάει με αυτό το ID χÏήστη\n";} - else - { - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    ΟΙ ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ΔΕΠΠΡΟΣΤΕΘΗΚΑΠ- ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Το ID χÏήστη και η εξωτεÏική εσωτ.σÏνδεση Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ΠΡΟΣΤΕΘΗΚΑÎ: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ENTRY |$PHP_AUTH_USER|$ip|'$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value'|\n"); - fclose($fp); - } - } - } -$ADD=10000; -} - -###################### -# ADD=211111 adds new user group to the system -###################### - -if ($ADD==211111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ΔΕΠΠΡΟΣΤΕΘΗΚΕ Η ΟΜΑΔΑ ΧΡΗΣΤΗ - υπάÏχει ήδη μία καταχώÏηση ομάδας χÏήστη με αυτό το όνομα\n";} - else - { - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    ΔΕΠΠΡΟΣΤΕΘΗΚΕ Η ΟΜΑΔΑ ΧΡΗΣΤΗ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Η ομάδα και η πεÏιγÏαφή Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="INSERT INTO vicidial_user_groups values('$user_group','$group_name');"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΟΜΑΔΑ ΧΡΗΣΤΗ ΠΡΟΣΤΕΘΗΚΕ: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΧΡΗΣΤΗ GROUP ENTRY |$PHP_AUTH_USER|$ip|'$user_group','$group_name'|\n"); - fclose($fp); - } - } - } -$ADD=100000; -} - -###################### -# ADD=2111111 adds new script to the system -###################### - -if ($ADD==2111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Ο ΒΟΗΘΟΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη μια είσοδος χειÏογÏάφων με αυτό το όνομα\n";} - else - { - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    Ο ΒΟΗΘΟΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το όνομα, η πεÏιγÏαφή και το κείμενο χειÏογÏάφων Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες στο μήκος\n"; - } - else - { - $stmt="INSERT INTO vicidial_scripts values('$script_id','$script_name','$script_comments','" . mysql_real_escape_string($script_text) . "','$active');"; - $rslt=mysql_query($stmt, $link); - - echo "
    Ο ΒΟΗΘΟΣ ΠΡΟΣΤΕΘΗΚΕ: $script_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000000; -} - - -###################### -# ADD=21111111 adds new filter to the system -###################### - -if ($ADD==21111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ΤΟ ΦΙΛΤΡΟ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη ένα φίλτÏο με αυτό το ID\n";} - else - { - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    ΤΟ ΦΙΛΤΡΟ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    ID φίλτÏου, όνομα και SQL Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΤΟ ΦΙΛΤΡΟ ΠΡΟΣΤΕΘΗΚΕ: $lead_filter_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=10000000; -} - - -###################### -# ADD=211111111 adds new call time definition to the system -###################### - -if ($ADD==211111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Ο ΟΡΙΣΜΟΣ ΧΡΟÎΟΥ ΚΛΗΣΗ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - υπάÏχει ήδη μία εγγÏαφή χÏόνου κλήσης με αυτό το ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    Ο ΟΡΙΣΜΟΣ ΧΡΟÎΟΥ ΚΛΗΣΗ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το ID ΧÏόνου Κλήσης και το όνομα Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="INSERT INTO vicidial_call_times SET call_time_id='$call_time_id',call_time_name='$call_time_name',call_time_comments='$call_time_comments';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΠΡΟΣΘΗΚΗ ΧΡΟÎΟΥ ΚΛΗΣΗΣ: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111; -} - - -###################### -# ADD=2111111111 adds new state call time definition to the system -###################### - -if ($ADD==2111111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    Ο ΟΡΙΣΜΟΣ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - υπάÏχει ήδη μία εγγÏαφή χÏόνου κλήσης με αυτό το ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    Ο ΟΡΙΣΜΟΣ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ ΔΕΠΠΡΟΣΤΕΘΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το ID ΧÏόνου Κλήσης Κατάστασης, το όνομα και η κατάσταση Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες \n"; - } - else - { - $stmt="INSERT INTO vicidial_state_call_times SET state_call_time_id='$call_time_id',state_call_time_name='$call_time_name',state_call_time_comments='$call_time_comments',state_call_time_state='$state_call_time_state';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΠΡΟΣΘΗΚΗ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=3111111111; -} - - - - -###################################################################################################### -###################################################################################################### -####### 4 series, record modifications submitted and DB is modified, then on to 3 series forms below -###################################################################################################### -###################################################################################################### - - - -###################### -# ADD=4A submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4A") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    Ο ΧΡΗΣΤΗΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Ο κωδικός και το πλήÏες όνομα Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες το κάθε ένα\n"; - } - else - { - echo "
    ΧΡΗΣΤΗΣ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - -###################### -# ADD=4B submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4B") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    Ο ΧΡΗΣΤΗΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Ο κωδικός και το πλήÏες όνομα Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες το κάθε ένα\n"; - } - else - { - echo "
    ΧΡΗΣΤΗΣ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - - -###################### -# ADD=4 submit user modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    Ο ΧΡΗΣΤΗΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Ο κωδικός και το πλήÏες όνομα Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες το κάθε ένα\n"; - } - else - { - echo "
    ΧΡΗΣΤΗΣ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - -###################### -# ADD=41 submit campaign modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    Η ΕΚΣΤΡΑΤΕΙΑ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    το όνομα της εκστÏατείας Ï€Ïέπει να είναι τουλάχιστον 6 χαÏακτήÏες\n"; - } - else - { - echo "
    ΕΣΤΡΑΤΕΙΑ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    ΕΠΑÎΑΦΟΡΑ ΚΑΘΟΘΗΓΗΤΗ ΕΚΣΤΡΑΤΕΙΑΣ HOPPER\n"; - echo "
    - Αναμονή 1 Î»ÎµÏ€Ï„Î¿Ï Ï€Ïιν την κλήση του επόμενου αÏιθμοÏ\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=42 delete campaign status in the system -###################### - -if ($ADD==42) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    το ID της εκστÏατείας Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - echo "
    η κατάσταση της εκστÏατείας Ï€Ïέπει να είναι τουλάχιστον 1 χαÏακτήÏας\n"; - } - else - { - echo "
    ΔΙΑΓΡΑΦΗΚΕ Η ΠΡΟΣΑΡΜΟΣΜΕÎΗ ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=43 delete campaign hotkey in the system -###################### - -if ($ADD==43) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    ΤΟ ΚΛΕΙΔΙ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    το ID της εκστÏατείας Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - echo "
    η κατάσταση της εκστÏατείας Ï€Ïέπει να είναι τουλάχιστον 1 χαÏακτήÏας\n"; - echo "
    το κλειδί της εκστÏατείας Ï€Ïέπει να είναι τουλάχιστον 1 χαÏακτήÏας\n"; - } - else - { - echo "
    ΔΙΑΦΡΑΦΗΚΕ ΤΟ ΠΡΟΣΑΡΜΟΣΜΕÎΟ ΚΛΕΙΔΙ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ: $campaign_id - $status - $hotkey\n"; - - $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=44 submit campaign modifications to the system - Basic View -###################### - -if ($ADD==44) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    Η ΕΚΣΤΡΑΤΕΙΑ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    το όνομα της εκστÏατείας Ï€Ïέπει να είναι τουλάχιστον 6 χαÏακτήÏες\n"; - } - else - { - echo "
    ΕΣΤΡΑΤΕΙΑ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level',lead_filter_id='$lead_filter_id' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    ΕΠΑÎΑΦΟΡΑ ΚΑΘΟΘΗΓΗΤΗ ΕΚΣΤΡΑΤΕΙΑΣ HOPPER\n"; - echo "
    - Αναμονή 1 Î»ÎµÏ€Ï„Î¿Ï Ï€Ïιν την κλήση του επόμενου αÏιθμοÏ\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG HOPPER RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=34; # go to campaign modification form below -} - -###################### -# ADD=45 modify campaign lead recycle in the system -###################### - -if ($ADD==45) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT MODIFIED - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    η θέση Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 1 και 6 χαÏακτήÏων στο μήκος\n"; - echo "
    η καθυστέÏηση Ï€Ïοσπάθειας Ï€Ïέπει να είναι τουλάχιστον 120δευτεÏόλεπτα\n"; - echo "
    οι μέγιστες Ï€Ïοσπάθειες Ï€Ïέπει να είναι από 1 έως 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD MODIFIED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=411 submit list modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) - { - echo "
    Η ΛΙΣΤΑ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    η λίστα Ï€Ïέπει να είναι τουλαχιστον 2 χαÏακτήÏες\n"; - } - else - { - echo "
    ΛΙΣΤΑ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $list_id\n"; - - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - if ($reset_list == 'Y') - { - echo "
    ΕΠΑÎΑΦΟΡΑ ΚΑΤΑΣΤΑΣΗΣ ΚΛΗΣΗΣ ΛΙΣΤΑΣ\n"; - $stmt="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|RESET LIST CALLED |$PHP_AUTH_USER|$ip|list_name='$list_name'|\n"); - fclose($fp); - } - } - if ($campaign_id != "$old_campaign_id") - { - echo "
    ΑΠΟΜΑΚΡΥÎΣΗ ΚΑΘΟΔΗΓΗΤΩΠΛΙΣΤΑΣ HOPPER ΑΠΟ ΠΑΛΑΙΑ HOPPER ΕΚΣΤΡΑΤΕΙΑ ($old_campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LIST INFO |$PHP_AUTH_USER|$ip|list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id'|\n"); - fclose($fp); - } - } - -$ADD=311; # go to list modification form below -} - - -###################### -# ADD=4111 modify in-group info in the system -###################### - -if ($ADD==4111) -{ - echo ""; - - if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) - { - echo "
    Η ΟΜΑΔΑ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    το όνομα και χÏώμα ομάδας Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - echo "
    ΟΜΑΔΑ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $group_id\n"; - - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_message='$drop_message',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten' where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY GROUP INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111; # go to in-group modification form below -} - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΑΠ- ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Το ID του χÏήστη και η εξωτεÏική εσωτ.σÏνδεση Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ΤΡΟΠΟΠΟΙΗΘΗΚΑÎ\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ENTRY |$PHP_AUTH_USER|$ip|set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - } - -$ADD=31111; # go to remote agents modification form below -} - - - -###################### -# ADD=411111 modify user group info in the system -###################### - -if ($ADD==411111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    Η ΟΜΑΔΑ ΧΡΗΣΤΗ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n"; - echo "
    Η ομάδα και η πεÏιγÏαφή Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΟΜΑΔΑ ΧΡΗΣΤΗ ΤΡΟΠΟΠΟΙΗΘΗΚΕ\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER GROUP ENTRY |$PHP_AUTH_USER|$ip|UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group'|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    Ο ΒΟΗΘΟΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το όνομα, η πεÏιγÏαφή και το κείμενο χειÏογÏάφων Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες στο μήκος\n"; - } - else - { - $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    Ο ΒΟΗΘΟΣ ΤΡΟΠΟΠΟΙΗΘΗΚΕ\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111; # go to script modification form below -} - - -###################### -# ADD=41111111 modify filter in the system -###################### - -if ($ADD==41111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    ΤΟ ΦΙΛΤΡΟ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    ID φίλτÏου, όνομα και SQL Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΤΟ ΦΙΛΤΡΟ ΤΡΟΠΟΠΟΙΗΘΗΚΕ\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31111111; # go to filter modification form below -} - - -###################### -# ADD=411111111 modify call time in the system -###################### - -if ($ADD==411111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    ΧΟÎΟΣ ΚΛΗΣΗΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το ID ΧÏόνου Κλήσης και το όνομα Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΤΡΟΠΟΠΟΙΗΘΗΚΕ ΧΡΟÎΟΣ ΚΛΗΣΗΣ\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111; # go to call time modification form below -} - - -###################### -# ADD=4111111111 modify state call time in the system -###################### - -if ($ADD==4111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    ΧΡΟÎΟΣ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το ID ΧÏόνου Κλήσης Κατάστασης, το όνομα και η κατάσταση Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες \n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΤΡΟΠΟΠΟΙΗΘΗΚΕ ΧΡΟÎΟΣ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111111; # go to state call time modification form below -} - - - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of user -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) - { - echo "
    ΧΡΗΣΤΗΣ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΗΣΤΗ: $user\n"; - echo "

    Χτυπήστε εδώ για να διαγÏάψετε το χÏήστη $user


    \n"; - } - -$ADD='3'; # go to user modification below -} - -###################### -# ADD=51 confirmation before deletion of campaign -###################### - -if ($ADD==51) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) - { - echo "
    ΕΚΣΤΡΑΤΕΙΑ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    ΕκστÏατεία_id be at least 2 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΕΚΣΤΡΑΤΕΙΑΣ: $campaign_id\n"; - echo "

    Χτυπήστε εδώ για να διαγÏάψετε την εκστÏατεία $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=52 confirmation before logging all agents out of campaign of campaign -###################### - -if ($ADD==52) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    ΧΕΙΡΙΣΤΕΣ ΠΟΥ ΔΕΠΕΙÎΑΙ ΑΠΟΣΥÎΔΕΜΕÎΟΙ ΑΠΟ ΤΗΠΕΚΣΤΡΑΤΕΙΑ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    ΕκστÏατεία_id be at least 2 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΑΠΟΣΥÎΔΕΣΗΣ ΧΕΙΡΙΣΤΩÎ: $campaign_id\n"; - echo "

    Επιλέξτε εδώ για να αποσυνδέσετε όλους τους χειÏιστές από $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=511 confirmation before deletion of list -###################### - -if ($ADD==511) -{ - echo ""; - - if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) - { - echo "
    ΛΙΣΤΑ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΛΙΣΤΑΣ: $list_id\n"; - echo "

    Χτυπήστε εδώ για να διαγÏάψετε τον κατάλογο και όλους τους οδηγοÏÏ‚ του $list_id


    \n"; - } - -$ADD='311'; # go to campaign modification below -} - -###################### -# ADD=5111 confirmation before deletion of in-group -###################### - -if ($ADD==5111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) - { - echo "
    ΕΙΣ-ΟΜΑΔΑ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΕΙΣ-ΟΜΑΔΑΣ: $group_id\n"; - echo "

    Χτυπήστε εδώ για να διαγÏάψετε την-ΟΜΑΔΑ $group_id


    \n"; - } - -$ADD='3111'; # go to in-group modification below -} - -###################### -# ADD=51111 confirmation before deletion of remote agent record -###################### - -if ($ADD==51111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) - { - echo "
    ΑΠΟΜΑΚΡΥΣΜΕÎΟΣ ΧΕΙΡΙΣΤΗΣ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩΠ: $remote_agent_id\n"; - echo "

    Επιλέξτε εδώ για να διαγÏάψετε τον απομακÏυσμένο χειÏιστή $remote_agent_id


    \n"; - } - -$ADD='31111'; # go to remote agent modification below -} - -###################### -# ADD=511111 confirmation before deletion of user group record -###################### - -if ($ADD==511111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) - { - echo "
    ΟΜΑΔΑ ΧΡΗΣΤΗ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΟΜΑΔΑΣ ΧΡΗΣΤΩÎ: $user_group\n"; - echo "

    Χτυπήστε εδώ για να διαγÏάψετε την ομάδα χÏηστών $user_group


    \n"; - } - -$ADD='311111'; # go to user group modification below -} - -###################### -# ADD=5111111 confirmation before deletion of script record -###################### - -if ($ADD==5111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) - { - echo "
    ΔΕΠΔΙΑΓΡΑΦΗΚΕ Ο ΒΟΗΘΟΣ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Script_id must be at least 2 characters in length\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΒΟΗΘΟΥ: $script_id\n"; - echo "

    επιλέξτε εδώ για να διαγÏάψετε τον βοηθό $script_id


    \n"; - } - -$ADD='3111111'; # go to script modification below -} - -###################### -# ADD=51111111 confirmation before deletion of filter record -###################### - -if ($ADD==51111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) - { - echo "
    ΤΟ ΦΙΛΤΡΟ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    To ID φίλτÏου Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - echo "
    FILTER DELETION CONFIRMATION: $lead_filter_id\n"; - echo "

    Πατήστε εδώ για διαγÏαφή του φίλτÏου$lead_filter_id


    \n"; - } - -$ADD='31111111'; # go to filter modification below -} - -###################### -# ADD=511111111 confirmation before deletion of call time record -###################### - -if ($ADD==511111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    Ο ΧΡΟÎΟΣ ΚΛΗΣΗΣ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το ID χÏόνου κλήσης Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΟÎΟΥ ΚΛΗΣΗΣ: $call_time_id\n"; - echo "

    Click here to delete call time $call_time_id


    \n"; - } - -$ADD='311111111'; # go to call time modification below -} - -###################### -# ADD=5111111111 confirmation before deletion of call time record -###################### - -if ($ADD==5111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    Ο ΧΡΟÎΟΣ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το ID χÏόνου κλήσης Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - echo "
    ΕΠΙΒΕΒΑΙΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ: $call_time_id\n"; - echo "

    Click here to delete state call time $call_time_id


    \n"; - } - -$ADD='3111111111'; # go to state call time modification below -} - - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete user record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) ) - { - echo "
    ΧΡΗΣΤΗΣ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_users where user='$user' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|user='$user'|\n"); - fclose($fp); - } - echo "
    ΔΙΑΓΡΑΦΗ ΧΡΗΣΤΗ ΟΛΟΚΛΗΡΩΘΗΚΕ: $user\n"; - echo "

    \n"; - } - -$ADD='0'; # go to user list -} - -###################### -# ADD=61 delete campaign record -###################### - -if ($ADD==61) -{ - echo ""; - - if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) ) - { - echo "
    ΕΚΣΤΡΑΤΕΙΑ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    ΕκστÏατεία_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_campaigns where campaign_id='$campaign_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΑΠΟΜΑΚΡΥÎΣΗ ΚΑΘΟΔΗΓΗΤΩΠΛΙΣΤΑΣ HOPPER ΑΠΟ ΠΑΛΑΙΑ HOPPER ΕΚΣΤΡΑΤΕΙΑ ($campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!DELETING CAMPAIGN!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    ΔΙΑΓΡΑΦΗ ΕΚΣΤΡΑΤΕΙΑΣ ΟΛΟΚΛΗΡΩΘΗΚΕ: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='10'; # go to campaigns list -} - -###################### -# ADD=62 Logout all agents fro a campaign -###################### - -if ($ADD==62) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    ΧΕΙΡΙΣΤΕΣ ΠΟΥ ΔΕΠΕΙÎΑΙ ΑΠΟΣΥÎΔΕΜΕÎΟΙ ΑΠΟ ΤΗΠΕΚΣΤΡΑΤΕΙΑ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    ΕκστÏατεία_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_live_agents where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!ΧΕΙΡΙΣΤΗΣLOGOUT!!!!!!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    ΑΠΟΣΥÎΔΕΣΗ ΧΕΙΡΙΣΤΩΠΟΛΟΚΛΗΡΩΘΗΚΕ: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='31'; # go to campaign modification below -} - - -###################### -# ADD=65 delete campaign lead recycle in the system -###################### - -if ($ADD==65) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    ΑÎΑΚΥΚΛΩΣΗΣ ΜΟΛΥΒΔΟΥ ΕΚΣΤΡΑΤΕΙΑΣ ΠΟΥ ΔΕΠΔΙΑΓΡΑΦΕΤΑΙ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    η θέση Ï€Ïέπει να είναι Î¼ÎµÏ„Î±Î¾Ï 1 και 6 χαÏακτήÏων στο μήκος\n"; - echo "
    η καθυστέÏηση Ï€Ïοσπάθειας Ï€Ïέπει να είναι τουλάχιστον 120δευτεÏόλεπτα\n"; - echo "
    οι μέγιστες Ï€Ïοσπάθειες Ï€Ïέπει να είναι από 1 έως 10\n"; - } - else - { - echo "
    ΑÎΑΚΥΚΛΩΣΗΣ ΜΟΛΥΒΔΟΥ ΕΚΣΤΡΑΤΕΙΑΣ ΠΟΥ ΔΙΑΓΡΑΦΕΤΑΙ: $campaign_id - $status - $attempt_delay\n"; - - $stmt="DELETE FROM vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=611 delete list record and all leads within it -###################### - -if ($ADD==611) -{ - echo ""; - - if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) ) - { - echo "
    ΛΙΣΤΑ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lists where list_id='$list_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΑΠΟΜΑΚΡΥÎΣΗ ΚΑΘΟΔΗΓΗΤΩΠΛΙΣΤΑΣ HOPPER ΑΠΟ ΠΑΛΑΙΑ HOPPER ΕΚΣΤΡΑΤΕΙΑ ($list_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    ΑΦΑΙΡΕΣΗ ΤΩΠΜΟΛΥΒΔΩΠΚΑΤΑΛΟΓΩΠΑΠΟ ΤΟΠΠΊÎΑΚΑ VICIDIAL_LIST\n"; - $stmt="DELETE from vicidial_list where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING LIST!!!!|$PHP_AUTH_USER|$ip|list_id='$list_id'|\n"); - fclose($fp); - } - echo "
    ΔΙΑΓΡΑΦΗ ΛΙΣΤΑΣ ΟΛΟΚΛΗΡΩΘΗΚΕ: $list_id\n"; - echo "

    \n"; - } - -$ADD='100'; # go to lists list -} - -###################### -# ADD=6111 delete in-group record -###################### - -if ($ADD==6111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_ingroups < 1) ) - { - echo "
    ΕΙΣ-ΟΜΑΔΑ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_inbound_groups where group_id='$group_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING IN-GROUP!!|$PHP_AUTH_USER|$ip|group_id='$group_id'|\n"); - fclose($fp); - } - echo "
    ΔΙΑΓΡΑΦΗ ΕΙΣ-ΟΜΑΔΑΣ ΟΛΟΚΛΗΡΩΘΗΚΕ: $group_id\n"; - echo "

    \n"; - } - -$ADD='1000'; # go to in-group list -} - -###################### -# ADD=61111 delete remote agent record -###################### - -if ($ADD==61111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) ) - { - echo "
    ΑΠΟΜΑΚΡΥΣΜΕÎΟΣ ΧΕΙΡΙΣΤΗΣ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_remote_agents where remote_agent_id='$remote_agent_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING RMTAGENT!!|$PHP_AUTH_USER|$ip|remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - echo "
    ΔΙΑΓΡΑΦΗ ΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩΠΟΛΟΚΛΗΡΩΘΗΚΕ: $remote_agent_id\n"; - echo "

    \n"; - } - -$ADD='10000'; # go to remote agents list -} - -###################### -# ADD=611111 delete user group record -###################### - -if ($ADD==611111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_user_groups < 1) ) - { - echo "
    ΟΜΑΔΑ ΧΡΗΣΤΗ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_user_groups where user_group='$user_group' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING USRGROUP!!|$PHP_AUTH_USER|$ip|user_group='$user_group'|\n"); - fclose($fp); - } - echo "
    ΔΙΑΓΡΑΦΗ ΟΜΑΔΑΣ ΧΡΗΣΤΩΠΟΛΟΚΛΗΡΩΘΗΚΕ: $user_group\n"; - echo "

    \n"; - } - -$ADD='100000'; # go to user group list -} - -###################### -# ADD=6111111 delete script record -###################### - -if ($ADD==6111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_scripts < 1) ) - { - echo "
    ΔΕΠΔΙΑΓΡΑΦΗΚΕ Ο ΒΟΗΘΟΣ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Script_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_scripts where script_id='$script_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING SCRIPT!!!!|$PHP_AUTH_USER|$ip|script_id='$script_id'|\n"); - fclose($fp); - } - echo "
    ΔΙΑΓΡΑΦΗ ΒΟΗΘΟΥ ΟΛΟΚΛΗΡΩΘΗΚΕ: $script_id\n"; - echo "

    \n"; - } - -$ADD='1000000'; # go to script list -} - - -###################### -# ADD=61111111 delete filter record -###################### - -if ($ADD==61111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) ) - { - echo "
    ΤΟ ΦΙΛΤΡΟ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    To ID φίλτÏου Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING FILTER!!!!|$PHP_AUTH_USER|$ip|lead_filter_id='$lead_filter_id'|\n"); - fclose($fp); - } - echo "
    Η ΔΙΑΓΡΑΦΗ ΤΟΥ ΦΙΛΤΡΟΥ ΟΛΟΚΛΗΡΩΘΗΚΕ: $lead_filter_id\n"; - echo "

    \n"; - } - -$ADD='10000000'; # go to filter list -} - - -###################### -# ADD=611111111 delete call times record -###################### - -if ($ADD==611111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    Ο ΧΡΟÎΟΣ ΚΛΗΣΗΣ ΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το ID χÏόνου κλήσης Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="DELETE from vicidial_call_times where call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    ΟΛΟΚΛΗΡΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΟÎΟΥ ΚΛΗΣΗΣ: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='100000000'; # go to call times list -} - - -###################### -# ADD=6111111111 delete call times record -###################### - -if ($ADD==6111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    Ο ΧΡΟÎΟΣ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣΔΕΠΔΙΑΓΡΑΦΗΚΕ - ΠαÏακαλώ επιστÏέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωÏήσατε\n"; - echo "
    Το ID χÏόνου κλήσης Ï€Ïέπει να είναι τουλάχιστον 2 χαÏακτήÏες\n"; - } - else - { - $stmt="DELETE from vicidial_state_call_times where state_call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT call_time_id,ct_state_call_times from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\" order by call_time_id;"; - $rslt=mysql_query($stmt, $link); - $sct_to_print = mysql_num_rows($rslt); - $sct_list=''; - - $o=0; - while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_ids[$o] = "$rowx[0]"; - $sct_states[$o] = "$rowx[1]"; - $o++; - } - $o=0; - - while ($sct_to_print > $o) { - $sct_states[$o] = eregi_replace("\|$call_time_id\|",'|',$sct_states[$o]); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$sct_states[$o]' where call_time_id='$sct_ids[$o]';"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - echo "ΑπομάκÏυνση Κανόνα Κατάστασης: $sct_ids[$o]
    \n"; - $o++; - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|state_call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    ΟΛΟΚΛΗΡΩΣΗ ΔΙΑΓΡΑΦΗΣ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='1000000000'; # go to call times list -} - - - - - - -###################################################################################################### -###################################################################################################### -####### 3 series, record modification forms -###################################################################################################### -###################################################################################################### - - - - -###################### -# ADD=3 modify user info in the system -###################### - -if ($ADD==3) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_level = $row[4]; - $user_group = $row[5]; - $phone_login = $row[6]; - $phone_pass = $row[7]; - $delete_users = $row[8]; - $delete_user_groups = $row[9]; - $delete_lists = $row[10]; - $delete_campaigns = $row[11]; - $delete_ingroups = $row[12]; - $delete_remote_agents = $row[13]; - $load_leads = $row[14]; - $campaign_detail = $row[15]; - $ast_admin_access = $row[16]; - $ast_delete_phones = $row[17]; - $delete_scripts = $row[18]; - $modify_leads = $row[19]; - $hotkeys_active = $row[20]; - $change_agent_campaign =$row[21]; - $agent_choose_ingroups =$row[22]; - $scheduled_callbacks = $row[24]; - $agentonly_callbacks = $row[25]; - $agentcall_manual = $row[26]; - $vicidial_recording = $row[27]; - $vicidial_transfers = $row[28]; - $delete_filters = $row[29]; - $alter_agent_interface_options =$row[30]; - $closer_default_blended = $row[31]; - $delete_call_times = $row[32]; - $modify_call_times = $row[33]; - -if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) - { - echo "
    Δεν έχετε τις άδειες να Ï„Ïοποποιήσετε αυτόν τον χÏήστη: $row[1]\n"; - } -else - { - echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΧΡΗΣΤΩÎ: $row[1]\n"; - if ($LOGuser_level > 8) - {echo "\n";} - else - { - if ($LOGalter_agent_interface == "1") - {echo "\n";} - else - {echo "\n";} - } - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") ) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($LOGuser_level > 8) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "\n"; - echo "
    ΑÏιθμός ΧÏήστη: $row[1]$NWB#vicidial_users-user$NWE
    Κωδικός:$NWB#vicidial_users-pass$NWE
    ΠλήÏες Ονομα: $NWB#vicidial_users-full_name$NWE
    Επίπεδο ΧÏήστη: $NWB#vicidial_users-user_level$NWE
    Ομάδα ΧÏήστη: $NWB#vicidial_users-user_group$NWE
    Τηλέφωνο ΣÏνδεσης: $NWB#vicidial_users-phone_login$NWE
    Κωδικός ΠÏόσβασης Τηλεφώνου: $NWB#vicidial_users-phone_pass$NWE
    ΕΠΙΛΟΓΕΣ ΕΠΙΦΑÎΕΙΑΣ ΕΡΓΑΣΙΑΣ ΧΕΙΡΙΣΤΩÎ:
    Ο χειÏιστής επιλέγει Εισ.Ομάδες: $NWB#vicidial_users-agent_choose_ingroups$NWE
    ΕνεÏγά Κλειδιά: $NWB#vicidial_users-hotkeys_active$NWE
    ΠÏογÏαμματισμένες Επανακλήσεις: $NWB#vicidial_users-scheduled_callbacks$NWE
    Μόνο του ΧειÏιστή Επανακλήσεις: $NWB#vicidial_users-agentonly_callbacks$NWE
    ΕγχειÏίδιο κλήσεων ΧειÏιστή: $NWB#vicidial_users-agentcall_manual$NWE
    ΚαταγÏαφή: $NWB#vicidial_users-vicidial_recording$NWE
    ΜεταφοÏές: $NWB#vicidial_users-vicidial_transfers$NWE
    Η πιό στενή Ï€Ïοεπιλογή συνδÏασε: $NWB#vicidial_users-closer_default_blended$NWE
    ΕισεÏχόμενες Ομάδες: \n"; - echo "$groups_list"; - echo "$NWB#vicidial_users-closer_campaigns$NWE
    ΕΠΙΛΟΓΈΣ ΕΠΙΦΑÎΕΙΑΣ ΕΡΓΑΣΙΑΣ ΔΙΑΧ:
    Αλλάξτε τις επιλογές επιφάνειας εÏγασίας των χειÏιστών: $NWB#vicidial_users-alter_agent_interface_options$NWE
    ΔιάγÏαψε τους χÏήστες: $NWB#vicidial_users-delete_users$NWE
    ΔιάγÏαψε τις ομάδες χÏηστών: $NWB#vicidial_users-delete_user_groups$NWE
    ΔιάγÏαψε τις Λίστες: $NWB#vicidial_users-delete_lists$NWE
    ΔιάγÏαψε τις εκστÏατείες: $NWB#vicidial_users-delete_campaigns$NWE
    ΔιάγÏαψε τις Εισ-ΟΜΑΔΕΣ: $NWB#vicidial_users-delete_ingroups$NWE
    ΔιάγÏαψε τους ΑπομακÏυσμένους ΧειÏιστές: $NWB#vicidial_users-delete_remote_agents$NWE
    ΔιάγÏαψε τον Βοηθόs: $NWB#vicidial_users-delete_scripts$NWE
    Εισαγωγή Οδηγών: $NWB#vicidial_users-load_leads$NWE
    ΛεπτομέÏειες εκστÏατείας: $NWB#vicidial_users-campaign_detail$NWE
    ΠÏόσβαση AGC Admin: $NWB#vicidial_users-ast_admin_access$NWE
    Το AGC διαγÏάφει τα τηλέφωνα: $NWB#vicidial_users-ast_delete_phones$NWE
    ΤÏοποποίηση Οδηγών: $NWB#vicidial_users-modify_leads$NWE
    Αλλαγή ΕκστÏατείας ΧειÏιστή: $NWB#vicidial_users-change_agent_campaign$NWE
    ΔιαγÏαφή ΦίλτÏουs: $NWB#vicidial_users-delete_filters$NWE
    ΔιαγÏαφή ΧÏόνου Κλήσηςs: $NWB#vicidial_users-delete_call_times$NWE
    ΤÏοποποίηση ΧÏόνου Κλήσηςs: $NWB#vicidial_users-modify_call_times$NWE
    \n"; - - if ($LOGdelete_users > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΟΠΤΟΠΧΡΗΣΤΗ\n"; - } - echo "

    Επιλέξτε εδώ για την σελίδα με τους χÏόνους χÏήσης\n"; - echo "

    Επιλέξτε εδώ για τη κατάσταση του χÏήστη\n"; - echo "

    Πατήστε εδώ για στατιστικά χÏήστη\n"; - echo "

    Επιλέξτε εδώ για τις Επανακλήσεις του χÏήστη που κÏατήθηκαν\n"; - } - -} - - -###################### -# ADD=31 modify campaign info in the system - Detail view -###################### - -if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Basic if not allowed - -if ($ADD==31) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $campaign_rec_exten = $row[22]; - $campaign_recording = $row[23]; - $campaign_rec_filename = $row[24]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $am_message_exten = $row[27]; - $amd_send_to_vmx = $row[28]; - $xferconf_a_dtmf = $row[29]; - $xferconf_a_number = $row[30]; - $xferconf_b_dtmf = $row[31]; - $xferconf_b_number = $row[32]; - $alt_number_dialing = $row[33]; - $scheduled_callbacks = $row[34]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $drop_call_seconds = $row[36]; - $safe_harbor_message = $row[37]; - $safe_harbor_exten = $row[38]; - $display_dialable_count = $row[39]; - $wrapup_seconds = $row[40]; - $wrapup_message = $row[41]; -# $closer_campaigns = $row[42]; - $use_internal_dnc = $row[43]; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΕΚΣΤΡΑΤΕΙΩÎ: $row[0] - Βασική Επισκόπηση"; -echo " | Αναλυτική Επισκόπηση | "; -echo "ΠÏÎ±Î³Î¼Î±Ï„Î¹ÎºÎ¿Ï Î§Ïόνου Οθόνη\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -if (eregi("CLOSER", $campaign_id)) - { - echo "\n"; - } - - - -echo "\n"; -echo "
    ID ΕκστÏατείας: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Ονομα ΕκστÏατείας: $NWB#vicidial_campaigns-campaign_name$NWE
    ΕνεÏγή:$NWB#vicidial_campaigns-active$NWE
    Τηλ.σÏνδ. Στάθμευσης: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
    Ιστο-σελίδα: $NWB#vicidial_campaigns-web_form_address$NWE
    ΕπιτÏέπω τους Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Κατάσταση κλήσης1: $NWB#vicidial_campaigns-dial_status$NWE
    Κατάσταση κλήσης2: $NWB#vicidial_campaigns-dial_status$NWE
    Κατάσταση κλήσης3: $NWB#vicidial_campaigns-dial_status$NWE
    Κατάσταση κλήσης4: $NWB#vicidial_campaigns-dial_status$NWE
    Κατάσταση κλήσης5: $NWB#vicidial_campaigns-dial_status$NWE
    ΣειÏά Λίστας: $NWB#vicidial_campaigns-lead_order$NWE
    ΦίλτÏο ΟδηγοÏ: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Επίπεδο Hopper: $NWB#vicidial_campaigns-hopper_level$NWE
    Αναγκαστική ΕπαναφοÏά του Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    ΕΠΙΠΕΔΟ ΑΥΤΟΜΑΤΗΣ ΚΛΗΣΗΣ: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Επόμενη Κλήση ΧειÏιστή: $NWB#vicidial_campaigns-next_agent_call$NWE
    ΧÏόνος Τοπικής Κλήσης: $NWB#vicidial_campaigns-local_call_time$NWE
    Κλήση εκτός χÏόνου: in seconds$NWB#vicidial_campaigns-dial_timeout$NWE
    ΠÏόθεμα Κλήσης: for 91NXXNXXXXXX value would be 9, for no dial prefix use X$NWB#vicidial_campaigns-dial_prefix$NWE
    CallerID ΕκστÏατείας: $NWB#vicidial_campaigns-campaign_cid$NWE
    ΕκστÏατείας VDAD εσωτ.σÏνδεση: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE
    Επέκταση εκστÏατείας ΗχογÏ: $NWB#vicidial_campaigns-campaign_rec_exten$NWE
    ΗχογÏάφηση εκστÏατείας: $NWB#vicidial_campaigns-campaign_recording$NWE
    Όνομα αÏχείου εκστÏατείας ΗχογÏ: $NWB#vicidial_campaigns-campaign_rec_filename$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Κατά την έναÏξη κλήσης: $NWB#vicidial_campaigns-get_call_launch$NWE
    Μήνυμα Αυτόματου Τηλεφωνητή: $NWB#vicidial_campaigns-am_message_exten$NWE
    AMD στέλνει στο VM: $NWB#vicidial_campaigns-amd_send_to_vmx$NWE
    DTMF ΜεταφοÏάς-Συνδ 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    ΑÏιθμός ΜεταφοÏάς-Συνδ 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    DTMF ΜεταφοÏάς-Συνδ 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    ΑÏιθμός ΜεταφοÏάς-Συνδ 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Κλήση Εναλ ΑÏιθμοÏ: $NWB#vicidial_campaigns-alt_number_dialing$NWE
    ΠÏογÏαμματισμένες Επανακλήσεις: $NWB#vicidial_campaigns-scheduled_callbacks$NWE
    ΔευτεÏ. Εγκαταλ. Κλήσης: $NWB#vicidial_campaigns-drop_call_seconds$NWE
    ΦΩÎΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ: $NWB#vicidial_campaigns-voicemail_ext$NWE
    ΧÏήση μηνÏματος ΑσφαλοÏÏ‚ Φιλοξενίας: $NWB#vicidial_campaigns-safe_harbor_message$NWE
    Εσωτ.ΣÏνδεση ΑσφαλοÏÏ‚ Φιλοξενίας: $NWB#vicidial_campaigns-safe_harbor_exten$NWE
    Î”ÎµÏ…Ï„ÎµÏ Î¤Ï…Î»Î¯Î³Î¼Î±Ï„Î¿Ï‚: $NWB#vicidial_campaigns-wrapup_seconds$NWE
    Μήνυμα Τυλίγματος: $NWB#vicidial_campaigns-wrapup_message$NWE
    ΕσωτεÏικός κατάλογος DNC χÏήσης: $NWB#vicidial_campaigns-use_internal_dnc$NWE
    ΕισεÏχόμενες ομάδες:
    "; - echo " $NWB#vicidial_campaigns-closer_campaigns$NWE
    \n"; - echo "$groups_list"; - echo "
    \n"; - -echo "
    \n"; -echo "
    ΛΙΣΤΕΣ ΣΤΗΠΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ID ΛΙΣΤΑΣΟÎΟΜΑ ΛΙΣΤΑΣΕÎΕΡΓΑ
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Αυτή η εκστÏατεία έχει$active_lists ενεÏγές λίστες και$inactive_lists Μη ενεÏγές λίστες

    \n"; - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - ΑΠΟΚΡΥΨΗ

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - ΕΜΦΑÎΙΣΗ

    "; - } - - - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "Αυτή η εκστÏατεία έχει$hopper_leads >οδηγοί στον hopper κλήσεων<

    \n"; -echo "Πατήστε εδώ για να δείτε ποιοι οδηγοί είναι στον hopper τώÏα

    \n"; -echo "Επιλέξτε εδώ για να δείτε τις κÏατειμένες Επανακλήσεις σε αυτήν την εκστÏατεία

    \n"; -echo "
    \n"; - - - - -echo "
    \n"; -echo "
    ΠΡΟΣΑΡΜΟΣΜΕÎΕΣ ΚΑΤΑΣΤΑΣΕΙΣ ΣΤΗΠΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_campaign_statuses$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ΚΑΤΑΣΤΑΣΗΠΕΡΙΓΡΑΦΗΕΠΙΛΕΞΙΜΟΔΙΑΓΡΑΦΗ
    $rowx[0]$rowx[1]$rowx[2]ΔΙΑΓΡΑΦΗ
    \n"; - -echo "
    ΠΡΟΣΘΗΚΗ ÎΕΑΣ ΠΡΟΣΑΡΜΟΣΜΕÎΗΣ ΚΑΤΑΣΤΑΣΗΣ ΣΤΗΠΕΚΣΤΡΑΤΕΙΑ
    \n"; -echo "\n"; -echo "\n"; -echo "Κατάσταση:   \n"; -echo "ΠεÏιγÏαφή:   \n"; -echo "Επιλέξιμο:   \n"; -echo "
    \n"; - -echo "

    \n"; - - - -echo "
    ΠΡΟΣΑΡΜΟΣΜΕÎΑ ΚΛΕΙΔΙΑ ΣΤΗΠΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_campaign_hotkeys$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ΚΛΕΙΔΙΚΑΤΑΣΤΑΣΗΠΕΡΙΓΡΑΦΗΔΙΑΓΡΑΦΗ
    $rowx[1]$rowx[0]$rowx[2]ΔΙΑΓΡΑΦΗ
    \n"; - -echo "
    ΠΡΟΣΘΗΚΗ ÎΕΟΥ ΠΡΟΣΑΡΜΟΣΜΕÎΟΥ ΚΛΕΙΔΙΟΥ ΕΚΣΤΡΑΤΕΙΑΣ
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Κλειδί:   \n"; -echo "Κατάσταση:   \n"; -echo "
    \n"; -echo "

    \n"; - - - -echo "

    ΑÎΑΚΥΚΛΩΣΗ ΜΟΛΥΒΔΟΥ ΜΕΣΑ ΣΕ ΑΥΤΗΠΤΗΠΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_lead_recycle$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $recycle_to_print = mysql_num_rows($rslt); - $o=0; - while ($recycle_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - -echo "
    ΚΑΤΑΣΤΑΣΗΚΑΘΥΣΤΕΡΗΣΗ ΠΡΟΣΠΑΘΕΙΑΣΜΕΓΙΣΤΟ ΠΡΟΣΠΑΘΕΙΑΣΕÎΕΡΓΑ ΔΙΑΓΡΑΦΗ
    $rowx[2]
    \n"; - echo "\n"; - echo "\n"; - echo "
    ΔΙΑΓΡΑΦΗ
    \n"; - -echo "
    ΠΡΟΣΘΕΣΤΕ ΤΟ ÎΕΟ ΜΟΛΥΒΔΟ ΕΚΣΤΡΑΤΕΙΑΣ ΑÎΑΚΥΚΛΩΣΗΣ
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Κατάσταση:   \n"; -echo "ΚαθυστέÏηση Ï€Ïοσπάθειας: \n"; -echo "Μέγιστο Ï€Ïοσπάθειας: \n"; -echo "
    \n"; - -echo "

    \n"; - -echo "ΑΠΟΣΥÎΔΕΣΗ ΟΛΩΠΤΩΠΧΕΙΡΙΣΤΩΠΑΠΟ ΑΥΤΗΠΤΗΠΕΚΣΤΡΑΤΕΙΑ

    \n"; - -if ($LOGdelete_campaigns > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΗΠΤΗΠΕΚΣΤΡΑΤΕΙΑ\n"; - } - -} - - -###################### -# ADD=34 modify campaign info in the system - Basic View -###################### - -if ($ADD==34) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $display_dialable_count = $row[39]; - -echo "
    MODIFY A CAMPAIGN'S RECORD: $row[0] - Βασική Επισκόπηση | "; -echo "Αναλυτική Επισκόπηση | "; -echo "ΠÏÎ±Î³Î¼Î±Ï„Î¹ÎºÎ¿Ï Î§Ïόνου Οθόνη\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; -echo "
    ID ΕκστÏατείας: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Ονομα ΕκστÏατείας: $NWB#vicidial_campaigns-campaign_name$NWE
    ΕνεÏγή:$NWB#vicidial_campaigns-active$NWE
    Τηλ.σÏνδ. Στάθμευσης: $row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE
    Ιστο-σελίδα: $row[11]$NWB#vicidial_campaigns-web_form_address$NWE
    ΕπιτÏέπω τους Closers: $row[12] $NWB#vicidial_campaigns-allow_closers$NWE
    Κατάσταση κλήσης1: $NWB#vicidial_campaigns-dial_status$NWE
    Κατάσταση κλήσης2: $NWB#vicidial_campaigns-dial_status$NWE
    Κατάσταση κλήσης3: $NWB#vicidial_campaigns-dial_status$NWE
    Κατάσταση κλήσης4: $NWB#vicidial_campaigns-dial_status$NWE
    Κατάσταση κλήσης5: $NWB#vicidial_campaigns-dial_status$NWE
    ΣειÏά Λίστας: $NWB#vicidial_campaigns-lead_order$NWE
    ΦίλτÏο ΟδηγοÏ: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Επίπεδο Hopper: $NWB#vicidial_campaigns-hopper_level$NWE
    Αναγκαστική ΕπαναφοÏά του Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    ΕΠΙΠΕΔΟ ΑΥΤΟΜΑΤΗΣ ΚΛΗΣΗΣ: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Script: $script_id
    Κατά την έναÏξη κλήσης: $get_call_launch
    \n"; - -echo "
    \n"; -echo "
    ΛΙΣΤΕΣ ΣΤΗΠΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ID ΛΙΣΤΑΣΟÎΟΜΑ ΛΙΣΤΑΣΕÎΕΡΓΑ
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Αυτή η εκστÏατεία έχει$active_lists ενεÏγές λίστες και$inactive_lists Μη ενεÏγές λίστες

    \n"; - - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - ΑΠΟΚΡΥΨΗ

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - ΕΜΦΑÎΙΣΗ

    "; - } - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "Αυτή η εκστÏατεία έχει$hopper_leads >οδηγοί στον hopper κλήσεων<

    \n"; -echo "Πατήστε εδώ για να δείτε ποιοι οδηγοί είναι στον hopper τώÏα

    \n"; -echo "Επιλέξτε εδώ για να δείτε τις κÏατειμένες Επανακλήσεις σε αυτήν την εκστÏατεία

    \n"; -echo "
    \n"; - -echo "
    \n"; - -echo "ΑΠΟΣΥÎΔΕΣΗ ΟΛΩΠΤΩΠΧΕΙΡΙΣΤΩΠΑΠΟ ΑΥΤΗΠΤΗΠΕΚΣΤΡΑΤΕΙΑ

    \n"; - - -if ($LOGdelete_campaigns > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΗΠΤΗΠΕΚΣΤΡΑΤΕΙΑ\n"; - } - - -} - - -###################### -# ADD=311 modify list info in the system -###################### - -if ($ADD==311) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $campaign_id = $row[2]; - $active = $row[3]; - - # grab names of global statuses and statuses in the selected campaign - $stmt="SELECT * from vicidial_statuses order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $Cstatuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($Cstatuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - # end grab status names - - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΛΙΣΤΑΣ: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID Λίστας: $row[0]$NWB#vicidial_lists-list_id$NWE
    Ονομα Λίστας: $NWB#vicidial_lists-list_name$NWE
    ΕκστÏατεία: $NWB#vicidial_lists-campaign_id$NWE
    ΕνεÏγή:$NWB#vicidial_lists-active$NWE
    ΕΠΑÎΑΦΟΡΑ ΚΑΤΑΣΤΑΣΗΣ ΚΛΗΣΗΣ ΟΔΗΓΟΥ ΓΙΑ ΤΗΠΛΙΣΤΑ: $NWB#vicidial_lists-reset_list$NWE
    \n"; - -echo "
    \n"; -echo "
    ΚΑΤΑΣΤΑΣΕΙΣ ΣΤΗΠΛΙΣΤΑ:
    \n"; -echo "\n"; -echo "\n"; - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by status,called_since_last_reset order by status,called_since_last_reset"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - $o=0; - if ($lead_list['count'] > 0) - { - while (list($dispo,) = each($lead_list[$since_reset])) - { - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($dispo == 'CBHOLD') - { - $CLB=""; - $CLE=""; - } - else - { - $CLB=''; - $CLE=''; - } - - echo "\n"; - $o++; - } - } - -echo "\n"; -echo "\n"; - -echo "
    ΚΑΤΑΣΤΑΣΗΟÎΟΜΑ ΚΑΤΑΣΤΑΣΗΣΚΛΗΘΕÎΤΑΜΗ ΚΛΗΘΕÎΤΑ
    $CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
    ΥΠΟΣΥÎΟΛΑ$lead_list[Y_count]$lead_list[N_count]
    ΣΥÎΟΛΙΚΑ$lead_list[count]

    \n"; -unset($lead_list); - - - - - -echo "
    \n"; -echo "
    ΖΩÎΕΣ ΩΡΑΣ ΣΤΗΠΛΙΣΤΑ:
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT gmt_offset_now,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by gmt_offset_now,called_since_last_reset order by gmt_offset_now,called_since_last_reset"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $plus='+'; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - if ($lead_list['count'] > 0) - { - while (list($tzone,) = each($lead_list[$since_reset])) - { - $LOCALzone=3600 * $tzone; - $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); - - if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} - else {$DISPtzone = "$tzone";} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - } - -echo "\n"; -echo "\n"; - -echo "
    GMT OFFSET (τοπικός χÏόνος)ΚΛΗΘΕÎΤΑΜΗ ΚΛΗΘΕÎΤΑ
    ".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
    ΥΠΟΣΥÎΟΛΑ$lead_list[Y_count]$lead_list[N_count]
    ΣΥÎΟΛΙΚΑ$lead_list[count]

    \n"; -unset($lead_list); - - - - - - - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_count,count(*) from vicidial_list where list_id='$list_id' group by status,called_count order by status,called_count"; - $rslt=mysql_query($stmt, $link); - $status_called_to_print = mysql_num_rows($rslt); - - $o=0; - $sts=0; - $first_row=1; - $all_called_first=1000; - $all_called_last=0; - while ($status_called_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $leads_in_list = ($leads_in_list + $rowx[2]); - $count_statuses[$o] = "$rowx[0]"; - $count_called[$o] = "$rowx[1]"; - $count_count[$o] = "$rowx[2]"; - $all_called_count[$rowx[1]] = ($all_called_count[$rowx[1]] + $rowx[2]); - - if ( (strlen($status[$sts]) < 1) or ($status[$sts] != "$rowx[0]") ) - { - if ($first_row) {$first_row=0;} - else {$sts++;} - $status[$sts] = "$rowx[0]"; - $status_called_first[$sts] = "$rowx[1]"; - if ($status_called_first[$sts] < $all_called_first) {$all_called_first = $status_called_first[$sts];} - } - $leads_in_sts[$sts] = ($leads_in_sts[$sts] + $rowx[2]); - $status_called_last[$sts] = "$rowx[1]"; - if ($status_called_last[$sts] > $all_called_last) {$all_called_last = $status_called_last[$sts];} - - $o++; - } - - - - -echo "
    \n"; -echo "
    ΜΕΤΡΗΣΗ ΚΛΗΣΕΩΠΣΤΗΠΛΙΣΤΑ:
    \n"; -echo "\n"; -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - - $sts=0; - $statuses_called_to_print = count($status); - while ($statuses_called_to_print > $sts) - { - $Pstatus = $status[$sts]; - if (eregi("1$|3$|5$|7$|9$", $sts)) - {$bgcolor='bgcolor="#B9CBFD"'; $AB='bgcolor="#9BB9FB"';} - else - {$bgcolor='bgcolor="#9BB9FB"'; $AB='bgcolor="#B9CBFD"';} -# echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n"; -# echo "$status[$sts]|"; - echo ""; - - $first = $all_called_first; - while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $sts)) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - else - { - if (eregi("0$|2$|4$|6$|8$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - - $called_printed=0; - $o=0; - while ($status_called_to_print > $o) - { - if ( ($count_statuses[$o] == "$Pstatus") and ($count_called[$o] == "$first") ) - { - $called_printed++; - echo ""; - } - - - $o++; - } - if (!$called_printed) - {echo "";} - $first++; - } - echo "\n\n"; - - $sts++; - } - -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - -echo "
    ΚΑΤΑΣΤΑΣΗΟÎΟΜΑ ΚΑΤΑΣΤΑΣΗΣ$firstΥΠΟΣΥÎΟΛΟ
    $Pstatus$statuses_list[$Pstatus] $count_count[$o]  $leads_in_sts[$sts]
    ΣΥÎΟΛΙΚΑ$all_called_count[$first]$leads_in_list

    \n"; - - - - - -echo "
    \n"; - -if ($LOGdelete_lists > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΗ ΤΗΠΛΙΣΤΑ\n"; - } - -} - - - -###################### -# ADD=3111 modify in-group info in the system -###################### - -if ($ADD==3111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = $row[4]; - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - $script_id = $row[8]; - $get_call_launch = $row[9]; - $xferconf_a_dtmf = $row[10]; - $xferconf_a_number = $row[11]; - $xferconf_b_dtmf = $row[12]; - $xferconf_b_number = $row[13]; - $drop_call_seconds = $row[14]; - $drop_message = $row[15]; - $drop_exten = $row[16]; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΟΜΑΔΩÎ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -echo "\n"; -echo "
    ID Ομάδας: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
    Ονομα Ομάδας: $NWB#vicidial_inbound_groups-group_name$NWE
    ΧÏώμα Ομάδας: $NWB#vicidial_inbound_groups-group_color$NWE
    ΕνεÏγή:$NWB#vicidial_inbound_groups-active$NWE
    Ιστο-σελίδα: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Επόμενη Κλήση ΧειÏιστή: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    ΜπÏοστινή Οθόνη: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Κατά την έναÏξη κλήσης: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    DTMF ΜεταφοÏάς-Συνδ 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    ΑÏιθμός ΜεταφοÏάς-Συνδ 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    DTMF ΜεταφοÏάς-Συνδ 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    ΑÏιθμός ΜεταφοÏάς-Συνδ 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    ΔευτεÏ. Εγκαταλ. Κλήσης: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
    ΦΩÎΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    ΧÏήση μηνÏματος Εγκατάλειψης: $NWB#vicidial_inbound_groups-drop_message$NWE
    Εσωτ. ΣÏνδεση Εγκατάλειψης: $NWB#vicidial_inbound_groups-drop_exten$NWE
    \n"; - -echo "

    \n"; - -echo "
    \n"; - -if ($LOGdelete_ingroups > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΗΠΤΗΠΕΙΣ-ΟΜΑΔΑ\n"; - } - -} - - - -###################### -# ADD=31111 modify remote agents info in the system -###################### - -if ($ADD==31111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΚΑΤΑΧΩΡΗΣΗΣ ΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩÎ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID ΧÏήστη Ξεκινά: (μόνο αÏιθμοί, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    ΑÏιθμός ΓÏαμμών: (μόνο αÏιθμοί)$NWB#vicidial_remote_agents-number_of_lines$NWE
    IP Διακομιστή: $NWB#vicidial_remote_agents-server_ip$NWE
    ΕξωτεÏική Τηλ. ΣÏνδεση: (ο αÏιθμός που κλήθηκε από το πλάνο κλήσεων για να καλέσει τους χειÏιστές)$NWB#vicidial_remote_agents-conf_exten$NWE
    Κατάσταση:$NWB#vicidial_remote_agents-status$NWE
    ΕκστÏατεία: $NWB#vicidial_remote_agents-campaign_id$NWE
    ΕισεÏχόμενες Ομάδες: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "ΣΗΜΕΙΩΣΗ: ΜποÏεί να διαÏκέσει και 30 δευτεÏόλεπτα για να καταχωÏηθοÏν οι αλλαγές της οθόνης\n"; - - -if ($LOGdelete_remote_agents > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΟΠΤΟΠΑΠΟΜΑΚΡΥΣΜΕÎΟ ΧΕΙΡΙΣΤΗ\n"; - } - -} - - -###################### -# ADD=311111 modify user group info in the system -###################### - -if ($ADD==311111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[0]; - $group_name = $row[1]; -echo ""; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΚΑΤΑΧΩΡΗΣΗΣ ΟΜΑΔΑΣ ΧΡΗΣΤΩÎ\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Ομάδα: (όχι κενά ή στίξη)$NWB#vicidial_user_groups-user_group$NWE
    ΠεÏιγÏαφή: (πεÏιγÏαφή ομάδας)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -if ($LOGdelete_user_groups > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΗΠΤΗΠΟΜΑΔΑ ΧΡΗΣΤΩÎ\n"; - } - -} - - -###################### -# ADD=3111111 modify script info in the system -###################### - -if ($ADD==3111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $script_name = $row[1]; - $script_comments = $row[2]; - $script_text = $row[3]; - $active = $row[4]; -echo ""; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΤΕ ΕÎΑΠΒΟΗΘΟ\n"; -echo "\n"; -echo "\n"; -echo "
    Ταυτότητα χειÏογÏάφων:: $script_id$NWB#vicidial_scripts-script_name$NWE
    Όνομα χειÏογÏάφων: (τίτλος του βοηθοÏ)$NWB#vicidial_scripts-script_name$NWE
    Σχόλια χειÏόγÏαφου: $NWB#vicidial_scripts-script_comments$NWE
    ΕνεÏγή:$NWB#vicidial_scripts-active$NWE
    Κείμενο χειÏόγÏαφου:

    ΠÏοεπισκόπιση ΒοηθοÏ
    $NWB#vicidial_scripts-script_text$NWE
    \n"; - -if ($LOGdelete_scripts > 0) - { - echo "

    ΔΙΑΓΡΑΨΕ ΑΥΤΟΠΤΟΠΒΟΗΘΟ\n"; - } - -} - - -###################### -# ADD=31111111 modify filter info in the system -###################### - -if ($ADD==31111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $lead_filter_name = $row[1]; - $lead_filter_comments = $row[2]; - $lead_filter_sql = $row[3]; -echo ""; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΕÎΟΣ ΦΙΛΤΡΟΥ\n"; -echo "\n"; -echo "\n"; -echo "
    ID ΦίλτÏου: $lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Όνομα ΦίλτÏου: (σÏντομη πεÏιγÏαφή του φίλτÏου)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Σχόλια ΦίλτÏου: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    SQL ΦίλτÏου: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - -echo "

    "; -echo "
    ΕΛΕΓΧΟΣ ΣΤΗΠΕΚΣΤΡΑΤΕΙΑ:
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -if ($LOGdelete_filters > 0) - { - echo "

    ΔΙΑΓΡΑΦΗ ΤΟΥ ΦΙΛΤΡΟΥ\n"; - } - -} - - -###################### -# ADD=321111111 modify call time definition info in the system -###################### - -if ($ADD==321111111) -{ -if ($LOGmodify_call_times==1) -{ - -if ( ($stage=="ADD") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - if (eregi("\|$",$ct_state_call_times)) - {$ct_state_call_times = "$ct_state_call_times$state_rule\|";} - else - {$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";} - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "ΠÏοσθήκη Κανόνα Κατάστασης: $state_rule
    \n"; - } -if ( ($stage=="REMOVE") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - $ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "ΑπομάκÏυνση Κανόνα Κατάστασης: $state_rule
    \n"; - } - -$ADD=311111111; -} -else -{ -echo "Δεν έχετε το δικαίωμα για να δείτε την σελίδα. ΠαÏακαλώ επιστÏέψτε."; -} - -} - - -###################### -# ADD=311111111 modify call time definition info in the system -###################### - -if ($ADD==311111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -$ct_srs=1; -$b=0; -$srs_SQL =''; -if (strlen($ct_state_call_times)>2) - { - $state_rules = explode('|',$ct_state_call_times); - $ct_srs = ((count($state_rules)) - 1); - } -echo "\n"; -echo "\n"; -while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>0) - { - $stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - echo "\n"; - $srs_SQL .= "'$state_rules[$b]',"; - $srs_state_SQL .= "'$row[0]',"; - } - $b++; - } -if (strlen($srs_SQL)>2) - { - $srs_SQL = "$srs_SQL''"; - $srs_state_SQL = "$srs_state_SQL''"; - $srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)"; - } -else - {$srs_SQL='';} -$stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;"; -$rslt=mysql_query($stmt, $link); -$sct_to_print = mysql_num_rows($rslt); -$sct_list=''; - -$o=0; -while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_list .= "\n"; - $o++; -} -echo "\n"; -echo "\n"; - -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $call_time_name = $row[1]; - $call_time_comments = $row[2]; - $ct_default_start = $row[3]; - $ct_default_stop = $row[4]; - $ct_sunday_start = $row[5]; - $ct_sunday_stop = $row[6]; - $ct_monday_start = $row[7]; - $ct_monday_stop = $row[8]; - $ct_tuesday_start = $row[9]; - $ct_tuesday_stop = $row[10]; - $ct_wednesday_start = $row[11]; - $ct_wednesday_stop = $row[12]; - $ct_thursday_start = $row[13]; - $ct_thursday_stop = $row[14]; - $ct_friday_start = $row[15]; - $ct_friday_stop = $row[16]; - $ct_saturday_start = $row[17]; - $ct_saturday_stop = $row[18]; - $ct_state_call_times = $row[19]; - -echo ""; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΧΡΟÎΟΥ ΚΛΗΣΗΣ\n"; -echo "\n"; -echo "\n"; -echo "
    ID ΧÏόνου Κλήσης: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    Ονομα ΧÏόνου Κλήσης: (σÏντομη πεÏιγÏαφή του χÏόνου κλήσης)$NWB#vicidial_call_times-call_time_name$NWE
    Σχόλια ΧÏόνου Κλήσης: $NWB#vicidial_call_times-call_time_comments$NWE
    ΠÏοκαθοÏσμένη Εκκίνηση ΠÏοκαθοÏσμένη ΠαÏση: $NWB#vicidial_call_times-ct_default_start$NWE
    ΚυÏιακή Εκκίνηση: ΚυÏιακή ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    ΔευτέÏα Εκκίνηση: ΔευτέÏα ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    ΤÏίτη Εκκίνηση: ΤÏίτη ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Wednesday Start: ΤετάÏτη ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Πέμπτη Εκκίνηση: Πέμπτη ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    ΠαÏασκευή Εκκίνηση: ΠαÏασκευή ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Σάββατο Εκκίνηση: Σάββατο ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    ΕνεÏγοί ΟÏισμοί ΧÏόνου Κλήσης Κατάστασης για αυτή την ΕγγÏαφή:  
    $state_rules[$b] - REMOVE $row[0] - $row[1]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Add state call time rule:


    \n"; -echo "ΕΚΣΤΑΤΕΙΕΣ ΠΟΥ ΧΡΗΣΙΜΟΠΟΙΟΥΠΑΥΤΟ ΤΟΠΧΡΟÎΟ ΚΛΗΣΗΣ:
    \n"; -echo "\n"; - - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - $CT_camp_id = $row[1]; - $CT_camp_name = $row[2]; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    ΔΙΑΓΡΑΦΗ ΟΡΙΣΜΟΥ ΧΡΟÎΟΥ ΚΛΗΣΗΣ\n"; - } -} -else -{ -echo "Δεν έχετε το δικαίωμα για να δείτε την σελίδα. ΠαÏακαλώ επιστÏέψτε."; -} - -} - - -###################### -# ADD=3111111111 modify state call time definition info in the system -###################### - -if ($ADD==3111111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $state_call_time_state =$row[1]; - $call_time_name = $row[2]; - $call_time_comments = $row[3]; - $ct_default_start = $row[4]; - $ct_default_stop = $row[5]; - $ct_sunday_start = $row[6]; - $ct_sunday_stop = $row[7]; - $ct_monday_start = $row[8]; - $ct_monday_stop = $row[9]; - $ct_tuesday_start = $row[10]; - $ct_tuesday_stop = $row[11]; - $ct_wednesday_start = $row[12]; - $ct_wednesday_stop = $row[13]; - $ct_thursday_start = $row[14]; - $ct_thursday_stop = $row[15]; - $ct_friday_start = $row[16]; - $ct_friday_stop = $row[17]; - $ct_saturday_start = $row[18]; - $ct_saturday_stop = $row[19]; - -echo ""; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ
    \n"; -echo "\n"; -echo "\n"; -echo "
    ID ΧÏόνου Κλήσης: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: $NWB#vicidial_call_times-state_call_time_state$NWE
    Ονομα ΧÏόνου Κλήσης Κατάτασης: (σÏντομη πεÏιγÏαφή του χÏόνου κλήσης)$NWB#vicidial_call_times-call_time_name$NWE
    Σχόλια ΧÏόνου Κλήσης Κατάστασης: $NWB#vicidial_call_times-call_time_comments$NWE
    ΠÏοκαθοÏσμένη Εκκίνηση ΠÏοκαθοÏσμένη ΠαÏση: $NWB#vicidial_call_times-ct_default_start$NWE
    ΚυÏιακή Εκκίνηση: ΚυÏιακή ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    ΔευτέÏα Εκκίνηση: ΔευτέÏα ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    ΤÏίτη Εκκίνηση: ΤÏίτη ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Wednesday Start: ΤετάÏτη ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Πέμπτη Εκκίνηση: Πέμπτη ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    ΠαÏασκευή Εκκίνηση: ΠαÏασκευή ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Σάββατο Εκκίνηση: Σάββατο ΠαÏση: $NWB#vicidial_call_times-ct_sunday_start$NWE


    \n"; -echo "ΧΡΟÎΟΙ ΚΛΗΣΕΩΠΠΟΥ ΧΡΗΣΙΜΟΠΟΙΟΥΠΑΥΤΟ ΤΟΠΧΡΟÎΟ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ:
    \n"; -echo "\n"; - - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    ΔΙΑΓΡΑΦΗ ΟΡΙΣΜΟΥ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ\n"; - } - -} -else -{ -echo "Δεν έχετε το δικαίωμα για να δείτε την σελίδα. ΠαÏακαλώ επιστÏέψτε."; -} - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo "
    \n"; -echo ""; - -echo "
    ΑÎΑΖΗΤΗΣΗ ΧΡΗΣΤΗ\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    ΑÏιθμός ΧÏήστη:
    ΠλήÏες Ονομα:
    Επίπεδο ΧÏήστη:
    Ομάδα ΧÏήστη:
    \n"; - -} - -###################### -# ADD=66 user search results -###################### - -if ($ADD==66) -{ -echo "
    \n"; - echo ""; - - $SQL = ''; - if ($user) {$SQL .= " user LIKE \"%$user%\" and";} - if ($full_name) {$SQL .= " full_name LIKE \"%$full_name%\" and";} - if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";} - if ($user_group) {$SQL .= " user_group = '$user_group' and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from vicidial_users $SQL order by full_name desc;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ΑÎΑΖΗΤΗΣΗ ΑΠΟΤΕΛΕΣΜΑΤΩÎ:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]ΤΡΟΠΟΠΟΙΗΣΗ | ΣΤΑΤΙΣΤΙΚΑ | ΚΑΤΑΣΤΑΣΗ | TIME
    \n"; - -} - - -###################################################################################################### -###################################################################################################### -####### 8 series, Callback lists -###################################################################################################### -###################################################################################################### - -###################### -# ADD=8 find all callbacks on hold by a User -###################### -if ($ADD==8) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    USER CALLBACK HOLD LISTINGS: $user\n"; -$ADD='82'; -} - -###################### -# ADD=81 find all callbacks on hold within a Campaign -###################### -if ($ADD==81) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; -$ADD='82'; -} - -###################### -# ADD=811 find all callbacks on hold within a List -###################### -if ($ADD==811) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    LIST CALLBACK HOLD LISTINGS: $list_id\n"; -$ADD='82'; -} - -###################### -# ADD=82 display all callbacks on hold -###################### -if ($ADD==82) -{ -echo "
    \n"; -echo "
    \n"; -echo "\n"; - - $o=0; - while ($cb_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    LEADLISTCAMPAIGNENTRY ΗΜΕΡΑCALLBACK ΗΜΕΡΑUSERRECIPIENTΚΑΤΑΣΤΑΣΗ
    $row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 0 series, displays and searches -###################################################################################################### -###################################################################################################### - -###################### -# ADD=0 display all active users -###################### -if ($ADD==0) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users order by full_name"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ΛΙΣΤΕΣ ΧΡΗΣΤΗ:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]ΤΡΟΠΟΠΟΙΗΣΗ | ΣΤΑΤΙΣΤΙΚΑ | ΚΑΤΑΣΤΑΣΗ | TIME
    \n"; -} - -###################### -# ADD=10 display all campaigns -###################### -if ($ADD==10) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ΕÎΤΑΓΜΕÎΕΣ ΕΚΣΤΡΑΤΕΙΕΣ:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3]$row[4]$row[5] $row[6]$row[7]  Î¤Î¡ÎŸÎ ÎŸÎ ÎŸÎ™Î—ΣΗ
    \n"; -} - - -###################### -# ADD=100 display all lists -###################### -if ($ADD==100) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists order by list_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ΕÎΤΑΓΜΕÎΕΣ ΛΙΣΤΕΣ:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  Î¤Î¡ÎŸÎ ÎŸÎ ÎŸÎ™Î—ΣΗ
    \n"; -} - - - -###################### -# ADD=1000 display all inbound groups -###################### -if ($ADD==1000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ΕÎΤΑΓΜΕÎΕΣ ΕΙΣΕΡΧΟΜΕÎΕΣ ΟΜΑΔΕΣ:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[5]  Î¤Î¡ÎŸÎ ÎŸÎ ÎŸÎ™Î—ΣΗ
    \n"; -} - - -###################### -# ADD=10000 display all remote agents -###################### -if ($ADD==10000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ΕÎΤΑΓΜΕÎΟΙ ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]ΤΡΟΠΟΠΟΙΗΣΗ
    \n"; -} - - -###################### -# ADD=100000 display all user groups -###################### -if ($ADD==100000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups order by user_group"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ΕÎΤΑΓΜΕÎΕΣ ΟΜΑΔΕΣ ΧΡΗΣΤΗ:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]ΤΡΟΠΟΠΟΙΗΣΗ
    \n"; -} - - -###################### -# ADD=1000000 display all scripts -###################### -if ($ADD==1000000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ΛΙΣΤΕΣ ΒΟΗΘΩÎ:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]ΤΡΟΠΟΠΟΙΗΣΗ
    \n"; -} - - -###################### -# ADD=10000000 display all filters -###################### -if ($ADD==10000000) -{ -echo "\n";echo "\n";?> -
    -
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    ΛΙΣΤΕΣ ΟΔΗΓΟΥ ΦΙΛΤΡΟΥ:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]ΤΡΟΠΟΠΟΙΗΣΗ
    \n"; -} - - -###################### -# ADD=100000000 display all call times -###################### -if ($ADD==100000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    ΛΙΣΤΕΣ ΧΡΟÎΟΥ ΚΛΗΣΗΣ:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[4] ΤΡΟΠΟΠΟΙΗΣΗ
    \n"; -} - -###################### -# ADD=1000000000 display all state call times -###################### -if ($ADD==1000000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_state_call_times order by state_call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    ΛΙΣΤΕΣ ΧΡΟÎΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3] $row[4] ΤΡΟΠΟΠΟΙΗΣΗ
    \n"; -} - - - - - -echo "
    \n"; - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds"; -echo "             ΕΚΔΟΣΗ: $version"; -echo "             ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; - - -?> - - -
    - - - -1) - { - $g=0; - $p='13'; - $GMT_gmt[0] = ''; - $GMT_hour[0] = ''; - $GMT_day[0] = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $pmin=(gmdate("i", time() + $pzone)); - $phour=( (gmdate("G", time() + $pzone)) * 100); - $pday=gmdate("w", time() + $pzone); - $tz = sprintf("%.2f", $p); - $GMT_gmt[$g] = "$tz"; - $GMT_day[$g] = "$pday"; - $GMT_hour[$g] = ($phour + $pmin); - $p = ($p - 0.25); - $g++; - } - - $stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $Gct_default_start = "$rowx[3]"; - $Gct_default_stop = "$rowx[4]"; - $Gct_sunday_start = "$rowx[5]"; - $Gct_sunday_stop = "$rowx[6]"; - $Gct_monday_start = "$rowx[7]"; - $Gct_monday_stop = "$rowx[8]"; - $Gct_tuesday_start = "$rowx[9]"; - $Gct_tuesday_stop = "$rowx[10]"; - $Gct_wednesday_start = "$rowx[11]"; - $Gct_wednesday_stop = "$rowx[12]"; - $Gct_thursday_start = "$rowx[13]"; - $Gct_thursday_stop = "$rowx[14]"; - $Gct_friday_start = "$rowx[15]"; - $Gct_friday_stop = "$rowx[16]"; - $Gct_saturday_start = "$rowx[17]"; - $Gct_saturday_stop = "$rowx[18]"; - $Gct_state_call_times = "$rowx[19]"; - - $ct_states = ''; - $ct_state_gmt_SQL = ''; - $ct_srs=0; - $b=0; - if (strlen($Gct_state_call_times)>2) - { - $state_rules = explode('|',$Gct_state_call_times); - $ct_srs = ((count($state_rules)) - 2); - } - while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>1) - { - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Gstate_call_time_id = "$row[0]"; - $Gstate_call_time_state = "$row[1]"; - $Gsct_default_start = "$row[4]"; - $Gsct_default_stop = "$row[5]"; - $Gsct_sunday_start = "$row[6]"; - $Gsct_sunday_stop = "$row[7]"; - $Gsct_monday_start = "$row[8]"; - $Gsct_monday_stop = "$row[9]"; - $Gsct_tuesday_start = "$row[10]"; - $Gsct_tuesday_stop = "$row[11]"; - $Gsct_wednesday_start = "$row[12]"; - $Gsct_wednesday_stop = "$row[13]"; - $Gsct_thursday_start = "$row[14]"; - $Gsct_thursday_stop = "$row[15]"; - $Gsct_friday_start = "$row[16]"; - $Gsct_friday_stop = "$row[17]"; - $Gsct_saturday_start = "$row[18]"; - $Gsct_saturday_stop = "$row[19]"; - - $ct_states .="'$Gstate_call_time_state',"; - - $r=0; - $state_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday τοπικός χÏόνος - { - if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday τοπικός χÏόνος - { - if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday τοπικός χÏόνος - { - if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday τοπικός χÏόνος - { - if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday τοπικός χÏόνος - { - if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday τοπικός χÏόνος - { - if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday τοπικός χÏόνος - { - if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - $state_gmt = "$state_gmt'99'"; - $ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) "; - } - - $b++; - } - if (strlen($ct_states)>2) - { - $ct_states = eregi_replace(",$",'',$ct_states); - $ct_statesSQL = "and state NOT IN($ct_states)"; - } - else - { - $ct_statesSQL = ""; - } - - $r=0; - $default_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday τοπικός χÏόνος - { - if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday τοπικός χÏόνος - { - if (($Gct_monday_start==0) and ($Gct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday τοπικός χÏόνος - { - if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday τοπικός χÏόνος - { - if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday τοπικός χÏόνος - { - if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday τοπικός χÏόνος - { - if (($Gct_friday_start==0) and ($Gct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday τοπικός χÏόνος - { - if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - - $default_gmt = "$default_gmt'99'"; - $all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL"; - - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and ($all_gmtSQL) $fSQL"; - #$DB=1; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rslt_rows = mysql_num_rows($rslt); - if ($rslt_rows) - { - $rowx=mysql_fetch_row($rslt); - $active_leads = "$rowx[0]"; - } - else {$active_leads = '0';} - - echo "Αυτή η εκστÏατεία έχει$active_leads οδηγοί που καλοÏντε στις λίστες\n"; - } - else - { - echo "δεν έχουν επιλεχθεί ενεÏγές λίστες για την εκστÏατεία\n"; - } - } -else - { - echo "δεν έχουν επιλεχθεί ενεÏγές λίστες για την εκστÏατεία\n"; - } -##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ### -} -?> diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/admin_modify_lead.php b/agc_2-X/trunk/LANG_admin/vicidial_el/admin_modify_lead.php deleted file mode 100644 index 73160d10..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/admin_modify_lead.php +++ /dev/null @@ -1,476 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} -if (isset($_GET["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"];} - elseif (isset($_POST["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];} -if (isset($_GET["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"];} - elseif (isset($_POST["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];} -if (isset($_GET["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"];} - elseif (isset($_POST["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["CBuser"])) {$CBuser=$_GET["CBuser"];} - elseif (isset($_POST["CBuser"])) {$CBuser=$_POST["CBuser"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -ΔΙΑΧΕΙΡΙΣΗ: ΤÏοποποίηση Î¿Î´Î·Î³Î¿Ï - - -
    - - 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "οι πληÏοφοÏίες Ï„Ïοποποιήθηκαν

    \n"; - echo "\n"; - - if ( ($dispo != $status) and ($dispo == 'CBHOLD') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status='ACTIVE';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - if ( ($dispo != $status) and ($dispo == 'CALLBK') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - - if ( ($dispo != $status) and ($status == 'DNC') ) - { - ### add lead to the internal DNC list - $stmt="INSERT INTO vicidial_dnc (phone_number) values('" . mysql_real_escape_string($phone_number) . "');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    Lead added to DNC List: $lead_id - $phone_number
    \n"; - } - -} -else -{ - - if ($CBchangeUSERtoANY == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set recipient='ANYONE' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to ANYONE
    \n"; - } - if ($CBchangeUSERtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record user changed to $CBuser
    \n"; - } - if ($CBchangeANYtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "',recipient='USERONLY' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to USERONLY, user: $CBuser
    \n"; - } - - - - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $dispo = "$row[3]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    ΠληÏοφοÏίες Κλήσης: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Lead ID: $lead_id
    Fronter: $tsr     ID Λίστας: $list_id
    Ονομα:   \n"; - echo " Επίθετο:
    ΔιεÏθυνση 1 :
    ΔιεÏθυνση 2 :
    ΔιεÏθυνση 3 :
    Πόλη :
    ΚÏάτος:   \n"; - echo "Ταχ.Κωδ.
    ΧώÏα :
    Εναλ Τηλέφωνο :
    Ασφάλεια :
    Σχόλια :
    ΤεÏματισμός:
    \n"; - echo "


    \n"; - - if ( ($dispo == 'CALLBK') or ($dispo == 'CBHOLD') ) - { - ### find any vicidial_callback records for this lead - $stmt="select * from vicidial_callbacks where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $CB_to_print = mysql_num_rows($rslt); - $rowx=mysql_fetch_row($rslt); - - if ($CB_to_print>0) - { - if ($rowx[9] == 'USERONLY') - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    \n"; - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - else - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - } - else - { - echo "
    No Callback records found
    \n"; - } - } - - - - - - - } - else - { - echo "ΑΠΟΤΥΧΙΑ ψαξίματος καθοδήγησης για lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - -echo "

    \n"; - -echo "
    \n"; - -echo "Κλήσεις για αυτόν τον οδηγό:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS TSRΕΚΣΤΡΑΤΕΙΑ LIST LEAD
    $row[4] $row[7] $row[8] $row[11] $row[3] $row[2] $row[1]
    \n"; - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/admin_search_lead.php b/agc_2-X/trunk/LANG_admin/vicidial_el/admin_search_lead.php deleted file mode 100644 index c1903336..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/admin_search_lead.php +++ /dev/null @@ -1,224 +0,0 @@ - LICENSE: GPLv2 -### -### AST GUI database administration search for lead info -### admin_modify_lead.php -# -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead -# -# changes: -# 60620-1055 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - Changed results to multi-record -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -ΔΙΑΧΕΙΡΙΣΗ: Αναζήτηση ÎŸÎ´Î·Î³Î¿Ï - -Ψάξιμο Καθοδήγησης - - - -
    \n"; - echo "
    \n"; - echo "\n"; - echo "ΠαÏακαλώ καταχωÏήστε:
    Vendor ID(αυτόματος κωδικός καθοδήγησης): or \n"; - echo "
    ένας αÏιθμός τηλεφώνου ÏƒÏ€Î¹Ï„Î¹Î¿Ï or\n"; - echo "
    ID οδηγοÏ

    \n"; - echo "
    \n"; - echo "\n
    \n"; - echo "\n"; - exit; - } - -else - { - - if ($vendor_id) - { - $stmt="SELECT * from vicidial_list where vendor_lead_code='" . mysql_real_escape_string($vendor_id) . "' order by modify_date desc limit 1000"; - } - else - { - if ($phone) - { - $stmt="SELECT * from vicidial_list where phone_number='" . mysql_real_escape_string($phone) . "' order by modify_date desc limit 1000"; - } - else - { - if ($lead_id) - { - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "' order by modify_date desc limit 1000"; - } - else - { - print "ERROR: you must search for something! Go back and search for something"; - exit; - } - } - } - if ($DB) - { - echo "\n\n$stmt\n\n"; - } - - $rslt=mysql_query($stmt, $link); - $results_to_print = mysql_num_rows($rslt); - if ($results_to_print < 1) - { - echo date("l F j, Y G:i:s A"); - echo "\n

    \n"; - echo "Οι μεταβλητές αναζήτησης που καταχωÏήσατε δεν είναι ενεÏγές στο σÏστημα

    \n"; - echo "ΠαÏακαλώ, επιστÏέψτε πίσω και ελέγξτε τις πληÏοφοÏίες που καταχωÏήσατε και Ï€Ïοσπαθήστε πάλι\n"; - echo "
    \n"; - echo "\n"; - exit; - } - else - { - echo "RESULTS: $results_to_print

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $o=0; - while ($results_to_print > $o) - { - $row=mysql_fetch_row($rslt); - $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "
    #LEAD IDΚΑΤΑΣΤΑΣΗVENDOR IDLAST AGENTID ΛΙΣΤΑΣPHONEΟÎΟΜΑCITYSECURITYLAST CALL
    $o$row[0]$row[3]$row[5]$row[4]$row[7]$row[11]$row[13] $row[15]$row[19]$row[28]$row[2]
    \n"; - } - } - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \nÎΕΑ ΑÎΑΖΗΤΗΣΗ"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds"; - - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/count.htm b/agc_2-X/trunk/LANG_admin/vicidial_el/count.htm deleted file mode 100644 index 51f8a361..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/count.htm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/dbconnect.php b/agc_2-X/trunk/LANG_admin/vicidial_el/dbconnect.php deleted file mode 100644 index fb6d5917..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/dbconnect.php +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/group_hourly_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_el/group_hourly_stats.php deleted file mode 100644 index fa64248e..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/group_hourly_stats.php +++ /dev/null @@ -1,252 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1014 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["date_with_hour"])) {$date_with_hour=$_GET["date_with_hour"];} - elseif (isset($_POST["date_with_hour"])) {$date_with_hour=$_POST["date_with_hour"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$date_with_hour_default = date("Y-m-d H"); -$date_no_hour_default = $TODAY; - -if (!isset($date_with_hour)) {$date_with_hour = $date_with_hour_default;} - $date_no_hour = $date_with_hour; - $date_no_hour = eregi_replace(" ([0-9]{2})",'',$date_no_hour); -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - -# $stmt="SELECT full_name from vicidial_users where user='$user';"; -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# $full_name = $row[0]; - - } - - - - -?> - - -ΔΙΑΧΕΙΡΙΣΗ: Ομαδοποιημένα ΩÏιαία Στατιστικά -\n"; -?> - - -
    - - - - - -= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDtotal[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_no_hour) . " 00:00:00' and call_date <= '" . mysql_real_escape_string($date_no_hour) . " 23:59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDday[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDcount[$o] = "$row[0]"; - $o++; - } - -echo "
      ΔΙΑΧΕΙΡΙΣΗ: Ομαδοποιημένα ΩÏιαία Στατιστικά  
    \n"; - -echo "
    \n"; - -echo "ΜΕΤΡΗΣΗ ΩΡΩΠTSR: $group | $status | $date_with_hour | $date_no_hour\n"; - -echo "
    \n"; -echo "\n"; - - $day_calls=0; - $hour_calls=0; - $total_calls=0; - $o=0; - while($o < $tsrs_to_print) - { - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $VDtotal[$o]); - $hour_calls = ($hour_calls + $VDcount[$o]); - $day_calls = ($day_calls + $VDday[$o]); - - $o++; - } - -echo "\n"; - - -} - -echo "
    TSR ID   $status   ΣΥÎΟΛΙΚΕΣ ΚΛΗΣΕΙΣ   $status DAY    
    $VDuser[$o] $VDname[$o] $VDcount[$o] $VDtotal[$o] $VDday[$o]ΤΡΟΠΟΠΟΙΗΣΗ | ΣΤΑΤΙΣΤΙΚΑ
    TOTAL $status $hour_calls $total_calls $day_calls
    \n"; -echo "

    \n"; - - - echo "
    ΠαÏακαλώ, καταχωÏήστε την ομάδα για την οποία θέλετε στατιστικά ανά ÏŽÏα:
    \n"; - echo "\n"; - echo "group:
    \n"; - echo "status:   (example: XFER)
    \n"; - echo "date with hour:   (example: 2004-06-25 14)
    \n"; - echo "\n"; - echo "


    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/help.gif b/agc_2-X/trunk/LANG_admin/vicidial_el/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/htglobalize.php b/agc_2-X/trunk/LANG_admin/vicidial_el/htglobalize.php deleted file mode 100644 index 72a10e1f..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/htglobalize.php +++ /dev/null @@ -1,23 +0,0 @@ - $value){ - ${$key} = $value; - global ${$key};// = $value; - } - -} -array_conv($_GET); -array_conv($_POST); -array_conv($_SERVER); - -?> \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/listloader.php b/agc_2-X/trunk/LANG_admin/vicidial_el/listloader.php deleted file mode 100644 index 2005942c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/listloader.php +++ /dev/null @@ -1,698 +0,0 @@ - LICENSE: GPLv2 -# -# AST Web GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1006 - added listID override and gmt_offset lookup while loading -# 60619-1652 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12'; -$build = '60619-1652'; - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -$submit_file=$_GET["submit_file"]; if (!$submit_file) {$submit_file=$_POST["submit_file"];} -$list_id_override=$_GET["list_id_override"]; if (!$list_id_override) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - - -#$DB=1; -#$DBX=1; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('listloader.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"ΒΟΗΘΕΙΑ\""; - - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -?> - - - - - - method=post enctype="multipart/form-data"> -
    - - - - - - - - - - - - - -
    Εισαγωγή οδηγών από αυτό το αÏχείο:
    ID Λίστας Override: (μόνο αÏιθμοί or leave blank for values in the file)
    ΕΠΙΛΕΞΤΕ ΕΔΩ ΓΙΑ ÎΑ ΠΑΤΕ ΣΤΟΠΠΡΟΗΓΜΕÎΟ ΕΙΣΑΓΩΓΕΑ ΟΔΗΓΩΠ(BETA ΕΚΔΟΣΗ)     ΠΙΣΩ ΣΤΗ ΔΙΑΧΕΙΡΙΣΗ
    - -document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - $pulldate=date("Y-m-d H:i:s"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("./vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    ΕπεξεÏγασία$delim_name-delimited file... ($tab_count|$pipe_count)\n"; - - if (strlen($list_id_override)>0) - { - print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city = $row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) - { - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $gmt_offset = '0'; - $called_since_last_reset='N'; - - if (strlen($list_id_override)>0) - { - # print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =='1') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### MEXICO ### - if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### AUSTRALIA ### - if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    Λάθος: Το αÏχείο δεν έχει τον απαιτοÏμενο αÏιθμό πεδίων.
    "; - } - print ""; -} else if (filesize($leadfile)>8388608) { - print "
    Λάθος: Το αÏχείο ξεπέÏασε το ÏŒÏιο των 8ΜΒ.
    "; -} -?> - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/listloaderMAIN.php b/agc_2-X/trunk/LANG_admin/vicidial_el/listloaderMAIN.php deleted file mode 100644 index 6960cfa6..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/listloaderMAIN.php +++ /dev/null @@ -1,79 +0,0 @@ - LICENSE: GPLv2 -# -# this is the main frame page for the lead loading section. This is where you -# would upload a file and have it inserted into vicidial_list -# -# changes: -# 60620-1149 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - -VICIDIAL: Υπομονάδα εισαγωγής οδηγών - - - - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/listloader_stmts.txt b/agc_2-X/trunk/LANG_admin/vicidial_el/listloader_stmts.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/new_listloader_superL.php b/agc_2-X/trunk/LANG_admin/vicidial_el/new_listloader_superL.php deleted file mode 100644 index 4796e269..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/new_listloader_superL.php +++ /dev/null @@ -1,1364 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60113-1603 - Fixed a few bugs in Excel import -# 60421-1624 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1240 - added listID override -# 60616-1604 - added gmt lookup for each lead -# 60619-1651 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12-1'; -$build = '60619-1651'; - - -require("dbconnect.php"); - -### links used for testing -#$link=mysql_connect("10.10.10.15", "cron", "1234"); -#mysql_select_db("asterisk"); -#$WeBServeRRooT = '/home/www/htdocs'; - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];} - elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} -if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} - elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} -if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} - elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} -if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} - elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];} -if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];} - elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];} -if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];} - elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];} -if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];} - elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];} -if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];} - elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];} -if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];} - elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];} -if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];} - elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];} -if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];} - elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];} -if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];} - elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];} -if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];} - elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];} -if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];} - elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];} -if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];} - elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];} -if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];} - elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];} -if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];} - elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];} -if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];} - elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];} -if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];} - elseif (isset($_POST["province_field"])) {$province_field=$_POST["province_field"];} -if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];} - elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];} -if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];} - elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];} -if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];} - elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];} -if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];} - elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];} -if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];} - elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];} -if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];} - elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];} -if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];} - elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];} -if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];} - elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];} -if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];} - elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); - -# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"ΒΟΗΘΕΙΑ\""; - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -function macfontfix($fontsize) { - - $browser = getenv("HTTP_USER_AGENT"); - $pctype = explode("(", $browser); - if (ereg("Mac",$pctype[1])) { - /* Browser is a Mac. If not Netscape 6, raise fonts */ - - $blownbrowser = explode('/', $browser); - $ver = explode(' ', $blownbrowser[1]); - $ver = $ver[0]; - if ($ver >= 5.0) return $fontsize; else return ($fontsize+2); - - } else return $fontsize; /* Browser is not a Mac - don't touch fonts */ -} - -echo "\n"; - -?> - - - -ΔΙΑΧΕΙΡΙΣΗ: Super Lead Loader - - -
    method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> - - - - - - - - - - - - - - - - - - - - -
    Εισαγωγή οδηγών από αυτό το αÏχείο:
    ID Λίστας Override: (μόνο αÏιθμοί or leave blank for values in the file)
    ΜοÏφή αÏχείων για χÏήση:Τυποποιημένο VICIDIAL    Î•μφάνιση συνήθειας
            
    ΕΠΙΛΕΞΤΕ ΕΔΩ ΓΙΑ ÎΑ ΠΑΤΕ ΣΤΟ ΒΑΣΙΚΟ ΕΙΣΑΓΩΓΕΑ ΟΔΗΓΩΠ        ΠΙΣΩ ΣΤΗ ΔΙΑΧΕΙΡΙΣΗ
    ΠΡΟΗΓΜΕÎΟΣ ΕΙΣΑΓΩΓΕΑΣ ΛΙΣΤΩÎ-     ΕΚΔΟΣΗ:     ΔΗΜΙΟΥΡΓΙΑ:
    - - -document.forms[0].leadfile.disabled=true;document.forms[0].list_id_override.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - $total=0; $good=0; $bad=0; - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    ΕπεξεÏγασία$delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - - if (strlen($list_id_override)>0) - { - # print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    Λάθος: Το αÏχείο δεν έχει τον απαιτοÏμενο αÏιθμό πεδίων.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - print "
    ΕπεξεÏγασίαExcel file... \n"; - if (strlen($list_id_override)>0) - { - print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    \n"; - } - # print "$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field"; - passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override"); - } else { - # copy($leadfile, "./vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    ΕπεξεÏγασίαCSV file... \n"; - if (strlen($list_id_override)>0) - { - print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - } - print ""; - } - -if ($leadfile && filesize($LF_path)<=8388608) { - $total=0; $good=0; $bad=0; - if ($file_layout=="standard") { - - print ""; - flush(); - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    ΕπεξεÏγασία$delim_name-delimited file... ($tab_count|$pipe_count)\n"; - if (strlen($list_id_override)>0) - { - print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    Λάθος: Το αÏχείο δεν έχει τον απαιτοÏμενο αÏιθμό πεδίων.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    ΕπεξεÏγασίαCSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } - print ""; - - } else { - print "
    "; - flush(); - print "\r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - - $rslt=mysql_query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1", $link); - - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    ΕπεξεÏγασία$delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    ΕπεξεÏγασίαCSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    ID ΛΙΣΤΑΣ OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - $total=0; $good=0; $bad=0; - $row=fgetcsv($file, 1000, ","); - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print "
    VICIDIAL ΣτήληΑÏχεία δεδομένων
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
            
    \r\n"; - # } - print ""; - } -} else if (filesize($leadfile)>8388608) { - print "
    Λάθος: Το αÏχείο ξεπέÏασε το ÏŒÏιο των 8ΜΒ.
    "; -} -?> - - - - - - - - - 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### MEXICO ### -if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### AUSTRALIA ### -if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### ALL OTHER COUNTRY CODES ### -if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - -### Find out if DST to raise the gmt offset ### -$AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); -$AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - -$AC_processed=0; -if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # τοπικός χÏόνος calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } -if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - -return $gmt_offset; -} \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/project_auth_entries.txt b/agc_2-X/trunk/LANG_admin/vicidial_el/project_auth_entries.txt deleted file mode 100644 index 805a9ec1..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/project_auth_entries.txt +++ /dev/null @@ -1,114 +0,0 @@ -VICIDIAL|GOOD|Tue, 22 Nov 2005 14:58:40 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:02:51 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:03:00 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:03:10 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:03:12 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:05:07 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:05:10 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:28:49 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:30:11 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:30:15 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:06:49 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:07:13 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:07:17 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:07:21 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Fri, 23 Dec 2005 14:39:30 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:43 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:45 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:46 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 03 Mar 2006 16:14:21 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:03:10 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:03:15 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:03:33 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:04:19 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:04:24 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:04:28 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:11:04 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:11:08 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:11:45 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:11:49 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:15:54 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:15:56 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -LIST_LOAD|GOOD|Thu, 27 Apr 2006 17:18:51 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:18:56 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:19:07 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:19:49 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:21:55 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:23:16 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:23:21 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:23:23 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:23:29 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:24:23 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:24:25 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:25:31 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:25:41 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:25:43 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:25:45 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:25:46 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:26:49 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:26:50 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:26:52 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:32 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:38 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:39 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:41 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:43 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:48 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:49 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:54 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:55 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:57 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:33:58 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:00:48 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:00:50 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:00:58 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:03 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:17 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:19 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:29 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:42 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:43 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:47 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:49 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:52 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:54 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:01:59 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:01 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:03 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:05 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:11 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:12 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:15 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:16 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:26 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:28 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:02:32 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:07:52 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:08:13 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:08:17 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:08:20 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:08:22 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:08:24 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:08:25 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:08:27 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:08:28 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:33 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:35 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:37 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:44 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:46 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:47 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:49 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:51 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:21:00 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:21:17 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:21:23 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -LIST_LOAD|GOOD|Thu, 27 Apr 2006 22:22:17 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|| -LIST_LOAD|GOOD|Thu, 27 Apr 2006 22:25:37 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|| -LIST_LOAD|GOOD|Thu, 27 Apr 2006 22:27:54 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|| -LIST_LOAD|GOOD|Thu, 27 Apr 2006 22:34:07 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:40:50 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:35:20 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:35:23 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:35:26 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:35:31 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/remote_dispo.php b/agc_2-X/trunk/LANG_admin/vicidial_el/remote_dispo.php deleted file mode 100644 index 3f45251b..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/remote_dispo.php +++ /dev/null @@ -1,327 +0,0 @@ - LICENSE: GPLv2 -### -# this is the remote agent disposition screen for calls sent to remote agents. This allows the remote agent to modify customer information and disposition the call - -# CHANGES -# -# 60619-1626 - Added variable filtering to eliminate SQL injection attack threat -# - - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - -$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 > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ΑπομακÏυσμένο: ΤεÏματισμός Κλήσης -\n"; -?> - - -
    - -"; - -if ($end_call > 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="UPDATE vicidial_closer_log set end_epoch='$STARTtime', length_in_sec='" . mysql_real_escape_string($call_length) . "', status='" . mysql_real_escape_string($status) . "', user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by start_epoch desc limit 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "',user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Η κλήση έχει τεÏματίσει       $NOW_TIME\n

    \n"; - - echo "
    \n"; - -} -else -{ - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    ΠληÏοφοÏίες Κλήσης: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     ID ΕκστÏατείας: $campaign_id
    Fronter: $tsr     ID Λίστας: $list_id
    Ονομα:   \n"; - echo " Επίθετο:
    ΔιεÏθυνση 1 :
    ΔιεÏθυνση 2 :
    ΔιεÏθυνση 3 :
    Πόλη :
    ΚÏάτος:   \n"; - echo "Ταχ.Κωδ.
    ΧώÏα :
    Εναλ Τηλέφωνο :
    Ασφάλεια :
    Σχόλια :
    ΤεÏματισμός:
    \n"; - echo "


    \n"; - - } - else - { - echo "ΑΠΟΤΥΧΙΑ ψαξίματος καθοδήγησης για lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/server_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_el/server_stats.php deleted file mode 100644 index d08bccbb..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/server_stats.php +++ /dev/null @@ -1,96 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1037 - Added Link back to Admin section -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select * from servers;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$servers_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $servers_to_print) - { - $row=mysql_fetch_row($rslt); - $server_id[$i] = $row[0]; - $server_description[$i] = $row[1]; - $server_ip[$i] = $row[2]; - $active[$i] = $row[3]; - $i++; - } -?> - - - - - -VICIDIAL: Στατιστικά Διακομιστή and Reports -VICIDIAL: Στατιστικά Διακομιστή and Reports                           -ΠΙΣΩ ΣΤΗ ΔΙΑΧΕΙΡΙΣΗ

    - - -
    
    -
    - $o)
    -	{
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	$o++;
    -	}
    -
    -?>
    -
    SERVERΠΕΡΙΓΡΑΦΗIP ADDRESSΕÎΕΡΓΑVDAD timeVDcall timePARK timeCLOSER/INBOUND time
    $server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINKLINK
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/user_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_el/user_stats.php deleted file mode 100644 index a48b56fd..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/user_stats.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1743 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - } - - - - -?> - - -ΔΙΑΧΕΙΡΙΣΗ: User Stats -\n"; -?> - - -
    - - - - - -\n"; -echo "
      ΔΙΑΧΕΙΡΙΣΗ: User Stats for  
      \n"; - -echo "
    \n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_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' group by status order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - -echo "
    \n"; - -echo "ΧΡΟÎΟΣ ΟΜΙΛΙΑΣ ΚΑΙ ΚΑΤΑΣΤΑΣΗ:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from vicidial_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'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - -echo "\n"; -echo "
    ΚΑΤΑΣΤΑΣΗΚΑΤΑΜΕΤΡΗΣΗΩΡΕΣ:ΛΕΠΤΑ
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    ΣΥÎΟΛΙΚΕΣ ΚΛΗΣΕΙΣ $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo " ΧΡΟÎΟΣ ΣYÎΔΕΣΗΣ/ΑΠΟΣΥÎΔΕΣΗΣ:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT event,event_epoch,event_date,campaign_id from vicidial_user_log where user='" . mysql_real_escape_string($user) . "' and event_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("LOGIN", $row[0])) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if (ereg("LOGIN", $row[0])) - { - $event_start_seconds = $row[1]; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - if (ereg("LOGOUT", $row[0])) - { - if ($event_start_seconds) - { - $event_stop_seconds = $row[1]; - $event_seconds = ($event_stop_seconds - $event_start_seconds); - $total_login_time = ($total_login_time + $event_seconds); - $event_hours = ($event_seconds / 3600); - $event_hours = round($event_hours, 2); - $event_hours_int = intval("$event_hours"); - $event_minutes = ($event_hours - $event_hours_int); - $event_minutes = ($event_minutes * 60); - $event_minutes_int = round($event_minutes, 0); - if ($event_minutes_int < 10) {$event_minutes_int = "0$event_minutes_int";} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - $event_start_seconds=''; - $event_stop_seconds=''; - } - else - { - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - } - - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - -$total_login_hours = ($total_login_time / 3600); -$total_login_hours = round($total_login_hours, 2); -$total_login_hours_int = intval("$total_login_hours"); -$total_login_minutes = ($total_login_hours - $total_login_hours_int); -$total_login_minutes = ($total_login_minutes * 60); -$total_login_minutes_int = round($total_login_minutes, 0); -if ($total_login_minutes_int < 10) {$total_login_minutes_int = "0$total_login_minutes_int";} - -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "
    ΣΥΜΒΑΠΗΜΕΡΑΕΚΣΤΡΑΤΕΙΑΩΡΕΣ:ΛΕΠΤΑ
    $row[0] $row[2] $row[3]
    $row[0] $row[2] $row[3] $event_hours_int:$event_minutes_int
    $row[0] $row[2] $row[3]
    ΣΥÎΟΛΙΚΑ $total_login_hours_int:$total_login_minutes_int
    \n"; - - -echo "

    \n"; - -echo "
    \n"; - -echo "Τελευταίες 50 Κλήσεις:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where user='" . mysql_real_escape_string($user) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS PHONEΕΚΣΤΡΑΤΕΙΑ LIST LEAD
    $row[4] $row[7] $row[8] $row[10] $row[3] $row[2] $row[1]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/user_status.php b/agc_2-X/trunk/LANG_admin/vicidial_el/user_status.php deleted file mode 100644 index 6b8aaaa8..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/user_status.php +++ /dev/null @@ -1,238 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1738 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,change_agent_campaign from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $change_agent_campaign=$row[1]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $agents_to_print = mysql_num_rows($rslt); - $i=0; - while ($i < $agents_to_print) - { - $row=mysql_fetch_row($rslt); - $Aserver_ip = $row[2]; - $Asession_id = $row[3]; - $Aextension = $row[4]; - $Astatus = $row[5]; - $Acampaign = $row[7]; - $Alast_call = $row[14]; - $Acl_campaigns = $row[15]; - $i++; - } - - } - -$stmt="select * from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - - - -?> - - -ΔΙΑΧΕΙΡΙΣΗ: User Status -\n"; -?> - - -
    -
    - - - - -\n"; -echo "
      ΔΙΑΧΕΙΡΙΣΗ: User Status for  
      \n"; - -if ($stage == "live_campaign_change") -{ - $stmt="UPDATE vicidial_live_agents set campaign_id='" . mysql_real_escape_string($group) . "' where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name changed to $group campaign
    \n"; - - exit; -} - -if ($stage == "log_agent_out") -{ - $stmt="DELETE from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name has been emergency logged out, make sure they close their web browser
    \n"; - - exit; -} - -if ($agents_to_print > 0) -{ - echo "
    ";
    -	echo "Agent Logged in at server:  $Aserver_ip\n";
    -	echo "               in session:  $Asession_id\n";
    -	echo "               from phone:  $Aextension\n";
    -	echo "Agent is in campaign:       $Acampaign\n";
    -	echo "              status:       $Astatus\n";
    -	echo " hungup last call at:       $Alast_call\n";
    -	echo "       Closer groups:       $Acl_campaigns\n\n";
    -
    -	echo "
    "; - - - if ($change_agent_campaign > 0) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "Current ΕκστÏατεία: \n"; - echo "
    \n"; - - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - } -} - -else -{ - echo "Agent is not logged in\n
    "; - -} - - -echo "           $user - $full_name - \n"; - -echo "VICIDIAL Time Sheet\n"; - -echo "
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - -echo "|$stage|$group|"; - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_el/vdremote.php b/agc_2-X/trunk/LANG_admin/vicidial_el/vdremote.php deleted file mode 100644 index 0061a097..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_el/vdremote.php +++ /dev/null @@ -1,602 +0,0 @@ - LICENSE: GPLv2 -# -# Changes -# 50307-1721 - First version -# 51123-1502 - removed requirement of PHP Globals=on -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1603 - Added variable filtering to eliminate SQL injection attack threat -# -# make sure you have added a user to the vicidial_users MySQL table with at least user_level 4 to access this page the first time - -$version = '1.1.12'; -$build = '60619-1603'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"];} - elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} - -if (!isset($force_logout)) {$force_logout = 0;} - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Έχετε αποσυνδεθεί. Σας ευχαÏιστοÏμε\n"; - exit; -} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -$popup_page = './closer_popup.php'; -$STARTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "ΑκυÏο Ονομα ΧÏήστη/Κωδικός ΠÏόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - - $stmt="SELECT count(*) from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $authx=$row[0]; - - if($authx>0) - { - $stmt="SELECT remote_agent_id,server_ip,number_of_lines from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id=$row[0]; - $server_ip=$row[1]; - if (!$number_of_lines) {$number_of_lines=$row[2];} - - fwrite ($fp, "VDremote|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - echo "This remote agent does not exist: |$PHP_AUTH_USER|\n"; - exit; - } - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -if ($ADD==61111) - { - echo"\n"; - } -echo "\n"; -?> - -ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ: $LOGfullname - $PHP_AUTH_USER "; - -if (!$ADD) {$ADD="31111";} -if ($ADD==31111) {echo "ΤÏοποποίηση ΑπομακÏυσμένων ΧειÏιστών";} -if ($ADD==41111) {echo "ΤÏοποποίηση ΑπομακÏυσμένων ΧειÏιστών";} -if ($ADD==61111) {echo "Remote Agent Status";} -if ($ADD==71111) {echo "Remote Agent Closer Stats";} - - -if (strlen($ADD)>4) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "2) {$groups_value .= " -";} - } - -?> - - - -
    -
    - - - -
      ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ:   ΑποσÏνδεση  
      ΤΡΟΠΟΠΟΙΗΣΗ | ">ΚΑΤΑΣΤΑΣΗ | ">ΣΤΑΤΙΣΤΙΚΑ ΕΙΣΕΡΧΟΜΕÎΩÎ
    -"; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΚΑΤΑΧΩΡΗΣΗΣ ΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩÎ: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID ΧÏήστη Ξεκινά: $user_start
    ΑÏιθμός ΓÏαμμών: (μόνο αÏιθμοί)
    IP Διακομιστή: $row[3]
    ΕξωτεÏική Τηλ. ΣÏνδεση: (number dialed to reach agents [i.e. 913125551212])
    Κατάσταση:
    ΕκστÏατεία: $campaign_id
    ΕισεÏχόμενες Ομάδες: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "ΣΗΜΕΙΩΣΗ: ΜποÏεί να διαÏκέσει και 30 δευτεÏόλεπτα για να καταχωÏηθοÏν οι αλλαγές της οθόνης\n"; - -} - - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($number_of_lines) < 1) or (strlen($conf_exten) < 2) ) - {echo "
    ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ΔΕΠΤΡΟΠΟΠΟΙΗΘΗΚΑΠ- ΠαÏακαλώ ελέγξτε τα δεδομένα που καταχωÏήσατε\n";} - else - { - $stmt="UPDATE vicidial_remote_agents set number_of_lines='" . mysql_real_escape_string($number_of_lines) . "', conf_exten='" . mysql_real_escape_string($conf_exten) . "', status='" . mysql_real_escape_string($status) . "', closer_campaigns='" . mysql_real_escape_string($groups_value) . "' where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - -# echo "$stmt\n"; - echo "
    ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ΤΡΟΠΟΠΟΙΗΘΗΚΑÎ\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY ΑΠΟΜΑΚΡΥΣΜΕÎΟΙ ΧΕΙΡΙΣΤΕΣ ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - - } - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    ΤΡΟΠΟΠΟΙΗΣΗ ΚΑΤΑΧΩΡΗΣΗΣ ΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩÎ: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID ΧÏήστη Ξεκινά: $user_start
    ΑÏιθμός ΓÏαμμών: (μόνο αÏιθμοί)
    IP Διακομιστή: $row[3]
    ΕξωτεÏική Τηλ. ΣÏνδεση: (number dialed to reach agents [i.e. 913125551212])
    Κατάσταση:
    ΕκστÏατεία: $campaign_id
    ΕισεÏχόμενες Ομάδες: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "ΣΗΜΕΙΩΣΗ: ΜποÏεί να διαÏκέσει και 30 δευτεÏόλεπτα για να καταχωÏηθοÏν οι αλλαγές της οθόνης\n"; - -} - - - - -###################### -# ADD=61111 status of remote agent in the system and active calls and queue -###################### - -if ($ADD==61111) -{ - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    ΛΑΘΟΣ ΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩÎ\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'" . mysql_real_escape_string($nextuser) . "',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - echo "VICIDIAL: Remote Agent Time On Calls $NOW_TIME\n\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo "| STATION | USER | LEADID | CHANNEL | STATUS | START TIME | MINUTES |\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select extension,user,lead_id,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' and user IN($users_list) order by extension;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $leadlink=0; - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[3]=''; - $row[5]='- ΑÎΑΜΟÎΗ -'; - $row[6]=$row[7]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $leadid = sprintf("%-12s", $row[2]); - if ($row[2] > 0) - { - $leadidLINK=$row[2]; - $leadlink++; - if ( eregi("QUEUE",$row[4]) ) {$row[6]=$STARTtime;} - $leadid = "$leadid"; - } - $channel = sprintf("%-10s", $row[3]); - $cc=0; - while ( (strlen($channel) > 10) and ($cc < 100) ) - { - $channel = eregi_replace(".$","",$channel); - $cc++; - if (strlen($channel) <= 10) {$cc=101;} - } - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = ($STARTtime - $row[6]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} - if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$extension$EG | $G$user$EG | $G$leadid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo " $i ΧειÏιστές συνδεμένοι στον διακομιστή $server_ip\n\n"; - - echo " - 5 λεπτά ή παÏαπάνω σε κλήση\n"; - echo " - Πάνω από 10 λεπτά σε κλήση\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "********************************* ΚΑÎΕÎΑΣ ΧΕΙΡΙΣΤΗΣ ΣΕ ΚΛΗΣΕΙΣ*********************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - -###################### -# ADD=71111 stats for remote agents from closer logs(vicidial_closer_log) -###################### - -if ($ADD==71111) -{ - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n\n"; - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    ΛΑΘΟΣ ΑΠΟΜΑΚΡΥΣΜΕÎΩΠΧΕΙΡΙΣΤΩÎ\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'$nextuser',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - $stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list);"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $in_calls = $row[0]; - $in_time = $row[1]; - $in_time_M = ($in_time / 60); - $in_time_M = round($in_time_M, 2); - $in_time_M_int = intval("$in_time_M"); - $in_time_SEC = ($in_time_M - $in_time_M_int); - $in_time_SEC = ($in_time_SEC * 60); - $in_time_SEC = round($in_time_SEC, 0); - if ($in_time_SEC < 10) {$in_time_SEC = "0$in_time_SEC";} - $in_time_MS = "$in_time_M_int:$in_time_SEC"; - $in_time_MS = sprintf("%7s", $in_time_MS); - - echo "VICIDIAL: Στατιστικά εισεÏχομένων απομακÏυσμένου χειÏιστή $NOW_TIME\n\n"; - echo "\n"; - echo "Συνολικές κλήσεις που διακομίστηκαν$query_date: $in_calls\n"; - echo "Συνολικός χÏόνος ομιλίας σε$query_date: $in_time_MS (minutes:seconds)\n"; - echo "\n"; - echo "\n"; - echo "Λίστα Κλήσεων για$query_date:\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - echo "| USER | LEADID | GROUP | PHONE NUM | STATUS | CALL TIME | MINUTES |\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select user,lead_id,campaign_id,phone_number,status,call_date,length_in_sec from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list) order by call_date;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - $user = sprintf("%-8s", $row[0]); - $leadid = sprintf("%-10s", $row[1]); - $group = sprintf("%-14s", $row[2]); - $phone = sprintf("%-10s", $row[3]); - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = $row[6]; - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - # if ($call_time_M_int >= 5) {$G=''; $EG='';} - # if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$user$EG | $G$leadid$EG | $G$group$EG | $G$phone$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - # echo " $i ΧειÏιστές συνδεμένοι στον διακομιστή $server_ip\n\n"; - - # echo " - 5 λεπτά ή παÏαπάνω σε κλήση\n"; - # echo " - Πάνω από 10 λεπτά σε κλήση\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "*********************************ΔΕΠΥΠΑΡΧΟΥΠΚΛΗΣΕΙΣ ΓΙΑ ΑΥΤΗ ΤΗΠΗΜΕΡΑ*******************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nχÏόνος εκτέλεσης διαδικασίας: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_CLOSERstats.php deleted file mode 100644 index b7a7bb8c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_CLOSERstats.php +++ /dev/null @@ -1,396 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1714 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select group_id from vicidial_inbound_groups;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Closer Stats\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Closer Stats                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls placed from this Campaign:        $TOTALcalls\n";
    -echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total DROP Calls:                             $DROPcalls  $DROPpercent%\n";
    -echo "Average Length for DROP Calls in seconds:     $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USER                     | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='$group';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_VDADstats.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_VDADstats.php deleted file mode 100644 index 9ac17006..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_VDADstats.php +++ /dev/null @@ -1,417 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1718 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Stats                             $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls placed from this Campaign:        $TOTALcalls\n";
    -echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total DROP Calls:                             $DROPcalls  $DROPpercent%\n";
    -echo "Average Length for DROP Calls in seconds:     $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- AUTO-DIAL NO ANSWERS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$NAcalls =	sprintf("%10s", $row[0]);
    -$NApercent = (($NAcalls / $TOTALcalls) * 100);
    -$NApercent = round($NApercent, 0);
    -
    -$average_na_seconds = ($row[1] / $row[0]);
    -$average_na_seconds = round($average_na_seconds, 0);
    -$average_na_seconds =	sprintf("%10s", $average_na_seconds);
    -
    -echo "Total NA calls -Busy,Disconnect,BTvoicemail:  $NAcalls  $NApercent%\n";
    -echo "Average Call Length for NA Calls in seconds:  $average_na_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USER                     | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_VICIDIAL_hopperlist.php deleted file mode 100644 index 1824a939..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_VICIDIAL_hopperlist.php +++ /dev/null @@ -1,161 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1654 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.10.15';} - -$stmt="select campaign_id,campaign_name from vicidial_campaigns order by campaign_id;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $campaign_id[$i] =$row[0]; - $campaign_name[$i] =$row[1]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Hopper List\n"; -echo "
    \n"; -#echo "\n"; -#echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Live Current Hopper List                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -
    -echo "Total leads in hopper right now:       $TOTALcalls\n";
    -
    -
    -##############################
    -#########  LEAD STATS
    -
    -echo "\n";
    -echo "---------- LEADS IN HOPPER\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$FMT_i =		sprintf("%-4s", $i);
    -	$lead_id =		sprintf("%-9s", $row[0]);
    -	$phone_number =	sprintf("%-10s", $row[1]);
    -	$state =		sprintf("%-5s", $row[2]);
    -	$status =		sprintf("%-6s", $row[3]);
    -	$count =		sprintf("%-5s", $row[4]);
    -	$gmt =			sprintf("%-6s", $row[5]);
    -
    -	echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_admin_log_display.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_admin_log_display.php deleted file mode 100644 index b5286873..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_admin_log_display.php +++ /dev/null @@ -1,118 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$query_date = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$query_date); - -# AST GUI database administration -# AST_admin_log_display.php -# -# CHANGES -# 50325-0932 - First build -# 51123-1443 - removed globals=on requirement -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1044 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '0.0.4'; -$build = '60620-1044'; - -$STARTtime = date("U"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN LOG DISPLAY"; -echo "\n"; - -# Fri, 25 Mar 2005 - -$DAY_DATE = date("j"); -if ($DAY_DATE < 10) -# {$GREP_DATE = date("D, j M Y");} - {$GREP_DATE = date("D, 0j M Y");} -else - {$GREP_DATE = date("D, j M Y");} - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!$query_date) {$query_date = $GREP_DATE;} - -$Gquery_date = eregi_replace(" ",'\ ',$query_date); -echo "\n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -echo "VICIDIAL ADMIN CHANGE LOG                             $NOW_TIME\n";
    -
    -#passthru("grep $Gquery_date /home/www/htdocs/vicidial/admin_changes_log.txt");
    -passthru("grep $Gquery_date $WeBServeRRooT/vicidial/admin_changes_log.txt");
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_performance.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_performance.php deleted file mode 100644 index a489bc7d..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_performance.php +++ /dev/null @@ -1,232 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1711 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["shift"])) {$shift=$_GET["shift"];} - elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Agent Performance\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:33:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:33:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:33:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:33:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TALK   | TALKAVG| A    | B    | DC   | DNC  | N    | NI   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='" . mysql_real_escape_string($group) . "' group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_performance_detail.php
    deleted file mode 100644
    index 2dd3dc5e..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_performance_detail.php
    +++ /dev/null
    @@ -1,406 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1712 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($group)) {$group = '';}
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -$stmt="select campaign_id from vicidial_campaigns;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$campaigns_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $campaigns_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 03:45:00";   
    -	$query_date_END = "$query_date 15:15:00";
    -	$time_BEGIN = "03:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:15:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance Detail                        $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TIME   | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG| A    | B    | DC   | DNC  | N    | NI   | CB   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtime=($TOTtime + $row[1] + $row[5] + $row[7] + $row[9]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$TOTtotWAIT=($TOTtotWAIT + $row[7]);
    -	$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
    -	$TOTtotDISPO=($TOTtotDISPO + $row[9]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtime =	($row[1] + $row[5] + $row[7] + $row[9]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -	$USERtotPAUSE =	$row[5];
    -	$USERavgPAUSE =	$row[6];
    -	$USERtotWAIT =	$row[7];
    -	$USERavgWAIT =	$row[8];
    -	$USERtotDISPO =	$row[9];
    -	$USERavgDISPO =	$row[10];
    -
    -	$USERtime_M = ($USERtime / 60);
    -	$USERtime_M = round($USERtime_M, 2);
    -	$USERtime_M_int = intval("$USERtime_M");
    -	$USERtime_S = ($USERtime_M - $USERtime_M_int);
    -	$USERtime_S = ($USERtime_S * 60);
    -	$USERtime_S = round($USERtime_S, 0);
    -	if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
    -	$USERtime_MS = "$USERtime_M_int:$USERtime_S";
    -	$pfUSERtime_MS[$i] =		sprintf("%7s", $USERtime_MS);
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	$USERtotPAUSE_M = ($USERtotPAUSE / 60);
    -	$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
    -	$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
    -	$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
    -	$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
    -	$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
    -	if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
    -	$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
    -	$pfUSERtotPAUSE_MS[$i] =		sprintf("%6s", $USERtotPAUSE_MS);
    -
    -	$USERavgPAUSE_M = ($USERavgPAUSE / 60);
    -	$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
    -	$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
    -	$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
    -	$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
    -	$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
    -	if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
    -	$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
    -	$pfUSERavgPAUSE_MS[$i] =		sprintf("%6s", $USERavgPAUSE_MS);
    -
    -	$USERtotWAIT_M = ($USERtotWAIT / 60);
    -	$USERtotWAIT_M = round($USERtotWAIT_M, 2);
    -	$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
    -	$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
    -	$USERtotWAIT_S = ($USERtotWAIT_S * 60);
    -	$USERtotWAIT_S = round($USERtotWAIT_S, 0);
    -	if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
    -	$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
    -	$pfUSERtotWAIT_MS[$i] =		sprintf("%6s", $USERtotWAIT_MS);
    -
    -	$USERavgWAIT_M = ($USERavgWAIT / 60);
    -	$USERavgWAIT_M = round($USERavgWAIT_M, 2);
    -	$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
    -	$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
    -	$USERavgWAIT_S = ($USERavgWAIT_S * 60);
    -	$USERavgWAIT_S = round($USERavgWAIT_S, 0);
    -	if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
    -	$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
    -	$pfUSERavgWAIT_MS[$i] =		sprintf("%6s", $USERavgWAIT_MS);
    -	
    -	$USERtotDISPO_M = ($USERtotDISPO / 60);
    -	$USERtotDISPO_M = round($USERtotDISPO_M, 2);
    -	$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
    -	$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
    -	$USERtotDISPO_S = ($USERtotDISPO_S * 60);
    -	$USERtotDISPO_S = round($USERtotDISPO_S, 0);
    -	if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
    -	$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
    -	$pfUSERtotDISPO_MS[$i] =		sprintf("%6s", $USERtotDISPO_MS);
    -
    -	$USERavgDISPO_M = ($USERavgDISPO / 60);
    -	$USERavgDISPO_M = round($USERavgDISPO_M, 2);
    -	$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
    -	$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
    -	$USERavgDISPO_S = ($USERavgDISPO_S * 60);
    -	$USERavgDISPO_S = round($USERavgDISPO_S, 0);
    -	if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
    -	$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
    -	$pfUSERavgDISPO_MS[$i] =		sprintf("%6s", $USERavgDISPO_MS);
    -
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; $ctCB[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		if (($row[1] == 'CALLBK') || ($row[1] == 'CBHOLD') ) {$ctCB[$k]=sprintf("%-4s", $row[0]);	$TOT_CB = ($TOT_CB + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtime_MS[$k]| $pfUSERtotPAUSE_MS[$k] | $pfUSERavgPAUSE_MS[$k] | $pfUSERtotWAIT_MS[$k] | $pfUSERavgWAIT_MS[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $pfUSERtotDISPO_MS[$k] | $pfUSERavgDISPO_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctCB[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtime_M = ($TOTtime / 60);
    -	$TOTtime_M = round($TOTtime_M, 2);
    -	$TOTtime_M_int = intval("$TOTtime_M");
    -	$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
    -	$TOTtime_S = ($TOTtime_S * 60);
    -	$TOTtime_S = round($TOTtime_S, 0);
    -	if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
    -	$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
    -	$TOTtime_MS =		sprintf("%7s", $TOTtime_MS);
    -		while(strlen($TOTtime_MS)>7) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOTtotDISPO_M = ($TOTtotDISPO / 60);
    -	$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
    -	$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
    -	$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
    -	$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
    -	$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
    -	if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
    -	$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
    -	$TOTtotDISPO_MS =		sprintf("%7s", $TOTtotDISPO_MS);
    -		while(strlen($TOTtotDISPO_MS)>7) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
    -
    -	$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
    -	$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
    -	$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
    -	$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
    -	if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
    -	$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
    -	$TOTtotPAUSE_MS =		sprintf("%7s", $TOTtotPAUSE_MS);
    -		while(strlen($TOTtotPAUSE_MS)>7) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
    -
    -	$TOTtotWAIT_M = ($TOTtotWAIT / 60);
    -	$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
    -	$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
    -	$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
    -	$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
    -	$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
    -	if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
    -	$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
    -	$TOTtotWAIT_MS =		sprintf("%7s", $TOTtotWAIT_MS);
    -		while(strlen($TOTtotWAIT_MS)>7) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
    -
    -
    -	$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
    -	$TOTavgTALK_M = round($TOTavgTALK_M, 2);
    -	$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
    -	$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
    -	$TOTavgTALK_S = ($TOTavgTALK_S * 60);
    -	$TOTavgTALK_S = round($TOTavgTALK_S, 0);
    -	if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
    -	$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
    -	$TOTavgTALK_MS =		sprintf("%6s", $TOTavgTALK_MS);
    -		while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
    -
    -	$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
    -	$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
    -	$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
    -	$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
    -	$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
    -	$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
    -	if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
    -	$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
    -	$TOTavgDISPO_MS =		sprintf("%6s", $TOTavgDISPO_MS);
    -		while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
    -
    -	$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
    -	$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
    -	$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
    -	$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
    -	if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
    -	$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
    -	$TOTavgPAUSE_MS =		sprintf("%6s", $TOTavgPAUSE_MS);
    -		while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
    -
    -	$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
    -	$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
    -	$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
    -	$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
    -	$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
    -	$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
    -	if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
    -	$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
    -	$TOTavgWAIT_MS =		sprintf("%6s", $TOTavgWAIT_MS);
    -		while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
    -
    -	
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_CB = sprintf("%-5s", $TOT_CB);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtime_MS| $TOTtotPAUSE_MS| $TOTavgPAUSE_MS | $TOTtotWAIT_MS| $TOTavgWAIT_MS | $TOTtotTALK_MS| $TOTavgTALK_MS | $TOTtotDISPO_MS| $TOTavgDISPO_MS | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_CB| $TOT_SALE|\n";
    -echo "+--------------------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_time_sheet.php
    deleted file mode 100644
    index 46659eb6..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_agent_time_sheet.php
    +++ /dev/null
    @@ -1,281 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1729 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
    -	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
    -	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Time Sheet\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$agent)
    -{
    -echo "\n";
    -echo "PLEASE SELECT AN AGENT ID AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from available agent log data\n";
    -}
    -
    -else
    -{
    -$query_date_BEGIN = "$query_date 00:00:00";   
    -$query_date_END = "$query_date 23:59:59";
    -$time_BEGIN = "00:00:00";   
    -$time_END = "23:59:59";
    -
    -$stmt="select full_name from vicidial_users where user='$agent';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$full_name = $row[0];
    -
    -echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENT TIME SHEET: $agent - $full_name -------------\n\n";
    -
    -if ($calls_summary)
    -	{
    -	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -
    -	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
    -
    -		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
    -		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
    -		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
    -		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
    -		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
    -		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
    -		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
    -		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
    -		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
    -		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
    -		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
    -		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
    -		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
    -		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
    -
    -		$TALK_TIME_H = ($row[1] / 3600);
    -		$TALK_TIME_H = round($TALK_TIME_H, 2);
    -		$TALK_TIME_H_int = intval("$TALK_TIME_H");
    -		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
    -		$TALK_TIME_M = ($TALK_TIME_M * 60);
    -		$TALK_TIME_M = round($TALK_TIME_M, 2);
    -		$TALK_TIME_M_int = intval("$TALK_TIME_M");
    -		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
    -		$TALK_TIME_S = ($TALK_TIME_S * 60);
    -		$TALK_TIME_S = round($TALK_TIME_S, 0);
    -		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
    -		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
    -		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
    -		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
    -
    -		$PAUSE_TIME_H = ($row[3] / 3600);
    -		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
    -		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
    -		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
    -		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
    -		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
    -		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
    -		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
    -		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
    -		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
    -		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
    -		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
    -		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
    -		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
    -
    -		$WAIT_TIME_H = ($row[5] / 3600);
    -		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
    -		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
    -		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
    -		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
    -		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
    -		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
    -		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
    -		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
    -		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
    -		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
    -		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
    -		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
    -		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
    -
    -		$WRAPUP_TIME_H = ($row[7] / 3600);
    -		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
    -		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
    -		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
    -		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
    -		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
    -		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
    -		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
    -		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
    -		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
    -
    -		$TALK_AVG_M = ($row[2] / 60);
    -		$TALK_AVG_M = round($TALK_AVG_M, 2);
    -		$TALK_AVG_M_int = intval("$TALK_AVG_M");
    -		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
    -		$TALK_AVG_S = ($TALK_AVG_S * 60);
    -		$TALK_AVG_S = round($TALK_AVG_S, 0);
    -		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
    -		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
    -		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
    -
    -		$PAUSE_AVG_M = ($row[4] / 60);
    -		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
    -		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
    -		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
    -		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
    -		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
    -		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
    -		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
    -		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
    -
    -		$WAIT_AVG_M = ($row[6] / 60);
    -		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
    -		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
    -		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
    -		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
    -		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
    -		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
    -		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
    -		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
    -
    -		$WRAPUP_AVG_M = ($row[8] / 60);
    -		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
    -		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
    -		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
    -		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
    -		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
    -		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
    -
    -	echo "TOTAL CALLS TAKEN: $row[0]\n";
    -	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
    -	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
    -	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
    -	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
    -	echo "----------------------------------------------------------------\n";
    -	echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
    -
    -	echo "\n";
    -	}
    -else
    -	{
    -	echo "Call Activity Summary\n\n";
    -
    -	}
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "FIRST LOGIN:          $row[0]\n";
    -$start = $row[1];
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "LAST LOG ACTIVITY:    $row[0]\n";
    -$end = $row[1];
    -
    -$login_time = ($end - $start);
    -	$LOGIN_TIME_H = ($login_time / 3600);
    -	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
    -	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
    -	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
    -	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
    -	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
    -	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
    -	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
    -	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
    -	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
    -	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
    -	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
    -	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
    -	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
    -
    -echo "-----------------------------------------\n";
    -echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_server_performance.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_server_performance.php
    deleted file mode 100644
    index fdedb9d9..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_server_performance.php
    +++ /dev/null
    @@ -1,310 +0,0 @@
    -    LICENSE: GPLv2
    -#
    -# CHANGES
    -#
    -# 60619-1732 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))	{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))	{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))	{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -# path from root to where ploticus files will be stored
    -$DOCroot = "$WeBServeRRooT/vicidial/ploticus/";
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -if (!isset($group)) {$group = '';}
    -
    -$stmt="select server_ip from servers;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$servers_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $servers_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Server Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "             REPORTS \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:32:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:32:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Server Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- TOTALS, PEAKS and AVERAGES\n";
    -
    -$stmt="select sysload from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by sysload desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$HIGHload =	sprintf("%10s", $row[0]);
    -$HIGHmulti = intval($HIGHload / 100);
    -#$HIGHmulti = ($HIGHload / 100);
    -
    -$stmt="select AVG(sysload),AVG(channels_total) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGload =	sprintf("%10s", $row[0]);
    -$AVGchannels =	sprintf("%10s", $row[1]);
    -
    -$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGcpuUSER =	sprintf("%10s", $row[0]);
    -$AVGcpuSYSTEM =	sprintf("%10s", $row[1]);
    -$AVGcpuIDLE =	sprintf("%10s", $row[2]);
    -
    -$stmt="select usedram from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by usedram desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$USEDram =	sprintf("%10s", $row[0]);
    -
    -$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365','8366','8367') and  start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$OFFHOOKtime =	sprintf("%10s", $row[1]);
    -
    -
    -echo "Total Calls in/out on this server:        $TOTALcalls\n";
    -echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
    -echo "Average channels in use for server:       $AVGchannels\n";
    -echo "Average load for server:                  $AVGload\n";
    -echo "Peak load for server:                     $HIGHload\n";
    -#echo "Peak used memory for server (in MB):      $USEDram\n";
    -echo "Average USER process cpu percentage:      $AVGcpuUSER %\n";
    -echo "Average SYSTEM process cpu percentage:    $AVGcpuSYSTEM %\n";
    -echo "Average IDLE process cpu percentage:      $AVGcpuIDLE %\n";
    -
    -echo "\n";
    -echo "---------- LINE GRAPH:\n";
    -
    -
    -
    -##############################
    -#########  Graph stats
    -
    -$DAT = '.dat';
    -$HTM = '.htm';
    -$PNG = '.png';
    -$filedate = date("Y-m-d_His");
    -$DATfile = "$group$query_date$shift$filedate$DAT";
    -$HTMfile = "$group$query_date$shift$filedate$HTM";
    -$PNGfile = "$group$query_date$shift$filedate$PNG";
    -
    -$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
    -$DATfp = fopen ("$DOCroot/$DATfile", "a");
    -
    -$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='" . mysql_real_escape_string($group) . "' and start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' order by timex;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
    -	$row[6] = intval($row[6] * $HIGHmulti);
    -	fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
    -	$i++;
    -	}
    -fclose($DATfp);
    -
    -$rows_to_max = ($rows_to_print + 100);
    -
    -
    -
    -$HTMcontent  = '';
    -$HTMcontent .= "#proc page\n";
    -$HTMcontent .= "#if @DEVICE in png,gif\n";
    -$HTMcontent .= "   scale: 0.6\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#endif\n";
    -$HTMcontent .= "#proc getdata\n";
    -$HTMcontent .= "file: $DOCroot/$DATfile\n";
    -$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc areadef\n";
    -$HTMcontent .= "title: Server $group   $query_date_BEGIN to $query_date_END\n";
    -$HTMcontent .= "titledetails: size=14  align=C\n";
    -$HTMcontent .= "rectangle: 1 1 14 7\n";
    -$HTMcontent .= "xscaletype: time hh:mm:ss\n";
    -$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
    -$HTMcontent .= "yrange: 0 $HIGHload\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc xaxis\n";
    -$HTMcontent .= "stubs: inc 30 minutes\n";
    -$HTMcontent .= "minorticinc: 5 minutes\n";
    -$HTMcontent .= "stubformat: hh:mm:ssa\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc yaxis\n";
    -$HTMcontent .= "stubs: inc 50\n";
    -$HTMcontent .= "grid: color=yellow\n";
    -$HTMcontent .= "gridskip: min\n";
    -$HTMcontent .= "ticincrement: 100 1000\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: userproc\n";
    -$HTMcontent .= "linedetails: color=purple width=.5\n";
    -$HTMcontent .= "fill: lavender\n";
    -$HTMcontent .= "legendlabel: user proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: sysproc\n";
    -$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
    -$HTMcontent .= "fill: dullyellow\n";
    -$HTMcontent .= "legendlabel: system proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: load\n";
    -$HTMcontent .= "linedetails: color=blue width=.5\n";
    -$HTMcontent .= "legendlabel: load\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: processes\n";
    -$HTMcontent .= "linedetails: color=red width=.5\n";
    -$HTMcontent .= "legendlabel: processes\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: channels\n";
    -$HTMcontent .= "linedetails: color=green width=.5\n";
    -$HTMcontent .= "legendlabel: channels\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc legend\n";
    -$HTMcontent .= "location: max-2 max\n";
    -$HTMcontent .= "seglen: 0.2\n";
    -$HTMcontent .= "\n";
    -
    -fwrite ($HTMfp, "$HTMcontent");
    -fclose($HTMfp);
    -
    -
    -passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
    -
    -sleep(1);
    -
    -echo "
    \n"; -echo "\n"; -echo "\n"; - - -echo ""; - -} - - - -?> - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDAD.php deleted file mode 100644 index 52efd9cc..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDAD.php +++ /dev/null @@ -1,255 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 60620-1040 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Agents Time On Calls                         $NOW_TIME    REPORTS\n\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL    | STATUS | START TIME          | MINUTES |\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	$agentcount=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]=' - WAITING - ';
    -			$row[6]=$row[7];
    -			}
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$sessionid =		sprintf("%-9s", $row[2]);
    -		$channel =			sprintf("%-10s", $row[3]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[4]);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 5) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 10) {$G=''; $EG='';}
    -		if (eregi("PAUSED",$row[4])) 
    -			{
    -			if ($call_time_M_int >= 1) 
    -				{$i++; continue;} 
    -			else
    -				{$G=''; $EG='';}
    -			}
    -
    -		$agentcount++;
    -		echo "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -		echo "  $agentcount agents logged in on server $server_ip\n\n";
    -
    -		echo "             - Paused agents\n";
    -		echo "             - 5 minutes or more on call\n";
    -		echo "             - Over 10 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -echo "| CHANNEL    | STATUS | CAMPAIGN | PHONE NUMBER       | START TIME          | MINUTES |\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-8s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -		echo "  $i calls being placed on server $server_ip\n\n";
    -
    -		echo "             - LIVE CALL WAITING\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "******************************* NO LIVE CALLS WAITING *********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDAD_closer.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDAD_closer.php deleted file mode 100644 index eb7d3c39..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDAD_closer.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# CHANGES -# -# 60620-1037 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - -\n"; -echo " - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Agents Time On Calls                         $NOW_TIME    REPORTS\n\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL             | STATUS | CALLTIME | MINUTES | CAMPAIGN     | FRONT  |\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED|CLOSER",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- WAIT -';
    -			$row[6]=$row[7];
    -			}
    -		$extension[$i] =		sprintf("%-10s", $row[0]);
    -		$user[$i] =				sprintf("%-6s", $row[1]);
    -		$sessionid[$i] =		sprintf("%-9s", $row[2]);
    -		$channel[$i] =			sprintf("%-19s", $row[3]);
    -			$cc[$i]=0;
    -		while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
    -			{
    -			$channel[$i] = eregi_replace(".$","",$channel[$i]);   
    -			$cc[$i]++;
    -			if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
    -			}
    -		$status[$i] =			sprintf("%-6s", $row[4]);
    -		$start_time[$i] =		sprintf("%-8s", $row[5]);
    -			$cd[$i]=0;
    -		while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
    -			{
    -			$start_time[$i] = eregi_replace("^.","",$start_time[$i]);   
    -			$cd[$i]++;
    -			if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
    -			}
    -		$uniqueid[$i] =			$row[8];
    -		$lead_id[$i] =			$row[9];
    -		$closer[$i] =			$row[1];
    -		$call_time_S[$i] = ($STARTtime - $row[6]);
    -
    -		$call_time_M[$i] = ($call_time_S[$i] / 60);
    -		$call_time_M[$i] = round($call_time_M[$i], 2);
    -		$call_time_M_int[$i] = intval("$call_time_M[$i]");
    -		$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
    -		$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
    -		$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
    -		if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
    -		$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
    -		$call_time_MS[$i] =		sprintf("%7s", $call_time_MS[$i]);
    -		$i++;
    -		}
    -		$ext_count = $i;
    -		$i=0;
    -	while ($i < $ext_count)
    -		{
    -
    -		$stmt="select campaign_id from vicidial_auto_calls where uniqueid='$uniqueid[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "';";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$camp_to_print = mysql_num_rows($rslt);
    -		if ($camp_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$campaign = sprintf("%-12s", $row[0]);
    -			$camp_color = $row[0];
    -			}
    -		else
    -			{$campaign = 'DEAD        ';   	$camp_color = 'DEAD';}
    -		if (eregi("READY|PAUSED|CLOSER",$status[$i]))
    -			{$campaign = '            ';   	$camp_color = '';}
    -
    -		$stmt="select user from vicidial_xfer_log where lead_id='$lead_id[$i]' and closer='$closer[$i]' order by call_date desc limit 1;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$xfer_to_print = mysql_num_rows($rslt);
    -		if ($xfer_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$fronter = sprintf("%-6s", $row[0]);
    -			}
    -		else
    -			{$fronter = '      ';}
    -
    -		$G = '';		$EG = '';
    -		$G=""; $EG='';
    -	#	if ($call_time_M_int[$i] >= 5) {$G=''; $EG='';}
    -	#	if ($call_time_M_int[$i] >= 10) {$G=''; $EG='';}
    -
    -		echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -		echo "  $i agents logged in on server $server_ip\n\n";
    -
    -	#	echo "             - 5 minutes or more on call\n";
    -	#	echo "             - Over 10 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -#echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -echo "| CHANNEL             | STATUS | CAMPAIGN     | PHONE NUMBER       | CALLTIME | MINUTES |\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id desc;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-19s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 19) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 19) {$cc=101;}
    -			}
    -		$start_time =		sprintf("%-8s", $row[5]);
    -			$cd=0;
    -		while ( (strlen($start_time) > 8) and ($cd < 100) )
    -			{
    -			$start_time = eregi_replace("^.","",$start_time);   
    -			$cd++;
    -			if (strlen($start_time) <= 8) {$cd=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-12s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -		echo "  $i calls being placed on server $server_ip\n\n";
    -
    -		echo "             - LIVE CALL WAITING\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "******************************* NO LIVE CALLS WAITING *********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDADall.php deleted file mode 100644 index 540a5eb6..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDADall.php +++ /dev/null @@ -1,349 +0,0 @@ - LICENSE: GPLv2 -# -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60511-1343 - Added leads and drop info at the top of the screen -# 60608-1539 - Fixed CLOSER tallies for active calls -# 60619-1658 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["RR"])) {$RR=$_GET["RR"];} - elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($group)) {$group='';} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$NOW_DAY = date("Y-m-d"); -$NOW_HOUR = date("H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns where active='Y';"; -$rslt=mysql_query($stmt, $link); -if (!isset($DB)) {$DB=0;} -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!isset($RR)) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if (!isset($reset_counter)) {$reset_counter=0;} -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD Campaign: $group\n"; -echo "
    \n"; -echo "VICIDIAL: Realtime Campaign: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         MODIFY | REPORTS \n"; -echo "\n\n"; - - -if (!$group) {echo "

    please select a campaign from the pulldown above\n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$HOPlev = $row[8]; - -echo "
    "; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; - -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$VDhop = $row[0]; - -$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$DAleads = $row[0]; -$callsTODAY = $row[1]; -$dropsTODAY = $row[2]; -$drpctTODAY = $row[3]; - -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "
    DIAL LEVEL:  $row[0]    STATUSES:  $row[1], $row[2], $row[3], $row[4], $row[5]     ORDER:  $row[6]     FILTER:  $row[7]    
    HOPPER LEVEL:  $HOPlev     LEADS IN HOPPER:  $VDhop     DIALABLE LEADS:  $DAleads       TIME:
    CALLS TODAY:  $callsTODAY     CALLS DROPPED:  $dropsTODAY     DROPPED PERCENT:  $drpctTODAY%       $NOW_TIME
    "; - - -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - { - $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );"; - } -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo " NO LIVE CALLS WAITING \n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVER IP | CALL SERVER IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n\n"; - - $Aecho .= " - Paused agents\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo " NO AGENTS ON CALLS \n";
    -	}
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDADall_SIPmonitor.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDADall_SIPmonitor.php deleted file mode 100644 index 0b24f82e..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonVDADall_SIPmonitor.php +++ /dev/null @@ -1,301 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60504-2023 - Modified click-to-listen for SIP phones by Angelito Manansala -# 60619-1708 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];} -$RR=$_GET["RR"]; if (!$RR) {$RR=$_POST["RR"];} -$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];} -$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];} -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!$RR) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VF DIALER: Time On VDAD Campaign: $group\n"; -echo "
    \n"; -echo "VF DIALER: Realtime Campaign: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         MODIFY | REPORTS \n"; -echo "\n\n"; - -if (!$group) {echo "

    please select a campaign from the pulldown above
    \n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); - -echo "
    "; -echo "DIAL LEVEL: $row[0]         "; -echo "STATUSES: $row[1], $row[2], $row[3], $row[4], $row[5]         "; -echo "ORDER: $row[6]"; -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and (campaign_id='" . mysql_real_escape_string($group) . "' or campaign_id LIKE \"CL_%\");";} -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo " NO LIVE CALLS WAITING \n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VF DIALER: Agents Time On Calls Campaign: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVER IP | CALL SERVER IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - $sessionid = trim($sessionid); - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG LISTEN | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n"; - $Aecho .= " NOTE: Click LISTERN to monitor agent call, you must have installed softphone on you machine.\n\n"; - - - $Aecho .= " - Paused agents\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo " NO AGENTS ON CALLS \n";
    -	}
    -
    -?>
    -
    - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeoncall.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeoncall.php deleted file mode 100644 index 4227f836..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeoncall.php +++ /dev/null @@ -1,180 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Call\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Call                                          $NOW_TIME\n\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -echo "| STATION    | SESSIONID | CHANNEL   | NUMBER DIALED    | START TIME          | MINUTES |\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -
    -$stmt="SELECT count(*) from live_sip_channels where server_ip='$server_ip';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="select extension from live_channels where server_ip='$server_ip';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$ext_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_zap_counter=0;
    -	$sessions = '';
    -	while ($i < $ext_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if (preg_match("/^8600/i",$row[0]))
    -			{
    -			$sessions .= "$row[0]|";
    -			}
    -		$i++;
    -		}
    -	$sessions = preg_replace("/\|$/",'',$sessions);
    -
    -	if ($DB) {echo "SESSIONS: -$sessions-\n";}
    -
    -	$stmt="select * from live_sip_channels where server_ip='$server_ip' order by channel;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_calls_counter=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ( (preg_match("/Zap\/|internal|ring/i",$row[3])) or (preg_match("/Local\//i",$row[0])) )
    -			{
    -			if ($DB) {echo "NOT STATION |$row[0]|$row[3]|\n";}
    -			$session_id = '';
    -			}
    -		else 
    -			{
    -			if (preg_match("/$row[3]/i",$sessions))
    -				{
    -				if ($DB) {echo "LIVE STATION|$row[0]|$row[3]|\n";}
    -				$session_id = $row[3];
    -				$station = preg_replace("/SIP\//",'',$row[0]);
    -				$station = preg_replace("/-.*/",'',$station);
    -			
    -				$LIVE_sessions[$live_calls_counter] =			"$session_id";
    -				$LIVE_sessions_FORMAT[$live_calls_counter] =	sprintf("%-9s", $session_id);
    -				$LIVE_stations[$live_calls_counter] =			"$station";
    -				$LIVE_stations_FORMAT[$live_calls_counter] =	sprintf("%-10s", $station);
    -
    -		#		echo "| $station | $session_id | \n";
    -
    -				$live_calls_counter++;
    -				}
    -			else
    -				{
    -				if ($DB) {echo "NOT STATIONZ|$row[0]|$row[3]|\n";}
    -				$session_id = '';
    -				}
    -			}
    -
    -		$i++;
    -		}
    -
    -		if ($live_calls_counter > 0)
    -		{
    -		$i=0;
    -		$LC_counter = $live_calls_counter;
    -
    -		while ($i < $live_calls_counter)
    -			{
    -			$stmt="select channel,extension,number_dialed,start_time,start_epoch from call_log where extension='$LIVE_stations[$i]' and server_ip='$server_ip' order by uniqueid desc LIMIT 1;";
    -			$rslt=mysql_query($stmt, $link);
    -			if ($DB) {echo "$stmt\n";}
    -			$parked_to_print = mysql_num_rows($rslt);
    -			$row=mysql_fetch_row($rslt);
    -
    -			$channel =			sprintf("%-9s", $row[0]);
    -			$number_dialed =	sprintf("%-16s", $row[2]);
    -			$start_time =		sprintf("%-19s", $row[3]);
    -			$call_time_S = ($STARTtime - $row[4]);
    -
    -			$call_time_M = ($call_time_S / 60);
    -			$call_time_M = round($call_time_M, 2);
    -			$call_time_M_int = intval("$call_time_M");
    -			$call_time_SEC = ($call_time_M - $call_time_M_int);
    -			$call_time_SEC = ($call_time_SEC * 60);
    -			$call_time_SEC = round($call_time_SEC, 0);
    -			if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -			$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -			$call_time_MS =		sprintf("%7s", $call_time_MS);
    -			$G = '';		$EG = '';
    -			if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -			if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -			echo "| $G$LIVE_stations_FORMAT[$i]$EG | $G$LIVE_sessions_FORMAT[$i]$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -			$i++;
    -			}
    -
    -		echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -		echo "  $i stations on live calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on live call\n";
    -		echo "             - Over 30 minutes on live call\n";
    -
    -		}
    -		else
    -		{
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*************************************** NO LIVE STATIONS ********************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*************************************** NO LIVE STATIONS ********************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	}
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonpark.php b/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonpark.php deleted file mode 100644 index 78caf4dc..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/AST_timeonpark.php +++ /dev/null @@ -1,197 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$timeONEhoursAGO = ($STARTtime - 3600); -$epochHALFhoursAGO = ($STARTtime - 1860); -$timeONEhoursAGO = date("Y-m-d H:i:s",$timeONEhoursAGO); -$timeHALFhoursAGO = date("Y-m-d H:i:s",$epochHALFhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where status='TALKING' and grab_time < '$timeONEhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - $stmt="delete from park_log where status='PARKED' and parked_time < '$timeHALFhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Park\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select extension,user,channel,channel_group,parked_time,UNIX_TIMESTAMP(parked_time) from park_log where status ='PARKED' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 1) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i callers waiting on server $server_ip\n\n";
    -
    -		echo "             - 1 minute or more on hold\n";
    -		echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	echo "******************** NO LIVE CALLS WAITING *********************\n";
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	}
    -
    -###################################################################################
    -###### TIME ON INBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Agents Time On Inbound Calls                             $NOW_TIME\n\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,channel,channel_group,grab_time,UNIX_TIMESTAMP(grab_time) from park_log where status ='TALKING' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -		echo "| $G$extension$EG | $G$user$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i agents on calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on call\n";
    -		echo "             - Over 30 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/admin.php b/agc_2-X/trunk/LANG_admin/vicidial_en/admin.php deleted file mode 100644 index 85bf7eae..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/admin.php +++ /dev/null @@ -1,6514 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} - elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} -if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} - elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];} - elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];} - elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];} -if (isset($_GET["park_file_name"])) {$park_file_name=$_GET["park_file_name"];} - elseif (isset($_POST["park_file_name"])) {$park_file_name=$_POST["park_file_name"];} -if (isset($_GET["web_form_address"])) {$web_form_address=$_GET["web_form_address"];} - elseif (isset($_POST["web_form_address"])) {$web_form_address=$_POST["web_form_address"];} -if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} - elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} -if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} - elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["next_agent_call"])) {$next_agent_call=$_GET["next_agent_call"];} - elseif (isset($_POST["next_agent_call"])) {$next_agent_call=$_POST["next_agent_call"];} -if (isset($_GET["local_call_time"])) {$local_call_time=$_GET["local_call_time"];} - elseif (isset($_POST["local_call_time"])) {$local_call_time=$_POST["local_call_time"];} -if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} - elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];} - elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];} -if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} - elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];} - elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} -if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} - elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["dial_status_a"])) {$dial_status_a=$_GET["dial_status_a"];} - elseif (isset($_POST["dial_status_a"])) {$dial_status_a=$_POST["dial_status_a"];} -if (isset($_GET["dial_status_b"])) {$dial_status_b=$_GET["dial_status_b"];} - elseif (isset($_POST["dial_status_b"])) {$dial_status_b=$_POST["dial_status_b"];} -if (isset($_GET["dial_status_c"])) {$dial_status_c=$_GET["dial_status_c"];} - elseif (isset($_POST["dial_status_c"])) {$dial_status_c=$_POST["dial_status_c"];} -if (isset($_GET["dial_status_d"])) {$dial_status_d=$_GET["dial_status_d"];} - elseif (isset($_POST["dial_status_d"])) {$dial_status_d=$_POST["dial_status_d"];} -if (isset($_GET["dial_status_e"])) {$dial_status_e=$_GET["dial_status_e"];} - elseif (isset($_POST["dial_status_e"])) {$dial_status_e=$_POST["dial_status_e"];} -if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} - elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["campaign_vdad_exten"])) {$campaign_vdad_exten=$_GET["campaign_vdad_exten"];} - elseif (isset($_POST["campaign_vdad_exten"])) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];} -if (isset($_GET["campaign_rec_exten"])) {$campaign_rec_exten=$_GET["campaign_rec_exten"];} - elseif (isset($_POST["campaign_rec_exten"])) {$campaign_rec_exten=$_POST["campaign_rec_exten"];} -if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} - elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} -if (isset($_GET["campaign_rec_filename"])) {$campaign_rec_filename=$_GET["campaign_rec_filename"];} - elseif (isset($_POST["campaign_rec_filename"])) {$campaign_rec_filename=$_POST["campaign_rec_filename"];} -if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} - elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} -if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} - elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} -if (isset($_GET["old_campaign_id"])) {$old_campaign_id=$_GET["old_campaign_id"];} - elseif (isset($_POST["old_campaign_id"])) {$old_campaign_id=$_POST["old_campaign_id"];} -if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} - elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} -if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} - elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];} -if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} - elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} -if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} - elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];} - elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} -if (isset($_GET["delete_user_groups"])) {$delete_user_groups=$_GET["delete_user_groups"];} - elseif (isset($_POST["delete_user_groups"])) {$delete_user_groups=$_POST["delete_user_groups"];} -if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} - elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} -if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} - elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} -if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} - elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} -if (isset($_GET["delete_remote_agents"])) {$delete_remote_agents=$_GET["delete_remote_agents"];} - elseif (isset($_POST["delete_remote_agents"])) {$delete_remote_agents=$_POST["delete_remote_agents"];} -if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];} - elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} -if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} - elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} -if (isset($_GET["ast_admin_access"])) {$ast_admin_access=$_GET["ast_admin_access"];} - elseif (isset($_POST["ast_admin_access"])) {$ast_admin_access=$_POST["ast_admin_access"];} -if (isset($_GET["ast_delete_phones"])) {$ast_delete_phones=$_GET["ast_delete_phones"];} - elseif (isset($_POST["ast_delete_phones"])) {$ast_delete_phones=$_POST["ast_delete_phones"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} -if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} - elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} -if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];} - elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];} -if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];} - elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];} -if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} - elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} -if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];} - elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} -if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} - elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} -if (isset($_GET["get_call_launch"])) {$get_call_launch=$_GET["get_call_launch"];} - elseif (isset($_POST["get_call_launch"])) {$get_call_launch=$_POST["get_call_launch"];} -if (isset($_GET["am_message_exten"])) {$am_message_exten=$_GET["am_message_exten"];} - elseif (isset($_POST["am_message_exten"])) {$am_message_exten=$_POST["am_message_exten"];} -if (isset($_GET["amd_send_to_vmx"])) {$amd_send_to_vmx=$_GET["amd_send_to_vmx"];} - elseif (isset($_POST["amd_send_to_vmx"])) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];} -if (isset($_GET["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"];} - elseif (isset($_POST["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];} -if (isset($_GET["xferconf_a_number"])) {$xferconf_a_number=$_GET["xferconf_a_number"];} - elseif (isset($_POST["xferconf_a_number"])) {$xferconf_a_number=$_POST["xferconf_a_number"];} -if (isset($_GET["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"];} - elseif (isset($_POST["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];} -if (isset($_GET["xferconf_b_number"])) {$xferconf_b_number=$_GET["xferconf_b_number"];} - elseif (isset($_POST["xferconf_b_number"])) {$xferconf_b_number=$_POST["xferconf_b_number"];} -if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} - elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} -if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} - elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} -if (isset($_GET["change_agent_campaign"])) {$change_agent_campaign=$_GET["change_agent_campaign"];} - elseif (isset($_POST["change_agent_campaign"])) {$change_agent_campaign=$_POST["change_agent_campaign"];} -if (isset($_GET["agent_choose_ingroups"])) {$agent_choose_ingroups=$_GET["agent_choose_ingroups"];} - elseif (isset($_POST["agent_choose_ingroups"])) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];} -if (isset($_GET["alt_number_dialing"])) {$alt_number_dialing=$_GET["alt_number_dialing"];} - elseif (isset($_POST["alt_number_dialing"])) {$alt_number_dialing=$_POST["alt_number_dialing"];} -if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} - elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} -if (isset($_GET["lead_filter_id"])) {$lead_filter_id=$_GET["lead_filter_id"];} - elseif (isset($_POST["lead_filter_id"])) {$lead_filter_id=$_POST["lead_filter_id"];} -if (isset($_GET["lead_filter_name"])) {$lead_filter_name=$_GET["lead_filter_name"];} - elseif (isset($_POST["lead_filter_name"])) {$lead_filter_name=$_POST["lead_filter_name"];} -if (isset($_GET["lead_filter_comments"])) {$lead_filter_comments=$_GET["lead_filter_comments"];} - elseif (isset($_POST["lead_filter_comments"])) {$lead_filter_comments=$_POST["lead_filter_comments"];} -if (isset($_GET["lead_filter_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} - elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} -if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} - elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} -if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} - elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} -if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];} - elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];} -if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];} - elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];} -if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} - elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} -if (isset($_GET["alter_agent_interface_options"])) {$alter_agent_interface_options=$_GET["alter_agent_interface_options"];} - elseif (isset($_POST["alter_agent_interface_options"])) {$alter_agent_interface_options=$_POST["alter_agent_interface_options"];} -if (isset($_GET["closer_default_blended"])) {$closer_default_blended=$_GET["closer_default_blended"];} - elseif (isset($_POST["closer_default_blended"])) {$closer_default_blended=$_POST["closer_default_blended"];} -if (isset($_GET["drop_call_seconds"])) {$drop_call_seconds=$_GET["drop_call_seconds"];} - elseif (isset($_POST["drop_call_seconds"])) {$drop_call_seconds=$_POST["drop_call_seconds"];} -if (isset($_GET["safe_harbor_message"])) {$safe_harbor_message=$_GET["safe_harbor_message"];} - elseif (isset($_POST["safe_harbor_message"])) {$safe_harbor_message=$_POST["safe_harbor_message"];} -if (isset($_GET["safe_harbor_exten"])) {$safe_harbor_exten=$_GET["safe_harbor_exten"];} - elseif (isset($_POST["safe_harbor_exten"])) {$safe_harbor_exten=$_POST["safe_harbor_exten"];} -if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} - elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} -if (isset($_GET["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} - elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} -if (isset($_GET["call_time_id"])) {$call_time_id=$_GET["call_time_id"];} - elseif (isset($_POST["call_time_id"])) {$call_time_id=$_POST["call_time_id"];} -if (isset($_GET["call_time_name"])) {$call_time_name=$_GET["call_time_name"];} - elseif (isset($_POST["call_time_name"])) {$call_time_name=$_POST["call_time_name"];} -if (isset($_GET["call_time_comments"])) {$call_time_comments=$_GET["call_time_comments"];} - elseif (isset($_POST["call_time_comments"])) {$call_time_comments=$_POST["call_time_comments"];} -if (isset($_GET["ct_default_start"])) {$ct_default_start=$_GET["ct_default_start"];} - elseif (isset($_POST["ct_default_start"])) {$ct_default_start=$_POST["ct_default_start"];} -if (isset($_GET["ct_default_stop"])) {$ct_default_stop=$_GET["ct_default_stop"];} - elseif (isset($_POST["ct_default_stop"])) {$ct_default_stop=$_POST["ct_default_stop"];} -if (isset($_GET["ct_sunday_start"])) {$ct_sunday_start=$_GET["ct_sunday_start"];} - elseif (isset($_POST["ct_sunday_start"])) {$ct_sunday_start=$_POST["ct_sunday_start"];} -if (isset($_GET["ct_sunday_stop"])) {$ct_sunday_stop=$_GET["ct_sunday_stop"];} - elseif (isset($_POST["ct_sunday_stop"])) {$ct_sunday_stop=$_POST["ct_sunday_stop"];} -if (isset($_GET["ct_monday_start"])) {$ct_monday_start=$_GET["ct_monday_start"];} - elseif (isset($_POST["ct_monday_start"])) {$ct_monday_start=$_POST["ct_monday_start"];} -if (isset($_GET["ct_monday_stop"])) {$ct_monday_stop=$_GET["ct_monday_stop"];} - elseif (isset($_POST["ct_monday_stop"])) {$ct_monday_stop=$_POST["ct_monday_stop"];} -if (isset($_GET["ct_tuesday_start"])) {$ct_tuesday_start=$_GET["ct_tuesday_start"];} - elseif (isset($_POST["ct_tuesday_start"])) {$ct_tuesday_start=$_POST["ct_tuesday_start"];} -if (isset($_GET["ct_tuesday_stop"])) {$ct_tuesday_stop=$_GET["ct_tuesday_stop"];} - elseif (isset($_POST["ct_tuesday_stop"])) {$ct_tuesday_stop=$_POST["ct_tuesday_stop"];} -if (isset($_GET["ct_wednesday_start"])) {$ct_wednesday_start=$_GET["ct_wednesday_start"];} - elseif (isset($_POST["ct_wednesday_start"])) {$ct_wednesday_start=$_POST["ct_wednesday_start"];} -if (isset($_GET["ct_wednesday_stop"])) {$ct_wednesday_stop=$_GET["ct_wednesday_stop"];} - elseif (isset($_POST["ct_wednesday_stop"])) {$ct_wednesday_stop=$_POST["ct_wednesday_stop"];} -if (isset($_GET["ct_thursday_start"])) {$ct_thursday_start=$_GET["ct_thursday_start"];} - elseif (isset($_POST["ct_thursday_start"])) {$ct_thursday_start=$_POST["ct_thursday_start"];} -if (isset($_GET["ct_thursday_stop"])) {$ct_thursday_stop=$_GET["ct_thursday_stop"];} - elseif (isset($_POST["ct_thursday_stop"])) {$ct_thursday_stop=$_POST["ct_thursday_stop"];} -if (isset($_GET["ct_friday_start"])) {$ct_friday_start=$_GET["ct_friday_start"];} - elseif (isset($_POST["ct_friday_start"])) {$ct_friday_start=$_POST["ct_friday_start"];} -if (isset($_GET["ct_friday_stop"])) {$ct_friday_stop=$_GET["ct_friday_stop"];} - elseif (isset($_POST["ct_friday_stop"])) {$ct_friday_stop=$_POST["ct_friday_stop"];} -if (isset($_GET["ct_saturday_start"])) {$ct_saturday_start=$_GET["ct_saturday_start"];} - elseif (isset($_POST["ct_saturday_start"])) {$ct_saturday_start=$_POST["ct_saturday_start"];} -if (isset($_GET["ct_saturday_stop"])) {$ct_saturday_stop=$_GET["ct_saturday_stop"];} - elseif (isset($_POST["ct_saturday_stop"])) {$ct_saturday_stop=$_POST["ct_saturday_stop"];} -if (isset($_GET["state_call_time_state"])) {$state_call_time_state=$_GET["state_call_time_state"];} - elseif (isset($_POST["state_call_time_state"])) {$state_call_time_state=$_POST["state_call_time_state"];} -if (isset($_GET["state_rule"])) {$state_rule=$_GET["state_rule"];} - elseif (isset($_POST["state_rule"])) {$state_rule=$_POST["state_rule"];} -if (isset($_GET["delete_call_times"])) {$delete_call_times=$_GET["delete_call_times"];} - elseif (isset($_POST["delete_call_times"])) {$delete_call_times=$_POST["delete_call_times"];} -if (isset($_GET["modify_call_times"])) {$modify_call_times=$_GET["modify_call_times"];} - elseif (isset($_POST["modify_call_times"])) {$modify_call_times=$_POST["modify_call_times"];} -if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} - elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} -if (isset($_GET["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} - elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} -if (isset($_GET["attempt_delay"])) {$attempt_delay=$_GET["attempt_delay"];} - elseif (isset($_POST["attempt_delay"])) {$attempt_delay=$_POST["attempt_delay"];} -if (isset($_GET["attempt_maximum"])) {$attempt_maximum=$_GET["attempt_maximum"];} - elseif (isset($_POST["attempt_maximum"])) {$attempt_maximum=$_POST["attempt_maximum"];} - - if (isset($script_id)) {$script_id= strtoupper($script_id);} - if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS ONLY ### -$user_level = ereg_replace("[^0-9]","",$user_level); -$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); -$xferconf_a_number = ereg_replace("[^0-9]","",$xferconf_a_number); -$xferconf_b_number = ereg_replace("[^0-9]","",$xferconf_b_number); -$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); -$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); -$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); -$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); -$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); -$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); -$drop_exten = ereg_replace("[^0-9]","",$drop_exten); -$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); -$park_ext = ereg_replace("[^0-9]","",$park_ext); -$hopper_level = ereg_replace("[^0-9]","",$hopper_level); -$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); -$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); -$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); -$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); -$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); -$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); -$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); -$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); -$delete_users = ereg_replace("[^0-9]","",$delete_users); -$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); -$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); -$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); -$delete_lists = ereg_replace("[^0-9]","",$delete_lists); -$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); -$delete_filters = ereg_replace("[^0-9]","",$delete_filters); -$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); -$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); -$load_leads = ereg_replace("[^0-9]","",$delete_call_times); -$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); -$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); -$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); -$modify_leads = ereg_replace("[^0-9]","",$modify_leads); -$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); -$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); -$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); -$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); -$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); -$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); -$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); -$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); -$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); -$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); -$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); -$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); -$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); -$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); -$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); -$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); -$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); -$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); -$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); -$user_start = ereg_replace("[^0-9]","",$user_start); -$phone_number = ereg_replace("[^0-9]","",$phone_number); -$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); -$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); -$hotkey = ereg_replace("[^0-9]","",$hotkey); -$list_id = ereg_replace("[^0-9]","",$list_id); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); -$allow_closers = ereg_replace("[^NY]","",$allow_closers); -$reset_hopper = ereg_replace("[^NY]","",$reset_hopper); -$amd_send_to_vmx = ereg_replace("[^NY]","",$amd_send_to_vmx); -$alt_number_dialing = ereg_replace("[^NY]","",$alt_number_dialing); -$safe_harbor_message = ereg_replace("[^NY]","",$safe_harbor_message); -$selectable = ereg_replace("[^NY]","",$selectable); -$reset_list = ereg_replace("[^NY]","",$reset_list); -$fronter_display = ereg_replace("[^NY]","",$fronter_display); -$drop_message = ereg_replace("[^NY]","",$drop_message); -$use_internal_dnc = ereg_replace("[^NY]","",$use_internal_dnc); - -### ALPHA-NUMERIC ONLY ### -$user = ereg_replace("[^0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^0-9a-zA-Z]","",$pass); -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$script_id = ereg_replace("[^0-9a-zA-Z]","",$script_id); -$submit = ereg_replace("[^0-9a-zA-Z]","",$submit); -$CoNfIrM = ereg_replace("[^0-9a-zA-Z]","",$CoNfIrM); -$campaign_cid = ereg_replace("[^0-9a-zA-Z]","",$campaign_cid); -$get_call_launch = ereg_replace("[^0-9a-zA-Z]","",$get_call_launch); -$campaign_recording = ereg_replace("[^0-9a-zA-Z]","",$campaign_recording); -$ADD = ereg_replace("[^0-9a-zA-Z]","",$ADD); -$dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$dial_prefix); -$state_call_time_state = ereg_replace("[^0-9a-zA-Z]","",$state_call_time_state); -$scheduled_callbacks = ereg_replace("[^0-9a-zA-Z]","",$scheduled_callbacks); - -### DIGITS and Dots -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); - -### DIGITS and spaces and hash and star and comma -$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_a_dtmf); -$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_b_dtmf); - -### ALPHA-NUMERIC and underscore and dash -$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); -$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); -$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); -$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); -$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); -$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); -$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); -$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); -$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); -$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); -$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); -$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); -$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); -$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); -$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); -$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); -$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); -$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); -$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); - -### ALPHA-NUMERIC and spaces -$lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); -### ALPHA-NUMERIC and hash -$group_color = ereg_replace("[^\#0-9a-zA-Z]","",$group_color); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); -$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); -$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); -$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); -$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); -$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); -$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); -$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); -$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); -$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); -$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); -$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); -$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); - -### remove semi-colons ### -$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); - -### VARIABLES TO BE mysql_real_escape_string ### -# $web_form_address -# $script_text - -##### END VARIABLE FILTERING FOR SECURITY ##### - - -# AST GUI database administration -# admin.php -# -# CHANGES -# 50315-1110 - Added Custom Campaign Statuses -# 50317-1438 - Added Fronter Display var to inbound groups -# 50322-1355 - Added custom callerID per campaign -# 50517-1356 - Added user_groups sections and user_group to vicidial_users -# 50517-1440 - Added ability to logout (must click OK with empty user/pass) -# 50602-1622 - Added lead loader pages to load new files into vicidial_list -# 50620-1351 - Added custom vdad transfer AGI extension per campaign -# 50810-1414 - modified in groups to kick out spaces and dashes -# 50908-2136 - Added Custom Campaign HotKeys -# 50914-0950 - Fixed user search by user_group -# 50926-1358 - Modified to allow for language translation -# 50926-1615 - Added WeBRooTWritablE write controls -# 51020-1008 - Added editable web address and park ext - NEW dial campaigns -# 51020-1056 - Added fields and help for campaign recording control -# 51123-1335 - Altered code to function in php globals=off -# 51208-1038 - Added user_level changes, function controls and default user phones -# 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents -# 51213-1706 - Added add/delete/modify vicidial scripts -# 51214-1737 - Added preview of vicidial script in popup window -# 51219-1225 - Added campaign and ingroups script selector and get_call_launch field -# 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button -# 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug -# 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen -# 60204-0659 - Fixed hopper reset bug -# 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets -# 60213-1100 - Added several vicidial_users permissions fields -# 60215-1319 - Added On-hold CallBacks display and links -# 60227-1226 - Fixed vicidial_inbound_groups insert bug -# 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables -# - Added status name in selected dial statuses in campaign screen -# 60417-1416 - Added vicidial_lead_filters sections -# - Changed the header links to color-coded sectional with sublinks below -# - Added filter name and script name to campaign and in-group modify sections -# - Added callback and alt dial options to campaigns section -# - Added callback, alt dial and other options to users section -# 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered -# 60421-1441 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60425-2355 - Added agent options to vicidial_users, reformatted user page -# 60502-1627 - Added drop_call_seconds and safe_harbor_ fields to campaign screen -# 60503-1228 - Added drop_call_seconds and drop_ fields to inbound groups screen -# 60505-1117 - Added initial framework for new local_call_times tables and definitions -# 60506-1033 - More revisions to the local_call_time section -# 60508-1354 - Finished call_times and state_call_times sections -# - Added modify/delete options for call_times -# 60509-1311 - Functionalize campaign dialable leads calculation -# - Change state_call_times selection from call_times to only allow one per state -# - Added dialable leads count popup to campaign screen if auto-calc is disabled -# - Added test dialable leads count popup to filter screen -# 60510-1050 - Added Wrapup seconds and Wrapup message to campaigns screen -# 60608-1401 - Added allowable inbound_groups checkboxes to CLOSER campaign detail screen -# 60609-1051 - Added add-to-dnc in LISTS section -# 60613-1415 - Added lead recycling options to campaign detail screen -# 60619-1523 - Added variable filtering to eliminate SQL injection attack threat -# 60622-1216 - Fixed HotKey addition form issues and variable filtering -# 60623-1159 - Fixed Scheduled Callbacks over-filtering bug -# - -# 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 - -$version = '1.1.12-3'; -$build = '60623-1159'; - -$STARTtime = date("U"); - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGuser_level =$row[4]; - $LOGdelete_users =$row[8]; - $LOGdelete_user_groups =$row[9]; - $LOGdelete_lists =$row[10]; - $LOGdelete_campaigns =$row[11]; - $LOGdelete_ingroups =$row[12]; - $LOGdelete_remote_agents =$row[13]; - $LOGload_leads =$row[14]; - $LOGcampaign_detail =$row[15]; - $LOGdelete_scripts =$row[18]; - $LOGdelete_filters =$row[29]; - $LOGalter_agent_interface =$row[30]; - $LOGdelete_call_times =$row[32]; - $LOGmodify_call_times =$row[33]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN: "; - -if (!isset($ADD)) {$ADD=0;} - -if ($ADD==1) {$hh='users'; echo "Add New User";} -if ($ADD==11) {$hh='campaigns'; echo "Add New Campaign";} -if ($ADD==111) {$hh='lists'; echo "Add New List";} -if ($ADD==121) {$hh='lists'; echo "Add New DNC";} -if ($ADD==1111) {$hh='ingroups'; echo "Add New In-Group";} -if ($ADD==11111) {$hh='remoteagent'; echo "Add New Remote Agents";} -if ($ADD==111111) {$hh='usergroups'; echo "Add New Users Group";} -if ($ADD==1111111) {$hh='scripts'; echo "Add New Script";} -if ($ADD==11111111) {$hh='filters'; echo "Add New Filter";} -if ($ADD==111111111) {$hh='times'; echo "Add New Call Time";} -if ($ADD==1111111111) {$hh='times'; echo "Add New State Call Time";} -if ($ADD==2) {$hh='users'; echo "New User Addition";} -if ($ADD==21) {$hh='campaigns'; echo "New Campaign Addition";} -if ($ADD==22) {$hh='campaigns'; echo "New Campaign Status Addition";} -if ($ADD==23) {$hh='campaigns'; echo "New Campaign HotKey Addition";} -if ($ADD==25) {$hh='campaigns'; echo "New Campaign Lead Recycle Addition";} -if ($ADD==211) {$hh='lists'; echo "New List Addition";} -if ($ADD==2111) {$hh='ingroups'; echo "New In-Group Addition";} -if ($ADD==21111) {$hh='remoteagent'; echo "New Remote Agents Addition";} -if ($ADD==211111) {$hh='usergroups'; echo "New Users Group Addition";} -if ($ADD==2111111) {$hh='scripts'; echo "New Script Addition";} -if ($ADD==21111111) {$hh='filters'; echo "New Filter Addition";} -if ($ADD==211111111) {$hh='times'; echo "New Call Time Addition";} -if ($ADD==2111111111) {$hh='times'; echo "New State Call Time Addition";} -if ($ADD==3) {$hh='users'; echo "Modify User";} -if ($ADD==31) {$hh='campaigns'; echo "Modify Campaign";} -if ($ADD==34) {$hh='campaigns'; echo "Modify Campaign - Basic View";} -if ($ADD==311) {$hh='lists'; echo "Modify List";} -if ($ADD==3111) {$hh='ingroups'; echo "Modify In-Group";} -if ($ADD==31111) {$hh='remoteagent'; echo "Modify Remote Agents";} -if ($ADD==311111) {$hh='usergroups'; echo "Modify Users Groups";} -if ($ADD==3111111) {$hh='scripts'; echo "Modify Script";} -if ($ADD==31111111) {$hh='filters'; echo "Modify Filter";} -if ($ADD==311111111) {$hh='times'; echo "Modify Call Time";} -if ($ADD==321111111) {$hh='times'; echo "Modify Call Time State Definitions List";} -if ($ADD==3111111111) {$hh='times'; echo "Modify State Call Time";} -if ($ADD=="4A") {$hh='users'; echo "Modify User - Admin";} -if ($ADD=="4B") {$hh='users'; echo "Modify User - Admin";} -if ($ADD==4) {$hh='users'; echo "Modify User";} -if ($ADD==41) {$hh='campaigns'; echo "Modify Campaign";} -if ($ADD==42) {$hh='campaigns'; echo "Modify Campaign Status";} -if ($ADD==43) {$hh='campaigns'; echo "Modify Campaign HotKey";} -if ($ADD==44) {$hh='campaigns'; echo "Modify Campaign - Basic View";} -if ($ADD==45) {$hh='campaigns'; echo "Modify Campaign Lead Recycle";} -if ($ADD==411) {$hh='lists'; echo "Modify List";} -if ($ADD==4111) {$hh='ingroups'; echo "Modify In-Group";} -if ($ADD==41111) {$hh='remoteagent'; echo "Modify Remote Agents";} -if ($ADD==411111) {$hh='usergroups'; echo "Modify Users Groups";} -if ($ADD==4111111) {$hh='scripts'; echo "Modify Script";} -if ($ADD==41111111) {$hh='filters'; echo "Modify Filter";} -if ($ADD==411111111) {$hh='times'; echo "Modify Call Time";} -if ($ADD==4111111111) {$hh='times'; echo "Modify State Call Time";} -if ($ADD==5) {$hh='users'; echo "Delete User";} -if ($ADD==51) {$hh='campaigns'; echo "Delete Campaign";} -if ($ADD==52) {$hh='campaigns'; echo "Logout Agents";} -if ($ADD==511) {$hh='lists'; echo "Delete List";} -if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==51111) {$hh='remoteagent'; echo "Delete Remote Agents";} -if ($ADD==511111) {$hh='usergroups'; echo "Delete Users Group";} -if ($ADD==5111111) {$hh='scripts'; echo "Delete Script";} -if ($ADD==51111111) {$hh='filters'; echo "Delete Filter";} -if ($ADD==511111111) {$hh='times'; echo "Delete Call Time";} -if ($ADD==5111111111) {$hh='times'; echo "Delete State Call Time";} -if ($ADD==6) {$hh='users'; echo "Delete User";} -if ($ADD==61) {$hh='campaigns'; echo "Delete Campaign";} -if ($ADD==62) {$hh='campaigns'; echo "Logout Agents";} -if ($ADD==65) {$hh='campaigns'; echo "Delete Lead Recycle";} -if ($ADD==611) {$hh='lists'; echo "Delete List";} -if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==61111) {$hh='remoteagent'; echo "Delete Remote Agents";} -if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";} -if ($ADD==6111111) {$hh='scripts'; echo "Delete Script";} -if ($ADD==61111111) {$hh='filters'; echo "Delete Filter";} -if ($ADD==611111111) {$hh='times'; echo "Delete Call Time";} -if ($ADD==6111111111) {$hh='times'; echo "Delete State Call Time";} -if ($ADD==73) {$hh='campaigns'; echo "Dialable Lead Count";} -if ($ADD==7111111) {$hh='scripts'; echo "Preview Script";} -if ($ADD==0) {$hh='users'; echo "Users List";} -if ($ADD==8) {$hh='users'; echo "CallBacks Within Agent";} -if ($ADD==81) {$hh='campaigns'; echo "CallBacks Within Campaign";} -if ($ADD==811) {$hh='campaigns'; echo "CallBacks Within List";} -if ($ADD==10) {$hh='campaigns'; echo "Campaigns";} -if ($ADD==100) {$hh='lists'; echo "Lists";} -if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";} -if ($ADD==10000) {$hh='remoteagent'; echo "Remote Agents";} -if ($ADD==100000) {$hh='usergroups'; echo "User Groups";} -if ($ADD==1000000) {$hh='scripts'; echo "Scripts";} -if ($ADD==10000000) {$hh='filters'; echo "Filters";} -if ($ADD==100000000) {$hh='times'; echo "Call Times";} -if ($ADD==1000000000) {$hh='times'; echo "State Call Times";} -if ($ADD==55) {$hh='users'; echo "Search Form";} -if ($ADD==66) {$hh='users'; echo "Search Results";} -if ($ADD==99999) {$hh='users'; echo "HELP";} - -if ( ($ADD>9) && ($ADD < 99998) ) - { - ##### get scripts listing for dynamic pulldown - $stmt="SELECT script_id,script_name from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $scripts_to_print = mysql_num_rows($rslt); - $scripts_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($scripts_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $scripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $scriptname_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - ##### get filters listing for dynamic pulldown - $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_sql from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - $filters_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($filters_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $filters_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $filtername_list["$rowx[0]"] = "$rowx[1]"; - $filtersql_list["$rowx[0]"] = "$rowx[2]"; - $o++; - } - - ##### get call_times listing for dynamic pulldown - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $times_to_print = mysql_num_rows($rslt); - - $o=0; - while ($times_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $call_times_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $call_timename_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - } - -if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD==21) or ($ADD==31) or ($ADD==41) or ($ADD=="4A") or ($ADD=="4B") ) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ($ADD==31) - { - $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ($ADD==3) - { - $stmt="SELECT closer_campaigns from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_value\""; - $p=0; - while ($p<100) - { - if ($group_id_value == $groups[$p]) - { - $groups_list .= " CHECKED"; - $groups_value .= " $group_id_value"; - } - $p++; - } - $groups_list .= "> $group_id_value - $group_name_value<BR>\n"; - $o++; - } - if (strlen($groups_value)>2) {$groups_value .= " -";} - } - - - - - -$NWB = "   <a href=\"javascript:openNewWindow('$PHP_SELF?ADD=99999"; -$NWE = "')\"><IMG SRC=\"../astguiclient/help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>"; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    VICIDIAL ADMIN: HELP


    \n"; - -?> -VICIDIAL_USERS TABLE

    - -
    -User ID - This field is where you put the VICIDIAL users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. - -
    -
    -
    -Password - This field is where you put the VICIDIAL users password. Must be at least 2 characters in length. - -
    -
    -
    -Full Name - This field is where you put the VICIDIAL users full name. Must be at least 2 characters in length. - -
    -
    -
    -User Level - This menu is where you select the VICIDIAL users user level. Must be a level of 1 to log into VICIDIAL, Must be level greater than 2 to log in as a closer, Must be user level 8 or greater to get into admin web section. - -
    -
    -
    -User Group - This menu is where you select the VICIDIAL users group that this user will belong to. This does not have any restrictions at this time, this is just to subdivide users and allow for future features based upon it. - -
    -
    -
    -Phone Login - Here is where you can set a default phone login value for when the user logs into vicidial.php. This value will populate the phone_login automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. - -
    -
    -
    -Phone Pass - Here is where you can set a default phone pass value for when the user logs into vicidial.php. This value will populate the phone_pass automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. - -
    -
    -
    -HotKeys Active - This option if set to 1 allows the user to use the HotKeys quick-dispositioning function in vicidial.php. - -
    -
    -
    -Agent Choose Ingroups - This option if set to 1 allows the user to choose the ingroups that they will receive calls from when they login to a CLOSER or INBOUND campaign. Otherwise the Manager will need to set this in their user detail screen of the admin page. - -
    -
    -
    -Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - -
    -
    -
    -Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. - -
    -
    -
    -Agent-Only Callbacks - This option allows an agent to set a callback so that they are the only Agent that can call the customer back. This also allows the agent to see their callback listings and call them back any time they want to. - -
    -
    -
    -Agent Call Manual - This option allows an agent to manually enter a new lead into the system and call them. This also allows the calling of any phone number from their vicidial screen and puts that call into their session. Use this option with caution. - -
    -
    -
    -Vicidial Recording - This option can prevent an agent from doing any recordings after they log in to vicidial. This option must be on for vicidial to follow the campaign recording session. - -
    -
    -
    -Vicidial Transfers - This option can prevent an agent from opening the transfer - conference session of vicidial. If this is disabled, the agent cannot third party call or blind transfer any calls. - -
    -
    -
    -Closer Default Blended - This option simply defaults the Blended checkbox on a CLOSER login screen. - -
    -
    -
    -Alter Agent Interface Options - This option if set to 1 allows the administrative user to modify the Agents interface options in admin.php. - -
    -
    -
    -Delete Users - This option if set to 1 allows the user to delete other users of equal or lesser user level from the system. - -
    -
    -
    -Delete User Groups - This option if set to 1 allows the user to delete user groups from the system. - -
    -
    -
    -Delete Lists - This option if set to 1 allows the user to delete vicidial lists from the system. - -
    -
    -
    -Delete Campaigns - This option if set to 1 allows the user to delete vicidial campaigns from the system. - -
    -
    -
    -Delete In-Groups - This option if set to 1 allows the user to delete vicidial In-Groups from the system. - -
    -
    -
    -Delete Remote Agents - This option if set to 1 allows the user to delete vicidial remote agents from the system. - -
    -
    -
    -Load Leads - This option if set to 1 allows the user to load vicidial leads into the vicidial_list table by way of the web based lead loader. - -
    -
    -
    -Campaign Detail - This option if set to 1 allows the user to view and modify the campaign detail screen elements. - -
    -
    -
    -AGC Admin Access - This option if set to 1 allows the user to login to the astGUIclient admin pages. - -
    -
    -
    -AGC Delete Phones - This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages. - -
    -
    -
    -Delete Scripts - This option if set to 1 allows the user to delete Campaign scripts in the script modification screen. - -
    -
    -
    -Modify Leads - This option if set to 1 allows the user to modify leads in the admin section lead search results page. - -
    -
    -
    -Change Agent Campaign - This option if set to 1 allows the user to alter the campaign that an agent is logged into while they are logged into it. - -
    -
    -
    -Delete Filters - This option allows the user to be able to delete vicidial lead filters from the system. - -
    -
    -
    -Delete Call Times - This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system. - -
    -
    -
    -Modify Call Times - This option allows the user to view and modify the call times and state call times records. A user doesn't need this option enabled if they only need to change the call times option on the campaigns screen. - - - - -



    - -VICIDIAL_CAMPAIGNS TABLE

    -
    -
    -Campaign ID - This is the short name of the campaign, it is not editable after initial submission, cannot contain spaces and must be between 2 and 8 characters in length. - -
    -
    -
    -Campaign Name - This is the description of the campaign, it must be between 6 and 40 characters in length. - -
    -
    -
    -Active - This is where you set the campaign to Active or Inactive. If Inactive, noone can log into it. - -
    -
    -
    -Park Extension - This is where you can customize the on-hold music for VICIDIAL. Make sure the extension is in place in the extensions.conf and that it points to the filename below. - -
    -
    -
    -Park File Name - This is where you can customize the on-hold music for VICIDIAL. Make sure the filename is 10 characters in length or less and that the file is in place in the /var/lib/asterisk/sounds directory. - -
    -
    -
    -Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. - -
    -
    -
    -Allow Closers - This is where you can set whether the users of this campaign will have the option to send the call to a closer. - -
    -
    -
    -Dial Status - This is where you set the statuses that you are wanting to dial on within the lists that are active for the campaign below - -
    -
    -
    -List Order - This menu is where you select how the leads that match the statuses selected above will be put in the lead hopper: -
      - DOWN: select the first leads loaded into the vicidial_list table -
      - UP: select the last leads loaded into the vicidial_list table -
      - UP PHONE: select the highest phone number and works its way down -
      - DOWN PHONE: select the lowest phone number and works its way up -
      - UP LAST NAME: starts with last names starting with Z and works its way down -
      - DOWN LAST NAME: starts with last names starting with A and works its way up -
      - UP COUNT: starts with most called leads and works its way down -
      - DOWN COUNT: starts with least called leads and works its way up -
      - DOWN COUNT 2nd NEW: starts with least called leads and works its way up inserting a NEW lead in every other lead - Must NOT have NEW selected in the dial statuses -
      - DOWN COUNT 3nd NEW: starts with least called leads and works its way up inserting a NEW lead in every third lead - Must NOT have NEW selected in the dial statuses -
      - DOWN COUNT 4th NEW: starts with least called leads and works its way up inserting a NEW lead in every forth lead - Must NOT have NEW selected in the dial statuses - -
    -
    -
    -Hopper Level - This is how many leads the VDhopper script tries to keep in the vicidial_hopper table for this campaign. If running VDhopper script every minute, make this slightly greater than the number of leads you go through in a minute. - -
    -
    -
    -Lead Filter - This is a method of filtering your leads using a fragment of a SQL query. Use this feature with caution, it is easy to stop dialing accidentally with the slightest alteration to the SQL statement. Default is NONE. - -
    -
    -
    -Force Reset of Hopper - This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs. - -
    -
    -
    -Auto Dial Level - This is where you set how many lines VICIDIAL should use per active agent. zero 0 means auto dialing is off and the agents will click to dial each number. Otherwise VICIDIAL will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. - -
    -
    -
    -Next Agent Call - This determines which agent receives the next call that is available: -
      - random: orders by the random update value in the vicidial_live_agents table -
      - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
      - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. -
      - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. - -
    -
    -
    -Local Call Time - This is where you set during which hours you would like to dial, as determined by the local time in the are in which you are calling. This is controlled by area code and is adjusted for Daylight Savings time if applicable. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm. - -
    -
    -
    -Dial Timeout - If defined, calls that would normally hangup after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve. - -
    -
    -
    -Dial Prefix - This field allows for more easily changing a path of dialing to go out through a different method without doing a reload in Asterisk. Default is 9 based upon a 91NXXNXXXXXX in the dialplan - extensions.conf. - -
    -
    -
    -Campaign CallerID - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service(RBS) circuits. This will also work through most VOIP(SIP or IAX trunks) providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. - -
    -
    -
    -Campaign VDAD extension - This field allows for a custom VDAD transfer extension. This allows you to use different VDADtransfer...agi scripts depending upon your campaign. The default transfer AGI - exten 8365 agi-VDADtransfer.agi - just immediately sends the calls on to agents as soon as they are picked up. An additional sample political survey AGI is also now included - 8366 agi-VDADtransferSURVEY.agi - that plays a message to the called person and allows them to make a choice by pressing buttons - effectively pre-screening the lead - . Please note that except for surveys, political calls and charities this form of calling is illegal in the United States. - -
    -
    -
    -Campaign Rec extension - This field allows for a custom recording extension to be used with VICIDIAL. This allows you to use different extensions depending upon how long you want to allow a maximum recording and what type of codec you want to record in. The default exten is 8309 which if you follow the SCRATCH_INSTALL examples will record in the WAV format for upto one hour. Another option included in the examples is 8310 which will record in GSM format for upto one hour. - -
    -
    -
    -Campaign Recording - This menu allows you to choose what level of recording is allowed on this campaign. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. - -
    -
    -
    -Campaign Rec Filename - This field allows you to customize the name of the recording when Campaign recording is ONDEMAND or ALLCALLS. The allowed variables are CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. 50 char max. - -
    -
    -
    -Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. - -
    -
    -
    -Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. - -
    -
    -
    -Answering Machine Message - This field is for entering in an extension to blind transfer calls to when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this exten up in the dialplan - extensions.conf - and make sure it plays an audio file then hangs up. - -
    -
    -
    -AMD send to vm exten - This menu allows you to define whether a message is left on an answering machine when it is detected. the call will be immediately forwarded to the Answering-Machine-Message extension if AMD is active and it is determined that the call is an answering machine. - -
    -
    -
    -Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. - -
    -
    -
    -Agent Alt Num Dialing - This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called. - -
    -
    -
    -Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. - -
    -
    -
    -Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls. - -
    -
    -
    -Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. - -
    -
    -
    -Safe Harbor Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y. - -
    -
    -
    -Safe Harbor Exten - This is the dialplan extension that the desired Safe Harbor audio file is located at on your server. - -
    -
    -
    -Wrapup Seconds - The number of seconds to force an agent to wait before allowing them to receive or dial another call. The timer begins as soon as an agent hangs up on their customer - or in the case of alternate number dialing when the agent finishes the lead - Default is 0 seconds. If the timer runs out before the agent has dispositioned the call, the agent still will NOT move on to the next call until they select a disposition. - -
    -
    -
    -Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set. - -
    -
    -
    -Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set. - -
    -
    -
    -Use Internal DNC List - This defines whether this campaign is to filter leads against the Internal DNC list. If it is set to Y, the hopper will look for each phone number in the DNC list before placing it in the hopper. If it is in the DNC list then it will change that lead status to DNCL so it cannot be dialed. Default is N. - -
    -
    -
    -Allowed Inbound Groups - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound/outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. - - - -



    - -VICIDIAL_LISTS TABLE

    -
    -
    -List ID - This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. - -
    -
    -
    -List Name - This is the description of the list, it must be between 2 and 20 characters in length. - -
    -
    -
    -Campaign - This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time. - -
    -
    -
    -Active - This defines whether the list is to be dialed on or not. - -
    -
    -
    -Reset Lead-Called-Status for this list - This resets all leads in this list to N for "not called since last reset" and means that any lead can now be called if it is the right status as defined in the campaign screen. - -
    -
    -
    -VICIDIAL DNC List - This Do Not Call list contains every lead that has been set to a status of DNC in the system. Through the LISTS - ADD NUMBER TO DNC page you are able to manually add a number to this list so that it will not be called by campaigns that use the internal DNC list. - - - -



    - -VICIDIAL_INBOUND_GROUPS TABLE

    -
    -
    -Group ID - This is the short name of the inbound group, it is not editable after initial submission, must not contain any spaces and must be between 2 and 20 characters in length. - -
    -
    -
    -Group Name - This is the description of the group, it must be between 2 and 30 characters in length. Cannot include dashes, plusses or spaces . - -
    -
    -
    -Group Color - This is the color that displays in the VICIDIAL client app when a call comes in on this group. It must be between 2 and 7 characters long. If this is a hex color definition you must remember to put a # at the beginning of the string or VICIDIAL will not work properly. - -
    -
    -
    -Active - This determines whether this group show up in the selection box when a VICIDIAL agent logs in. - -
    -
    -
    -Web Form - This is the custom address that clicking on the WEB FORM button in VICIDIAL will take you to for calls that come in on this group. - -
    -
    -
    -Next Agent Call - This determines which agent receives the next call that is available: -
      - random: orders by the random update value in the vicidial_live_agents table -
      - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
      - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. -
      - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. - -
    -
    -
    -Fronter Display - This field determines whether the inbound VICIDIAL agent would have the fronter name - if there is one - displayed in the Status field when the call comes to the agent. - -
    -
    -
    -Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. - -
    -
    -
    -Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. - -
    -
    -
    -Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. - -
    -
    -
    -Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls. - -
    -
    -
    -Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. - -
    -
    -
    -Drop Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y. - -
    -
    -
    -Drop Exten - This is the dialplan extension that the desired Dropped call audio file is located at on your server. - - - -



    - -VICIDIAL_REMOTE_AGENTS TABLE

    -
    -
    -User ID Start - This is the starting User ID that is used when the remote agent entries are inserted into the system. If the Number of Lines is set higher than 1, this number is incremented by one until each line has an entry. Make sure you create a new VICIDIAL user account with a user level of 4 or great if you want them to be able to use the vdremote.php page for remote web access of this account. - -
    -
    -
    -Number of Lines - This defines how many remote agent entries the system creates, and determines how many lines it thinks it can safely send to the number below. - -
    -
    -
    -Server IP - A remote agent entry is only good for one specific server, here is where you select which server you want. - -
    -
    -
    -External Extension - This is the number that you want the calls forwarded to. Make sure that it is a full dialplan number and that if you need a 9 at the beginning you put it in here. Test by dialing this number from a phone on the system. - -
    -
    -
    -Status - Here is where you turn the remote agent on and off. As soon as the agent is Active the system assumes that it can send calls to it. It may take up to 30 seconds once you change the status to Inactive to stop receiving calls. - -
    -
    -
    -Campaign - Here is where you select the campaign that these remote agents will be logged into. Inbound needs to use the CLOSER campaign and select the inbound campaigns below that you want to receive calls from. - -
    -
    -
    -Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - - -



    - -VICIDIAL_CAMPAIGN_LISTS

    -
    -
    -The lists within this campaign are listed here, whether they are active is denoted by the Y or N and you can go to the list screen by clicking on the list ID in the first column. - - -



    - -VICIDIAL_CAMPAIGN_STATUSES TABLE

    -
    -
    -Through the use of custom campaign statuses, you can have statuses that only exist for a specific campaign. The Status must be 1-8 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as a disposition. - - - -



    - -VICIDIAL_CAMPAIGN_HOTKEYS TABLE

    -
    -
    -Through the use of custom campaign hotkeys, agents that use the vicidial web-client can hangup and disposition calls just by pressing a single key on their keyboard. - - - - -



    - -VICIDIAL_LEAD_RECYCLE TABLE

    -
    -
    -Through the use of lead recycling, you can call specific statuses of leads again at a specified interval without resetting the entire list. Lead recycling is campaign-specific and does not have to be a selected dialable status in your campaign. The attempt delay field is the number of seconds until the lead can be placed back in the hopper, this number must be at least 120 seconds. The attempt maximum field is the maximum number of times that a lead of this status can be attempted before the list needs to be reset, this number can be from 1 to 10. You can activate and deactivate a lead recycle entry with the provided links. This feature only works in auto-dial mode, where dial level is greater than 0. - - - - - -



    - -VICIDIAL_USER_GROUPS TABLE

    -
    -
    -User Group - This is the short name of a Vicidial User group, try not to use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. - -
    -
    -
    -Group Name - This is the description of the vicidial user group max of 40 characters. - - - - - -



    - -VICIDIAL_SCRIPTS TABLE

    -
    -
    -Script ID - This is the short name of a Vicidial Script. This needs to be a unique identifier. Try not to use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Script Name - This is the title of a Vicidial Script. This is a short summary of the script. max 50 characters, minimum of 2 characters. There should be no spaces or punctuation of any kind in theis field. - -
    -
    -Script Comments - This is where you can place comments for a Vicidial Script such as -changed to free upgrade on Sept 23-. max 255 characters, minimum of 2 characters. - -
    -
    -Script Text - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments. For example, this sentence would print the persons name in it----

    Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

    This would read----

    Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today? - -
    -
    -
    -Active - This determines whether this script can be selected to be used by a campaign. - - - - - -



    - -VICIDIAL_LEAD_FILTERS TABLE

    -
    -
    -Filter ID - This is the short name of a Vicidial Lead Filter. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Filter Name - This is a more descriptive name of the Filter. This is a short summary of the filter. max 30 characters, minimum of 2 characters. - -
    -
    -Filter Comments - This is where you can place comments for a Vicidial Filter such as -calls all California leads-. max 255 characters, minimum of 2 characters. - -
    -
    -Filter SQL - This is where you place the SQL query fragment that you want to filter by. do not begin or end with an AND, that will be added by the hopper cron script automatically. an example SQL query that would work here is- called_count > 4 and called_count < 8 -. - - - - - -



    - -VICIDIAL_CALL TIMES TABLE

    -
    -
    -Call Time ID - This is the short name of a Vicidial Call Time Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Call Time Name - This is a more descriptive name of the Call Time Definition. This is a short summary of the Call Time definition. max 30 characters, minimum of 2 characters. - -
    -
    -Call Time Comments - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters. - -
    -
    -Default Start and Stop Times - This is the default time that calling will be allowed to be started or stopped within this call time definition if the day-of-the-week start time is not defined. 0 is midnight. To prevent calling completely set this field to 2400 and set the Default Stop time to 2400. To allow calling 24 hours a day set the start time to 0 and the stop time to 2400. - -
    -
    -Weekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times. - -
    -
    -State Call Time Definitions - This is the list of State specific call time definitions that are followed in this Call Time Definition. - -
    -
    -State Call Time State - This is the two letter code for the state that this calling time definition is for. For this to be in effect the local call time that is set in the campaign must have this state call time record in it as well as all of the leads having two letter state codes in them. - - - - -



    - -VICIDIAL LIST LOADER FUNCTIONALITY

    -
    -
    -The VICIDIAL basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. There is also a new beta version super lead loader that allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation or check for duplicates in itself or other lists, so that is something you need to do before you load the leads. Also, make sure that you have created the list that these leads are to be under so that you can use them. There is also the matter of time-zone-coding these leads. You may want to increase the frequency that the ADMIN_adjust_GMTnow_on_leads.pl is being run in the cron on your Asterisk server so that any loaded leads can be coded faster. Here is a list of the fields in their proper order for the lead files: -
      -
    1. Vendor Lead Code - shows up in the Vendor ID field of the GUI -
    2. Source Code - internal use only for admins and DBAs -
    3. List ID - the list number that these leads will show up under -
    4. Phone Code - the prefix for the phone number - 1 for US, 01144 for UK, 01161 for AUS, etc -
    5. Phone Number - must be at least 8 digits long -
    6. Title - title of the customer - Mr. Ms. Mrs, etc... -
    7. First Name -
    8. Middle Initial -
    9. Last Name -
    10. Address Line 1 -
    11. Address Line 2 -
    12. Address Line 3 -
    13. City -
    14. State - limited to 2 characters -
    15. Province -
    16. Postal Code -
    17. Country -
    18. Gender -
    19. Date of Birth -
    20. Alternate Phone Number -
    21. Email Address -
    22. Security Phrase -
    23. Comments -
    - -
    NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /home/cron/AST_SERVER_conf.pl file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. - -







    -







    -THE END -
    -\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$dial_status_a = $row[3]; -$dial_status_b = $row[4]; -$dial_status_c = $row[5]; -$dial_status_d = $row[6]; -$dial_status_e = $row[7]; -$local_call_time = $row[16]; -if ($lead_filter_id=='') - { - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') - { - $lead_filter_id='NONE'; - } - } - -$stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; -$rslt=mysql_query($stmt, $link); -$lists_to_print = mysql_num_rows($rslt); -$camp_lists=''; -$o=0; -while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; -if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";} -} -$camp_lists = eregi_replace(".$","",$camp_lists); - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - -echo "

    \n"; -echo "Show Dialable Leads Count -

    \n"; -echo "CAMPAIGN: $campaign_id
    \n"; -echo "LISTS: $camp_lists
    \n"; -echo "STATUSES: $dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e
    \n"; -echo "FILTER: $lead_filter_id
    \n"; -echo "CALL TIME: $local_call_time

    \n"; - -### call function to calculate and print dialable leads -dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - -echo "

    \n"; -echo "\n"; - -exit; -} - - -###################### -# ADD=7111111 view sample script with test variables -###################### - -if ($ADD==7111111) -{ - ##### TEST VARIABLES ##### - $vendor_lead_code = 'VENDORLEADCODE'; - $list_id = 'LISTID'; - $gmt_offset_now = 'GMTOFFSET'; - $phone_code = '1'; - $phone_number = '7275551212'; - $title = 'Mr.'; - $first_name = 'JOHN'; - $middle_initial = 'Q'; - $last_name = 'PUBLIC'; - $address1 = '1234 Main St.'; - $address2 = 'Apt. 3'; - $address3 = 'ADDRESS3'; - $city = 'CHICAGO'; - $state = 'IL'; - $province = 'PROVINCE'; - $postal_code = '33760'; - $country_code = 'USA'; - $gender = 'M'; - $date_of_birth = '1970-01-01'; - $alt_phone = '3125551212'; - $email = 'test@test.com'; - $security_phrase = 'SECUTIRY'; - $comments = 'COMMENTS FIELD'; - $RGfullname = 'JOE AGENT'; - $RGuser = '6666'; - -echo "\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$script_name = $row[1]; -$script_text = $row[3]; - -$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); -$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text); -$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text); -$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text); -$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text); -$script_text = eregi_replace('--A--title--B--',"$title",$script_text); -$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text); -$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text); -$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text); -$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text); -$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text); -$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text); -$script_text = eregi_replace('--A--city--B--',"$city",$script_text); -$script_text = eregi_replace('--A--state--B--',"$state",$script_text); -$script_text = eregi_replace('--A--province--B--',"$province",$script_text); -$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text); -$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text); -$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text); -$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text); -$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text); -$script_text = eregi_replace('--A--email--B--',"$email",$script_text); -$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text); -$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text); -$script_text = eregi_replace('--A--fullname--B--',"$RGfullname",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace("\n","
    ",$script_text); - - -echo ""; - -echo "Preview Script: $script_id
    \n"; -echo "
    \n"; -echo "
    $script_name
    \n"; -echo "$script_text\n"; -echo "
    \n"; - -echo "\n"; - -exit; -} - - - - -######################### HTML HEADER BEGIN ####################################### -if ($hh=='users') {$users_hh='bgcolor ="#FFFF99"'; $users_fc='BLACK';} # yellow - else {$users_hh=''; $users_fc='WHITE';} -if ($hh=='campaigns') {$campaigns_hh='bgcolor ="#FFCC99"'; $campaigns_fc='BLACK';} # orange - else {$campaigns_hh=''; $campaigns_fc='WHITE';} -if ($hh=='lists') {$lists_hh='bgcolor ="#FFCCCC"'; $lists_fc='BLACK';} # red - else {$lists_hh=''; $lists_fc='WHITE';} -if ($hh=='ingroups') {$ingroups_hh='bgcolor ="#CC99FF"'; $ingroups_fc='BLACK';} # purple - else {$ingroups_hh=''; $ingroups_fc='WHITE';} -if ($hh=='remoteagent') {$remoteagent_hh='bgcolor ="#CCFFCC"'; $remoteagent_fc='BLACK';} # green - else {$remoteagent_hh=''; $remoteagent_fc='WHITE';} -if ($hh=='usergroups') {$usergroups_hh='bgcolor ="#CCFFFF"'; $usergroups_fc='BLACK';} # cyan - else {$usergroups_hh=''; $usergroups_fc='WHITE';} -if ($hh=='scripts') {$scripts_hh='bgcolor ="#99FFCC"'; $scripts_fc='BLACK';} # light teal - else {$scripts_hh=''; $scripts_fc='WHITE';} -if ($hh=='filters') {$filters_hh='bgcolor ="#CCCCCC"'; $filters_fc='BLACK';} # grey - else {$filters_hh=''; $filters_fc='WHITE';} -if ($hh=='times') {$times_hh='bgcolor ="#99FF33"'; $times_fc='BLACK';} # hard teal - else {$times_hh=''; $times_fc='WHITE';} - -?> - - - - -\n"; -echo "
    English Español
    - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - - - - -
      VICIDIAL ADMIN - Logout  
    > SIZE=1> USERS > SIZE=1> CAMPAIGNS > SIZE=1> LISTS > SIZE=1> SCRIPTS > SIZE=1> FILTERS > SIZE=1> IN-GROUPS > SIZE=1> CALL TIMES > SIZE=1> USER GROUPS > SIZE=1> REMOTE AGENTS > REPORTS
      LIST USERS     |     ADD A NEW USER     |     SEARCH FOR A USER
      ADD CAMPAIGN     |     LIST CAMPAIGNS
      SHOW LISTS     |     ADD NEW LIST     |     SEARCH FOR A LEAD |     ADD NUMBER TO DNC           |     LOAD NEW LEADS
      ADD SCRIPT     |     VIEW SCRIPTS
      ADD FILTER     |     VIEW FILTERS
      SHOW IN-GROUPS     |     ADD NEW IN-GROUP
      SHOW CALL TIMES     |     ADD NEW CALL TIME     |     SHOW STATE CALL TIMES     |     ADD NEW STATE CALL TIME  
      ADD USER GROUP     |     LIST USER GROUPS     |     GROUP HOURLY
      SHOW REMOTE AGENTS     |     ADD NEW REMOTE AGENTS
     
    -
    \n"; -echo ""; - -echo "
    ADD A NEW USER
    \n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "$NWB#vicidial_users-user_group$NWE\n"; -echo "\n"; -echo "
    User Number: $NWB#vicidial_users-user$NWE
    Password: $NWB#vicidial_users-pass$NWE
    Full Name: $NWB#vicidial_users-full_name$NWE
    User Level: $NWB#vicidial_users-user_level$NWE
    User Group:
    Phone Login: $NWB#vicidial_users-phone_login$NWE
    Phone Pass: $NWB#vicidial_users-phone_pass$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN -###################### - -if ($ADD==11) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW CAMPAIGN\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Campaign ID: $NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: $NWB#vicidial_campaigns-park_ext$NWE
    Park Filename: $NWB#vicidial_campaigns-park_file_name$NWE
    Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Next Agent Call: $NWB#vicidial_campaigns-next_agent_call$NWE
    Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW LIST FORM SCREEN -###################### - -if ($ADD==111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    List ID: (digits only)$NWB#vicidial_lists-list_id$NWE
    List Name: $NWB#vicidial_lists-list_name$NWE
    Campaign: $NWB#vicidial_lists-campaign_id$NWE
    Active: $NWB#vicidial_lists-active$NWE
    \n"; - -} - - -###################### -# ADD=121 display the ADD NUMBER TO DNC FORM SCREEN and add a new number -###################### - -if ($ADD==121) -{ -echo "
    \n"; -echo ""; - -if (strlen($phone_number) > 2) - { - $stmt="SELECT count(*) from vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    DNC NOT ADDED - This phone number is already in the Do Not Call List: $phone_number

    \n";} - else - { - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$phone_number');"; - $rslt=mysql_query($stmt, $link); - - echo "
    DNC ADDED: $phone_number

    \n"; - - ### LOG INSERTION TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW DNC NUMBER|$PHP_AUTH_USER|$ip|'$phone_number'|\n"); - fclose($fp); - } - } - } - -echo "
    ADD A NUMBER TO THE DNC LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    Phone Number: (digits only)$NWB#vicidial_list-dnc$NWE
    \n"; - -} - - -###################### -# ADD=1111 display the ADD NEW INBOUND GROUP SCREEN -###################### - -if ($ADD==1111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW INBOUND GROUP\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group ID: (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE
    Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
    Active: $NWB#vicidial_inbound_groups-active$NWE
    Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN -###################### - -if ($ADD==11111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW REMOTE AGENTS\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
    External Extension: (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status: $NWB#vicidial_remote_agents-status$NWE
    Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Groups: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - -###################### -# ADD=111111 display the ADD NEW USERS GROUP SCREEN -###################### - -if ($ADD==111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW USERS GROUP\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
    Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -} - - -###################### -# ADD=1111111 display the ADD NEW SCRIPT SCREEN -###################### - -if ($ADD==1111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW SCRIPT\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Script ID: (no spaces or punctuation)$NWB#vicidial_scripts-script_id$NWE
    Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
    Script Comments: $NWB#vicidial_scripts-script_comments$NWE
    Active: $NWB#vicidial_scripts-active$NWE
    Script Text: $NWB#vicidial_scripts-script_text$NWE
    \n"; - -} - - -###################### -# ADD=11111111 display the ADD NEW FILTER SCREEN -###################### - -if ($ADD==11111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW FILTER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Filter ID: (no spaces or punctuation)$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; -} - - -###################### -# ADD=111111111 display the ADD NEW CALL TIME SCREEN -###################### - -if ($ADD==111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW CALL TIME\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    Call Time ID: (no spaces or punctuation)$NWB#vicidial_call_times-call_time_id$NWE
    Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Day and time options will appear once you have created the Call Time Definition
    \n"; -} - - -###################### -# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN -###################### - -if ($ADD==1111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW STATE CALL TIME\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    State Call Time ID: (no spaces or punctuation)$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: (no spaces or punctuation)$NWB#vicidial_call_times-state_call_time_state$NWE
    State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    State Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Day and time options will appear once you have created the Call Time Definition
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 2 series, validates form data and inserts the new record into the database -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=2 adds the new user to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USER NOT ADDED - there is already a user in the system with this user number\n";} - else - { - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) - { - echo "
    USER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    user id must be between 2 and 8 characters long\n"; - echo "
    full name and password must be at least 2 characters long\n"; - } - else - { - echo "
    USER ADDED: $user\n"; - - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass) values('$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A USER |$PHP_AUTH_USER|$ip|'$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass'|\n"); - fclose($fp); - } - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new campaign to the system -###################### - -if ($ADD==21) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) - { - echo "
    CAMPAIGN NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    campaign ID must be between 2 and 8 characters in length\n"; - echo "
    campaign name must be between 6 and 40 characters in length\n"; - } - else - { - echo "
    CAMPAIGN ADDED: $campaign_id\n"; - - $stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,active,dial_status_a,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,campaign_script,get_call_launch) values('$campaign_id','$campaign_name','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - echo ""; - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - - } - } -$ADD=31; -} - -###################### -# ADD=22 adds the new campaign status to the system -###################### - -if ($ADD==22) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN STATUS NOT ADDED - there is already a campaign-status in the system with this name\n";} - else - { - $stmt="SELECT count(*) from vicidial_statuses where status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) - { - echo "
    CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 8 characters in length\n"; - echo "
    status name must be between 2 and 30 characters in length\n"; - } - else - { - echo "
    CAMPAIGN STATUS ADDED: $campaign_id - $status\n"; - - $stmt="INSERT INTO vicidial_campaign_statuses values('$status','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN STATUS |$PHP_AUTH_USER|$ip|'$status','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } - } -$ADD=31; -} - - -###################### -# ADD=23 adds the new campaign hotkey to the system -###################### - -if ($ADD==23) -{ - $HKstatus_data = explode('-----',$HKstatus); - $status = $HKstatus_data[0]; - $status_name = $HKstatus_data[1]; - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_hotkeys where campaign_id='$campaign_id' and hotkey='$hotkey' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN HOTKEY NOT ADDED - there is already a campaign-hotkey in the system with this hotkey\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    CAMPAIGN HOTKEY NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    hotkey must be a single character between 1 and 9 \n"; - echo "
    status must be between 1 and 8 characters in length\n"; - } - else - { - echo "
    CAMPAIGN HOTKEY ADDED: $campaign_id - $status - $hotkey\n"; - - $stmt="INSERT INTO vicidial_campaign_hotkeys values('$status','$hotkey','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN HOTKEY |$PHP_AUTH_USER|$ip|'$status','$hotkey','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=25 adds the new campaign lead recycle entry to the system -###################### - -if ($ADD==25) -{ - $status = eregi_replace("-----.*",'',$status); - echo ""; - $stmt="SELECT count(*) from vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN LEAD RECYCLE NOT ADDED - there is already a lead-recycle for this campaign with this status\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD RECYCLE ADDED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="INSERT INTO vicidial_lead_recycle(campaign_id,status,attempt_delay,attempt_maximum,active) values('$campaign_id','$status','$attempt_delay','$attempt_maximum','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new list to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    LIST NOT ADDED - there is already a list in the system with this ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or (strlen($list_id) < 2) or (strlen($list_id) > 8) ) - { - echo "
    LIST NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    List ID must be between 2 and 8 characters in length\n"; - echo "
    List name must be at least 2 characters in length\n"; - } - else - { - echo "
    LIST ADDED: $list_id\n"; - - $stmt="INSERT INTO vicidial_lists values('$list_id','$list_name','$campaign_id','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LIST |$PHP_AUTH_USER|$ip|'$list_id','$list_name','$campaign_id','$active'|\n"); - fclose($fp); - } - } - } -$ADD=311; -} - - - -###################### -# ADD=2111 adds the new inbound group to the system -###################### - -if ($ADD==2111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    GROUP NOT ADDED - there is already a group in the system with this ID\n";} - else - { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) - { - echo "
    GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Group ID must be between 2 and 20 characters in length and contain no ' -+'.\n"; - echo "
    Group name and group color must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - echo "
    GROUP ADDED: $group_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW GROUP |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000; -} - - -###################### -# ADD=21111 adds new remote agents to the system -###################### - -if ($ADD==21111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    REMOTE AGENTS NOT ADDED - there is already a remote agents entry starting with this userID\n";} - else - { - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    User ID start and external extension must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTE AGENTS ADDED: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|'$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value'|\n"); - fclose($fp); - } - } - } -$ADD=10000; -} - -###################### -# ADD=211111 adds new user group to the system -###################### - -if ($ADD==211111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USER GROUP NOT ADDED - there is already a user group entry with this name\n";} - else - { - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    USER GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Group name and description must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_user_groups values('$user_group','$group_name');"; - $rslt=mysql_query($stmt, $link); - - echo "
    USER GROUP ADDED: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW USER GROUP ENTRY |$PHP_AUTH_USER|$ip|'$user_group','$group_name'|\n"); - fclose($fp); - } - } - } -$ADD=100000; -} - -###################### -# ADD=2111111 adds new script to the system -###################### - -if ($ADD==2111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    SCRIPT NOT ADDED - there is already a script entry with this name\n";} - else - { - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    SCRIPT NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Script name, description and text must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_scripts values('$script_id','$script_name','$script_comments','" . mysql_real_escape_string($script_text) . "','$active');"; - $rslt=mysql_query($stmt, $link); - - echo "
    SCRIPT ADDED: $script_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000000; -} - - -###################### -# ADD=21111111 adds new filter to the system -###################### - -if ($ADD==21111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    FILTER NOT ADDED - there is already a filter entry with this ID\n";} - else - { - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Filter ID, name and SQL must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTER ADDED: $lead_filter_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=10000000; -} - - -###################### -# ADD=211111111 adds new call time definition to the system -###################### - -if ($ADD==211111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID and name must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_call_times SET call_time_id='$call_time_id',call_time_name='$call_time_name',call_time_comments='$call_time_comments';"; - $rslt=mysql_query($stmt, $link); - - echo "
    CALL TIME ADDED: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111; -} - - -###################### -# ADD=2111111111 adds new state call time definition to the system -###################### - -if ($ADD==2111111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    STATE CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    STATE CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    State Call Time ID, name and state must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_state_call_times SET state_call_time_id='$call_time_id',state_call_time_name='$call_time_name',state_call_time_comments='$call_time_comments',state_call_time_state='$state_call_time_state';"; - $rslt=mysql_query($stmt, $link); - - echo "
    STATE CALL TIME ADDED: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=3111111111; -} - - - - -###################################################################################################### -###################################################################################################### -####### 4 series, record modifications submitted and DB is modified, then on to 3 series forms below -###################################################################################################### -###################################################################################################### - - - -###################### -# ADD=4A submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4A") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - -###################### -# ADD=4B submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4B") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - - -###################### -# ADD=4 submit user modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - -###################### -# ADD=41 submit campaign modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign name needs to be at least 6 characters in length\n"; - } - else - { - echo "
    CAMPAIGN MODIFIED: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    RESETTING CAMPAIGN LEAD HOPPER\n"; - echo "
    - Wait 1 minute before dialing next number\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=42 delete campaign status in the system -###################### - -if ($ADD==42) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign id needs to be at least 2 characters in length\n"; - echo "
    the campaign status needs to be at least 1 characters in length\n"; - } - else - { - echo "
    CUSTOM CAMPAIGN STATUS DELETED: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=43 delete campaign hotkey in the system -###################### - -if ($ADD==43) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    CAMPAIGN HOTKEY NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign id needs to be at least 2 characters in length\n"; - echo "
    the campaign status needs to be at least 1 characters in length\n"; - echo "
    the campaign hotkey needs to be at least 1 characters in length\n"; - } - else - { - echo "
    CUSTOM CAMPAIGN HOTKEY DELETED: $campaign_id - $status - $hotkey\n"; - - $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=44 submit campaign modifications to the system - Basic View -###################### - -if ($ADD==44) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign name needs to be at least 6 characters in length\n"; - } - else - { - echo "
    CAMPAIGN MODIFIED: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level',lead_filter_id='$lead_filter_id' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    RESETTING CAMPAIGN LEAD HOPPER\n"; - echo "
    - Wait 1 minute before dialing next number\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG HOPPER RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=34; # go to campaign modification form below -} - -###################### -# ADD=45 modify campaign lead recycle in the system -###################### - -if ($ADD==45) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD MODIFIED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=411 submit list modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) - { - echo "
    LIST NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    list name must be at least 2 characters in length\n"; - } - else - { - echo "
    LIST MODIFIED: $list_id\n"; - - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - if ($reset_list == 'Y') - { - echo "
    RESETTING LIST-CALLED-STATUS\n"; - $stmt="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|RESET LIST CALLED |$PHP_AUTH_USER|$ip|list_name='$list_name'|\n"); - fclose($fp); - } - } - if ($campaign_id != "$old_campaign_id") - { - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($old_campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LIST INFO |$PHP_AUTH_USER|$ip|list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id'|\n"); - fclose($fp); - } - } - -$ADD=311; # go to list modification form below -} - - -###################### -# ADD=4111 modify in-group info in the system -###################### - -if ($ADD==4111) -{ - echo ""; - - if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) - { - echo "
    GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    group name and group color must be at least 2 characters in length\n"; - } - else - { - echo "
    GROUP MODIFIED: $group_id\n"; - - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_message='$drop_message',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten' where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY GROUP INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111; # go to in-group modification form below -} - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    User ID Start and External Extension must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTE AGENTS MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - } - -$ADD=31111; # go to remote agents modification form below -} - - - -###################### -# ADD=411111 modify user group info in the system -###################### - -if ($ADD==411111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    USER GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Group name and description must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group';"; - $rslt=mysql_query($stmt, $link); - - echo "
    USER GROUP MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER GROUP ENTRY |$PHP_AUTH_USER|$ip|UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group'|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    SCRIPT NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Script name, description and text must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    SCRIPT MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111; # go to script modification form below -} - - -###################### -# ADD=41111111 modify filter in the system -###################### - -if ($ADD==41111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Filter ID, name and SQL must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTER MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31111111; # go to filter modification form below -} - - -###################### -# ADD=411111111 modify call time in the system -###################### - -if ($ADD==411111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID and name must be at least 2 characters in length\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    CALL TIME MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111; # go to call time modification form below -} - - -###################### -# ADD=4111111111 modify state call time in the system -###################### - -if ($ADD==4111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    STATE CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    State Call Time ID, name and state must be at least 2 characters in length\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    STATE CALL TIME MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111111; # go to state call time modification form below -} - - - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of user -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) - { - echo "
    USER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - echo "
    USER DELETION CONFIRMATION: $user\n"; - echo "

    Click here to delete user $user


    \n"; - } - -$ADD='3'; # go to user modification below -} - -###################### -# ADD=51 confirmation before deletion of campaign -###################### - -if ($ADD==51) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) - { - echo "
    CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - echo "
    CAMPAIGN DELETION CONFIRMATION: $campaign_id\n"; - echo "

    Click here to delete campaign $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=52 confirmation before logging all agents out of campaign of campaign -###################### - -if ($ADD==52) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - echo "
    AGENT LOGOUT CONFIRMATION: $campaign_id\n"; - echo "

    Click here to log all agents out of $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=511 confirmation before deletion of list -###################### - -if ($ADD==511) -{ - echo ""; - - if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) - { - echo "
    LIST NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - echo "
    LIST DELETION CONFIRMATION: $list_id\n"; - echo "

    Click here to delete list and all of its leads $list_id


    \n"; - } - -$ADD='311'; # go to campaign modification below -} - -###################### -# ADD=5111 confirmation before deletion of in-group -###################### - -if ($ADD==5111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) - { - echo "
    IN-GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - echo "
    IN-GROUP DELETION CONFIRMATION: $group_id\n"; - echo "

    Click here to delete in-group $group_id


    \n"; - } - -$ADD='3111'; # go to in-group modification below -} - -###################### -# ADD=51111 confirmation before deletion of remote agent record -###################### - -if ($ADD==51111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) - { - echo "
    REMOTE AGENT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - echo "
    REMOTE AGENT DELETION CONFIRMATION: $remote_agent_id\n"; - echo "

    Click here to delete remote agent $remote_agent_id


    \n"; - } - -$ADD='31111'; # go to remote agent modification below -} - -###################### -# ADD=511111 confirmation before deletion of user group record -###################### - -if ($ADD==511111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) - { - echo "
    USER GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - echo "
    USER GROUP DELETION CONFIRMATION: $user_group\n"; - echo "

    Click here to delete user group $user_group


    \n"; - } - -$ADD='311111'; # go to user group modification below -} - -###################### -# ADD=5111111 confirmation before deletion of script record -###################### - -if ($ADD==5111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) - { - echo "
    SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Script_id must be at least 2 characters in length\n"; - } - else - { - echo "
    SCRIPT DELETION CONFIRMATION: $script_id\n"; - echo "

    Click here to delete script $script_id


    \n"; - } - -$ADD='3111111'; # go to script modification below -} - -###################### -# ADD=51111111 confirmation before deletion of filter record -###################### - -if ($ADD==51111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) - { - echo "
    FILTER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Filter ID must be at least 2 characters in length\n"; - } - else - { - echo "
    FILTER DELETION CONFIRMATION: $lead_filter_id\n"; - echo "

    Click here to delete filter $lead_filter_id


    \n"; - } - -$ADD='31111111'; # go to filter modification below -} - -###################### -# ADD=511111111 confirmation before deletion of call time record -###################### - -if ($ADD==511111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - echo "
    CALL TIME DELETION CONFIRMATION: $call_time_id\n"; - echo "

    Click here to delete call time $call_time_id


    \n"; - } - -$ADD='311111111'; # go to call time modification below -} - -###################### -# ADD=5111111111 confirmation before deletion of call time record -###################### - -if ($ADD==5111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    STATE CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - echo "
    STATE CALL TIME DELETION CONFIRMATION: $call_time_id\n"; - echo "

    Click here to delete state call time $call_time_id


    \n"; - } - -$ADD='3111111111'; # go to state call time modification below -} - - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete user record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) ) - { - echo "
    USER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_users where user='$user' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|user='$user'|\n"); - fclose($fp); - } - echo "
    USER DELETION COMPLETED: $user\n"; - echo "

    \n"; - } - -$ADD='0'; # go to user list -} - -###################### -# ADD=61 delete campaign record -###################### - -if ($ADD==61) -{ - echo ""; - - if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) ) - { - echo "
    CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_campaigns where campaign_id='$campaign_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!DELETING CAMPAIGN!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    CAMPAIGN DELETION COMPLETED: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='10'; # go to campaigns list -} - -###################### -# ADD=62 Logout all agents fro a campaign -###################### - -if ($ADD==62) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_live_agents where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!AGENT LOGOUT!!!!!!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    AGENT LOGOUT COMPLETED: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='31'; # go to campaign modification below -} - - -###################### -# ADD=65 delete campaign lead recycle in the system -###################### - -if ($ADD==65) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD RECYCLE DELETED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="DELETE FROM vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=611 delete list record and all leads within it -###################### - -if ($ADD==611) -{ - echo ""; - - if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) ) - { - echo "
    LIST NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lists where list_id='$list_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($list_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST LEADS FROM VICIDIAL_LIST TABLE\n"; - $stmt="DELETE from vicidial_list where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING LIST!!!!|$PHP_AUTH_USER|$ip|list_id='$list_id'|\n"); - fclose($fp); - } - echo "
    LIST DELETION COMPLETED: $list_id\n"; - echo "

    \n"; - } - -$ADD='100'; # go to lists list -} - -###################### -# ADD=6111 delete in-group record -###################### - -if ($ADD==6111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_ingroups < 1) ) - { - echo "
    IN-GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_inbound_groups where group_id='$group_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING IN-GROUP!!|$PHP_AUTH_USER|$ip|group_id='$group_id'|\n"); - fclose($fp); - } - echo "
    IN-GROUP DELETION COMPLETED: $group_id\n"; - echo "

    \n"; - } - -$ADD='1000'; # go to in-group list -} - -###################### -# ADD=61111 delete remote agent record -###################### - -if ($ADD==61111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) ) - { - echo "
    REMOTE AGENT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_remote_agents where remote_agent_id='$remote_agent_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING RMTAGENT!!|$PHP_AUTH_USER|$ip|remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - echo "
    REMOTE AGENT DELETION COMPLETED: $remote_agent_id\n"; - echo "

    \n"; - } - -$ADD='10000'; # go to remote agents list -} - -###################### -# ADD=611111 delete user group record -###################### - -if ($ADD==611111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_user_groups < 1) ) - { - echo "
    USER GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_user_groups where user_group='$user_group' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING USRGROUP!!|$PHP_AUTH_USER|$ip|user_group='$user_group'|\n"); - fclose($fp); - } - echo "
    USER GROUP DELETION COMPLETED: $user_group\n"; - echo "

    \n"; - } - -$ADD='100000'; # go to user group list -} - -###################### -# ADD=6111111 delete script record -###################### - -if ($ADD==6111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_scripts < 1) ) - { - echo "
    SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Script_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_scripts where script_id='$script_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING SCRIPT!!!!|$PHP_AUTH_USER|$ip|script_id='$script_id'|\n"); - fclose($fp); - } - echo "
    SCRIPT DELETION COMPLETED: $script_id\n"; - echo "

    \n"; - } - -$ADD='1000000'; # go to script list -} - - -###################### -# ADD=61111111 delete filter record -###################### - -if ($ADD==61111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) ) - { - echo "
    FILTER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Filter ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING FILTER!!!!|$PHP_AUTH_USER|$ip|lead_filter_id='$lead_filter_id'|\n"); - fclose($fp); - } - echo "
    FILTER DELETION COMPLETED: $lead_filter_id\n"; - echo "

    \n"; - } - -$ADD='10000000'; # go to filter list -} - - -###################### -# ADD=611111111 delete call times record -###################### - -if ($ADD==611111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_call_times where call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    CALL TIME DELETION COMPLETED: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='100000000'; # go to call times list -} - - -###################### -# ADD=6111111111 delete call times record -###################### - -if ($ADD==6111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    STATE CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_state_call_times where state_call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT call_time_id,ct_state_call_times from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\" order by call_time_id;"; - $rslt=mysql_query($stmt, $link); - $sct_to_print = mysql_num_rows($rslt); - $sct_list=''; - - $o=0; - while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_ids[$o] = "$rowx[0]"; - $sct_states[$o] = "$rowx[1]"; - $o++; - } - $o=0; - - while ($sct_to_print > $o) { - $sct_states[$o] = eregi_replace("\|$call_time_id\|",'|',$sct_states[$o]); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$sct_states[$o]' where call_time_id='$sct_ids[$o]';"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - echo "State Rule Removed: $sct_ids[$o]
    \n"; - $o++; - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|state_call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    STATE CALL TIME DELETION COMPLETED: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='1000000000'; # go to call times list -} - - - - - - -###################################################################################################### -###################################################################################################### -####### 3 series, record modification forms -###################################################################################################### -###################################################################################################### - - - - -###################### -# ADD=3 modify user info in the system -###################### - -if ($ADD==3) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_level = $row[4]; - $user_group = $row[5]; - $phone_login = $row[6]; - $phone_pass = $row[7]; - $delete_users = $row[8]; - $delete_user_groups = $row[9]; - $delete_lists = $row[10]; - $delete_campaigns = $row[11]; - $delete_ingroups = $row[12]; - $delete_remote_agents = $row[13]; - $load_leads = $row[14]; - $campaign_detail = $row[15]; - $ast_admin_access = $row[16]; - $ast_delete_phones = $row[17]; - $delete_scripts = $row[18]; - $modify_leads = $row[19]; - $hotkeys_active = $row[20]; - $change_agent_campaign =$row[21]; - $agent_choose_ingroups =$row[22]; - $scheduled_callbacks = $row[24]; - $agentonly_callbacks = $row[25]; - $agentcall_manual = $row[26]; - $vicidial_recording = $row[27]; - $vicidial_transfers = $row[28]; - $delete_filters = $row[29]; - $alter_agent_interface_options =$row[30]; - $closer_default_blended = $row[31]; - $delete_call_times = $row[32]; - $modify_call_times = $row[33]; - -if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) - { - echo "
    You do not have permissions to modify this user: $row[1]\n"; - } -else - { - echo "
    MODIFY A USERS RECORD: $row[1]\n"; - if ($LOGuser_level > 8) - {echo "\n";} - else - { - if ($LOGalter_agent_interface == "1") - {echo "\n";} - else - {echo "\n";} - } - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") ) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($LOGuser_level > 8) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "\n"; - echo "
    User Number: $row[1]$NWB#vicidial_users-user$NWE
    Password: $NWB#vicidial_users-pass$NWE
    Full Name: $NWB#vicidial_users-full_name$NWE
    User Level: $NWB#vicidial_users-user_level$NWE
    User Group: $NWB#vicidial_users-user_group$NWE
    Phone Login: $NWB#vicidial_users-phone_login$NWE
    Phone Pass: $NWB#vicidial_users-phone_pass$NWE
    AGENT INTERFACE OPTIONS:
    Agent Choose Ingroups: $NWB#vicidial_users-agent_choose_ingroups$NWE
    HotKeys Active: $NWB#vicidial_users-hotkeys_active$NWE
    Scheduled Callbacks: $NWB#vicidial_users-scheduled_callbacks$NWE
    Agent-Only Callbacks: $NWB#vicidial_users-agentonly_callbacks$NWE
    Agent Call Manual: $NWB#vicidial_users-agentcall_manual$NWE
    Vicidial Recording: $NWB#vicidial_users-vicidial_recording$NWE
    Vicidial Transfers: $NWB#vicidial_users-vicidial_transfers$NWE
    Closer Default Blended: $NWB#vicidial_users-closer_default_blended$NWE
    Inbound Groups: \n"; - echo "$groups_list"; - echo "$NWB#vicidial_users-closer_campaigns$NWE
    ADMIN INTERFACE OPTIONS:
    Alter Agent Interface Options: $NWB#vicidial_users-alter_agent_interface_options$NWE
    Delete Users: $NWB#vicidial_users-delete_users$NWE
    Delete User Groups: $NWB#vicidial_users-delete_user_groups$NWE
    Delete Lists: $NWB#vicidial_users-delete_lists$NWE
    Delete Campaigns: $NWB#vicidial_users-delete_campaigns$NWE
    Delete In-Groups: $NWB#vicidial_users-delete_ingroups$NWE
    Delete Remote Agents: $NWB#vicidial_users-delete_remote_agents$NWE
    Delete Scripts: $NWB#vicidial_users-delete_scripts$NWE
    Load Leads: $NWB#vicidial_users-load_leads$NWE
    Campaign Detail: $NWB#vicidial_users-campaign_detail$NWE
    AGC Admin Access: $NWB#vicidial_users-ast_admin_access$NWE
    AGC Delete Phones: $NWB#vicidial_users-ast_delete_phones$NWE
    Modify Leads: $NWB#vicidial_users-modify_leads$NWE
    Change Agent Campaign: $NWB#vicidial_users-change_agent_campaign$NWE
    Delete Filters: $NWB#vicidial_users-delete_filters$NWE
    Delete Call Times: $NWB#vicidial_users-delete_call_times$NWE
    Modify Call Times: $NWB#vicidial_users-modify_call_times$NWE
    \n"; - - if ($LOGdelete_users > 0) - { - echo "

    DELETE THIS USER\n"; - } - echo "

    Click here for user time sheet\n"; - echo "

    Click here for user status\n"; - echo "

    Click here for user stats\n"; - echo "

    Click here for user CallBack Holds\n"; - } - -} - - -###################### -# ADD=31 modify campaign info in the system - Detail view -###################### - -if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Basic if not allowed - -if ($ADD==31) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $campaign_rec_exten = $row[22]; - $campaign_recording = $row[23]; - $campaign_rec_filename = $row[24]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $am_message_exten = $row[27]; - $amd_send_to_vmx = $row[28]; - $xferconf_a_dtmf = $row[29]; - $xferconf_a_number = $row[30]; - $xferconf_b_dtmf = $row[31]; - $xferconf_b_number = $row[32]; - $alt_number_dialing = $row[33]; - $scheduled_callbacks = $row[34]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $drop_call_seconds = $row[36]; - $safe_harbor_message = $row[37]; - $safe_harbor_exten = $row[38]; - $display_dialable_count = $row[39]; - $wrapup_seconds = $row[40]; - $wrapup_message = $row[41]; -# $closer_campaigns = $row[42]; - $use_internal_dnc = $row[43]; - -echo "
    MODIFY A CAMPAIGNS RECORD: $row[0] - Basic View"; -echo " | Detail View | "; -echo "Realtime Screen\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -if (eregi("CLOSER", $campaign_id)) - { - echo "\n"; - } - - - -echo "\n"; -echo "
    Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
    Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Dial status 1: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 2: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 3: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 4: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 5: $NWB#vicidial_campaigns-dial_status$NWE
    List Order: $NWB#vicidial_campaigns-lead_order$NWE
    Lead Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Next Agent Call: $NWB#vicidial_campaigns-next_agent_call$NWE
    Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
    Dial Timeout: in seconds$NWB#vicidial_campaigns-dial_timeout$NWE
    Dial Prefix: for 91NXXNXXXXXX value would be 9, for no dial prefix use X$NWB#vicidial_campaigns-dial_prefix$NWE
    Campaign CallerID: $NWB#vicidial_campaigns-campaign_cid$NWE
    Campaign VDAD exten: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE
    Campaign Rec exten: $NWB#vicidial_campaigns-campaign_rec_exten$NWE
    Campaign Recording: $NWB#vicidial_campaigns-campaign_recording$NWE
    Campaign Rec Filename: $NWB#vicidial_campaigns-campaign_rec_filename$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE
    Answering Machine Message: $NWB#vicidial_campaigns-am_message_exten$NWE
    AMD Send to VM exten: $NWB#vicidial_campaigns-amd_send_to_vmx$NWE
    Transfer-Conf DTMF 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf Number 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf DTMF 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf Number 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Alt Number Dialing: $NWB#vicidial_campaigns-alt_number_dialing$NWE
    Scheduled Callbacks: $NWB#vicidial_campaigns-scheduled_callbacks$NWE
    Drop Call Seconds: $NWB#vicidial_campaigns-drop_call_seconds$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Use Safe Harbor Message: $NWB#vicidial_campaigns-safe_harbor_message$NWE
    Safe Harbor Exten: $NWB#vicidial_campaigns-safe_harbor_exten$NWE
    Wrapup Seconds: $NWB#vicidial_campaigns-wrapup_seconds$NWE
    Wrapup Message: $NWB#vicidial_campaigns-wrapup_message$NWE
    Use Internal DNC List: $NWB#vicidial_campaigns-use_internal_dnc$NWE
    Allowed Inbound Groups:
    "; - echo " $NWB#vicidial_campaigns-closer_campaigns$NWE
    \n"; - echo "$groups_list"; - echo "
    \n"; - -echo "
    \n"; -echo "
    LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LIST IDLIST NAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

    \n"; - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - HIDE

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - SHOW

    "; - } - - - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "This campaign has $hopper_leads leads in the dial hopper

    \n"; -echo "Click here to see what leads are in the hopper right now

    \n"; -echo "Click here to see all CallBack Holds in this campaign

    \n"; -echo "
    \n"; - - - - -echo "
    \n"; -echo "
    CUSTOM STATUSES WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_statuses$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    STATUSDESCRIPTIONSELECTABLEDELETE
    $rowx[0]$rowx[1]$rowx[2]DELETE
    \n"; - -echo "
    ADD NEW CUSTOM CAMPAIGN STATUS
    \n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Description:   \n"; -echo "Selectable:   \n"; -echo "
    \n"; - -echo "

    \n"; - - - -echo "
    CUSTOM HOTKEYS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_hotkeys$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    HOTKEYSTATUSDESCRIPTIONDELETE
    $rowx[1]$rowx[0]$rowx[2]DELETE
    \n"; - -echo "
    ADD NEW CUSTOM CAMPAIGN HOTKEY
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Hotkey:   \n"; -echo "Status:   \n"; -echo "
    \n"; -echo "

    \n"; - - - -echo "

    LEAD RECYCLING WITHIN THIS CAMPAIGN:   $NWB#vicidial_lead_recycle$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $recycle_to_print = mysql_num_rows($rslt); - $o=0; - while ($recycle_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - -echo "
    STATUSATTEMPT DELAYATTEMPT MAXIMUMACTIVE DELETE
    $rowx[2]
    \n"; - echo "\n"; - echo "\n"; - echo "
    DELETE
    \n"; - -echo "
    ADD NEW CAMPAIGN LEAD RECYCLE
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Attempt Delay: \n"; -echo "Attempt Maximum: \n"; -echo "
    \n"; - -echo "

    \n"; - -echo "LOG ALL AGENTS OUT OF THIS CAMPAIGN

    \n"; - -if ($LOGdelete_campaigns > 0) - { - echo "

    DELETE THIS CAMPAIGN\n"; - } - -} - - -###################### -# ADD=34 modify campaign info in the system - Basic View -###################### - -if ($ADD==34) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $display_dialable_count = $row[39]; - -echo "
    MODIFY A CAMPAIGN'S RECORD: $row[0] - Basic View | "; -echo "Detail View | "; -echo "Realtime Screen\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; -echo "
    Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: $row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE
    Web Form: $row[11]$NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $row[12] $NWB#vicidial_campaigns-allow_closers$NWE
    Dial status 1: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 2: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 3: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 4: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 5: $NWB#vicidial_campaigns-dial_status$NWE
    List Order: $NWB#vicidial_campaigns-lead_order$NWE
    Lead Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Script: $script_id
    Get Call Launch: $get_call_launch
    \n"; - -echo "
    \n"; -echo "
    LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LIST IDLIST NAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

    \n"; - - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - HIDE

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - SHOW

    "; - } - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "This campaign has $hopper_leads leads in the dial hopper

    \n"; -echo "Click here to see what leads are in the hopper right now

    \n"; -echo "Click here to see all CallBack Holds in this campaign

    \n"; -echo "
    \n"; - -echo "
    \n"; - -echo "LOG ALL AGENTS OUT OF THIS CAMPAIGN

    \n"; - - -if ($LOGdelete_campaigns > 0) - { - echo "

    DELETE THIS CAMPAIGN\n"; - } - - -} - - -###################### -# ADD=311 modify list info in the system -###################### - -if ($ADD==311) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $campaign_id = $row[2]; - $active = $row[3]; - - # grab names of global statuses and statuses in the selected campaign - $stmt="SELECT * from vicidial_statuses order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $Cstatuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($Cstatuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - # end grab status names - - -echo "
    MODIFY A LISTS RECORD: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    List ID: $row[0]$NWB#vicidial_lists-list_id$NWE
    List Name: $NWB#vicidial_lists-list_name$NWE
    Campaign: $NWB#vicidial_lists-campaign_id$NWE
    Active: $NWB#vicidial_lists-active$NWE
    Reset Lead-Called-Status for this list: $NWB#vicidial_lists-reset_list$NWE
    \n"; - -echo "
    \n"; -echo "
    STATUSES WITHIN THIS LIST:
    \n"; -echo "\n"; -echo "\n"; - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by status,called_since_last_reset order by status,called_since_last_reset"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - $o=0; - if ($lead_list['count'] > 0) - { - while (list($dispo,) = each($lead_list[$since_reset])) - { - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($dispo == 'CBHOLD') - { - $CLB=""; - $CLE=""; - } - else - { - $CLB=''; - $CLE=''; - } - - echo "\n"; - $o++; - } - } - -echo "\n"; -echo "\n"; - -echo "
    STATUSSTATUS NAMECALLEDNOT CALLED
    $CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
    SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; -unset($lead_list); - - - - - -echo "
    \n"; -echo "
    TIME ZONES WITHIN THIS LIST:
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT gmt_offset_now,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by gmt_offset_now,called_since_last_reset order by gmt_offset_now,called_since_last_reset"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $plus='+'; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - if ($lead_list['count'] > 0) - { - while (list($tzone,) = each($lead_list[$since_reset])) - { - $LOCALzone=3600 * $tzone; - $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); - - if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} - else {$DISPtzone = "$tzone";} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - } - -echo "\n"; -echo "\n"; - -echo "
    GMT OFFSET NOW (local time)CALLEDNOT CALLED
    ".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
    SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; -unset($lead_list); - - - - - - - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_count,count(*) from vicidial_list where list_id='$list_id' group by status,called_count order by status,called_count"; - $rslt=mysql_query($stmt, $link); - $status_called_to_print = mysql_num_rows($rslt); - - $o=0; - $sts=0; - $first_row=1; - $all_called_first=1000; - $all_called_last=0; - while ($status_called_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $leads_in_list = ($leads_in_list + $rowx[2]); - $count_statuses[$o] = "$rowx[0]"; - $count_called[$o] = "$rowx[1]"; - $count_count[$o] = "$rowx[2]"; - $all_called_count[$rowx[1]] = ($all_called_count[$rowx[1]] + $rowx[2]); - - if ( (strlen($status[$sts]) < 1) or ($status[$sts] != "$rowx[0]") ) - { - if ($first_row) {$first_row=0;} - else {$sts++;} - $status[$sts] = "$rowx[0]"; - $status_called_first[$sts] = "$rowx[1]"; - if ($status_called_first[$sts] < $all_called_first) {$all_called_first = $status_called_first[$sts];} - } - $leads_in_sts[$sts] = ($leads_in_sts[$sts] + $rowx[2]); - $status_called_last[$sts] = "$rowx[1]"; - if ($status_called_last[$sts] > $all_called_last) {$all_called_last = $status_called_last[$sts];} - - $o++; - } - - - - -echo "
    \n"; -echo "
    CALLED COUNTS WITHIN THIS LIST:
    \n"; -echo "\n"; -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - - $sts=0; - $statuses_called_to_print = count($status); - while ($statuses_called_to_print > $sts) - { - $Pstatus = $status[$sts]; - if (eregi("1$|3$|5$|7$|9$", $sts)) - {$bgcolor='bgcolor="#B9CBFD"'; $AB='bgcolor="#9BB9FB"';} - else - {$bgcolor='bgcolor="#9BB9FB"'; $AB='bgcolor="#B9CBFD"';} -# echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n"; -# echo "$status[$sts]|"; - echo ""; - - $first = $all_called_first; - while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $sts)) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - else - { - if (eregi("0$|2$|4$|6$|8$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - - $called_printed=0; - $o=0; - while ($status_called_to_print > $o) - { - if ( ($count_statuses[$o] == "$Pstatus") and ($count_called[$o] == "$first") ) - { - $called_printed++; - echo ""; - } - - - $o++; - } - if (!$called_printed) - {echo "";} - $first++; - } - echo "\n\n"; - - $sts++; - } - -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - -echo "
    STATUSSTATUS NAME$firstSUBTOTAL
    $Pstatus$statuses_list[$Pstatus] $count_count[$o]  $leads_in_sts[$sts]
    TOTAL$all_called_count[$first]$leads_in_list

    \n"; - - - - - -echo "
    \n"; - -if ($LOGdelete_lists > 0) - { - echo "

    DELETE THIS LIST\n"; - } - -} - - - -###################### -# ADD=3111 modify in-group info in the system -###################### - -if ($ADD==3111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = $row[4]; - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - $script_id = $row[8]; - $get_call_launch = $row[9]; - $xferconf_a_dtmf = $row[10]; - $xferconf_a_number = $row[11]; - $xferconf_b_dtmf = $row[12]; - $xferconf_b_number = $row[13]; - $drop_call_seconds = $row[14]; - $drop_message = $row[15]; - $drop_exten = $row[16]; - -echo "
    MODIFY A GROUPS RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -echo "\n"; -echo "
    Group ID: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
    Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
    Active: $NWB#vicidial_inbound_groups-active$NWE
    Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    Transfer-Conf DTMF 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf Number 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf DTMF 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf Number 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Drop Call Seconds: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Use Drop Message: $NWB#vicidial_inbound_groups-drop_message$NWE
    Drop Exten: $NWB#vicidial_inbound_groups-drop_exten$NWE
    \n"; - -echo "

    \n"; - -echo "
    \n"; - -if ($LOGdelete_ingroups > 0) - { - echo "

    DELETE THIS IN-GROUP\n"; - } - -} - - - -###################### -# ADD=31111 modify remote agents info in the system -###################### - -if ($ADD==31111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
    External Extension: (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status: $NWB#vicidial_remote_agents-status$NWE
    Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Groups: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - - -if ($LOGdelete_remote_agents > 0) - { - echo "

    DELETE THIS REMOTE AGENT\n"; - } - -} - - -###################### -# ADD=311111 modify user group info in the system -###################### - -if ($ADD==311111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[0]; - $group_name = $row[1]; -echo ""; - -echo "
    MODIFY A USERS GROUP ENTRY\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
    Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -if ($LOGdelete_user_groups > 0) - { - echo "

    DELETE THIS USER GROUP\n"; - } - -} - - -###################### -# ADD=3111111 modify script info in the system -###################### - -if ($ADD==3111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $script_name = $row[1]; - $script_comments = $row[2]; - $script_text = $row[3]; - $active = $row[4]; -echo ""; - -echo "
    MODIFY A SCRIPT\n"; -echo "\n"; -echo "\n"; -echo "
    Script ID: $script_id$NWB#vicidial_scripts-script_name$NWE
    Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
    Script Comments: $NWB#vicidial_scripts-script_comments$NWE
    Active: $NWB#vicidial_scripts-active$NWE
    Script Text:

    Preview Script
    $NWB#vicidial_scripts-script_text$NWE
    \n"; - -if ($LOGdelete_scripts > 0) - { - echo "

    DELETE THIS SCRIPT\n"; - } - -} - - -###################### -# ADD=31111111 modify filter info in the system -###################### - -if ($ADD==31111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $lead_filter_name = $row[1]; - $lead_filter_comments = $row[2]; - $lead_filter_sql = $row[3]; -echo ""; - -echo "
    MODIFY A FILTER\n"; -echo "\n"; -echo "\n"; -echo "
    Filter ID: $lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - -echo "

    "; -echo "
    TEST ON CAMPAIGN:
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -if ($LOGdelete_filters > 0) - { - echo "

    DELETE THIS FILTER\n"; - } - -} - - -###################### -# ADD=321111111 modify call time definition info in the system -###################### - -if ($ADD==321111111) -{ -if ($LOGmodify_call_times==1) -{ - -if ( ($stage=="ADD") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - if (eregi("\|$",$ct_state_call_times)) - {$ct_state_call_times = "$ct_state_call_times$state_rule\|";} - else - {$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";} - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "State Rule Added: $state_rule
    \n"; - } -if ( ($stage=="REMOVE") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - $ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "State Rule Removed: $state_rule
    \n"; - } - -$ADD=311111111; -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - -###################### -# ADD=311111111 modify call time definition info in the system -###################### - -if ($ADD==311111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -$ct_srs=1; -$b=0; -$srs_SQL =''; -if (strlen($ct_state_call_times)>2) - { - $state_rules = explode('|',$ct_state_call_times); - $ct_srs = ((count($state_rules)) - 1); - } -echo "\n"; -echo "\n"; -while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>0) - { - $stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - echo "\n"; - $srs_SQL .= "'$state_rules[$b]',"; - $srs_state_SQL .= "'$row[0]',"; - } - $b++; - } -if (strlen($srs_SQL)>2) - { - $srs_SQL = "$srs_SQL''"; - $srs_state_SQL = "$srs_state_SQL''"; - $srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)"; - } -else - {$srs_SQL='';} -$stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;"; -$rslt=mysql_query($stmt, $link); -$sct_to_print = mysql_num_rows($rslt); -$sct_list=''; - -$o=0; -while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_list .= "\n"; - $o++; -} -echo "\n"; -echo "\n"; - -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $call_time_name = $row[1]; - $call_time_comments = $row[2]; - $ct_default_start = $row[3]; - $ct_default_stop = $row[4]; - $ct_sunday_start = $row[5]; - $ct_sunday_stop = $row[6]; - $ct_monday_start = $row[7]; - $ct_monday_stop = $row[8]; - $ct_tuesday_start = $row[9]; - $ct_tuesday_stop = $row[10]; - $ct_wednesday_start = $row[11]; - $ct_wednesday_stop = $row[12]; - $ct_thursday_start = $row[13]; - $ct_thursday_stop = $row[14]; - $ct_friday_start = $row[15]; - $ct_friday_stop = $row[16]; - $ct_saturday_start = $row[17]; - $ct_saturday_stop = $row[18]; - $ct_state_call_times = $row[19]; - -echo ""; - -echo "
    MODIFY A CALL TIME\n"; -echo "\n"; -echo "\n"; -echo "
    Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
    Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Active State Call Time Definitions for this Record:  
    $state_rules[$b] - REMOVE $row[0] - $row[1]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Add state call time rule:


    \n"; -echo "CAMPAIGNS USING THIS CALL TIME:
    \n"; -echo "\n"; - - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - $CT_camp_id = $row[1]; - $CT_camp_name = $row[2]; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    DELETE THIS CALL TIME DEFINITION\n"; - } -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - -###################### -# ADD=3111111111 modify state call time definition info in the system -###################### - -if ($ADD==3111111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $state_call_time_state =$row[1]; - $call_time_name = $row[2]; - $call_time_comments = $row[3]; - $ct_default_start = $row[4]; - $ct_default_stop = $row[5]; - $ct_sunday_start = $row[6]; - $ct_sunday_stop = $row[7]; - $ct_monday_start = $row[8]; - $ct_monday_stop = $row[9]; - $ct_tuesday_start = $row[10]; - $ct_tuesday_stop = $row[11]; - $ct_wednesday_start = $row[12]; - $ct_wednesday_stop = $row[13]; - $ct_thursday_start = $row[14]; - $ct_thursday_stop = $row[15]; - $ct_friday_start = $row[16]; - $ct_friday_stop = $row[17]; - $ct_saturday_start = $row[18]; - $ct_saturday_stop = $row[19]; - -echo ""; - -echo "
    MODIFY A STATE CALL TIME
    \n"; -echo "\n"; -echo "\n"; -echo "
    Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: $NWB#vicidial_call_times-state_call_time_state$NWE
    State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    State Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
    Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE


    \n"; -echo "CALL TIMES USING THIS STATE CALL TIME:
    \n"; -echo "\n"; - - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    DELETE THIS STATE CALL TIME DEFINITION\n"; - } - -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo "
    \n"; -echo ""; - -echo "
    SEARCH FOR A USER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    User Number:
    Full Name:
    User Level:
    User Group:
    \n"; - -} - -###################### -# ADD=66 user search results -###################### - -if ($ADD==66) -{ -echo "
    \n"; - echo ""; - - $SQL = ''; - if ($user) {$SQL .= " user LIKE \"%$user%\" and";} - if ($full_name) {$SQL .= " full_name LIKE \"%$full_name%\" and";} - if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";} - if ($user_group) {$SQL .= " user_group = '$user_group' and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from vicidial_users $SQL order by full_name desc;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    SEARCH RESULTS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
    \n"; - -} - - -###################################################################################################### -###################################################################################################### -####### 8 series, Callback lists -###################################################################################################### -###################################################################################################### - -###################### -# ADD=8 find all callbacks on hold by a User -###################### -if ($ADD==8) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    USER CALLBACK HOLD LISTINGS: $user\n"; -$ADD='82'; -} - -###################### -# ADD=81 find all callbacks on hold within a Campaign -###################### -if ($ADD==81) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; -$ADD='82'; -} - -###################### -# ADD=811 find all callbacks on hold within a List -###################### -if ($ADD==811) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    LIST CALLBACK HOLD LISTINGS: $list_id\n"; -$ADD='82'; -} - -###################### -# ADD=82 display all callbacks on hold -###################### -if ($ADD==82) -{ -echo "
    \n"; -echo "
    \n"; -echo "\n"; - - $o=0; - while ($cb_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    LEADLISTCAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUS
    $row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 0 series, displays and searches -###################################################################################################### -###################################################################################################### - -###################### -# ADD=0 display all active users -###################### -if ($ADD==0) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users order by full_name"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
    \n"; -} - -###################### -# ADD=10 display all campaigns -###################### -if ($ADD==10) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3]$row[4]$row[5] $row[6]$row[7]  MODIFY
    \n"; -} - - -###################### -# ADD=100 display all lists -###################### -if ($ADD==100) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists order by list_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    LIST LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  MODIFY
    \n"; -} - - - -###################### -# ADD=1000 display all inbound groups -###################### -if ($ADD==1000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    INBOUND GROUP LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[5]  MODIFY
    \n"; -} - - -###################### -# ADD=10000 display all remote agents -###################### -if ($ADD==10000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    REMOTE AGENTS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
    \n"; -} - - -###################### -# ADD=100000 display all user groups -###################### -if ($ADD==100000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups order by user_group"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USER GROUPS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=1000000 display all scripts -###################### -if ($ADD==1000000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    SCRIPTS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=10000000 display all filters -###################### -if ($ADD==10000000) -{ -echo "\n";echo "\n";?> -
    -
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    LEAD FILTER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=100000000 display all call times -###################### -if ($ADD==100000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    CALL TIME LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[4] MODIFY
    \n"; -} - -###################### -# ADD=1000000000 display all state call times -###################### -if ($ADD==1000000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_state_call_times order by state_call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    STATE CALL TIME LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3] $row[4] MODIFY
    \n"; -} - - - - - -echo "
    \n"; - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; -echo "             VERSION: $version"; -echo "             BUILD: $build
    \n"; - - -?> - - -
    - - - -1) - { - $g=0; - $p='13'; - $GMT_gmt[0] = ''; - $GMT_hour[0] = ''; - $GMT_day[0] = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $pmin=(gmdate("i", time() + $pzone)); - $phour=( (gmdate("G", time() + $pzone)) * 100); - $pday=gmdate("w", time() + $pzone); - $tz = sprintf("%.2f", $p); - $GMT_gmt[$g] = "$tz"; - $GMT_day[$g] = "$pday"; - $GMT_hour[$g] = ($phour + $pmin); - $p = ($p - 0.25); - $g++; - } - - $stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $Gct_default_start = "$rowx[3]"; - $Gct_default_stop = "$rowx[4]"; - $Gct_sunday_start = "$rowx[5]"; - $Gct_sunday_stop = "$rowx[6]"; - $Gct_monday_start = "$rowx[7]"; - $Gct_monday_stop = "$rowx[8]"; - $Gct_tuesday_start = "$rowx[9]"; - $Gct_tuesday_stop = "$rowx[10]"; - $Gct_wednesday_start = "$rowx[11]"; - $Gct_wednesday_stop = "$rowx[12]"; - $Gct_thursday_start = "$rowx[13]"; - $Gct_thursday_stop = "$rowx[14]"; - $Gct_friday_start = "$rowx[15]"; - $Gct_friday_stop = "$rowx[16]"; - $Gct_saturday_start = "$rowx[17]"; - $Gct_saturday_stop = "$rowx[18]"; - $Gct_state_call_times = "$rowx[19]"; - - $ct_states = ''; - $ct_state_gmt_SQL = ''; - $ct_srs=0; - $b=0; - if (strlen($Gct_state_call_times)>2) - { - $state_rules = explode('|',$Gct_state_call_times); - $ct_srs = ((count($state_rules)) - 2); - } - while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>1) - { - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Gstate_call_time_id = "$row[0]"; - $Gstate_call_time_state = "$row[1]"; - $Gsct_default_start = "$row[4]"; - $Gsct_default_stop = "$row[5]"; - $Gsct_sunday_start = "$row[6]"; - $Gsct_sunday_stop = "$row[7]"; - $Gsct_monday_start = "$row[8]"; - $Gsct_monday_stop = "$row[9]"; - $Gsct_tuesday_start = "$row[10]"; - $Gsct_tuesday_stop = "$row[11]"; - $Gsct_wednesday_start = "$row[12]"; - $Gsct_wednesday_stop = "$row[13]"; - $Gsct_thursday_start = "$row[14]"; - $Gsct_thursday_stop = "$row[15]"; - $Gsct_friday_start = "$row[16]"; - $Gsct_friday_stop = "$row[17]"; - $Gsct_saturday_start = "$row[18]"; - $Gsct_saturday_stop = "$row[19]"; - - $ct_states .="'$Gstate_call_time_state',"; - - $r=0; - $state_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday local time - { - if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday local time - { - if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday local time - { - if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday local time - { - if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday local time - { - if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday local time - { - if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday local time - { - if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - $state_gmt = "$state_gmt'99'"; - $ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) "; - } - - $b++; - } - if (strlen($ct_states)>2) - { - $ct_states = eregi_replace(",$",'',$ct_states); - $ct_statesSQL = "and state NOT IN($ct_states)"; - } - else - { - $ct_statesSQL = ""; - } - - $r=0; - $default_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday local time - { - if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday local time - { - if (($Gct_monday_start==0) and ($Gct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday local time - { - if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday local time - { - if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday local time - { - if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday local time - { - if (($Gct_friday_start==0) and ($Gct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday local time - { - if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - - $default_gmt = "$default_gmt'99'"; - $all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL"; - - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and ($all_gmtSQL) $fSQL"; - #$DB=1; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rslt_rows = mysql_num_rows($rslt); - if ($rslt_rows) - { - $rowx=mysql_fetch_row($rslt); - $active_leads = "$rowx[0]"; - } - else {$active_leads = '0';} - - echo "This campaign has $active_leads leads to be dialed in those lists\n"; - } - else - { - echo "no active lists selected for this campaign\n"; - } - } -else - { - echo "no active lists selected for this campaign\n"; - } -##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ### -} -?> diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/admin_changes_log.txt b/agc_2-X/trunk/LANG_admin/vicidial_en/admin_changes_log.txt deleted file mode 100644 index e4750d94..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/admin_changes_log.txt +++ /dev/null @@ -1,37 +0,0 @@ -Wed, 14 Dec 2005 10:17:51 -0500|ADD A NEW SCRIPT ENTRY |6666|10.10.6.19|'TESTCAMP01','first test script','script_comments','script_text','Y'| -Wed, 14 Dec 2005 17:02:06 -0500|ADD A NEW SCRIPT ENTRY |6666|10.10.6.19|'TESTCAMP02','first test script','for testing purposes only','asdf asdf as dfafd as dfas fda sf as fa sdf a sdf as fda sdf a sdf as fas df as fa sf as dfa sdf a fd - - -hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there ','Y'| -Wed, 14 Dec 2005 17:04:05 -0500|ADD A NEW SCRIPT ENTRY |6666|10.10.6.19|'TESTCAMP03','first test script','for testing purposes only','asdf asdf as dfafd as dfas fda sf as fa sdf a sdf as fda sdf a sdf as fas df as fa sf as dfa sdf a fd - - -hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there hello there ','Y'| -Tue, 03 Jan 2006 11:33:22 -0500|RESET LIST CALLED |123456|10.10.6.19|list_name='test domestic lists'| -Tue, 03 Jan 2006 11:33:22 -0500|MODIFY LIST INFO |123456|10.10.6.19|list_name='test domestic lists',campaign_id='TESTCAMP',active='Y' where list_id='101'| -Mon, 23 Jan 2006 10:45:26 -0500|ADD A NEW CAMPAIGN |123456|10.10.6.19|INSERT INTO vicidial_campaigns (campaign_id,campaign_name,active,dial_status_a,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,campaign_script,get_call_launch) values('CCONFIRM','College Partnership Confirm','Y','NEW','DOWN','','','','Y','50','1','oldest_call_finish','9am-9pm','','','NONE')| -Mon, 23 Jan 2006 10:46:09 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='College Partnership Confirm',active='Y',dial_status_a='NEW',dial_status_b='',dial_status_c='',dial_status_d='',dial_status_e='',lead_order='DOWN',allow_closers='Y',hopper_level='50', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='9am-9pm', voicemail_ext='', dial_timeout='60', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8367', web_form_address='', park_ext='', park_file_name='', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='FULLDATE_AGENT', campaign_script='', get_call_launch='NONE', am_message_exten='' where campaign_id='CCONFIRM'|N| -Mon, 23 Jan 2006 10:47:08 -0500|ADD A NEW CAMPAIGN HOTKEY |123456|10.10.6.19|'A','1','Answering Machine','Y','CCONFIRM'| -Mon, 23 Jan 2006 10:47:14 -0500|ADD A NEW CAMPAIGN HOTKEY |123456|10.10.6.19|'N','2','No Answer','Y','CCONFIRM'| -Mon, 23 Jan 2006 10:48:06 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='College Partnership',active='Y',dial_status_a='N',dial_status_b='NEW',dial_status_c='DROP',dial_status_d='A',dial_status_e='NA',lead_order='DOWN COUNT',allow_closers='Y',hopper_level='200', auto_dial_level='2.7', next_agent_call='oldest_call_finish', local_call_time='9am-9pm', voicemail_ext='', dial_timeout='30', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8367', web_form_address='http://10.10.10.196/vicidial/vicidial_college_partnership.php', park_ext='', park_file_name='', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='FULLDATE_AGENT', campaign_script='', get_call_launch='NONE', am_message_exten='' where campaign_id='CPARTNER'|N| -Mon, 23 Jan 2006 10:48:22 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='College Partnership Confirm',active='Y',dial_status_a='NEW',dial_status_b='',dial_status_c='',dial_status_d='',dial_status_e='',lead_order='DOWN',allow_closers='Y',hopper_level='50', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='9am-9pm', voicemail_ext='', dial_timeout='30', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8367', web_form_address='', park_ext='', park_file_name='', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='FULLDATE_AGENT', campaign_script='', get_call_launch='NONE', am_message_exten='' where campaign_id='CCONFIRM'|N| -Mon, 23 Jan 2006 10:49:01 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='College Partnership Confirm',active='Y',dial_status_a='NEW',dial_status_b='',dial_status_c='',dial_status_d='',dial_status_e='',lead_order='DOWN',allow_closers='Y',hopper_level='50', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='9am-9pm', voicemail_ext='', dial_timeout='30', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8367', web_form_address='http://10.10.10.196/vicidial/vicidial_college_partnership_confirm.php', park_ext='', park_file_name='', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='FULLDATE_AGENT', campaign_script='', get_call_launch='NONE', am_message_exten='' where campaign_id='CCONFIRM'|N| -Mon, 23 Jan 2006 11:07:57 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='College Partnership Confirm',active='Y',dial_status_a='NEW',dial_status_b='',dial_status_c='',dial_status_d='',dial_status_e='',lead_order='DOWN',allow_closers='Y',hopper_level='50', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='9am-9pm', voicemail_ext='', dial_timeout='30', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8367', web_form_address='http://10.10.10.196/vicidial/vicidial_college_partnership_confirm.php?STAGE=CONFIRMLOOKUP', park_ext='', park_file_name='', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='FULLDATE_AGENT', campaign_script='', get_call_launch='NONE', am_message_exten='' where campaign_id='CCONFIRM'|N| -Mon, 23 Jan 2006 12:10:13 -0500|ADD A NEW LIST |123456|10.10.6.19|'80204','CP Confirm Jan28-29','CCONFIRM','N'| -Mon, 23 Jan 2006 12:14:26 -0500|MODIFY LIST INFO |123456|10.10.6.19|list_name='CPConfirm Jan28-29 E',campaign_id='CCONFIRM',active='N' where list_id='80204'| -Mon, 23 Jan 2006 12:14:31 -0500|RESET LIST CALLED |123456|10.10.6.19|list_name='CPConfirm Jan28-29 E'| -Mon, 23 Jan 2006 12:14:31 -0500|MODIFY LIST INFO |123456|10.10.6.19|list_name='CPConfirm Jan28-29 E',campaign_id='CCONFIRM',active='Y' where list_id='80204'| -Mon, 23 Jan 2006 12:14:48 -0500|ADD A NEW LIST |123456|10.10.6.19|'80304','CPConfirm Jan28-29 W','CCONFIRM','Y'| -Mon, 23 Jan 2006 12:15:57 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='College Partnership Confirm',active='Y',dial_status_a='SALE',dial_status_b='',dial_status_c='',dial_status_d='',dial_status_e='',lead_order='DOWN',allow_closers='Y',hopper_level='50', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='9am-9pm', voicemail_ext='', dial_timeout='30', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8367', web_form_address='http://10.10.10.196/vicidial/vicidial_college_partnership_confirm.php?STAGE=CONFIRMLOOKUP', park_ext='', park_file_name='', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='FULLDATE_AGENT', campaign_script='', get_call_launch='NONE', am_message_exten='' where campaign_id='CCONFIRM'|N| -Mon, 23 Jan 2006 12:16:16 -0500|RESET LIST CALLED |123456|10.10.6.19|list_name='CPConfirm Jan28-29 E'| -Mon, 23 Jan 2006 12:16:16 -0500|MODIFY LIST INFO |123456|10.10.6.19|list_name='CPConfirm Jan28-29 E',campaign_id='CCONFIRM',active='Y' where list_id='80204'| -Mon, 23 Jan 2006 12:16:37 -0500|RESET LIST CALLED |123456|10.10.6.19|list_name='CPConfirm Jan28-29 W'| -Mon, 23 Jan 2006 12:16:37 -0500|MODIFY LIST INFO |123456|10.10.6.19|list_name='CPConfirm Jan28-29 W',campaign_id='CCONFIRM',active='Y' where list_id='80304'| -Mon, 23 Jan 2006 12:18:31 -0500|RESET LIST CALLED |123456|10.10.6.19|list_name='CPConfirm Jan28-29 W'| -Mon, 23 Jan 2006 12:18:31 -0500|MODIFY LIST INFO |123456|10.10.6.19|list_name='CPConfirm Jan28-29 W',campaign_id='CCONFIRM',active='Y' where list_id='80304'| -Mon, 23 Jan 2006 12:18:42 -0500|RESET LIST CALLED |123456|10.10.6.19|list_name='CPConfirm Jan28-29 E'| -Mon, 23 Jan 2006 12:18:42 -0500|MODIFY LIST INFO |123456|10.10.6.19|list_name='CPConfirm Jan28-29 E',campaign_id='CCONFIRM',active='Y' where list_id='80204'| -Mon, 23 Jan 2006 12:21:01 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='College Partnership Confirm',active='Y',dial_status_a='NEW',dial_status_b='',dial_status_c='',dial_status_d='',dial_status_e='',lead_order='DOWN',allow_closers='Y',hopper_level='50', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='9am-9pm', voicemail_ext='', dial_timeout='30', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8367', web_form_address='http://10.10.10.196/vicidial/vicidial_college_partnership_confirm.php?STAGE=CONFIRMLOOKUP', park_ext='', park_file_name='', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='FULLDATE_AGENT', campaign_script='', get_call_launch='NONE', am_message_exten='' where campaign_id='CCONFIRM'|N| -Mon, 23 Jan 2006 12:21:13 -0500|CAMPAIGN HOPPERRESET|123456|10.10.6.19|campaign_name='College Partnership Confirm'| -Mon, 23 Jan 2006 12:21:13 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='College Partnership Confirm',active='Y',dial_status_a='NEW',dial_status_b='',dial_status_c='',dial_status_d='',dial_status_e='',lead_order='DOWN',allow_closers='Y',hopper_level='50', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='9am-9pm', voicemail_ext='', dial_timeout='30', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8367', web_form_address='http://10.10.10.196/vicidial/vicidial_college_partnership_confirm.php?STAGE=CONFIRMLOOKUP', park_ext='', park_file_name='', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='FULLDATE_AGENT', campaign_script='', get_call_launch='NONE', am_message_exten='' where campaign_id='CCONFIRM'|Y| -Tue, 24 Jan 2006 11:35:57 -0500|MODIFY CAMPAIGN INFO|123456|10.10.6.19|campaign_name='UMG Card on File',active='Y',dial_status_a='N',dial_status_b='B',dial_status_c='DROP',dial_status_d='A',dial_status_e='NA',lead_order='DOWN COUNT',hopper_level='500', auto_dial_level='4.0' where campaign_id='UMGCOF'|N| diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/admin_modify_lead.php b/agc_2-X/trunk/LANG_admin/vicidial_en/admin_modify_lead.php deleted file mode 100644 index 9dad4f62..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/admin_modify_lead.php +++ /dev/null @@ -1,476 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"];} - elseif (isset($_POST["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];} -if (isset($_GET["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"];} - elseif (isset($_POST["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];} -if (isset($_GET["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"];} - elseif (isset($_POST["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["CBuser"])) {$CBuser=$_GET["CBuser"];} - elseif (isset($_POST["CBuser"])) {$CBuser=$_POST["CBuser"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Lead record modification - - -
    - - 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "information modified

    \n"; - echo "\n"; - - if ( ($dispo != $status) and ($dispo == 'CBHOLD') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status='ACTIVE';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - if ( ($dispo != $status) and ($dispo == 'CALLBK') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - - if ( ($dispo != $status) and ($status == 'DNC') ) - { - ### add lead to the internal DNC list - $stmt="INSERT INTO vicidial_dnc (phone_number) values('" . mysql_real_escape_string($phone_number) . "');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    Lead added to DNC List: $lead_id - $phone_number
    \n"; - } - -} -else -{ - - if ($CBchangeUSERtoANY == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set recipient='ANYONE' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to ANYONE
    \n"; - } - if ($CBchangeUSERtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record user changed to $CBuser
    \n"; - } - if ($CBchangeANYtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "',recipient='USERONLY' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to USERONLY, user: $CBuser
    \n"; - } - - - - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $dispo = "$row[3]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Call information: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Lead ID: $lead_id
    Fronter: $tsr     List ID: $list_id
    First Name:   \n"; - echo " Last Name:
    Address 1 :
    Address 2 :
    Address 3 :
    City :
    State:   \n"; - echo " Postal Code:
    Province :
    Country :
    Alt Phone :
    Email :
    Security :
    Comments :
    Disposition:
    \n"; - echo "


    \n"; - - if ( ($dispo == 'CALLBK') or ($dispo == 'CBHOLD') ) - { - ### find any vicidial_callback records for this lead - $stmt="select * from vicidial_callbacks where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $CB_to_print = mysql_num_rows($rslt); - $rowx=mysql_fetch_row($rslt); - - if ($CB_to_print>0) - { - if ($rowx[9] == 'USERONLY') - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    \n"; - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - else - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - } - else - { - echo "
    No Callback records found
    \n"; - } - } - - - - - - - } - else - { - echo "lead lookup FAILED for lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - -echo "

    \n"; - -echo "
    \n"; - -echo "CALLS TO THIS LEAD:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS TSR CAMPAIGN LIST LEAD
    $row[4] $row[7] $row[8] $row[11] $row[3] $row[2] $row[1]
    \n"; - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/admin_search_lead.php b/agc_2-X/trunk/LANG_admin/vicidial_en/admin_search_lead.php deleted file mode 100644 index a727e3a1..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/admin_search_lead.php +++ /dev/null @@ -1,224 +0,0 @@ - LICENSE: GPLv2 -### -### AST GUI database administration search for lead info -### admin_modify_lead.php -# -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead -# -# changes: -# 60620-1055 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - Changed results to multi-record -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Lead Search - -Lead Lookup - - - -
    \n"; - echo "
    \n"; - echo "\n"; - echo "Please enter a:
    Vendor ID(vendor lead code): or \n"; - echo "
    a Home Phone Number: or\n"; - echo "
    a lead ID:

    \n"; - echo "
    \n"; - echo "\n
    \n"; - echo "\n"; - exit; - } - -else - { - - if ($vendor_id) - { - $stmt="SELECT * from vicidial_list where vendor_lead_code='" . mysql_real_escape_string($vendor_id) . "' order by modify_date desc limit 1000"; - } - else - { - if ($phone) - { - $stmt="SELECT * from vicidial_list where phone_number='" . mysql_real_escape_string($phone) . "' order by modify_date desc limit 1000"; - } - else - { - if ($lead_id) - { - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "' order by modify_date desc limit 1000"; - } - else - { - print "ERROR: you must search for something! Go back and search for something"; - exit; - } - } - } - if ($DB) - { - echo "\n\n$stmt\n\n"; - } - - $rslt=mysql_query($stmt, $link); - $results_to_print = mysql_num_rows($rslt); - if ($results_to_print < 1) - { - echo date("l F j, Y G:i:s A"); - echo "\n

    \n"; - echo "The search variables you entered are not active in the system

    \n"; - echo "Please go back and double check the information you entered and submit again\n"; - echo "
    \n"; - echo "\n"; - exit; - } - else - { - echo "RESULTS: $results_to_print

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $o=0; - while ($results_to_print > $o) - { - $row=mysql_fetch_row($rslt); - $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "
    #LEAD IDSTATUSVENDOR IDLAST AGENTLIST IDPHONENAMECITYSECURITYLAST CALL
    $o$row[0]$row[3]$row[5]$row[4]$row[7]$row[11]$row[13] $row[15]$row[19]$row[28]$row[2]
    \n"; - } - } - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \nNEW SEARCH"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; - - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/count.htm b/agc_2-X/trunk/LANG_admin/vicidial_en/count.htm deleted file mode 100644 index 51f8a361..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/count.htm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/dbconnect.php b/agc_2-X/trunk/LANG_admin/vicidial_en/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/group_hourly_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_en/group_hourly_stats.php deleted file mode 100644 index b7eb1b31..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/group_hourly_stats.php +++ /dev/null @@ -1,252 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1014 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["date_with_hour"])) {$date_with_hour=$_GET["date_with_hour"];} - elseif (isset($_POST["date_with_hour"])) {$date_with_hour=$_POST["date_with_hour"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$date_with_hour_default = date("Y-m-d H"); -$date_no_hour_default = $TODAY; - -if (!isset($date_with_hour)) {$date_with_hour = $date_with_hour_default;} - $date_no_hour = $date_with_hour; - $date_no_hour = eregi_replace(" ([0-9]{2})",'',$date_no_hour); -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - -# $stmt="SELECT full_name from vicidial_users where user='$user';"; -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: Group Hourly Stats -\n"; -?> - - -
    - - - - - -= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDtotal[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_no_hour) . " 00:00:00' and call_date <= '" . mysql_real_escape_string($date_no_hour) . " 23:59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDday[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDcount[$o] = "$row[0]"; - $o++; - } - -echo "
      VICIDIAL ADMIN: Group Hourly Stats  
    \n"; - -echo "
    \n"; - -echo "TSR HOUR COUNTS: $group | $status | $date_with_hour | $date_no_hour\n"; - -echo "
    \n"; -echo "\n"; - - $day_calls=0; - $hour_calls=0; - $total_calls=0; - $o=0; - while($o < $tsrs_to_print) - { - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $VDtotal[$o]); - $hour_calls = ($hour_calls + $VDcount[$o]); - $day_calls = ($day_calls + $VDday[$o]); - - $o++; - } - -echo "\n"; - - -} - -echo "
    TSR ID   $status   TOTAL CALLS   $status DAY    
    $VDuser[$o] $VDname[$o] $VDcount[$o] $VDtotal[$o] $VDday[$o]MODIFY | STATS
    TOTAL $status $hour_calls $total_calls $day_calls
    \n"; -echo "

    \n"; - - - echo "
    Please enter the group you want to get hourly stats for:
    \n"; - echo "\n"; - echo "group:
    \n"; - echo "status:   (example: XFER)
    \n"; - echo "date with hour:   (example: 2004-06-25 14)
    \n"; - echo "\n"; - echo "


    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/help.gif b/agc_2-X/trunk/LANG_admin/vicidial_en/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/listloader.php b/agc_2-X/trunk/LANG_admin/vicidial_en/listloader.php deleted file mode 100644 index 71dd25e4..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/listloader.php +++ /dev/null @@ -1,698 +0,0 @@ - LICENSE: GPLv2 -# -# AST Web GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1006 - added listID override and gmt_offset lookup while loading -# 60619-1652 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12'; -$build = '60619-1652'; - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -$submit_file=$_GET["submit_file"]; if (!$submit_file) {$submit_file=$_POST["submit_file"];} -$list_id_override=$_GET["list_id_override"]; if (!$list_id_override) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - - -#$DB=1; -#$DBX=1; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('listloader.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"HELP\""; - - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -?> - - - - - - method=post enctype="multipart/form-data"> -
    - - - - - - - - - - - - - -
    Load leads from this file:
    List ID Override: (numbers only or leave blank for values in the file)
    CLICK HERE TO GO TO THE SUPER LEAD LOADER (BETA VERSION)     BACK TO ADMIN
    - -document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - $pulldate=date("Y-m-d H:i:s"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("./vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Processing $delim_name-delimited file... ($tab_count|$pipe_count)\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city = $row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) - { - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $gmt_offset = '0'; - $called_since_last_reset='N'; - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =='1') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### MEXICO ### - if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### AUSTRALIA ### - if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - print ""; -} else if (filesize($leadfile)>8388608) { - print "
    ERROR: File exceeds the 8MB limit.
    "; -} -?> - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/listloaderMAIN.php b/agc_2-X/trunk/LANG_admin/vicidial_en/listloaderMAIN.php deleted file mode 100644 index 67ee25bc..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/listloaderMAIN.php +++ /dev/null @@ -1,79 +0,0 @@ - LICENSE: GPLv2 -# -# this is the main frame page for the lead loading section. This is where you -# would upload a file and have it inserted into vicidial_list -# -# changes: -# 60620-1149 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - -VICIDIAL: Lead Loader Module - - - - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/new_listloader_superL.php b/agc_2-X/trunk/LANG_admin/vicidial_en/new_listloader_superL.php deleted file mode 100644 index d9471182..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/new_listloader_superL.php +++ /dev/null @@ -1,1364 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60113-1603 - Fixed a few bugs in Excel import -# 60421-1624 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1240 - added listID override -# 60616-1604 - added gmt lookup for each lead -# 60619-1651 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12-1'; -$build = '60619-1651'; - - -require("dbconnect.php"); - -### links used for testing -#$link=mysql_connect("10.10.10.15", "cron", "1234"); -#mysql_select_db("asterisk"); -#$WeBServeRRooT = '/home/www/htdocs'; - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];} - elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} - elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} -if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} - elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} -if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} - elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];} -if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];} - elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];} -if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];} - elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];} -if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];} - elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];} -if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];} - elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];} -if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];} - elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];} -if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];} - elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];} -if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];} - elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];} -if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];} - elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];} -if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];} - elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];} -if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];} - elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];} -if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];} - elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];} -if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];} - elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];} -if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];} - elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];} -if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];} - elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];} -if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];} - elseif (isset($_POST["province_field"])) {$province_field=$_POST["province_field"];} -if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];} - elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];} -if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];} - elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];} -if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];} - elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];} -if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];} - elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];} -if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];} - elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];} -if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];} - elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];} -if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];} - elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];} -if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];} - elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];} -if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];} - elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); - -# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"HELP\""; - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -function macfontfix($fontsize) { - - $browser = getenv("HTTP_USER_AGENT"); - $pctype = explode("(", $browser); - if (ereg("Mac",$pctype[1])) { - /* Browser is a Mac. If not Netscape 6, raise fonts */ - - $blownbrowser = explode('/', $browser); - $ver = explode(' ', $blownbrowser[1]); - $ver = $ver[0]; - if ($ver >= 5.0) return $fontsize; else return ($fontsize+2); - - } else return $fontsize; /* Browser is not a Mac - don't touch fonts */ -} - -echo "\n"; - -?> - - - -VICIDIAL ADMIN: Super Lead Loader - - -
    method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> - - - - - - - - - - - - - - - - - - - - -
    Load leads from this file:
    List ID Override: (numbers only or leave blank for values in the file)
    File layout to use:Standard VICIDIAL    Custom layout
            
    CLICK HERE TO GO TO THE BASIC LEAD LOADER         BACK TO ADMIN
    SUPER LIST LOADER-     VERSION:     BUILD:
    - - -document.forms[0].leadfile.disabled=true;document.forms[0].list_id_override.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - $total=0; $good=0; $bad=0; - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Processing $delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - print "
    Processing Excel file... \n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    \n"; - } - # print "$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field"; - passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override"); - } else { - # copy($leadfile, "./vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - } - print ""; - } - -if ($leadfile && filesize($LF_path)<=8388608) { - $total=0; $good=0; $bad=0; - if ($file_layout=="standard") { - - print ""; - flush(); - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Processing $delim_name-delimited file... ($tab_count|$pipe_count)\n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } - print ""; - - } else { - print "
    "; - flush(); - print "\r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - - $rslt=mysql_query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1", $link); - - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Processing $delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - $total=0; $good=0; $bad=0; - $row=fgetcsv($file, 1000, ","); - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print "
    VICIDIAL ColumnFile data
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
            
    \r\n"; - # } - print ""; - } -} else if (filesize($leadfile)>8388608) { - print "
    ERROR: File exceeds the 8MB limit.
    "; -} -?> - - - - - - - - - 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### MEXICO ### -if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### AUSTRALIA ### -if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### ALL OTHER COUNTRY CODES ### -if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - -### Find out if DST to raise the gmt offset ### -$AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); -$AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - -$AC_processed=0; -if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } -if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - -return $gmt_offset; -} \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/project_auth_entries.txt b/agc_2-X/trunk/LANG_admin/vicidial_en/project_auth_entries.txt deleted file mode 100644 index b152bf1c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/project_auth_entries.txt +++ /dev/null @@ -1,129 +0,0 @@ -VICIDIAL|GOOD|Thu, 22 Sep 2005 17:42:07 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:04 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:14 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:15 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:16 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:17 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:18 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:19 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:20 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:35 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:37 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:03:39 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 13:14:51 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 16:18:06 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:48 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:47:57 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:48:00 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:48:01 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 30 Sep 2005 15:48:43 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 30 Sep 2005 15:50:19 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Tue, 04 Oct 2005 10:57:45 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -LIST_LOAD|GOOD|Tue, 04 Oct 2005 10:57:52 -0400|lead|load|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|| -VICIDIAL|GOOD|Tue, 04 Oct 2005 10:57:54 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:02:12 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:09:17 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:02:48 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 13 Dec 2005 17:44:00 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 13 Dec 2005 17:44:50 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 13 Dec 2005 17:53:06 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 13 Dec 2005 17:53:08 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 13 Dec 2005 17:53:11 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Wed, 14 Dec 2005 10:17:14 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Wed, 14 Dec 2005 10:17:51 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Wed, 14 Dec 2005 17:01:30 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Wed, 14 Dec 2005 17:02:01 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Wed, 14 Dec 2005 17:02:06 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Wed, 14 Dec 2005 17:04:05 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Wed, 14 Dec 2005 17:04:07 -0500|6666|sales|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Wed, 14 Dec 2005 17:04:25 -0500|123456|bob5|10.10.6.19|Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)|1 - TESTCAMP remote agent| -VICIDIAL|GOOD|Wed, 14 Dec 2005 17:04:33 -0500|123456|bob5|10.10.6.19|Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)|1 - TESTCAMP remote agent| -VICIDIAL|GOOD|Wed, 14 Dec 2005 17:04:36 -0500|123456|bob5|10.10.6.19|Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)|1 - TESTCAMP remote agent| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:09:08 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Fri, 23 Dec 2005 14:39:26 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Fri, 23 Dec 2005 14:39:37 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Tue, 03 Jan 2006 11:33:11 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Tue, 03 Jan 2006 11:33:15 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Tue, 03 Jan 2006 11:33:18 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Tue, 03 Jan 2006 11:33:22 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Tue, 03 Jan 2006 11:33:25 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:37:53 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:04 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:06 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:55 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:47:46 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:47:48 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:44:44 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:45:26 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:46:09 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:47:08 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:47:14 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:47:47 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:47:54 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:06 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:10 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:14 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:22 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:23 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:25 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:27 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:39 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:42 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:49 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:48:52 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 10:49:01 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 11:07:57 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:06:18 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:06:20 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:06:23 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:06:43 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:09:37 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:10:13 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:14:26 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:14:31 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:14:36 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:14:48 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:14:51 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:14:56 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:15:45 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:15:57 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:16:04 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:16:16 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:16:31 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:16:34 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:16:37 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:18:31 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:18:36 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:18:39 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:18:42 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:18:43 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:18:49 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:21:01 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Mon, 23 Jan 2006 12:21:13 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 10:01:26 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 10:01:30 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 10:08:30 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 10:08:33 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 11:34:58 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 11:35:04 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 11:35:10 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 11:35:22 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 11:35:49 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Tue, 24 Jan 2006 11:35:57 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 03 Mar 2006 16:14:19 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:03:05 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:21:23 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:21:45 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:21:47 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:21:49 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:21:52 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:21:56 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:21:57 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:21:59 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:22:00 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:22:01 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:41:20 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 10:05:32 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 10:05:35 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 10:06:06 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:35:54 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/remote_dispo.php b/agc_2-X/trunk/LANG_admin/vicidial_en/remote_dispo.php deleted file mode 100644 index da249fba..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/remote_dispo.php +++ /dev/null @@ -1,327 +0,0 @@ - LICENSE: GPLv2 -### -# this is the remote agent disposition screen for calls sent to remote agents. This allows the remote agent to modify customer information and disposition the call - -# CHANGES -# -# 60619-1626 - Added variable filtering to eliminate SQL injection attack threat -# - - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - -$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 > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -VICIDIAL REMOTE: Call Disposition -\n"; -?> - - -
    - -"; - -if ($end_call > 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="UPDATE vicidial_closer_log set end_epoch='$STARTtime', length_in_sec='" . mysql_real_escape_string($call_length) . "', status='" . mysql_real_escape_string($status) . "', user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by start_epoch desc limit 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "',user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Call has been dispositioned       $NOW_TIME\n

    \n"; - - echo "
    \n"; - -} -else -{ - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Call information: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Campaign ID: $campaign_id
    Fronter: $tsr     List ID: $list_id
    First Name:   \n"; - echo " Last Name:
    Address 1 :
    Address 2 :
    Address 3 :
    City :
    State:   \n"; - echo " Postal Code:
    Province :
    Country :
    Alt Phone :
    Email :
    Security :
    Comments :
    Disposition:
    \n"; - echo "


    \n"; - - } - else - { - echo "lead lookup FAILED for lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/server_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_en/server_stats.php deleted file mode 100644 index a427f5c0..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/server_stats.php +++ /dev/null @@ -1,96 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1037 - Added Link back to Admin section -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select * from servers;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$servers_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $servers_to_print) - { - $row=mysql_fetch_row($rslt); - $server_id[$i] = $row[0]; - $server_description[$i] = $row[1]; - $server_ip[$i] = $row[2]; - $active[$i] = $row[3]; - $i++; - } -?> - - - - - -VICIDIAL: Server Stats and Reports -VICIDIAL: Server Stats and Reports                           -BACK TO ADMIN

    - - -
    
    -
    - $o)
    -	{
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	$o++;
    -	}
    -
    -?>
    -
    SERVERDESCRIPTIONIP ADDRESSACTIVEVDAD timeVDcall timePARK timeCLOSER/INBOUND time
    $server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINKLINK
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/user_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_en/user_stats.php deleted file mode 100644 index bdada227..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/user_stats.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1743 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: User Stats -\n"; -?> - - -
    - - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Stats for  
      \n"; - -echo "
    \n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_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' group by status order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - -echo "
    \n"; - -echo "TALK TIME AND STATUS:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from vicidial_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'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - -echo "\n"; -echo "
    STATUSCOUNTHOURS:MINUTES
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    TOTAL CALLS $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "LOGIN/LOGOUT TIME:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT event,event_epoch,event_date,campaign_id from vicidial_user_log where user='" . mysql_real_escape_string($user) . "' and event_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("LOGIN", $row[0])) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if (ereg("LOGIN", $row[0])) - { - $event_start_seconds = $row[1]; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - if (ereg("LOGOUT", $row[0])) - { - if ($event_start_seconds) - { - $event_stop_seconds = $row[1]; - $event_seconds = ($event_stop_seconds - $event_start_seconds); - $total_login_time = ($total_login_time + $event_seconds); - $event_hours = ($event_seconds / 3600); - $event_hours = round($event_hours, 2); - $event_hours_int = intval("$event_hours"); - $event_minutes = ($event_hours - $event_hours_int); - $event_minutes = ($event_minutes * 60); - $event_minutes_int = round($event_minutes, 0); - if ($event_minutes_int < 10) {$event_minutes_int = "0$event_minutes_int";} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - $event_start_seconds=''; - $event_stop_seconds=''; - } - else - { - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - } - - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - -$total_login_hours = ($total_login_time / 3600); -$total_login_hours = round($total_login_hours, 2); -$total_login_hours_int = intval("$total_login_hours"); -$total_login_minutes = ($total_login_hours - $total_login_hours_int); -$total_login_minutes = ($total_login_minutes * 60); -$total_login_minutes_int = round($total_login_minutes, 0); -if ($total_login_minutes_int < 10) {$total_login_minutes_int = "0$total_login_minutes_int";} - -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "
    EVENT DATE CAMPAIGNHOURS:MINUTES
    $row[0] $row[2] $row[3]
    $row[0] $row[2] $row[3] $event_hours_int:$event_minutes_int
    $row[0] $row[2] $row[3]
    TOTAL $total_login_hours_int:$total_login_minutes_int
    \n"; - - -echo "

    \n"; - -echo "
    \n"; - -echo "LAST 50 CALLS:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where user='" . mysql_real_escape_string($user) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS PHONE CAMPAIGN LIST LEAD
    $row[4] $row[7] $row[8] $row[10] $row[3] $row[2] $row[1]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/user_status.php b/agc_2-X/trunk/LANG_admin/vicidial_en/user_status.php deleted file mode 100644 index 8efe670f..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/user_status.php +++ /dev/null @@ -1,238 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1738 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,change_agent_campaign from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $change_agent_campaign=$row[1]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $agents_to_print = mysql_num_rows($rslt); - $i=0; - while ($i < $agents_to_print) - { - $row=mysql_fetch_row($rslt); - $Aserver_ip = $row[2]; - $Asession_id = $row[3]; - $Aextension = $row[4]; - $Astatus = $row[5]; - $Acampaign = $row[7]; - $Alast_call = $row[14]; - $Acl_campaigns = $row[15]; - $i++; - } - - } - -$stmt="select * from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - - - -?> - - -VICIDIAL ADMIN: User Status -\n"; -?> - - -
    -
    - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Status for  
      \n"; - -if ($stage == "live_campaign_change") -{ - $stmt="UPDATE vicidial_live_agents set campaign_id='" . mysql_real_escape_string($group) . "' where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name changed to $group campaign
    \n"; - - exit; -} - -if ($stage == "log_agent_out") -{ - $stmt="DELETE from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name has been emergency logged out, make sure they close their web browser
    \n"; - - exit; -} - -if ($agents_to_print > 0) -{ - echo "
    ";
    -	echo "Agent Logged in at server:  $Aserver_ip\n";
    -	echo "               in session:  $Asession_id\n";
    -	echo "               from phone:  $Aextension\n";
    -	echo "Agent is in campaign:       $Acampaign\n";
    -	echo "              status:       $Astatus\n";
    -	echo " hungup last call at:       $Alast_call\n";
    -	echo "       Closer groups:       $Acl_campaigns\n\n";
    -
    -	echo "
    "; - - - if ($change_agent_campaign > 0) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "Current Campaign: \n"; - echo "
    \n"; - - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - } -} - -else -{ - echo "Agent is not logged in\n
    "; - -} - - -echo "           $user - $full_name - \n"; - -echo "VICIDIAL Time Sheet\n"; - -echo "
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - -echo "|$stage|$group|"; - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_en/vdremote.php b/agc_2-X/trunk/LANG_admin/vicidial_en/vdremote.php deleted file mode 100644 index dfe11fa3..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_en/vdremote.php +++ /dev/null @@ -1,602 +0,0 @@ - LICENSE: GPLv2 -# -# Changes -# 50307-1721 - First version -# 51123-1502 - removed requirement of PHP Globals=on -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1603 - Added variable filtering to eliminate SQL injection attack threat -# -# make sure you have added a user to the vicidial_users MySQL table with at least user_level 4 to access this page the first time - -$version = '1.1.12'; -$build = '60619-1603'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($force_logout)) {$force_logout = 0;} - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -$popup_page = './closer_popup.php'; -$STARTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - - $stmt="SELECT count(*) from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $authx=$row[0]; - - if($authx>0) - { - $stmt="SELECT remote_agent_id,server_ip,number_of_lines from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id=$row[0]; - $server_ip=$row[1]; - if (!$number_of_lines) {$number_of_lines=$row[2];} - - fwrite ($fp, "VDremote|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - echo "This remote agent does not exist: |$PHP_AUTH_USER|\n"; - exit; - } - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -if ($ADD==61111) - { - echo"\n"; - } -echo "\n"; -?> - -VICIDIAL REMOTE AGENTS: $LOGfullname - $PHP_AUTH_USER "; - -if (!$ADD) {$ADD="31111";} -if ($ADD==31111) {echo "Modify Remote Agents";} -if ($ADD==41111) {echo "Modify Remote Agents";} -if ($ADD==61111) {echo "Remote Agent Status";} -if ($ADD==71111) {echo "Remote Agent Closer Stats";} - - -if (strlen($ADD)>4) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "2) {$groups_value .= " -";} - } - -?> - - - -
    -
    - - - -
      VICIDIAL REMOTE AGENTS:   Logout  
      MODIFY | ">STATUS | ">INBOUND STATS
    -"; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: $user_start
    Number of Lines: (numbers only)
    Server IP: $row[3]
    External Extension: (number dialed to reach agents [i.e. 913125551212])
    Status:
    Campaign: $campaign_id
    Inbound Groups: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($number_of_lines) < 1) or (strlen($conf_exten) < 2) ) - {echo "
    REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - $stmt="UPDATE vicidial_remote_agents set number_of_lines='" . mysql_real_escape_string($number_of_lines) . "', conf_exten='" . mysql_real_escape_string($conf_exten) . "', status='" . mysql_real_escape_string($status) . "', closer_campaigns='" . mysql_real_escape_string($groups_value) . "' where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - -# echo "$stmt\n"; - echo "
    REMOTE AGENTS MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - - } - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: $user_start
    Number of Lines: (numbers only)
    Server IP: $row[3]
    External Extension: (number dialed to reach agents [i.e. 913125551212])
    Status:
    Campaign: $campaign_id
    Inbound Groups: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - - - -###################### -# ADD=61111 status of remote agent in the system and active calls and queue -###################### - -if ($ADD==61111) -{ - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    REMOTE AGENTS ERROR - Please go back and look at the data you entered\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'" . mysql_real_escape_string($nextuser) . "',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - echo "VICIDIAL: Remote Agent Time On Calls $NOW_TIME\n\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo "| STATION | USER | LEADID | CHANNEL | STATUS | START TIME | MINUTES |\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select extension,user,lead_id,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' and user IN($users_list) order by extension;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $leadlink=0; - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[3]=''; - $row[5]=' - WAITING - '; - $row[6]=$row[7]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $leadid = sprintf("%-12s", $row[2]); - if ($row[2] > 0) - { - $leadidLINK=$row[2]; - $leadlink++; - if ( eregi("QUEUE",$row[4]) ) {$row[6]=$STARTtime;} - $leadid = "$leadid"; - } - $channel = sprintf("%-10s", $row[3]); - $cc=0; - while ( (strlen($channel) > 10) and ($cc < 100) ) - { - $channel = eregi_replace(".$","",$channel); - $cc++; - if (strlen($channel) <= 10) {$cc=101;} - } - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = ($STARTtime - $row[6]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} - if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$extension$EG | $G$user$EG | $G$leadid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo " $i agents logged in on server $server_ip\n\n"; - - echo " - 5 minutes or more on call\n"; - echo " - Over 10 minutes on call\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "********************************* NO AGENTS ON CALLS *********************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - -###################### -# ADD=71111 stats for remote agents from closer logs(vicidial_closer_log) -###################### - -if ($ADD==71111) -{ - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n\n"; - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    REMOTE AGENTS ERROR - Please go back and look at the data you entered\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'$nextuser',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - $stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list);"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $in_calls = $row[0]; - $in_time = $row[1]; - $in_time_M = ($in_time / 60); - $in_time_M = round($in_time_M, 2); - $in_time_M_int = intval("$in_time_M"); - $in_time_SEC = ($in_time_M - $in_time_M_int); - $in_time_SEC = ($in_time_SEC * 60); - $in_time_SEC = round($in_time_SEC, 0); - if ($in_time_SEC < 10) {$in_time_SEC = "0$in_time_SEC";} - $in_time_MS = "$in_time_M_int:$in_time_SEC"; - $in_time_MS = sprintf("%7s", $in_time_MS); - - echo "VICIDIAL: Remote Agent inbound stats $NOW_TIME\n\n"; - echo "\n"; - echo "Total calls taken $query_date: $in_calls\n"; - echo "Total talk time on $query_date: $in_time_MS (minutes:seconds)\n"; - echo "\n"; - echo "\n"; - echo "Call list for $query_date:\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - echo "| USER | LEADID | GROUP | PHONE NUM | STATUS | CALL TIME | MINUTES |\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select user,lead_id,campaign_id,phone_number,status,call_date,length_in_sec from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list) order by call_date;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - $user = sprintf("%-8s", $row[0]); - $leadid = sprintf("%-10s", $row[1]); - $group = sprintf("%-14s", $row[2]); - $phone = sprintf("%-10s", $row[3]); - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = $row[6]; - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - # if ($call_time_M_int >= 5) {$G=''; $EG='';} - # if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$user$EG | $G$leadid$EG | $G$group$EG | $G$phone$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - # echo " $i agents logged in on server $server_ip\n\n"; - - # echo " - 5 minutes or more on call\n"; - # echo " - Over 10 minutes on call\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "********************************* NO CALLS ON THIS DAY *******************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_CLOSERstats.php deleted file mode 100644 index 495856fb..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_CLOSERstats.php +++ /dev/null @@ -1,396 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1714 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select group_id from vicidial_inbound_groups;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Estadísticas de VDAD Closer\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFICAR | INFORMES \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "SELECCIONE POR FAVOR Una CAMPAÚA Y La FECHA ARRIBA Y El TECLEO SOMETEN\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Estadísticas de Auto-dial en CLOSER                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Llamadas dentro de esta campaña $TOTALcalls\n";
    -echo "Longitud media para las llamadas en segundos: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total DROP Calls: $DROPcalls  $DROPpercent%\n";
    -echo "Longitud media para las llamadas DROP en segundos:    $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- ESTADÃSTICAS DEL USUARIO\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USUARIO                  | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- ESTADÃSTICAS DEL TIEMPO\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='$group';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRÃFICO EN 15 INCREMENTOS MINUCIOSOS DE LAS LLAMADAS TOTALES PUESTAS DE ESTA CAMPAÚA\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_VDADstats.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_VDADstats.php deleted file mode 100644 index 478ccef7..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_VDADstats.php +++ /dev/null @@ -1,417 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1718 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFICAR | INFORMES \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "SELECCIONE POR FAVOR Una CAMPAÚA Y La FECHA ARRIBA Y El TECLEO SOMETEN\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Stats                             $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Llamadas dentro de esta campaña $TOTALcalls\n";
    -echo "Longitud media para las llamadas en segundos: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total DROP Calls: $DROPcalls  $DROPpercent%\n";
    -echo "Longitud media para las llamadas DROP en segundos:    $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- AUTO-DIAL SIN RESPUESTA\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$NAcalls =	sprintf("%10s", $row[0]);
    -$NApercent = (($NAcalls / $TOTALcalls) * 100);
    -$NApercent = round($NApercent, 0);
    -
    -$average_na_seconds = ($row[1] / $row[0]);
    -$average_na_seconds = round($average_na_seconds, 0);
    -$average_na_seconds =	sprintf("%10s", $average_na_seconds);
    -
    -echo "Llamadas sin Respuesta - ocupado, desconexión,..:  $NAcalls  $NApercent%\n";
    -echo "Longitud media para las Llamadas sin Respuesta en segundos:       $average_na_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- ESTADÃSTICAS DEL USUARIO\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USUARIO                  | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- ESTADÃSTICAS DEL TIEMPO\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRÃFICO EN 15 INCREMENTOS MINUCIOSOS DE LAS LLAMADAS TOTALES PUESTAS DE ESTA CAMPAÚA\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_VICIDIAL_hopperlist.php deleted file mode 100644 index 1f2ca7cd..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_VICIDIAL_hopperlist.php +++ /dev/null @@ -1,161 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1654 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.10.15';} - -$stmt="select campaign_id,campaign_name from vicidial_campaigns order by campaign_id;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $campaign_id[$i] =$row[0]; - $campaign_name[$i] =$row[1]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Lista De Hopper\n"; -echo "
    \n"; -#echo "\n"; -#echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFICAR \n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "SELECCIONE POR FAVOR Una CAMPAÚA ARRIBA Y El TECLEO SOMETE\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Live Current Lista De Hopper                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -
    -echo "Total de Leads en el hopper ahora mismo:       $TOTALcalls\n";
    -
    -
    -##############################
    -#########  LEAD STATS
    -
    -echo "\n";
    -echo "---------- LEADS IN HOPPER\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$FMT_i =		sprintf("%-4s", $i);
    -	$lead_id =		sprintf("%-9s", $row[0]);
    -	$phone_number =	sprintf("%-10s", $row[1]);
    -	$state =		sprintf("%-5s", $row[2]);
    -	$status =		sprintf("%-6s", $row[3]);
    -	$count =		sprintf("%-5s", $row[4]);
    -	$gmt =			sprintf("%-6s", $row[5]);
    -
    -	echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_admin_log_display.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_admin_log_display.php deleted file mode 100644 index 6d89ee3e..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_admin_log_display.php +++ /dev/null @@ -1,118 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$query_date = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$query_date); - -# AST GUI database administration -# AST_admin_log_display.php -# -# CHANGES -# 50325-0932 - First build -# 51123-1443 - removed globals=on requirement -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1044 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '0.0.4'; -$build = '60620-1044'; - -$STARTtime = date("U"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN LOG DISPLAY"; -echo "\n"; - -# Fri, 25 Mar 2005 - -$DAY_DATE = date("j"); -if ($DAY_DATE < 10) -# {$GREP_DATE = date("D, j M Y");} - {$GREP_DATE = date("D, 0j M Y");} -else - {$GREP_DATE = date("D, j M Y");} - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!$query_date) {$query_date = $GREP_DATE;} - -$Gquery_date = eregi_replace(" ",'\ ',$query_date); -echo "\n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n\n";
    -
    -
    -echo "VICIDIAL ADMIN CHANGE LOG                             $NOW_TIME\n";
    -
    -#passthru("grep $Gquery_date /home/www/htdocs/vicidial/admin_changes_log.txt");
    -passthru("grep $Gquery_date $WeBServeRRooT/vicidial/admin_changes_log.txt");
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_performance.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_performance.php deleted file mode 100644 index 5c58d6f8..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_performance.php +++ /dev/null @@ -1,232 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1711 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["shift"])) {$shift=$_GET["shift"];} - elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Agent Performance\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFICAR | INFORMES \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A SERVIDOR AND DATE-TIME ABOVE AND CLICK ENVIAR\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:33:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:33:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:33:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:33:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TALK   | TALKAVG| A    | B    | DC   | DNC  | N    | NI   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='" . mysql_real_escape_string($group) . "' group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_performance_detail.php
    deleted file mode 100644
    index 45a7f5f8..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_performance_detail.php
    +++ /dev/null
    @@ -1,406 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1712 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["ENVIAR"]))				{$ENVIAR=$_GET["ENVIAR"];}
    -	elseif (isset($_POST["ENVIAR"]))		{$ENVIAR=$_POST["ENVIAR"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($group)) {$group = '';}
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -$stmt="select campaign_id from vicidial_campaigns;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$campaigns_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $campaigns_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFICAR | INFORMES \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK ENVIAR\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 03:45:00";   
    -	$query_date_END = "$query_date 15:15:00";
    -	$time_BEGIN = "03:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:15:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance Detail                        $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TIME   | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG| A    | B    | DC   | DNC  | N    | NI   | CB   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtime=($TOTtime + $row[1] + $row[5] + $row[7] + $row[9]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$TOTtotWAIT=($TOTtotWAIT + $row[7]);
    -	$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
    -	$TOTtotDISPO=($TOTtotDISPO + $row[9]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtime =	($row[1] + $row[5] + $row[7] + $row[9]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -	$USERtotPAUSE =	$row[5];
    -	$USERavgPAUSE =	$row[6];
    -	$USERtotWAIT =	$row[7];
    -	$USERavgWAIT =	$row[8];
    -	$USERtotDISPO =	$row[9];
    -	$USERavgDISPO =	$row[10];
    -
    -	$USERtime_M = ($USERtime / 60);
    -	$USERtime_M = round($USERtime_M, 2);
    -	$USERtime_M_int = intval("$USERtime_M");
    -	$USERtime_S = ($USERtime_M - $USERtime_M_int);
    -	$USERtime_S = ($USERtime_S * 60);
    -	$USERtime_S = round($USERtime_S, 0);
    -	if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
    -	$USERtime_MS = "$USERtime_M_int:$USERtime_S";
    -	$pfUSERtime_MS[$i] =		sprintf("%7s", $USERtime_MS);
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	$USERtotPAUSE_M = ($USERtotPAUSE / 60);
    -	$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
    -	$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
    -	$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
    -	$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
    -	$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
    -	if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
    -	$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
    -	$pfUSERtotPAUSE_MS[$i] =		sprintf("%6s", $USERtotPAUSE_MS);
    -
    -	$USERavgPAUSE_M = ($USERavgPAUSE / 60);
    -	$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
    -	$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
    -	$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
    -	$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
    -	$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
    -	if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
    -	$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
    -	$pfUSERavgPAUSE_MS[$i] =		sprintf("%6s", $USERavgPAUSE_MS);
    -
    -	$USERtotWAIT_M = ($USERtotWAIT / 60);
    -	$USERtotWAIT_M = round($USERtotWAIT_M, 2);
    -	$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
    -	$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
    -	$USERtotWAIT_S = ($USERtotWAIT_S * 60);
    -	$USERtotWAIT_S = round($USERtotWAIT_S, 0);
    -	if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
    -	$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
    -	$pfUSERtotWAIT_MS[$i] =		sprintf("%6s", $USERtotWAIT_MS);
    -
    -	$USERavgWAIT_M = ($USERavgWAIT / 60);
    -	$USERavgWAIT_M = round($USERavgWAIT_M, 2);
    -	$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
    -	$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
    -	$USERavgWAIT_S = ($USERavgWAIT_S * 60);
    -	$USERavgWAIT_S = round($USERavgWAIT_S, 0);
    -	if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
    -	$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
    -	$pfUSERavgWAIT_MS[$i] =		sprintf("%6s", $USERavgWAIT_MS);
    -	
    -	$USERtotDISPO_M = ($USERtotDISPO / 60);
    -	$USERtotDISPO_M = round($USERtotDISPO_M, 2);
    -	$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
    -	$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
    -	$USERtotDISPO_S = ($USERtotDISPO_S * 60);
    -	$USERtotDISPO_S = round($USERtotDISPO_S, 0);
    -	if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
    -	$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
    -	$pfUSERtotDISPO_MS[$i] =		sprintf("%6s", $USERtotDISPO_MS);
    -
    -	$USERavgDISPO_M = ($USERavgDISPO / 60);
    -	$USERavgDISPO_M = round($USERavgDISPO_M, 2);
    -	$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
    -	$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
    -	$USERavgDISPO_S = ($USERavgDISPO_S * 60);
    -	$USERavgDISPO_S = round($USERavgDISPO_S, 0);
    -	if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
    -	$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
    -	$pfUSERavgDISPO_MS[$i] =		sprintf("%6s", $USERavgDISPO_MS);
    -
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; $ctCB[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		if (($row[1] == 'CALLBK') || ($row[1] == 'CBHOLD') ) {$ctCB[$k]=sprintf("%-4s", $row[0]);	$TOT_CB = ($TOT_CB + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtime_MS[$k]| $pfUSERtotPAUSE_MS[$k] | $pfUSERavgPAUSE_MS[$k] | $pfUSERtotWAIT_MS[$k] | $pfUSERavgWAIT_MS[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $pfUSERtotDISPO_MS[$k] | $pfUSERavgDISPO_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctCB[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtime_M = ($TOTtime / 60);
    -	$TOTtime_M = round($TOTtime_M, 2);
    -	$TOTtime_M_int = intval("$TOTtime_M");
    -	$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
    -	$TOTtime_S = ($TOTtime_S * 60);
    -	$TOTtime_S = round($TOTtime_S, 0);
    -	if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
    -	$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
    -	$TOTtime_MS =		sprintf("%7s", $TOTtime_MS);
    -		while(strlen($TOTtime_MS)>7) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOTtotDISPO_M = ($TOTtotDISPO / 60);
    -	$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
    -	$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
    -	$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
    -	$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
    -	$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
    -	if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
    -	$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
    -	$TOTtotDISPO_MS =		sprintf("%7s", $TOTtotDISPO_MS);
    -		while(strlen($TOTtotDISPO_MS)>7) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
    -
    -	$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
    -	$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
    -	$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
    -	$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
    -	if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
    -	$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
    -	$TOTtotPAUSE_MS =		sprintf("%7s", $TOTtotPAUSE_MS);
    -		while(strlen($TOTtotPAUSE_MS)>7) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
    -
    -	$TOTtotWAIT_M = ($TOTtotWAIT / 60);
    -	$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
    -	$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
    -	$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
    -	$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
    -	$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
    -	if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
    -	$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
    -	$TOTtotWAIT_MS =		sprintf("%7s", $TOTtotWAIT_MS);
    -		while(strlen($TOTtotWAIT_MS)>7) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
    -
    -
    -	$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
    -	$TOTavgTALK_M = round($TOTavgTALK_M, 2);
    -	$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
    -	$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
    -	$TOTavgTALK_S = ($TOTavgTALK_S * 60);
    -	$TOTavgTALK_S = round($TOTavgTALK_S, 0);
    -	if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
    -	$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
    -	$TOTavgTALK_MS =		sprintf("%6s", $TOTavgTALK_MS);
    -		while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
    -
    -	$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
    -	$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
    -	$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
    -	$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
    -	$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
    -	$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
    -	if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
    -	$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
    -	$TOTavgDISPO_MS =		sprintf("%6s", $TOTavgDISPO_MS);
    -		while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
    -
    -	$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
    -	$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
    -	$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
    -	$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
    -	if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
    -	$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
    -	$TOTavgPAUSE_MS =		sprintf("%6s", $TOTavgPAUSE_MS);
    -		while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
    -
    -	$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
    -	$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
    -	$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
    -	$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
    -	$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
    -	$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
    -	if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
    -	$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
    -	$TOTavgWAIT_MS =		sprintf("%6s", $TOTavgWAIT_MS);
    -		while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
    -
    -	
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_CB = sprintf("%-5s", $TOT_CB);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtime_MS| $TOTtotPAUSE_MS| $TOTavgPAUSE_MS | $TOTtotWAIT_MS| $TOTavgWAIT_MS | $TOTtotTALK_MS| $TOTavgTALK_MS | $TOTtotDISPO_MS| $TOTavgDISPO_MS | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_CB| $TOT_SALE|\n";
    -echo "+--------------------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_time_sheet.php
    deleted file mode 100644
    index a01653c9..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_agent_time_sheet.php
    +++ /dev/null
    @@ -1,281 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1729 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
    -	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
    -	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["ENVIAR"]))				{$ENVIAR=$_GET["ENVIAR"];}
    -	elseif (isset($_POST["ENVIAR"]))		{$ENVIAR=$_POST["ENVIAR"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Time Sheet\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$agent)
    -{
    -echo "\n";
    -echo "PLEASE SELECT AN AGENTE ID AND DATE-TIME ABOVE AND CLICK ENVIAR\n";
    -echo " NOTE: stats taken from available agent log data\n";
    -}
    -
    -else
    -{
    -$query_date_BEGIN = "$query_date 00:00:00";   
    -$query_date_END = "$query_date 23:59:59";
    -$time_BEGIN = "00:00:00";   
    -$time_END = "23:59:59";
    -
    -$stmt="select full_name from vicidial_users where user='$agent';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$full_name = $row[0];
    -
    -echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTE TIME SHEET: $agent - $full_name -------------\n\n";
    -
    -if ($calls_summary)
    -	{
    -	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -
    -	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
    -
    -		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
    -		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
    -		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
    -		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
    -		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
    -		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
    -		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
    -		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
    -		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
    -		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
    -		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
    -		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
    -		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
    -		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
    -
    -		$TALK_TIME_H = ($row[1] / 3600);
    -		$TALK_TIME_H = round($TALK_TIME_H, 2);
    -		$TALK_TIME_H_int = intval("$TALK_TIME_H");
    -		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
    -		$TALK_TIME_M = ($TALK_TIME_M * 60);
    -		$TALK_TIME_M = round($TALK_TIME_M, 2);
    -		$TALK_TIME_M_int = intval("$TALK_TIME_M");
    -		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
    -		$TALK_TIME_S = ($TALK_TIME_S * 60);
    -		$TALK_TIME_S = round($TALK_TIME_S, 0);
    -		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
    -		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
    -		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
    -		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
    -
    -		$PAUSE_TIME_H = ($row[3] / 3600);
    -		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
    -		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
    -		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
    -		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
    -		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
    -		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
    -		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
    -		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
    -		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
    -		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
    -		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
    -		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
    -		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
    -
    -		$WAIT_TIME_H = ($row[5] / 3600);
    -		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
    -		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
    -		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
    -		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
    -		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
    -		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
    -		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
    -		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
    -		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
    -		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
    -		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
    -		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
    -		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
    -
    -		$WRAPUP_TIME_H = ($row[7] / 3600);
    -		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
    -		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
    -		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
    -		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
    -		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
    -		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
    -		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
    -		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
    -		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
    -
    -		$TALK_AVG_M = ($row[2] / 60);
    -		$TALK_AVG_M = round($TALK_AVG_M, 2);
    -		$TALK_AVG_M_int = intval("$TALK_AVG_M");
    -		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
    -		$TALK_AVG_S = ($TALK_AVG_S * 60);
    -		$TALK_AVG_S = round($TALK_AVG_S, 0);
    -		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
    -		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
    -		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
    -
    -		$PAUSE_AVG_M = ($row[4] / 60);
    -		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
    -		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
    -		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
    -		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
    -		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
    -		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
    -		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
    -		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
    -
    -		$WAIT_AVG_M = ($row[6] / 60);
    -		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
    -		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
    -		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
    -		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
    -		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
    -		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
    -		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
    -		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
    -
    -		$WRAPUP_AVG_M = ($row[8] / 60);
    -		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
    -		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
    -		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
    -		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
    -		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
    -		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
    -
    -	echo "LLAMADAS TOTALES TAKEN: $row[0]\n";
    -	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
    -	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
    -	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
    -	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
    -	echo "----------------------------------------------------------------\n";
    -	echo "TOTAL ACTIVE AGENTE TIME: $pfTOTAL_TIME_HMS\n";
    -
    -	echo "\n";
    -	}
    -else
    -	{
    -	echo "Call Activity Summary\n\n";
    -
    -	}
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "FIRST LOGIN:          $row[0]\n";
    -$start = $row[1];
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "LAST LOG ACTIVITY:    $row[0]\n";
    -$end = $row[1];
    -
    -$login_time = ($end - $start);
    -	$LOGIN_TIME_H = ($login_time / 3600);
    -	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
    -	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
    -	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
    -	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
    -	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
    -	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
    -	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
    -	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
    -	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
    -	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
    -	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
    -	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
    -	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
    -
    -echo "-----------------------------------------\n";
    -echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_server_performance.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_server_performance.php
    deleted file mode 100644
    index e7b7a022..00000000
    --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_server_performance.php
    +++ /dev/null
    @@ -1,310 +0,0 @@
    -    LICENSE: GPLv2
    -#
    -# CHANGES
    -#
    -# 60619-1732 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))	{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))	{$submit=$_POST["submit"];}
    -if (isset($_GET["ENVIAR"]))				{$ENVIAR=$_GET["ENVIAR"];}
    -	elseif (isset($_POST["ENVIAR"]))	{$ENVIAR=$_POST["ENVIAR"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -# path from root to where ploticus files will be stored
    -$DOCroot = "$WeBServeRRooT/vicidial/ploticus/";
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -if (!isset($group)) {$group = '';}
    -
    -$stmt="select server_ip from servers;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$servers_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $servers_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Server Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "             INFORMES \n"; -echo "\n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A SERVIDOR AND DATE-TIME ABOVE AND CLICK ENVIAR\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:32:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:32:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Server Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- TOTALS, PEAKS and AVERAGES\n";
    -
    -$stmt="select sysload from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by sysload desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$HIGHload =	sprintf("%10s", $row[0]);
    -$HIGHmulti = intval($HIGHload / 100);
    -#$HIGHmulti = ($HIGHload / 100);
    -
    -$stmt="select AVG(sysload),AVG(channels_total) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGload =	sprintf("%10s", $row[0]);
    -$AVGchannels =	sprintf("%10s", $row[1]);
    -
    -$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGcpuUSER =	sprintf("%10s", $row[0]);
    -$AVGcpuSYSTEM =	sprintf("%10s", $row[1]);
    -$AVGcpuIDLE =	sprintf("%10s", $row[2]);
    -
    -$stmt="select usedram from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by usedram desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$USEDram =	sprintf("%10s", $row[0]);
    -
    -$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365','8366','8367') and  start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$OFFHOOKtime =	sprintf("%10s", $row[1]);
    -
    -
    -echo "Total Calls in/out on this server:        $TOTALcalls\n";
    -echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
    -echo "Average channels in use for server:       $AVGchannels\n";
    -echo "Average load for server:                  $AVGload\n";
    -echo "Peak load for server:                     $HIGHload\n";
    -#echo "Peak used memory for server (in MB):      $USEDram\n";
    -echo "Average USER process cpu percentage:      $AVGcpuUSER %\n";
    -echo "Average SYSTEM process cpu percentage:    $AVGcpuSYSTEM %\n";
    -echo "Average IDLE process cpu percentage:      $AVGcpuIDLE %\n";
    -
    -echo "\n";
    -echo "---------- LINE GRAPH:\n";
    -
    -
    -
    -##############################
    -#########  Graph stats
    -
    -$DAT = '.dat';
    -$HTM = '.htm';
    -$PNG = '.png';
    -$filedate = date("Y-m-d_His");
    -$DATfile = "$group$query_date$shift$filedate$DAT";
    -$HTMfile = "$group$query_date$shift$filedate$HTM";
    -$PNGfile = "$group$query_date$shift$filedate$PNG";
    -
    -$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
    -$DATfp = fopen ("$DOCroot/$DATfile", "a");
    -
    -$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='" . mysql_real_escape_string($group) . "' and start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' order by timex;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
    -	$row[6] = intval($row[6] * $HIGHmulti);
    -	fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
    -	$i++;
    -	}
    -fclose($DATfp);
    -
    -$rows_to_max = ($rows_to_print + 100);
    -
    -
    -
    -$HTMcontent  = '';
    -$HTMcontent .= "#proc page\n";
    -$HTMcontent .= "#if @DEVICE in png,gif\n";
    -$HTMcontent .= "   scale: 0.6\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#endif\n";
    -$HTMcontent .= "#proc getdata\n";
    -$HTMcontent .= "file: $DOCroot/$DATfile\n";
    -$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc areadef\n";
    -$HTMcontent .= "title: Server $group   $query_date_BEGIN to $query_date_END\n";
    -$HTMcontent .= "titledetails: size=14  align=C\n";
    -$HTMcontent .= "rectangle: 1 1 14 7\n";
    -$HTMcontent .= "xscaletype: time hh:mm:ss\n";
    -$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
    -$HTMcontent .= "yrange: 0 $HIGHload\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc xaxis\n";
    -$HTMcontent .= "stubs: inc 30 minutes\n";
    -$HTMcontent .= "minorticinc: 5 minutes\n";
    -$HTMcontent .= "stubformat: hh:mm:ssa\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc yaxis\n";
    -$HTMcontent .= "stubs: inc 50\n";
    -$HTMcontent .= "grid: color=yellow\n";
    -$HTMcontent .= "gridskip: min\n";
    -$HTMcontent .= "ticincrement: 100 1000\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: userproc\n";
    -$HTMcontent .= "linedetails: color=purple width=.5\n";
    -$HTMcontent .= "fill: lavender\n";
    -$HTMcontent .= "legendlabel: user proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: sysproc\n";
    -$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
    -$HTMcontent .= "fill: dullyellow\n";
    -$HTMcontent .= "legendlabel: system proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: load\n";
    -$HTMcontent .= "linedetails: color=blue width=.5\n";
    -$HTMcontent .= "legendlabel: load\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: processes\n";
    -$HTMcontent .= "linedetails: color=red width=.5\n";
    -$HTMcontent .= "legendlabel: processes\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: channels\n";
    -$HTMcontent .= "linedetails: color=green width=.5\n";
    -$HTMcontent .= "legendlabel: channels\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc legend\n";
    -$HTMcontent .= "location: max-2 max\n";
    -$HTMcontent .= "seglen: 0.2\n";
    -$HTMcontent .= "\n";
    -
    -fwrite ($HTMfp, "$HTMcontent");
    -fclose($HTMfp);
    -
    -
    -passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
    -
    -sleep(1);
    -
    -echo "
    \n"; -echo "\n"; -echo "\n"; - - -echo ""; - -} - - - -?> - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDAD.php deleted file mode 100644 index 2fb623d0..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDAD.php +++ /dev/null @@ -1,255 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 60620-1040 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Tiempo de los  Agentes En Llamadas        $NOW_TIME    INFORMES\n\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL    | STATUS | START TIME          | MINUTES |\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	$agentcount=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- ESPERANDO -';
    -			$row[6]=$row[7];
    -			}
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$sessionid =		sprintf("%-9s", $row[2]);
    -		$channel =			sprintf("%-10s", $row[3]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[4]);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 5) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 10) {$G=''; $EG='';}
    -		if (eregi("PAUSED",$row[4])) 
    -			{
    -			if ($call_time_M_int >= 1) 
    -				{$i++; continue;} 
    -			else
    -				{$G=''; $EG='';}
    -			}
    -
    -		$agentcount++;
    -		echo "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -		echo "  $agentcount agentes identificados en el servidor $server_ip\n\n";
    -
    -		echo "             - Agentes detenidos brevemente\n";
    -		echo "             - Llamadas de 5 minutos o más\n";
    -		echo "             - Sobre 10 minutos en llamada\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "*********************************AGENTES SIN LLAMADAS*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -echo "| CHANNEL    | STATUS | CAMPAIGN | PHONE NUMBER       | START TIME          | MINUTES |\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-8s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -		echo "  $i llamadas en el servidor $server_ip\n\n";
    -
    -		echo "             - LLAMADAS ACTUALES EN ESPERA\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "*******************************LLAMADAS EN ESPERA*********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDAD_closer.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDAD_closer.php deleted file mode 100644 index 9850f4ed..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDAD_closer.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# CHANGES -# -# 60620-1037 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - -\n"; -echo " - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Tiempo de los  Agentes En Llamadas        $NOW_TIME    INFORMES\n\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL             | STATUS | CALLTIME | MINUTES | CAMPAIGN     | FRONT  |\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED|CLOSER",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- WAIT -';
    -			$row[6]=$row[7];
    -			}
    -		$extension[$i] =		sprintf("%-10s", $row[0]);
    -		$user[$i] =				sprintf("%-6s", $row[1]);
    -		$sessionid[$i] =		sprintf("%-9s", $row[2]);
    -		$channel[$i] =			sprintf("%-19s", $row[3]);
    -			$cc[$i]=0;
    -		while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
    -			{
    -			$channel[$i] = eregi_replace(".$","",$channel[$i]);   
    -			$cc[$i]++;
    -			if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
    -			}
    -		$status[$i] =			sprintf("%-6s", $row[4]);
    -		$start_time[$i] =		sprintf("%-8s", $row[5]);
    -			$cd[$i]=0;
    -		while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
    -			{
    -			$start_time[$i] = eregi_replace("^.","",$start_time[$i]);   
    -			$cd[$i]++;
    -			if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
    -			}
    -		$uniqueid[$i] =			$row[8];
    -		$lead_id[$i] =			$row[9];
    -		$closer[$i] =			$row[1];
    -		$call_time_S[$i] = ($STARTtime - $row[6]);
    -
    -		$call_time_M[$i] = ($call_time_S[$i] / 60);
    -		$call_time_M[$i] = round($call_time_M[$i], 2);
    -		$call_time_M_int[$i] = intval("$call_time_M[$i]");
    -		$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
    -		$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
    -		$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
    -		if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
    -		$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
    -		$call_time_MS[$i] =		sprintf("%7s", $call_time_MS[$i]);
    -		$i++;
    -		}
    -		$ext_count = $i;
    -		$i=0;
    -	while ($i < $ext_count)
    -		{
    -
    -		$stmt="select campaign_id from vicidial_auto_calls where uniqueid='$uniqueid[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "';";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$camp_to_print = mysql_num_rows($rslt);
    -		if ($camp_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$campaign = sprintf("%-12s", $row[0]);
    -			$camp_color = $row[0];
    -			}
    -		else
    -			{$campaign = 'DEAD        ';   	$camp_color = 'DEAD';}
    -		if (eregi("READY|PAUSED|CLOSER",$status[$i]))
    -			{$campaign = '            ';   	$camp_color = '';}
    -
    -		$stmt="select user from vicidial_xfer_log where lead_id='$lead_id[$i]' and closer='$closer[$i]' order by call_date desc limit 1;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$xfer_to_print = mysql_num_rows($rslt);
    -		if ($xfer_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$fronter = sprintf("%-6s", $row[0]);
    -			}
    -		else
    -			{$fronter = '      ';}
    -
    -		$G = '';		$EG = '';
    -		$G=""; $EG='';
    -	#	if ($call_time_M_int[$i] >= 5) {$G=''; $EG='';}
    -	#	if ($call_time_M_int[$i] >= 10) {$G=''; $EG='';}
    -
    -		echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -		echo "  $i agentes identificados en el servidor $server_ip\n\n";
    -
    -	#	echo "             - Llamadas de 5 minutos o más\n";
    -	#	echo "             - Sobre 10 minutos en llamada\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "*********************************AGENTES SIN LLAMADAS*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -#echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -echo "| CHANNEL             | STATUS | CAMPAIGN     | PHONE NUMBER       | CALLTIME | MINUTES |\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id desc;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-19s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 19) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 19) {$cc=101;}
    -			}
    -		$start_time =		sprintf("%-8s", $row[5]);
    -			$cd=0;
    -		while ( (strlen($start_time) > 8) and ($cd < 100) )
    -			{
    -			$start_time = eregi_replace("^.","",$start_time);   
    -			$cd++;
    -			if (strlen($start_time) <= 8) {$cd=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-12s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -		echo "  $i llamadas en el servidor $server_ip\n\n";
    -
    -		echo "             - LLAMADAS ACTUALES EN ESPERA\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "*******************************LLAMADAS EN ESPERA*********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDADall.php deleted file mode 100644 index 428c8d56..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDADall.php +++ /dev/null @@ -1,349 +0,0 @@ - LICENSE: GPLv2 -# -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60511-1343 - Added leads and drop info at the top of the screen -# 60608-1539 - Fixed CLOSER tallies for active calls -# 60619-1658 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["RR"])) {$RR=$_GET["RR"];} - elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -if (!isset($group)) {$group='';} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$NOW_DAY = date("Y-m-d"); -$NOW_HOUR = date("H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns where active='Y';"; -$rslt=mysql_query($stmt, $link); -if (!isset($DB)) {$DB=0;} -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!isset($RR)) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if (!isset($reset_counter)) {$reset_counter=0;} -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD Campaña: $group\n"; -echo "
    \n"; -echo "VICIDIAL: Realtime Campaña: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         MODIFICAR | INFORMES \n"; -echo "\n\n"; - - -if (!$group) {echo "

    please select a campaign from the pulldown above\n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$HOPlev = $row[8]; - -echo "
    "; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; - -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$VDhop = $row[0]; - -$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$DAleads = $row[0]; -$callsTODAY = $row[1]; -$dropsTODAY = $row[2]; -$drpctTODAY = $row[3]; - -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "
    DIAL LEVEL:  $row[0]    STATUSES:  $row[1], $row[2], $row[3], $row[4], $row[5]     ORDER:  $row[6]     FILTER:  $row[7]    
    HOPPER LEVEL:  $HOPlev     LEADS IN HOPPER:  $VDhop     DIALABLE LEADS:  $DAleads       TIME:
    CALLS TODAY:  $callsTODAY     CALLS DROPPED:  $dropsTODAY     DROPPED PERCENT:  $drpctTODAY%       $NOW_TIME
    "; - - -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - { - $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );"; - } -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo "LLAMADAS EN ESPERA\n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Campaña: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVIDOR IP | CALL SERVIDOR IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n\n"; - - $Aecho .= " - Agentes detenidos brevemente\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo "AGENTES SIN LLAMADAS\n";
    -	}
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDADall_SIPmonitor.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDADall_SIPmonitor.php deleted file mode 100644 index 27281fb1..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonVDADall_SIPmonitor.php +++ /dev/null @@ -1,301 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60504-2023 - Modified click-to-listen for SIP phones by Angelito Manansala -# 60619-1708 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];} -$RR=$_GET["RR"]; if (!$RR) {$RR=$_POST["RR"];} -$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];} -$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];} -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$ENVIAR=$_GET["ENVIAR"]; if (!$ENVIAR) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!$RR) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VF DIALER: Time On VDAD Campaña: $group\n"; -echo "
    \n"; -echo "VF DIALER: Realtime Campaña: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         MODIFICAR | INFORMES \n"; -echo "\n\n"; - -if (!$group) {echo "

    please select a campaign from the pulldown above
    \n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); - -echo "
    "; -echo "DIAL LEVEL: $row[0]         "; -echo "STATUSES: $row[1], $row[2], $row[3], $row[4], $row[5]         "; -echo "ORDER: $row[6]"; -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and (campaign_id='" . mysql_real_escape_string($group) . "' or campaign_id LIKE \"CL_%\");";} -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo "LLAMADAS EN ESPERA\n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VF DIALER: Agents Time On Calls Campaña: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVIDOR IP | CALL SERVIDOR IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - $sessionid = trim($sessionid); - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG LISTEN | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n"; - $Aecho .= " NOTE: Click LISTERN to monitor agent call, you must have installed softphone on you machine.\n\n"; - - - $Aecho .= " - Agentes detenidos brevemente\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo "AGENTES SIN LLAMADAS\n";
    -	}
    -
    -?>
    -
    - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeoncall.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeoncall.php deleted file mode 100644 index c417350c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeoncall.php +++ /dev/null @@ -1,180 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Call\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Call                                          $NOW_TIME\n\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -echo "| STATION    | SESSIONID | CHANNEL   | NUMBER DIALED    | START TIME          | MINUTES |\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -
    -$stmt="SELECT count(*) from live_sip_channels where server_ip='$server_ip';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="select extension from live_channels where server_ip='$server_ip';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$ext_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_zap_counter=0;
    -	$sessions = '';
    -	while ($i < $ext_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if (preg_match("/^8600/i",$row[0]))
    -			{
    -			$sessions .= "$row[0]|";
    -			}
    -		$i++;
    -		}
    -	$sessions = preg_replace("/\|$/",'',$sessions);
    -
    -	if ($DB) {echo "SESSIONS: -$sessions-\n";}
    -
    -	$stmt="select * from live_sip_channels where server_ip='$server_ip' order by channel;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_calls_counter=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ( (preg_match("/Zap\/|internal|ring/i",$row[3])) or (preg_match("/Local\//i",$row[0])) )
    -			{
    -			if ($DB) {echo "NOT STATION |$row[0]|$row[3]|\n";}
    -			$session_id = '';
    -			}
    -		else 
    -			{
    -			if (preg_match("/$row[3]/i",$sessions))
    -				{
    -				if ($DB) {echo "LIVE STATION|$row[0]|$row[3]|\n";}
    -				$session_id = $row[3];
    -				$station = preg_replace("/SIP\//",'',$row[0]);
    -				$station = preg_replace("/-.*/",'',$station);
    -			
    -				$LIVE_sessions[$live_calls_counter] =			"$session_id";
    -				$LIVE_sessions_FORMAT[$live_calls_counter] =	sprintf("%-9s", $session_id);
    -				$LIVE_stations[$live_calls_counter] =			"$station";
    -				$LIVE_stations_FORMAT[$live_calls_counter] =	sprintf("%-10s", $station);
    -
    -		#		echo "| $station | $session_id | \n";
    -
    -				$live_calls_counter++;
    -				}
    -			else
    -				{
    -				if ($DB) {echo "NOT STATIONZ|$row[0]|$row[3]|\n";}
    -				$session_id = '';
    -				}
    -			}
    -
    -		$i++;
    -		}
    -
    -		if ($live_calls_counter > 0)
    -		{
    -		$i=0;
    -		$LC_counter = $live_calls_counter;
    -
    -		while ($i < $live_calls_counter)
    -			{
    -			$stmt="select channel,extension,number_dialed,start_time,start_epoch from call_log where extension='$LIVE_stations[$i]' and server_ip='$server_ip' order by uniqueid desc LIMIT 1;";
    -			$rslt=mysql_query($stmt, $link);
    -			if ($DB) {echo "$stmt\n";}
    -			$parked_to_print = mysql_num_rows($rslt);
    -			$row=mysql_fetch_row($rslt);
    -
    -			$channel =			sprintf("%-9s", $row[0]);
    -			$number_dialed =	sprintf("%-16s", $row[2]);
    -			$start_time =		sprintf("%-19s", $row[3]);
    -			$call_time_S = ($STARTtime - $row[4]);
    -
    -			$call_time_M = ($call_time_S / 60);
    -			$call_time_M = round($call_time_M, 2);
    -			$call_time_M_int = intval("$call_time_M");
    -			$call_time_SEC = ($call_time_M - $call_time_M_int);
    -			$call_time_SEC = ($call_time_SEC * 60);
    -			$call_time_SEC = round($call_time_SEC, 0);
    -			if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -			$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -			$call_time_MS =		sprintf("%7s", $call_time_MS);
    -			$G = '';		$EG = '';
    -			if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -			if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -			echo "| $G$LIVE_stations_FORMAT[$i]$EG | $G$LIVE_sessions_FORMAT[$i]$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -			$i++;
    -			}
    -
    -		echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -		echo "  $i stations on live calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on live call\n";
    -		echo "             - Over 30 minutes on live call\n";
    -
    -		}
    -		else
    -		{
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*************************************** NO LIVE STATIONS ********************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*************************************** NO LIVE STATIONS ********************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	}
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonpark.php b/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonpark.php deleted file mode 100644 index d098a8a4..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/AST_timeonpark.php +++ /dev/null @@ -1,197 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$timeONEhoursAGO = ($STARTtime - 3600); -$epochHALFhoursAGO = ($STARTtime - 1860); -$timeONEhoursAGO = date("Y-m-d H:i:s",$timeONEhoursAGO); -$timeHALFhoursAGO = date("Y-m-d H:i:s",$epochHALFhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where status='TALKING' and grab_time < '$timeONEhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - $stmt="delete from park_log where status='PARKED' and parked_time < '$timeHALFhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Park\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select extension,user,channel,channel_group,parked_time,UNIX_TIMESTAMP(parked_time) from park_log where status ='PARKED' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 1) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i callers waiting on server $server_ip\n\n";
    -
    -		echo "             - 1 minute or more on hold\n";
    -		echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	echo "********************LLAMADAS EN ESPERA*********************\n";
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	}
    -
    -###################################################################################
    -###### TIME ON INBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Agents Time On Inbound Calls                             $NOW_TIME\n\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,channel,channel_group,grab_time,UNIX_TIMESTAMP(grab_time) from park_log where status ='TALKING' and server_ip='$server_ip' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -		echo "| $G$extension$EG | $G$user$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i agents on calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on call\n";
    -		echo "             - Over 30 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "*********************************AGENTES SIN LLAMADAS*********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/admin.php b/agc_2-X/trunk/LANG_admin/vicidial_es/admin.php deleted file mode 100644 index 558e011c..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/admin.php +++ /dev/null @@ -1,6514 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} - elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} -if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} - elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];} - elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];} - elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];} -if (isset($_GET["park_file_name"])) {$park_file_name=$_GET["park_file_name"];} - elseif (isset($_POST["park_file_name"])) {$park_file_name=$_POST["park_file_name"];} -if (isset($_GET["web_form_address"])) {$web_form_address=$_GET["web_form_address"];} - elseif (isset($_POST["web_form_address"])) {$web_form_address=$_POST["web_form_address"];} -if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} - elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} -if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} - elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["next_agent_call"])) {$next_agent_call=$_GET["next_agent_call"];} - elseif (isset($_POST["next_agent_call"])) {$next_agent_call=$_POST["next_agent_call"];} -if (isset($_GET["local_call_time"])) {$local_call_time=$_GET["local_call_time"];} - elseif (isset($_POST["local_call_time"])) {$local_call_time=$_POST["local_call_time"];} -if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} - elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];} - elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];} -if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} - elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];} - elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} -if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} - elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["dial_status_a"])) {$dial_status_a=$_GET["dial_status_a"];} - elseif (isset($_POST["dial_status_a"])) {$dial_status_a=$_POST["dial_status_a"];} -if (isset($_GET["dial_status_b"])) {$dial_status_b=$_GET["dial_status_b"];} - elseif (isset($_POST["dial_status_b"])) {$dial_status_b=$_POST["dial_status_b"];} -if (isset($_GET["dial_status_c"])) {$dial_status_c=$_GET["dial_status_c"];} - elseif (isset($_POST["dial_status_c"])) {$dial_status_c=$_POST["dial_status_c"];} -if (isset($_GET["dial_status_d"])) {$dial_status_d=$_GET["dial_status_d"];} - elseif (isset($_POST["dial_status_d"])) {$dial_status_d=$_POST["dial_status_d"];} -if (isset($_GET["dial_status_e"])) {$dial_status_e=$_GET["dial_status_e"];} - elseif (isset($_POST["dial_status_e"])) {$dial_status_e=$_POST["dial_status_e"];} -if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} - elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["campaign_vdad_exten"])) {$campaign_vdad_exten=$_GET["campaign_vdad_exten"];} - elseif (isset($_POST["campaign_vdad_exten"])) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];} -if (isset($_GET["campaign_rec_exten"])) {$campaign_rec_exten=$_GET["campaign_rec_exten"];} - elseif (isset($_POST["campaign_rec_exten"])) {$campaign_rec_exten=$_POST["campaign_rec_exten"];} -if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} - elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} -if (isset($_GET["campaign_rec_filename"])) {$campaign_rec_filename=$_GET["campaign_rec_filename"];} - elseif (isset($_POST["campaign_rec_filename"])) {$campaign_rec_filename=$_POST["campaign_rec_filename"];} -if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} - elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} -if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} - elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} -if (isset($_GET["old_campaign_id"])) {$old_campaign_id=$_GET["old_campaign_id"];} - elseif (isset($_POST["old_campaign_id"])) {$old_campaign_id=$_POST["old_campaign_id"];} -if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} - elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} -if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} - elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];} -if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} - elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} -if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} - elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];} - elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} -if (isset($_GET["delete_user_groups"])) {$delete_user_groups=$_GET["delete_user_groups"];} - elseif (isset($_POST["delete_user_groups"])) {$delete_user_groups=$_POST["delete_user_groups"];} -if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} - elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} -if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} - elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} -if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} - elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} -if (isset($_GET["delete_remote_agents"])) {$delete_remote_agents=$_GET["delete_remote_agents"];} - elseif (isset($_POST["delete_remote_agents"])) {$delete_remote_agents=$_POST["delete_remote_agents"];} -if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];} - elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} -if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} - elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} -if (isset($_GET["ast_admin_access"])) {$ast_admin_access=$_GET["ast_admin_access"];} - elseif (isset($_POST["ast_admin_access"])) {$ast_admin_access=$_POST["ast_admin_access"];} -if (isset($_GET["ast_delete_phones"])) {$ast_delete_phones=$_GET["ast_delete_phones"];} - elseif (isset($_POST["ast_delete_phones"])) {$ast_delete_phones=$_POST["ast_delete_phones"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} -if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} - elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} -if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];} - elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];} -if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];} - elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];} -if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} - elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} -if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];} - elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} -if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} - elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} -if (isset($_GET["get_call_launch"])) {$get_call_launch=$_GET["get_call_launch"];} - elseif (isset($_POST["get_call_launch"])) {$get_call_launch=$_POST["get_call_launch"];} -if (isset($_GET["am_message_exten"])) {$am_message_exten=$_GET["am_message_exten"];} - elseif (isset($_POST["am_message_exten"])) {$am_message_exten=$_POST["am_message_exten"];} -if (isset($_GET["amd_send_to_vmx"])) {$amd_send_to_vmx=$_GET["amd_send_to_vmx"];} - elseif (isset($_POST["amd_send_to_vmx"])) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];} -if (isset($_GET["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"];} - elseif (isset($_POST["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];} -if (isset($_GET["xferconf_a_number"])) {$xferconf_a_number=$_GET["xferconf_a_number"];} - elseif (isset($_POST["xferconf_a_number"])) {$xferconf_a_number=$_POST["xferconf_a_number"];} -if (isset($_GET["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"];} - elseif (isset($_POST["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];} -if (isset($_GET["xferconf_b_number"])) {$xferconf_b_number=$_GET["xferconf_b_number"];} - elseif (isset($_POST["xferconf_b_number"])) {$xferconf_b_number=$_POST["xferconf_b_number"];} -if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} - elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} -if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} - elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} -if (isset($_GET["change_agent_campaign"])) {$change_agent_campaign=$_GET["change_agent_campaign"];} - elseif (isset($_POST["change_agent_campaign"])) {$change_agent_campaign=$_POST["change_agent_campaign"];} -if (isset($_GET["agent_choose_ingroups"])) {$agent_choose_ingroups=$_GET["agent_choose_ingroups"];} - elseif (isset($_POST["agent_choose_ingroups"])) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];} -if (isset($_GET["alt_number_dialing"])) {$alt_number_dialing=$_GET["alt_number_dialing"];} - elseif (isset($_POST["alt_number_dialing"])) {$alt_number_dialing=$_POST["alt_number_dialing"];} -if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} - elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} -if (isset($_GET["lead_filter_id"])) {$lead_filter_id=$_GET["lead_filter_id"];} - elseif (isset($_POST["lead_filter_id"])) {$lead_filter_id=$_POST["lead_filter_id"];} -if (isset($_GET["lead_filter_name"])) {$lead_filter_name=$_GET["lead_filter_name"];} - elseif (isset($_POST["lead_filter_name"])) {$lead_filter_name=$_POST["lead_filter_name"];} -if (isset($_GET["lead_filter_comments"])) {$lead_filter_comments=$_GET["lead_filter_comments"];} - elseif (isset($_POST["lead_filter_comments"])) {$lead_filter_comments=$_POST["lead_filter_comments"];} -if (isset($_GET["lead_filter_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} - elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} -if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} - elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} -if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} - elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} -if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];} - elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];} -if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];} - elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];} -if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} - elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} -if (isset($_GET["alter_agent_interface_options"])) {$alter_agent_interface_options=$_GET["alter_agent_interface_options"];} - elseif (isset($_POST["alter_agent_interface_options"])) {$alter_agent_interface_options=$_POST["alter_agent_interface_options"];} -if (isset($_GET["closer_default_blended"])) {$closer_default_blended=$_GET["closer_default_blended"];} - elseif (isset($_POST["closer_default_blended"])) {$closer_default_blended=$_POST["closer_default_blended"];} -if (isset($_GET["drop_call_seconds"])) {$drop_call_seconds=$_GET["drop_call_seconds"];} - elseif (isset($_POST["drop_call_seconds"])) {$drop_call_seconds=$_POST["drop_call_seconds"];} -if (isset($_GET["safe_harbor_message"])) {$safe_harbor_message=$_GET["safe_harbor_message"];} - elseif (isset($_POST["safe_harbor_message"])) {$safe_harbor_message=$_POST["safe_harbor_message"];} -if (isset($_GET["safe_harbor_exten"])) {$safe_harbor_exten=$_GET["safe_harbor_exten"];} - elseif (isset($_POST["safe_harbor_exten"])) {$safe_harbor_exten=$_POST["safe_harbor_exten"];} -if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} - elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} -if (isset($_GET["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} - elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} -if (isset($_GET["call_time_id"])) {$call_time_id=$_GET["call_time_id"];} - elseif (isset($_POST["call_time_id"])) {$call_time_id=$_POST["call_time_id"];} -if (isset($_GET["call_time_name"])) {$call_time_name=$_GET["call_time_name"];} - elseif (isset($_POST["call_time_name"])) {$call_time_name=$_POST["call_time_name"];} -if (isset($_GET["call_time_comments"])) {$call_time_comments=$_GET["call_time_comments"];} - elseif (isset($_POST["call_time_comments"])) {$call_time_comments=$_POST["call_time_comments"];} -if (isset($_GET["ct_default_start"])) {$ct_default_start=$_GET["ct_default_start"];} - elseif (isset($_POST["ct_default_start"])) {$ct_default_start=$_POST["ct_default_start"];} -if (isset($_GET["ct_default_stop"])) {$ct_default_stop=$_GET["ct_default_stop"];} - elseif (isset($_POST["ct_default_stop"])) {$ct_default_stop=$_POST["ct_default_stop"];} -if (isset($_GET["ct_sunday_start"])) {$ct_sunday_start=$_GET["ct_sunday_start"];} - elseif (isset($_POST["ct_sunday_start"])) {$ct_sunday_start=$_POST["ct_sunday_start"];} -if (isset($_GET["ct_sunday_stop"])) {$ct_sunday_stop=$_GET["ct_sunday_stop"];} - elseif (isset($_POST["ct_sunday_stop"])) {$ct_sunday_stop=$_POST["ct_sunday_stop"];} -if (isset($_GET["ct_monday_start"])) {$ct_monday_start=$_GET["ct_monday_start"];} - elseif (isset($_POST["ct_monday_start"])) {$ct_monday_start=$_POST["ct_monday_start"];} -if (isset($_GET["ct_monday_stop"])) {$ct_monday_stop=$_GET["ct_monday_stop"];} - elseif (isset($_POST["ct_monday_stop"])) {$ct_monday_stop=$_POST["ct_monday_stop"];} -if (isset($_GET["ct_tuesday_start"])) {$ct_tuesday_start=$_GET["ct_tuesday_start"];} - elseif (isset($_POST["ct_tuesday_start"])) {$ct_tuesday_start=$_POST["ct_tuesday_start"];} -if (isset($_GET["ct_tuesday_stop"])) {$ct_tuesday_stop=$_GET["ct_tuesday_stop"];} - elseif (isset($_POST["ct_tuesday_stop"])) {$ct_tuesday_stop=$_POST["ct_tuesday_stop"];} -if (isset($_GET["ct_wednesday_start"])) {$ct_wednesday_start=$_GET["ct_wednesday_start"];} - elseif (isset($_POST["ct_wednesday_start"])) {$ct_wednesday_start=$_POST["ct_wednesday_start"];} -if (isset($_GET["ct_wednesday_stop"])) {$ct_wednesday_stop=$_GET["ct_wednesday_stop"];} - elseif (isset($_POST["ct_wednesday_stop"])) {$ct_wednesday_stop=$_POST["ct_wednesday_stop"];} -if (isset($_GET["ct_thursday_start"])) {$ct_thursday_start=$_GET["ct_thursday_start"];} - elseif (isset($_POST["ct_thursday_start"])) {$ct_thursday_start=$_POST["ct_thursday_start"];} -if (isset($_GET["ct_thursday_stop"])) {$ct_thursday_stop=$_GET["ct_thursday_stop"];} - elseif (isset($_POST["ct_thursday_stop"])) {$ct_thursday_stop=$_POST["ct_thursday_stop"];} -if (isset($_GET["ct_friday_start"])) {$ct_friday_start=$_GET["ct_friday_start"];} - elseif (isset($_POST["ct_friday_start"])) {$ct_friday_start=$_POST["ct_friday_start"];} -if (isset($_GET["ct_friday_stop"])) {$ct_friday_stop=$_GET["ct_friday_stop"];} - elseif (isset($_POST["ct_friday_stop"])) {$ct_friday_stop=$_POST["ct_friday_stop"];} -if (isset($_GET["ct_saturday_start"])) {$ct_saturday_start=$_GET["ct_saturday_start"];} - elseif (isset($_POST["ct_saturday_start"])) {$ct_saturday_start=$_POST["ct_saturday_start"];} -if (isset($_GET["ct_saturday_stop"])) {$ct_saturday_stop=$_GET["ct_saturday_stop"];} - elseif (isset($_POST["ct_saturday_stop"])) {$ct_saturday_stop=$_POST["ct_saturday_stop"];} -if (isset($_GET["state_call_time_state"])) {$state_call_time_state=$_GET["state_call_time_state"];} - elseif (isset($_POST["state_call_time_state"])) {$state_call_time_state=$_POST["state_call_time_state"];} -if (isset($_GET["state_rule"])) {$state_rule=$_GET["state_rule"];} - elseif (isset($_POST["state_rule"])) {$state_rule=$_POST["state_rule"];} -if (isset($_GET["delete_call_times"])) {$delete_call_times=$_GET["delete_call_times"];} - elseif (isset($_POST["delete_call_times"])) {$delete_call_times=$_POST["delete_call_times"];} -if (isset($_GET["modify_call_times"])) {$modify_call_times=$_GET["modify_call_times"];} - elseif (isset($_POST["modify_call_times"])) {$modify_call_times=$_POST["modify_call_times"];} -if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} - elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} -if (isset($_GET["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} - elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} -if (isset($_GET["attempt_delay"])) {$attempt_delay=$_GET["attempt_delay"];} - elseif (isset($_POST["attempt_delay"])) {$attempt_delay=$_POST["attempt_delay"];} -if (isset($_GET["attempt_maximum"])) {$attempt_maximum=$_GET["attempt_maximum"];} - elseif (isset($_POST["attempt_maximum"])) {$attempt_maximum=$_POST["attempt_maximum"];} - - if (isset($script_id)) {$script_id= strtoupper($script_id);} - if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS ONLY ### -$user_level = ereg_replace("[^0-9]","",$user_level); -$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); -$xferconf_a_number = ereg_replace("[^0-9]","",$xferconf_a_number); -$xferconf_b_number = ereg_replace("[^0-9]","",$xferconf_b_number); -$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); -$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); -$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); -$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); -$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); -$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); -$drop_exten = ereg_replace("[^0-9]","",$drop_exten); -$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); -$park_ext = ereg_replace("[^0-9]","",$park_ext); -$hopper_level = ereg_replace("[^0-9]","",$hopper_level); -$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); -$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); -$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); -$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); -$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); -$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); -$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); -$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); -$delete_users = ereg_replace("[^0-9]","",$delete_users); -$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); -$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); -$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); -$delete_lists = ereg_replace("[^0-9]","",$delete_lists); -$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); -$delete_filters = ereg_replace("[^0-9]","",$delete_filters); -$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); -$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); -$load_leads = ereg_replace("[^0-9]","",$delete_call_times); -$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); -$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); -$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); -$modify_leads = ereg_replace("[^0-9]","",$modify_leads); -$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); -$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); -$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); -$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); -$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); -$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); -$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); -$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); -$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); -$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); -$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); -$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); -$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); -$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); -$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); -$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); -$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); -$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); -$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); -$user_start = ereg_replace("[^0-9]","",$user_start); -$phone_number = ereg_replace("[^0-9]","",$phone_number); -$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); -$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); -$hotkey = ereg_replace("[^0-9]","",$hotkey); -$list_id = ereg_replace("[^0-9]","",$list_id); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); -$allow_closers = ereg_replace("[^NY]","",$allow_closers); -$reset_hopper = ereg_replace("[^NY]","",$reset_hopper); -$amd_send_to_vmx = ereg_replace("[^NY]","",$amd_send_to_vmx); -$alt_number_dialing = ereg_replace("[^NY]","",$alt_number_dialing); -$safe_harbor_message = ereg_replace("[^NY]","",$safe_harbor_message); -$selectable = ereg_replace("[^NY]","",$selectable); -$reset_list = ereg_replace("[^NY]","",$reset_list); -$fronter_display = ereg_replace("[^NY]","",$fronter_display); -$drop_message = ereg_replace("[^NY]","",$drop_message); -$use_internal_dnc = ereg_replace("[^NY]","",$use_internal_dnc); - -### ALPHA-NUMERIC ONLY ### -$user = ereg_replace("[^0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^0-9a-zA-Z]","",$pass); -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$script_id = ereg_replace("[^0-9a-zA-Z]","",$script_id); -$submit = ereg_replace("[^0-9a-zA-Z]","",$submit); -$CoNfIrM = ereg_replace("[^0-9a-zA-Z]","",$CoNfIrM); -$campaign_cid = ereg_replace("[^0-9a-zA-Z]","",$campaign_cid); -$get_call_launch = ereg_replace("[^0-9a-zA-Z]","",$get_call_launch); -$campaign_recording = ereg_replace("[^0-9a-zA-Z]","",$campaign_recording); -$ADD = ereg_replace("[^0-9a-zA-Z]","",$ADD); -$dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$dial_prefix); -$state_call_time_state = ereg_replace("[^0-9a-zA-Z]","",$state_call_time_state); -$scheduled_callbacks = ereg_replace("[^0-9a-zA-Z]","",$scheduled_callbacks); - -### DIGITS and Dots -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); - -### DIGITS and spaces and hash and star and comma -$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_a_dtmf); -$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_b_dtmf); - -### ALPHA-NUMERIC and underscore and dash -$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); -$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); -$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); -$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); -$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); -$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); -$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); -$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); -$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); -$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); -$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); -$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); -$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); -$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); -$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); -$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); -$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); -$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); -$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); - -### ALPHA-NUMERIC and spaces -$lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); -### ALPHA-NUMERIC and hash -$group_color = ereg_replace("[^\#0-9a-zA-Z]","",$group_color); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); -$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); -$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); -$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); -$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); -$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); -$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); -$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); -$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); -$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); -$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); -$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); -$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); - -### remove semi-colons ### -$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); - -### VARIABLES TO BE mysql_real_escape_string ### -# $web_form_address -# $script_text - -##### END VARIABLE FILTERING FOR SECURITY ##### - - -# AST GUI database administration -# admin.php -# -# CHANGES -# 50315-1110 - Added Custom Campaign Statuses -# 50317-1438 - Added Fronter Display var to inbound groups -# 50322-1355 - Added custom callerID per campaign -# 50517-1356 - Added user_groups sections and user_group to vicidial_users -# 50517-1440 - Added ability to logout (must click OK with empty user/pass) -# 50602-1622 - Added lead loader pages to load new files into vicidial_list -# 50620-1351 - Added custom vdad transfer AGI extension per campaign -# 50810-1414 - modified in groups to kick out spaces and dashes -# 50908-2136 - Added Custom Campaign HotKeys -# 50914-0950 - Fixed user search by user_group -# 50926-1358 - Modified to allow for language translation -# 50926-1615 - Added WeBRooTWritablE write controls -# 51020-1008 - Added editable web address and park ext - NEW dial campaigns -# 51020-1056 - Added fields and help for campaign recording control -# 51123-1335 - Altered code to function in php globals=off -# 51208-1038 - Added user_level changes, function controls and default user phones -# 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents -# 51213-1706 - Added add/delete/modify vicidial scripts -# 51214-1737 - Added preview of vicidial script in popup window -# 51219-1225 - Added campaign and ingroups script selector and get_call_launch field -# 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button -# 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug -# 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen -# 60204-0659 - Fixed hopper reset bug -# 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets -# 60213-1100 - Added several vicidial_users permissions fields -# 60215-1319 - Added On-hold CallBacks display and links -# 60227-1226 - Fixed vicidial_inbound_groups insert bug -# 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables -# - Added status name in selected dial statuses in campaign screen -# 60417-1416 - Added vicidial_lead_filters sections -# - Changed the header links to color-coded sectional with sublinks below -# - Added filter name and script name to campaign and in-group modify sections -# - Added callback and alt dial options to campaigns section -# - Added callback, alt dial and other options to users section -# 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered -# 60421-1441 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60425-2355 - Added agent options to vicidial_users, reformatted user page -# 60502-1627 - Added drop_call_seconds and safe_harbor_ fields to campaign screen -# 60503-1228 - Added drop_call_seconds and drop_ fields to inbound groups screen -# 60505-1117 - Added initial framework for new local_call_times tables and definitions -# 60506-1033 - More revisions to the local_call_time section -# 60508-1354 - Finished call_times and state_call_times sections -# - Added modify/delete options for call_times -# 60509-1311 - Functionalize campaign dialable leads calculation -# - Change state_call_times selection from call_times to only allow one per state -# - Added dialable leads count popup to campaign screen if auto-calc is disabled -# - Added test dialable leads count popup to filter screen -# 60510-1050 - Added Wrapup seconds and Wrapup message to campaigns screen -# 60608-1401 - Added allowable inbound_groups checkboxes to CLOSER campaign detail screen -# 60609-1051 - Added add-to-dnc in LISTS section -# 60613-1415 - Added lead recycling options to campaign detail screen -# 60619-1523 - Added variable filtering to eliminate SQL injection attack threat -# 60622-1216 - Fixed HotKey addition form issues and variable filtering -# 60623-1159 - Fixed Scheduled Callbacks over-filtering bug -# - -# 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 - -$version = '1.1.12-3'; -$build = '60623-1159'; - -$STARTtime = date("U"); - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Usted ahora ha salido. Gracias\n"; - exit; -} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGuser_level =$row[4]; - $LOGdelete_users =$row[8]; - $LOGdelete_user_groups =$row[9]; - $LOGdelete_lists =$row[10]; - $LOGdelete_campaigns =$row[11]; - $LOGdelete_ingroups =$row[12]; - $LOGdelete_remote_agents =$row[13]; - $LOGload_leads =$row[14]; - $LOGcampaign_detail =$row[15]; - $LOGdelete_scripts =$row[18]; - $LOGdelete_filters =$row[29]; - $LOGalter_agent_interface =$row[30]; - $LOGdelete_call_times =$row[32]; - $LOGmodify_call_times =$row[33]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN: "; - -if (!isset($ADD)) {$ADD=0;} - -if ($ADD==1) {$hh='users'; echo "Añadir un Usuario";} -if ($ADD==11) {$hh='campaigns'; echo "Añadir una Campaña";} -if ($ADD==111) {$hh='lists'; echo "Añadir una Lista";} -if ($ADD==121) {$hh='lists'; echo "Agregue DNC Nuevo";} -if ($ADD==1111) {$hh='ingroups'; echo "Añadir un Grupo-Entrantes";} -if ($ADD==11111) {$hh='remoteagent'; echo "Añadir Agentes Remotos";} -if ($ADD==111111) {$hh='usergroups'; echo "Añadir un Grupo De Usuarios";} -if ($ADD==1111111) {$hh='scripts'; echo "Agregue La Nueva Escritura";} -if ($ADD==11111111) {$hh='filters'; echo "Agregue El Filtro Nuevo";} -if ($ADD==111111111) {$hh='times'; echo "Agregue El Nuevo Tiempo De la Llamada";} -if ($ADD==1111111111) {$hh='times'; echo "Agregue El Nuevo Tiempo De la Llamada Del Estado";} -if ($ADD==2) {$hh='users'; echo "Nueva Adición De Usuario";} -if ($ADD==21) {$hh='campaigns'; echo "Nueva Adición De la Campaña";} -if ($ADD==22) {$hh='campaigns'; echo "Nueva Adición Del Estado De la Campaña";} -if ($ADD==23) {$hh='campaigns'; echo "Nueva Adición De Tecla De Acceso Directo De la Campaña";} -if ($ADD==25) {$hh='campaigns'; echo "El Nuevo Plomo De la Campaña Recicla La Adición";} -if ($ADD==211) {$hh='lists'; echo "Nueva Adición De la Lista";} -if ($ADD==2111) {$hh='ingroups'; echo "Nueva Adición Del Grupo de Entrantes";} -if ($ADD==21111) {$hh='remoteagent'; echo "Nueva Adición de Agentes Remotos";} -if ($ADD==211111) {$hh='usergroups'; echo "Nueva Adición Del Grupo De Usuarios";} -if ($ADD==2111111) {$hh='scripts'; echo "Nueva Adición De la Escritura";} -if ($ADD==21111111) {$hh='filters'; echo "Nueva Adición Del Filtro";} -if ($ADD==211111111) {$hh='times'; echo "Nueva Adición Del Tiempo De la Llamada";} -if ($ADD==2111111111) {$hh='times'; echo "Nueva Adición Del Tiempo De la Llamada Del Estado";} -if ($ADD==3) {$hh='users'; echo "Modificar Usuario";} -if ($ADD==31) {$hh='campaigns'; echo "Modifcar Campaña";} -if ($ADD==34) {$hh='campaigns'; echo "Modificar Campaña - Vista Básica";} -if ($ADD==311) {$hh='lists'; echo "Modificar Lista";} -if ($ADD==3111) {$hh='ingroups'; echo "Modificar In-Group";} -if ($ADD==31111) {$hh='remoteagent'; echo "Modificar Agentes Remotos";} -if ($ADD==311111) {$hh='usergroups'; echo "Modificar Grupos De Usuarios";} -if ($ADD==3111111) {$hh='scripts'; echo "Modifique La Escritura";} -if ($ADD==31111111) {$hh='filters'; echo "Modifique El Filtro";} -if ($ADD==311111111) {$hh='times'; echo "Modifique El Tiempo De la Llamada";} -if ($ADD==321111111) {$hh='times'; echo "Modifique La Lista De las Definiciones Del Estado Del Tiempo De laLlamada";} -if ($ADD==3111111111) {$hh='times'; echo "Modifique El Tiempo De la Llamada Del Estado";} -if ($ADD=="4A") {$hh='users'; echo "Modificar Usuario - Admin";} -if ($ADD=="4B") {$hh='users'; echo "Modificar Usuario - Admin";} -if ($ADD==4) {$hh='users'; echo "Modificar Usuario";} -if ($ADD==41) {$hh='campaigns'; echo "Modifcar Campaña";} -if ($ADD==42) {$hh='campaigns'; echo "Modifcar Campaña Status";} -if ($ADD==43) {$hh='campaigns'; echo "Modifcar Campaña HotKey";} -if ($ADD==44) {$hh='campaigns'; echo "Modificar Campaña - Vista Básica";} -if ($ADD==45) {$hh='campaigns'; echo "Modifique El Plomo De la Campaña Reciclan";} -if ($ADD==411) {$hh='lists'; echo "Modificar Lista";} -if ($ADD==4111) {$hh='ingroups'; echo "Modificar In-Group";} -if ($ADD==41111) {$hh='remoteagent'; echo "Modificar Agentes Remotos";} -if ($ADD==411111) {$hh='usergroups'; echo "Modificar Grupos De Usuarios";} -if ($ADD==4111111) {$hh='scripts'; echo "Modifique La Escritura";} -if ($ADD==41111111) {$hh='filters'; echo "Modifique El Filtro";} -if ($ADD==411111111) {$hh='times'; echo "Modifique El Tiempo De la Llamada";} -if ($ADD==4111111111) {$hh='times'; echo "Modifique El Tiempo De la Llamada Del Estado";} -if ($ADD==5) {$hh='users'; echo "Delete User";} -if ($ADD==51) {$hh='campaigns'; echo "Delete Campaña";} -if ($ADD==52) {$hh='campaigns'; echo "Agentes Del Registro de estado de la máquina";} -if ($ADD==511) {$hh='lists'; echo "Delete List";} -if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==51111) {$hh='remoteagent'; echo "Suprima los agentes alejados";} -if ($ADD==511111) {$hh='usergroups'; echo "Usuarios de la cancelación Group";} -if ($ADD==5111111) {$hh='scripts'; echo "Escritura De la Cancelación";} -if ($ADD==51111111) {$hh='filters'; echo "Filtro De la Cancelación";} -if ($ADD==511111111) {$hh='times'; echo "Delete Call Time";} -if ($ADD==5111111111) {$hh='times'; echo "Tiempo De la Llamada Del Estado De la Cancelación";} -if ($ADD==6) {$hh='users'; echo "Delete User";} -if ($ADD==61) {$hh='campaigns'; echo "Delete Campaña";} -if ($ADD==62) {$hh='campaigns'; echo "Agentes Del Registro de estado de la máquina";} -if ($ADD==65) {$hh='campaigns'; echo "El Plomo De la Cancelación Recicla";} -if ($ADD==611) {$hh='lists'; echo "Delete List";} -if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==61111) {$hh='remoteagent'; echo "Suprima los agentes alejados";} -if ($ADD==611111) {$hh='usergroups'; echo "Usuarios de la cancelación Group";} -if ($ADD==6111111) {$hh='scripts'; echo "Escritura De la Cancelación";} -if ($ADD==61111111) {$hh='filters'; echo "Filtro De la Cancelación";} -if ($ADD==611111111) {$hh='times'; echo "Delete Call Time";} -if ($ADD==6111111111) {$hh='times'; echo "Tiempo De la Llamada Del Estado De la Cancelación";} -if ($ADD==73) {$hh='campaigns'; echo "Cuenta Del Plomo De Dialable";} -if ($ADD==7111111) {$hh='scripts'; echo "Escritura De la Inspección previo";} -if ($ADD==0) {$hh='users'; echo "Lista De Usuarios";} -if ($ADD==8) {$hh='users'; echo "Servicios repetidos Dentro Del Agente";} -if ($ADD==81) {$hh='campaigns'; echo "Servicios repetidos Dentro De la Campaña";} -if ($ADD==811) {$hh='campaigns'; echo "Servicios repetidos Dentro De la Lista";} -if ($ADD==10) {$hh='campaigns'; echo "Campañas";} -if ($ADD==100) {$hh='lists'; echo "Listas";} -if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";} -if ($ADD==10000) {$hh='remoteagent'; echo "Agentes Remotos";} -if ($ADD==100000) {$hh='usergroups'; echo "Grupos De Usuario";} -if ($ADD==1000000) {$hh='scripts'; echo "Escrituras";} -if ($ADD==10000000) {$hh='filters'; echo "Filtros";} -if ($ADD==100000000) {$hh='times'; echo "Tiempos De la Llamada";} -if ($ADD==1000000000) {$hh='times'; echo "Tiempos De la Llamada Del Estado";} -if ($ADD==55) {$hh='users'; echo "Formulario De Búsqueda";} -if ($ADD==66) {$hh='users'; echo "RESULTADOS DE LA BÚSQUEDA";} -if ($ADD==99999) {$hh='users'; echo "AYUDA";} - -if ( ($ADD>9) && ($ADD < 99998) ) - { - ##### get scripts listing for dynamic pulldown - $stmt="SELECT script_id,script_name from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $scripts_to_print = mysql_num_rows($rslt); - $scripts_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($scripts_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $scripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $scriptname_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - ##### get filters listing for dynamic pulldown - $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_sql from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - $filters_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($filters_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $filters_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $filtername_list["$rowx[0]"] = "$rowx[1]"; - $filtersql_list["$rowx[0]"] = "$rowx[2]"; - $o++; - } - - ##### get call_times listing for dynamic pulldown - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $times_to_print = mysql_num_rows($rslt); - - $o=0; - while ($times_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $call_times_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $call_timename_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - } - -if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD==21) or ($ADD==31) or ($ADD==41) or ($ADD=="4A") or ($ADD=="4B") ) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ($ADD==31) - { - $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ($ADD==3) - { - $stmt="SELECT closer_campaigns from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_value\""; - $p=0; - while ($p<100) - { - if ($group_id_value == $groups[$p]) - { - $groups_list .= " CHECKED"; - $groups_value .= " $group_id_value"; - } - $p++; - } - $groups_list .= "> $group_id_value - $group_name_value<BR>\n"; - $o++; - } - if (strlen($groups_value)>2) {$groups_value .= " -";} - } - - - - - -$NWB = "   <a href=\"javascript:openNewWindow('$PHP_SELF?ADD=99999"; -$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 Border=0 ALT=\"AYUDA\" ALIGN=TOP></A>"; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    VICIDIAL ADMIN: AYUDA


    \n"; - -?> -VICIDIAL_USUARIOS TABLA

    - -
    -Identificación del usuario - este campo es donde usted pone el número de la identificación del usuario de VICIDIAL, puede ser hasta 8 dígitos en longitud, debe ser por lo menos 2 caracteres en longitud. - -
    -
    -
    -Contraseña - este campo es donde usted pone la contraseña de los usuarios de VICIDIAL. Deben ser por lo menos 2 caracteres en longitud. - -
    -
    -
    -Nombre completo - este campo es donde usted pone el nombre completo de los usuarios de VICIDIAL. Deben ser por lo menos 2 caracteres en longitud. - -
    -
    -
    -Nivel de usuario - este menú es donde usted selecciona el nivel de usuario de los usuarios de VICIDIAL. Debe ser un nivel de 1 a registrar en VICIDIAL, debe ser llano mayor de 2 a abrirse una sesión como más cercano, deben ser el nivel de usuario 8 o mayor conseguir en la sección de la tela del admin. - -
    -
    -
    -Grupo de usuario - este menú es donde usted selecciona a grupo de usuarios de VICIDIAL que este usuario pertenecerá a. Esto no tiene ninguna restricciones en este tiempo, éste es justo subdividir a usuarios y permitir las características futuras basadas sobre él. - -
    -
    -
    -Conexión del teléfono - aquí es para donde usted puede fijar un valor de la conexión del teléfono del defecto cuando los registros del usuario en vicidial.php. Este valor poblará el phone_login automáticamente cuando el usuario entra con su usuario-pasar-campaña en la pantalla de la conexión de vicidial.php. - -
    -
    -
    -Paso del teléfono - aquí es para donde usted puede fijar un valor del paso del teléfono del defecto cuando los registros del usuario en vicidial.php. Este valor poblará los phone_pass automáticamente cuando el usuario entra con su usuario-pasar-campaña en la pantalla de la conexión de vicidial.php. - -
    -
    -
    -HotKeys activo - esta opción si el sistema a 1 permite que el usuario utilice la función ra'pida-dispositioning de HotKeys adentro vicidial.php. - -
    -
    -
    -El agente elige Ingroups - esta opción si el sistema a 1 permite que el usuario elija los ingroups de los cuales recibirán llamadas cuando ellos conexión a una campaña MÃS CERCANA o DE ENTRADA. Si no el encargado necesitará fijar esto en su pantalla del detalle del usuario de la página del admin. - -
    -
    -
    -Grupos de entrada - aquí es donde usted selecciona a grupos de entrada que usted desea recibir llamadas de si usted ha seleccionado la campaña MÃS CERCANA. - -
    -
    -
    -Servicios repetidos programar - esta opción no prohibe a agente a la disposición una llamada como CALLBK y elige los datos y el tiempo en los cuales el plomo será reactivado. - -
    -
    -
    -Servicios repetidos del Agente-Solamente - esta opción permite que un agente fije un servicio repetido de modo que sean el único agente que puede llamar la parte posteriora del cliente. Esto también permite que el agente vea sus listados del servicio repetido y los llame detrás cualquier momento desean a. - -
    -
    -
    -Manual de la llamada del agente - esta opción permite que un agente incorpore manualmente un nuevo plomo en el sistema y los llame. Esto también permite llamar de cualquier número de teléfono de su pantalla vicidial y pone esa llamada en su sesión. Utilice esta opción con la precaución. - -
    -
    -
    -Grabación de Vicidial - esta opción puede evitar que un agente haga cualquier grabación después de que se abran una sesión a vicidial. Esta opción debe estar encendido para que vicidial siga la sesión de la grabación de la campaña. - -
    -
    -
    -Vicidial transfiere - esta opción puede evitar que un agente abra la transferencia - la sesión de la conferencia de vicidial. Si esto es lisiado, el agente no puede llamada de los terceros o la transferencia oculta cualquiera llama. - -
    -
    -
    -Un defecto más cercano mezclado - esta opción omite simplemente el checkbox mezclado en una pantalla MÃS CERCANA de la conexión. - -
    -
    -
    -Altere las opciones de interfaz del agente - esta opción si el sistema a 1 permite que el usuario administrativo modifique las opciones de interfaz de los agentes en admin.php. - -
    -
    -
    -Usuarios de la cancelación - esta opción si el sistema a 1 permite que el usuario suprima a otros usuarios del igual o de poco nivel de usuario del sistema. - -
    -
    -
    -Suprima a grupos de usuario - esta opción si el sistema a 1 permite que el usuario suprima a grupos de usuario del sistema. - -
    -
    -
    -La cancelación enumera - esta opción si el sistema a 1 permite que el usuario suprima listas vicidial del sistema. - -
    -
    -
    -La cancelación hace campaña - esta opción si el sistema a 1 permite que el usuario suprima campañas vicidial del sistema. - -
    -
    -
    -En-Grupos de la cancelación - esta opción si el sistema a 1 permite que el usuario suprima a En-Grupos vicidial del sistema. - -
    -
    -
    -Suprima los agentes alejados - esta opción si el sistema a 1 permite que el usuario suprima agentes alejados vicidial del sistema. - -
    -
    -
    -La carga conduce - esta opción si el sistema a 1 permite que el usuario cargue los plomos vicidial en la tabla del vicidial_list por el cargador basado tela del plomo. - -
    -
    -
    -Detalle de la campaña - esta opción si el sistema a 1 permite que el usuario visión y modifique los elementos de la pantalla del detalle de la campaña. - -
    -
    -
    -Acceso de AGC Admin - esta opción si el sistema a 1 permite a usuario a la conexión a las páginas astGUIclient del admin. - -
    -
    -
    -La cancelación de AGC telefona - esta opción si el sistema a 1 permite que el usuario suprima entradas del teléfono en las páginas astGUIclient del admin. - -
    -
    -
    -Escrituras de la cancelación - esta opción si el sistema a 1 permite que el usuario suprima las escrituras de la campaña en la pantalla de la modificación de la escritura. - -
    -
    -
    -Modifique los plomos - esta opción si el sistema a 1 permite que el usuario modifique los plomos en la página de los resultados de la búsqueda del plomo de la sección del admin. - -
    -
    -
    -Cambie la campaña del agente - esta opción si el sistema a 1 permite que el usuario altere la campaña que un agente está registrado en mientras que se registran en él. - -
    -
    -
    -La cancelación se filtra - esta opción permite que el usuario pueda suprimir los filtros vicidial del plomo del sistema. - -
    -
    -
    -Tiempos de la llamada de la cancelación - esta opción permite que elusuario pueda suprimir expedientes vicidial de los tiempos de lallamada y expedientes vicidial de los tiempos de la llamada del estadodel sistema. - -
    -
    -
    -Modifique los tiempos de la llamada - esta opción permite que elusuario visión y modifique los expedientes de los tiempos de lallamada y de los tiempos de la llamada del estado. Un usuario nonecesita esta opción permitida si necesitan solamente cambiar laopción de los tiempos de la llamada en la pantalla de las campañas. - - - - -



    - -VICIDIAL_CAMPAÑAS TABLA

    -
    -
    -Identificación de la campaña - Úste es el nombre corto de la campaña, él no es editable después de la sumisión inicial, no puede contener espacios y debe estar entre 2 y 8 caracteres en longitudh. - -
    -
    -
    -Nombre de la campaña - Ésta es la descripción de la campaña, debe estar entre 6 y 40 caracteres en longitud. - -
    -
    -
    -Activo - aquí es adonde usted fija la campaña a activo o a inactivo. Si es inactivo, noone puede registrar en él. - -
    -
    -
    -Extensión del parque - aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cerciórese de que la extensión esté en lugar en el extensions.conf y eso que señala al nombre de fichero abajo. - -
    -
    -
    -Nombre del archivo del parque - aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cerciórese de que el nombre de fichero sea 10 caracteres en longitud o menos y que el archivo está en lugar en el directorio de /var/lib/asterisk/sounds. - -
    -
    -
    -Forma del Web - aquí es donde usted puede fijar el Web page de encargo que será abierto cuando el usuario chasca encendido el botón de la FORMA del WEB. - -
    -
    -
    -Permita Closers - aquí es donde usted puede fijar si los usuarios de esta campaña tendrán la opción para enviar la llamada a un más cercano. - -
    -
    -
    -Estado del dial - aquí es adonde usted fija los estados que usted está deseando marcar encendido dentro de las listas que son activas para la campaña abajo - -
    -
    -
    -Orden de la lista - Este menú es donde usted selecciona cómo los plomos que emparejan los estados seleccionados arriba serán puestos en la tolva del plomo: -
      - DOWN: seleccione los primeros plomos cargados en la tabla del vicidial_list -
      - UP: seleccione los plomos pasados cargados en la tabla del vicidial_list -
      - UP PHONE: seleccione el número y los trabajos más altos de teléfono su manera abajo -
      - DOWN PHONE: seleccione el número y los trabajos más bajos de teléfono su manera para arriba -
      - UP LAST NAME: comienzo con los nombres pasados comenzando con Z y trabajos su manera abajo -
      - DOWN LAST NAME: comienzo con los nombres pasados comenzando con A y trabajos su manera para arriba -
      - UP COUNT: comienzo con los plomos y los trabajos llamados su manera abajo -
      - DOWN COUNT: comienzo con menos plomos y trabajos llamados su manera para arriba -
      - DOWN COUNT 2nd NEW: comienzo con menos plomos y trabajos llamados su manera para arriba que inserta un NEW plomo en cada otro lead(Must para no tener NEW seleccionado en los estados del dial) -
      - DOWN COUNT 3nd NEW: comienzo con menos plomos y trabajos llamados su manera para arriba que inserta un NEW plomo en cada tercer lead(Must para no tener NEW seleccionado en los estados del dial) -
      - DOWN COUNT 4th NEW: comienzo con menos plomos y trabajos llamados que su manera para arriba que inserta un NEW plomo en cada adelante conduzca (no debe tener NEW seleccionado en los estados del dial) - -
    -
    -
    -Tolva llana - éste es cuántos conducen los intentos de la escritura de VDhopper para mantener la tabla del vicidial_hopper para esta campaña. Si funciona la escritura de VDhopper cada minuto, haga esto levemente mayor que el número de plomos que usted entra a través en un minuto. - -
    -
    -
    -Filtro del plomo - éste es un método de filtrar sus plomos usando un fragmento de una pregunta del SQL. Utilice esta característica con la precaución, él es fácil de parar el marcar accidentalmente con la alteración más leve a la declaración del SQL. El defecto no es NINGUNO. - -
    -
    -
    -Reajuste de la fuerza de la tolva - esto permite que usted limpie fuera del contenido de la tolva sobre la sumisión de la forma. Debe ser llenada otra vez cuando la escritura de VDhopper funciona. - -
    -
    -
    -Nivel auto del dial - aquí es adonde usted fija cuántos alinea VICIDIAL debe utilizar por medios del agente activo cero 0 que el marcar del automóvil está apagado y los agentes chascarán para marcar cada número. Si no VICIDIAL mantendrá líneas que marcan iguales a los agentes activos multiplicados por el nivel del dial para llegar cuántas líneas debe permitir esta campaña en cada servidor. - -
    -
    -
    -Llamada siguiente del agente - esto se determina qué agente recibe la llamada siguiente que está disponible: -
      - random: órdenes por el valor al azar de la actualización en la tabla de los vicidial_live_agents -
      - oldest_call_start: las órdenes por la vez última un agente fueron enviadas una llamada. Resultados en los agentes que reciben el número casi igual de llamadas cabalmente. -
      - oldest_call_finish: las órdenes por la vez última un agente acabaron una llamada. El agente de AKA que espera lo más de largo posible recibe la primera llamada. -
      - overall_user_level: las órdenes por el user_level del agente según lo definido en los vicidial_users tabulan un user_level más alto recibirán más llamadas. - -
    -
    -
    -Tiempo de la llamada local - aquí es adonde usted fijó durante qué horas usted quisiera marcar, según lo determinado por el tiempo local en está en cuál usted está llamando. Esto es controlada por código de área y ajustada por tiempo de los ahorros de la luz del día si es aplicable. Las pautas generales en los E.E.U.U. para el negocio al negocio son los 9am a los 5pm y el negocio a las llamadas del consumidor es los 9am a los 9pm. - -
    -
    -
    -Descanso del dial - si está definido, llamadas que normalmente retraso después de que el descanso definido en extensions.conf en lugar de otro descanso en esta cantidad de segundos si es menos que el descanso de extensions.conf. Esto permite descansos del dial rápidamente que cambian del servidor al servidor y a limitar los efectos a una sola campaña. Si usted está teniendo muchos de llamadas del contestador automático o de Buzón de Voz usted puede desear intentar cambiar este valor entre a 21-26 y ver si los resultados mejoran. - -
    -
    -
    -Prefijo del dial - este campo permite más fácilmente cambiar una trayectoria de marcar a salir con un diverso método sin hacer una recarga en asterisco. El defecto es 9 basados sobre un 91NXXNXXXXXX en el dialplan - extensions.conf. - -
    -
    -
    -CallerID de la Campaña - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service(RBS) circuits. This will also work through most VOIP(SIP or IAX trunks) providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. - -
    -
    -
    -Extensión de la campaña VDAD - este campo permite una extensión de la transferencia del costumbre VDAD. Esto permite que usted utilice diversas escrituras del agi de VDADtransfer... dependiendo de su campaña. La transferencia AGI(exten 8365 agi-VDADtransfer.agi del defecto) apenas envía inmediatamente invita a los agentes tan pronto como él se tome. Una encuesta sobre política AGI la muestra adicional es también (8366 agi-VDADtransferSURVEY.agi ) ese ahora incluido los juegos un mensaje a la persona llamada y permite que él haga una opción presionando buttons(effectively la pre-investigacio'n el plomo). Observe por favor eso a excepción de los exámenes, llamadas políticas y las caridades esta forma de llamar son ilegales en los Estados Unidos. - -
    -
    -
    -Extensión de Rec de la Campaña - este campo permite para que una extensión de encargo de la grabación sea utilizada con VICIDIAL. Esto permite que usted utilice diversas extensiones dependiendo sobre cuánto tiempo usted desea permitir una grabación máxima y qué tipo de codec usted desea registrar adentro. El defecto exten es 8309 que si usted sigue los ejemplos de SCRATCH_INSTALL registrarán en el formato de WAV para hasta que una hora. Otra opción incluida en los ejemplos es 8310 que registrarán en el formato del GSM para hasta que una hora. - -
    -
    -
    -Grabación de la campaña - este menú permite que usted elija qué nivel de la grabación se permite en esta campaña. NEVER inhabilitará la grabación en el cliente. ONDEMAND es el defecto y permite que el agente comience y pare a registrar según lo necesitado. ALLCALLS comenzará la grabación en el cliente siempre que una llamada se envíe a un agente. - -
    -
    -
    -Nombre de fichero de Rec de la campaña - este campo permite que usted modifique el nombre para requisitos particulares de la grabación cuando la grabación de la campaña es ONDEMAND o ALLCALLS. Las variables permitidas son CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. El defecto es FULLDATE_AGENTE y parecería este 20051020-103108_6666. Otro ejemplo es CAMPAIGN_TINYDATE_CUSTPHONE que parecería este TESTCAMP_51020103108_3125551212. 50 char max. - -
    -
    -
    -Escritura de la campaña - este menú permite que usted elija la escritura que aparecerá en la pantalla de los agentes para esta campaña. No seleccione NONE no demostrar ninguna escritura para esta campaña. - -
    -
    -
    -Consiga el lanzamiento de la llamada - este menú permite que usted elija si usted desee automo'vil-lance la página en una ventana separada, auto-switch de la tela-forma a la lengüeta de la ESCRITURA o no haga nada cuando una llamada se envía al agente para esta campaña. - -
    -
    -
    -Mensaje del contestador automático - este campo está para entrar en una extensión para cegar llamadas de la transferencia a cuando el agente consigue un contestador automático y chasca encendido el botón del mensaje del contestador automático en el marco de la conferencia de la transferencia. Usted debe fijar esto exten para arriba en el dialplan - extensions.conf - y se cerciora de que juega un archivo audio después que cuelga para arriba. - -
    -
    -
    -AMD envían a la VM exten - este menú permite que usted defina si un mensaje esté dejado en un contestador automático cuando se detecta la llamada será remitido inmediatamente a la extensión del Contestar-Ma'quina-Mensaje si AMD es activo y se determina que la llamada es un contestador automático. - -
    -
    -
    -Xfer-Conf DTMF - Estos cuatro campos permiten para que usted tenga dos sistemas de conferencia de la transferencia y de precolocaciones de DTMF. Cuando se carga la llamada o la campaña, la escritura de vicidial.php demostrará dos botones en el marco de la transferir-conferencia y automo'vil-poblara' el nu'mero-a-dial y los campos del enviar-dtmf cuando está presionada. - -
    -
    -
    -El marcar numérico del Alt del agente - esta opción permite que un agente marque manualmente el número de teléfono o el campo alterno address3 después de que se haya llamado el número principal. - -
    -
    -
    -Servicios repetidos programar - esta opción no prohibe a agente a la disposición una llamada como CALLBK y elige los datos y el tiempo en los cuales el plomo será reactivado. - -
    -
    -
    -Segundos de la llamada de la gota - el número de segundos a partirdel tiempo que la línea de cliente se escoge encima de hasta que lallamada se considera una GOTA, sólo se aplica a las llamadas desalida. - -
    -
    -
    -Buzón de Voz - si estuvieron definidas, las llamadas que CAERÃAN normalmente en lugar de otro serían ordenadas a esta caja del voicemail para oír y para dejar un mensaje. - -
    -
    -
    -seguro puerto mensaje - si fijar y juego uno mensaje clientedespués gota llamar segundo descanso ser alcanzar sin ser transferiruno agente. _ este fijar eliminar sending uno voicemail caja si esteser fijar y. - -
    -
    -
    -seguro puerto Exten - este ser dialplan extensión que desear seguropuerto audio archivo ser localizar en en su servidor. - -
    -
    -
    -Segundos de Wrapup - el número de los segundos para forzar un agenteesperar antes de permitir que reciban o que marquen otra llamada. Elcontador de tiempo comienza tan pronto como un agente cuelgue paraarriba en su cliente - o en el caso del número alterno que marcacuando el agente acaba el plomo - defecto sea los segundos 0. Si elcontador de tiempo funciona hacia fuera antes de que el agente tengadispositioned la llamada, el agente todavía no se mueve encendido ala llamada siguiente hasta que seleccionan una disposición. - -
    -
    -
    -Mensaje de Wrapup - esto es un mensaje campaña-especi'fico que seexhibirá en la pantalla del wrapup si se fijan los segundos delwrapup. - -
    -
    -
    -Mensaje de Wrapup - esto es un mensaje campaña-especi'fico que seexhibirá en la pantalla del wrapup si se fijan los segundos delwrapup. - -
    -
    -
    -Lista interna del uso DNC - esto define si esta campaña es filtrarlos plomos contra la lista interna de DNC. Si se fija a Y, la tolvabuscará cada número de teléfono en la lista de DNC antes de ponerlaen la tolva. Si está en la lista de DNC entonces que cambiará eseconduce estado a DNCL así que no puede ser marcada. El defecto es N. - -
    -
    -
    -Grupos De entrada Permitidos - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound/outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. - - - -



    - -VICIDIAL_LISTAS TABLA

    -
    -
    -Identificación de la lista - Úste es el nombre numérico de la lista, él no es editable después de la sumisión inicial, debe contener solamente números y debe estar entre 2 y 8 caracteres en longitud. - -
    -
    -
    -Nombre de la lista - Ésta es la descripción de la lista, debe estar entre 2 y 20 caracteres en longitud. - -
    -
    -
    -Campaña - Ésta es la campaña que esta lista pertenece a. Una lista se puede marcar solamente en una sola campaña contemporáneamente. - -
    -
    -
    -Activo - esto define si la lista debe ser marcada encendido o no. - -
    -
    -
    -Reajuste el Conducir-Llamar-Estado para esta lista - esto reajusta todos los plomos en esta lista a N para "no llamado puesto que reajuste pasado" y significa que cualquier plomo puede ahora ser llamado si es el estado derecho según lo definido en la pantalla de la campaña. - -
    -
    -
    -Lista de VICIDIAL DNC - esto no llama la lista contiene cada plomo quese ha fijado a un estado de DNC en el sistema. A través de las LISTAS- AGREGUE EL NÚMERO a la página de DNC que usted puede agregarmanualmente un número a esta lista de modo que no sea llamada por lascampañas que utilizan la lista interna de DNC. - - - -



    - -VICIDIAL_INBOUND_GROUPS TABLA

    -
    -
    -Identificación de grupo - Úste es el nombre corto del grupo de entrada, él no es editable después de la sumisión inicial, no debe contener cualquier espacio y debe estar entre 2 y 20 caracteres en longitud. - -
    -
    -
    -Nombre de grupo - Ésta es la descripción del grupo, debe estar entre 2 y 30 caracteres en longitud. No puede incluir rociadas -, plusses + o espacios . - -
    -
    -
    -Color del grupo - éste es el color que exhibe en el cliente app de VICIDIAL cuando una llamada viene adentro en este grupo. Debe estar entre 2 y 7 caracteres de largo. Si esto es una definición del color de la tuerca hexagonal usted debe recordar poner a # al principio de la secuencia o VICIDIAL no trabajará correctamente. - -
    -
    -
    -Activo - esto se determina si este grupo demuestra para arriba en la caja de la selección cuando un agente de VICIDIAL entra. - -
    -
    -
    -Forma del Web - Ésta es la dirección de encargo que el chascar en el botón de la FORMA del WEB en VICIDIAL le llevará para las llamadas que vienen adentro en este grupo. - -
    -
    -
    -Llamada siguiente del agente - esto se determina qué agente recibe la llamada siguiente que está disponible: -
      - random: órdenes por el valor al azar de la actualización en la tabla de los vicidial_live_agents -
      - oldest_call_start: las órdenes por la vez última un agente fueron enviadas una llamada. Resultados en los agentes que reciben el número casi igual de llamadas cabalmente. -
      - oldest_call_finish: las órdenes por la vez última un agente acabaron una llamada. El agente de AKA que espera lo más de largo posible recibe la primera llamada. -
      - overall_user_level: las órdenes por el user_level del agente según lo definido en los vicidial_users tabulan un user_level más alto recibirán más llamadas. - -
    -
    -
    -Exhibición de Fronter - este campo se determina si el agente de entrada de VICIDIAL tendría el name(if del fronter allí es uno) exhibido en el campo del estado cuando la llamada viene al agente. - -
    -
    -
    -Escritura de la campaña - este menú permite que usted elija la escritura que aparecerá en la pantalla de los agentes para esta campaña. No seleccione NONE no demostrar ninguna escritura para esta campaña. - -
    -
    -
    -Consiga el lanzamiento de la llamada - este menú permite que usted elija si usted desee automo'vil-lance la página en una ventana separada, auto-switch de la tela-forma a la lengüeta de la ESCRITURA o no haga nada cuando una llamada se envía al agente para esta campaña. - -
    -
    -
    -Xfer-Conf DTMF - Estos cuatro campos permiten para que usted tenga dos sistemas de conferencia de la transferencia y de precolocaciones de DTMF. Cuando se carga la llamada o la campaña, la escritura de vicidial.php demostrará dos botones en el marco de la transferir-conferencia y automo'vil-poblara' el nu'mero-a-dial y los campos del enviar-dtmf cuando está presionada. - -
    -
    -
    -Segundos de la llamada de la gota - el número de segundos a partirdel tiempo que la línea de cliente se escoge encima de hasta que lallamada se considera una GOTA, sólo se aplica a las llamadas desalida. - -
    -
    -
    -Buzón de Voz - si estuvieron definidas, las llamadas que CAERÃAN normalmente en lugar de otro serían ordenadas a esta caja del voicemail para oír y para dejar un mensaje. - -
    -
    -
    -Mensaje de la gota - si el sistema a Y juega un mensaje al clientedespués de que el descanso de los segundos de la llamada de la gotase alcance sin la transferencia a un agente. Este ajuste eliminaráenviar a una caja del voicemail si esto se fija a Y. - -
    -
    -
    -Gota Exten - ésta es la extensión dialplan que el archivo audiocaído deseado de la llamada está situado en en su servidor. - - - -



    - -VICIDIAL_REMOTE_AGENTS TABLA

    -
    -
    -Comienzo de la identificación del usuario - Ésta es la identificación del usuario que comienza se utiliza que cuando las entradas alejadas del agente se insertan en el sistema. Si el número de líneas se fija más altamente de 1, este número es incrementado por uno hasta que cada línea tiene una entrada. Se cerciora de usted crear una nueva cuenta del usuario de VICIDIAL con un nivel de usuario de 4 o grande si usted quisiera que pudieran utilizar la página de vdremote.php para el acceso alejado de la tela de esta cuenta. - -
    -
    -
    -Número de líneas - el define cuánto crea el agente alejado las entradas el sistema, y se determina cuántas líneas piensa que puede enviar con seguridad al número debajo. - -
    -
    -
    -IP del servidor - Una entrada alejada del agente es solamente buena para un servidor específico, aquí es donde usted selecciona a que el servidor usted desea. - -
    -
    -
    -Extensión externa - éste es el número que usted desea las llamadas remitidas a. Cerciórese de que sea un número dialplan completo y que si usted necesita 9 al principio usted lo pone adentro aquí. Pruebe marcando este número de un teléfono en el sistema. - -
    -
    -
    -Estado - aquí es donde usted da vuelta al agente alejado por intervalos. Tan pronto como el agente sea activo el sistema asume que puede enviarle llamadas. Puede tomar hasta 30 segundos una vez que usted cambie el estado a inactivo para parar el recibir de llamadas. - -
    -
    -
    -Campaña - aquí es donde usted selecciona la campaña que estos agentes alejados serán registrados en. Necesidades de entrada de utilizar la campaña MÃS CERCANA y de seleccionar las campañas de entrada debajo de ésa que usted desea recibir llamadas de. - -
    -
    -
    -Grupos de entrada - aquí es donde usted selecciona a grupos de entrada que usted desea recibir llamadas de si usted ha seleccionado la campaña MÃS CERCANA. - - -



    - -VICIDIAL_CAMPAIGN_LISTAS

    -
    -
    -Las listas dentro de esta campaña se enumeran aquí, si son activas son denotadas por la Y o N y usted pueden ir a la pantalla de la lista chascando en la identificación de la lista en la primera columna. - - -



    - -VICIDIAL_CAMPAIGN_STATUSES TABLA

    -
    -
    -Con el uso de los estados de encargo de la campaña, usted puede tener estados que existan solamente para una campaña específica. El estado debe ser 1-8 caracteres en longitud, la descripción debe ser 2-30 caracteres en longitud y seleccionable define si demuestra para arriba en VICIDIAL como disposición. - - - -



    - -VICIDIAL_CAMPAIGN_HOTKEYS TABLA

    -
    -
    -Con el uso de los hotkeys de encargo de la campaña, los agentes que utilizan el retraso vicidial de la lata del tela-cliente y la disposición llama apenas presionando una sola llave en su teclado. - - - - -



    - -VICIDIAL_LEAD_RECYCLE TABLA

    -
    -
    -Con el uso del plomo que recicla, usted puede llamar estadosespecíficos de plomos otra vez en un intervalo especificado sin elreajuste de la lista entera. El reciclaje del plomo escampaña-especi'fico y no tiene que ser un estado dialableseleccionado en su campaña. La tentativa retrasa el campo es elnúmero de segundos hasta que el plomo se puede poner detrás en latolva, este número debe ser por lo menos 120 segundos. El campomáximo de la tentativa es el número máximo de las épocas que unplomo de este estado se puede procurar antes de que la lista necesiteser reajustada, este número puede ser a partir la 1 a 10. Usted puedeactivar y desactivar un plomo recicle la entrada con los acoplamientosproporcionados. Esta característica trabaja solamente en modo delautomo'vil-dial, donde está mayor el nivel del dial de 0. - - - - - -



    - -VICIDIAL_USER_GROUPS TABLA

    -
    -
    -Grupo de usuario - éste es el nombre corto de un grupo de usuario de Vicidial, intento para no utilizar ningunos espacios o puntuación para los caracteres de este máximo 20 del campo, mínimo de 2 caracteres. - -
    -
    -
    -Nombre de grupo - Ésta es la descripción del máximo vicidial del grupo de usuario de 40 caracteres. - - - - - -



    - -VICIDIAL_ESCRITURAS TABLA

    -
    -
    -Identificación de la escritura - Éste es el nombre corto de una escritura de Vicidial. Éste necesita ser un identificador único. Intente no utilizar ningunos espacios o puntuación para los caracteres de este máximo 10 del campo, mínimo de 2 caracteres. - -
    -
    -Nombre de la escritura - éste es el título de una escritura de Vicidial. Éste es un resumen corto de los caracteres del máximo 50 de la escritura, mínimo de 2 caracteres. No debe haber espacios o puntuación de la clase en campo de los theis. - -
    -
    -Comentarios de la escritura - éste es tal como donde usted puede poner los comentarios para una escritura de Vicidial - cambiantes para liberar mejora de sept. el 23 -. caracteres del máximo 255, mínimo de 2 caracteres. - -
    -
    -Texto de la escritura - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments. For example, this sentence would print the persons name in it----

    Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

    This would read----

    Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today? - -
    -
    -
    -Activo - esto se determina si esta escritura se puede seleccionar para ser utilizado por una campaña. - - - - - -



    - -VICIDIAL_LEAD_FILTROS TABLA

    -
    -
    -Identificación del filtro - Éste es el nombre corto de un filtro del plomo de Vicidial. Éste necesita ser un identificador único. No utilice ningunos espacios o puntuación para los caracteres de este máximo 10 del campo, mínimo de 2 caracteres. - -
    -
    -Nombre del filtro - éste es un nombre más descriptivo del filtro. Éste es un resumen corto de los caracteres del máximo 30 del filtro, mínimo de 2 caracteres. - -
    -
    -El filtro comenta - aquí es tal como donde usted puede poner los comentarios para un filtro de Vicidial - las llamadas todos los plomos de California -. los caracteres del máximo 255, mínimo de 2 caracteres. - -
    -
    -Filtro SQL - Aquí es adonde usted pone el fragmento de la pregunta del SQL que usted desea filtrar cerca no comienza o el extremo con Y, eso será agregado por la escritura del cron de la tolva automáticamente. una pregunta del SQL del ejemplo que trabajaría aquí es el called_count 4 y called_count. - - - - - -



    - -VICIDIAL_TIEMPOS DE LA LLAMADA TABLA

    -
    -
    -Identificación del tiempo de la llamada - éste es el nombre corto deuna definición del tiempo de la llamada de Vicidial. Éste necesitaser un identificador único. No utilice ningunos espacios opuntuación para los caracteres de este máximo 10 del campo, mínimode 2 caracteres. - -
    -
    -Nombre del tiempo de la llamada - éste es un nombre más descriptivode la definición del tiempo de la llamada. Éste es un resumen cortode los caracteres del máximo 30 de la definición del tiempo de lallamada, mínimo de 2 caracteres. - -
    -
    -El tiempo de la llamada comenta - aquí es donde usted puede poner loscomentarios para una definición del tiempo de la llamada de Vicidialtal como -10am hasta los 4pm con restricciones adicionales del estadode la llamada -. los caracteres del máximo 255. - -
    -
    -Tiempos del comienzo y de parada del defecto - éste es el tiempo dedefecto paran que el llamar será permitido que sea comenzado o dentrode esta definición del tiempo de la llamada si la hora de salida dela di'a-de-$$$-SEMANA no se define. 0 es medianoche. Evitar el llamarfijó totalmente este campo a 2400 y fijó el tiempo de parada deldefecto a 2400. Permitir el llamar 24 horas al día fijó la hora desalida a 0 y el tiempo de parada a 2400. - -
    -
    -Tiempos del comienzo y de parada del día laborable - éstos son lostiempos de encargo por el día que se puede fijar para la definicióndel tiempo de la llamada que las mismas reglas se aplican como con lostiempos del comienzo y de parada del defecto. - -
    -
    -Definiciones del tiempo de la llamada del estado - ésta es la listade las definiciones específicas del tiempo de la llamada del estadoque se siguen en esta definición del tiempo de la llamada. - -
    -
    -Estado del tiempo de la llamada del estado - éste es el código dedos letras para el estado que esta definición del tiempo que llamaestá para. Para que esto sea en efecto la llamada local mida eltiempo que se fija en la campaña debe tener este expediente deltiempo de la llamada del estado en él así como todos los plomos quetienen dos códigos del estado de la letra en ellos. - - - - -



    - -FUNCIONALIDAD DEL CARGADOR DE LA LISTA DE VICIDIAL

    -
    -
    -El VICIDIAL tela-baso' cargador del plomo se diseña simplemente llevar un file(up del plomo 8MB de tamaño) que es lengüeta o pipa delimitada y cargarlo en la tabla del vicidial_list. Hay también un cargador estupendo nuevo del plomo de la versión beta que permite para el campo que elige y de TXT- el texto claramente, los valores separados coma de CSV- y XLS- sobresalen formatos del archivo. El cargador del plomo no hace la validación de datos o la comprobación para duplicados en sí mismo u otras listas, de modo que esté algo usted necesita hacer antes de usted la carga los plomos. También, cerciórese de que usted haya creado la lista que estos plomos son estar debajo de modo que usted pueda utilizarlos. Hay también la materia de la tiempo-zona-codificacio'n estos plomos. Usted puede desear aumentar la frecuencia que el ADMIN_adjust_GMTnow_on_leads.pl se está funcionando en el cron en su servidor del asterisco para poder cifrar cualquier plomo cargado más rápidamente. Aquí está una lista de los campos en su orden apropiada para los archivos del plomo: -
      -
    1. Código del plomo del vendedor - demuestra para arriba en el campo de la identificación del vendedor del GUI -
    2. Código de fuente - uso interno solamente para los admins y DBAs -
    3. Identificación de la lista - el número de la lista que estos plomos demostrarán para arriba debajo -
    4. Código del teléfono - el prefijo para el teléfono number(1 para los E.E.U.U., 01144 para Reino Unido, 01161 para AUS, el etc) -
    5. Número de teléfono - debe ser por lo menos 8 dígitos de largo -
    6. Título - título del customer(Mr. Ms señ., etc...) -
    7. Nombre -
    8. Inicial Media -
    9. Apellidos -
    10. Dirección, línea 1 -
    11. Dirección, línea 2 -
    12. Dirección, línea 3 -
    13. Ciudad -
    14. Estado - limitado a 2 caracteres -
    15. Provincia -
    16. Código Postal -
    17. País -
    18. Sexo -
    19. Fecha de nacimiento -
    20. Número De Teléfono Alternativo -
    21. Dirección Email -
    22. Frase De Seguridad -
    23. Comentarios -
    - -
    NOTAS: La funcionalidad del cargador del plomo del sobresalir es permitida por una serie de escrituras del Perl y necesita tener un archivo correctamente configurado de /home/cron/AST_SERVER_conf.pl en lugar en el web server. También, los módulos de un Perl de los pares se deben cargar para ella para trabajar también - oLE-Storage_Lite-Storage_Lite y la Hoja de balance-ParseExcel. Usted puede comprobar para saber si hay errores runtime en éstos mirando su archivo del error_log de apache. - -







    -







    -EL EXTREMO -
    -\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$dial_status_a = $row[3]; -$dial_status_b = $row[4]; -$dial_status_c = $row[5]; -$dial_status_d = $row[6]; -$dial_status_e = $row[7]; -$local_call_time = $row[16]; -if ($lead_filter_id=='') - { - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') - { - $lead_filter_id='NONE'; - } - } - -$stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; -$rslt=mysql_query($stmt, $link); -$lists_to_print = mysql_num_rows($rslt); -$camp_lists=''; -$o=0; -while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; -if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";} -} -$camp_lists = eregi_replace(".$","",$camp_lists); - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - -echo "

    \n"; -echo "Demuestre La Cuenta De los Plomos De Dialable -

    \n"; -echo "CAMPAIGN: $campaign_id
    \n"; -echo "LISTAS: $camp_lists
    \n"; -echo "STATUSES: $dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e
    \n"; -echo "FILTER: $lead_filter_id
    \n"; -echo "CALL TIME: $local_call_time

    \n"; - -### call function to calculate and print dialable leads -dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - -echo "

    \n"; -echo "\n"; - -exit; -} - - -###################### -# ADD=7111111 view sample script with test variables -###################### - -if ($ADD==7111111) -{ - ##### TEST VARIABLES ##### - $vendor_lead_code = 'VENDORLEADCODE'; - $list_id = 'LISTID'; - $gmt_offset_now = 'GMTOFFSET'; - $phone_code = '1'; - $phone_number = '7275551212'; - $title = 'Mr.'; - $first_name = 'JOHN'; - $middle_initial = 'Q'; - $last_name = 'PUBLIC'; - $address1 = '1234 Main St.'; - $address2 = 'Apt. 3'; - $address3 = 'ADDRESS3'; - $city = 'CHICAGO'; - $state = 'IL'; - $province = 'PROVINCE'; - $postal_code = '33760'; - $country_code = 'USA'; - $gender = 'M'; - $date_of_birth = '1970-01-01'; - $alt_phone = '3125551212'; - $email = 'test@test.com'; - $security_phrase = 'SECUTIRY'; - $comments = 'COMMENTS FIELD'; - $RGfullname = 'JOE AGENT'; - $RGuser = '6666'; - -echo "\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$script_name = $row[1]; -$script_text = $row[3]; - -$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); -$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text); -$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text); -$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text); -$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text); -$script_text = eregi_replace('--A--title--B--',"$title",$script_text); -$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text); -$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text); -$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text); -$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text); -$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text); -$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text); -$script_text = eregi_replace('--A--city--B--',"$city",$script_text); -$script_text = eregi_replace('--A--state--B--',"$state",$script_text); -$script_text = eregi_replace('--A--province--B--',"$province",$script_text); -$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text); -$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text); -$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text); -$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text); -$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text); -$script_text = eregi_replace('--A--email--B--',"$email",$script_text); -$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text); -$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text); -$script_text = eregi_replace('--A--fullname--B--',"$RGfullname",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace("\n","
    ",$script_text); - - -echo ""; - -echo "Escritura De la Inspección previo: $script_id
    \n"; -echo "
    \n"; -echo "
    $script_name
    \n"; -echo "$script_text\n"; -echo "
    \n"; - -echo "\n"; - -exit; -} - - - - -######################### HTML HEADER BEGIN ####################################### -if ($hh=='users') {$users_hh='bgcolor ="#FFFF99"'; $users_fc='BLACK';} # yellow - else {$users_hh=''; $users_fc='WHITE';} -if ($hh=='campaigns') {$campaigns_hh='bgcolor ="#FFCC99"'; $campaigns_fc='BLACK';} # orange - else {$campaigns_hh=''; $campaigns_fc='WHITE';} -if ($hh=='lists') {$lists_hh='bgcolor ="#FFCCCC"'; $lists_fc='BLACK';} # red - else {$lists_hh=''; $lists_fc='WHITE';} -if ($hh=='ingroups') {$ingroups_hh='bgcolor ="#CC99FF"'; $ingroups_fc='BLACK';} # purple - else {$ingroups_hh=''; $ingroups_fc='WHITE';} -if ($hh=='remoteagent') {$remoteagent_hh='bgcolor ="#CCFFCC"'; $remoteagent_fc='BLACK';} # green - else {$remoteagent_hh=''; $remoteagent_fc='WHITE';} -if ($hh=='usergroups') {$usergroups_hh='bgcolor ="#CCFFFF"'; $usergroups_fc='BLACK';} # cyan - else {$usergroups_hh=''; $usergroups_fc='WHITE';} -if ($hh=='scripts') {$scripts_hh='bgcolor ="#99FFCC"'; $scripts_fc='BLACK';} # light teal - else {$scripts_hh=''; $scripts_fc='WHITE';} -if ($hh=='filters') {$filters_hh='bgcolor ="#CCCCCC"'; $filters_fc='BLACK';} # grey - else {$filters_hh=''; $filters_fc='WHITE';} -if ($hh=='times') {$times_hh='bgcolor ="#99FF33"'; $times_fc='BLACK';} # hard teal - else {$times_hh=''; $times_fc='WHITE';} - -?> - - - - -\n"; -echo "
    English Español
    - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - - - - -
      VICIDIAL ADMIN - Salir  
    > SIZE=1> USUARIOS > SIZE=1> CAMPAÑAS > SIZE=1> LISTAS > SIZE=1> ESCRITURAS > SIZE=1> FILTROS > SIZE=1> EN-GROUPOS > SIZE=1> TIEMPOS DE LA LLAMADA > SIZE=1> GRUPOS DE USUARIO > SIZE=1> AGENTES REMOTOS > INFORMES
      MOSTRAR USUARIOS     |     NUEVO USUARIO     |     BUSCAR UN USUARIO
      NUEVA CAMPAÑA     |     MOSTRAR CAMPAÑAS
      MOSTRAR LISTAS     |     NUEVA LISTA     |     BÚSCAR UN LEAD |     AGREGUE EL NÚMERO A DNC           |     CARGAR LEADS
      AGREGUE LA ESCRITURA     |     ESCRITURAS DE LA VISIÓN
      AGREGUE EL FILTRO     |     FILTROS DE LA VISIÓN
      MOSTRAR EN-GROUPOS     |     NUEVO IN-GROUP
      DEMUESTRE LOS TIEMPOS DE LA LLAMADA     |     AGREGUE EL NUEVO TIEMPO DE LA LLAMADA     |     DEMUESTRE LOS TIEMPOS DE LA LLAMADA DEL ESTADO     |     AGREGUE EL NUEVO TIEMPO DE LA LLAMADA DEL ESTADO  
      NUEVO GRUPO DE USUARIO     |     MOSTRAR GRUPOS DE USUARIO     |     GRUPO POR HORA
      MOSTRAR LOS AGENTES REMOTOS     |     NUEVO AGENTE REMOTO
     
    -
    \n"; -echo ""; - -echo "
    NUEVO USUARIO
    \n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "$NWB#vicidial_users-user_group$NWE\n"; -echo "\n"; -echo "
    NÚmero De Usuario: $NWB#vicidial_users-user$NWE
    Contraseña: $NWB#vicidial_users-pass$NWE
    Nombre Completo: $NWB#vicidial_users-full_name$NWE
    Nivel Del Usuario: $NWB#vicidial_users-user_level$NWE
    Grupo Del Usuario:
    Conexión Del Teléfono: $NWB#vicidial_users-phone_login$NWE
    Contraseña Del Teléfono: $NWB#vicidial_users-phone_pass$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN -###################### - -if ($ADD==11) -{ -echo "
    \n"; -echo ""; - -echo "
    NUEVA CAMPAÑA\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID De la Campaña: $NWB#vicidial_campaigns-campaign_id$NWE
    Nombre de la Campaña: $NWB#vicidial_campaigns-campaign_name$NWE
    Activo: $NWB#vicidial_campaigns-active$NWE
    Extensión del parking: $NWB#vicidial_campaigns-park_ext$NWE
    Nombre de fichero Del Parking: $NWB#vicidial_campaigns-park_file_name$NWE
    Formulario Web: $NWB#vicidial_campaigns-web_form_address$NWE
    Permitir Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Nivel Del Hopper: $NWB#vicidial_campaigns-hopper_level$NWE
    Nivel del Auto-Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Llamar al Siguiente Agente: $NWB#vicidial_campaigns-next_agent_call$NWE
    Franja horaria de llamada: $NWB#vicidial_campaigns-local_call_time$NWE
    Buzón de Voz: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Escritura: $NWB#vicidial_campaigns-campaign_script$NWE
    Consiga El Lanzamiento De la Llamada: $NWB#vicidial_campaigns-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW LIST FORM SCREEN -###################### - -if ($ADD==111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID De la Lista: (Solamente dígitos)$NWB#vicidial_lists-list_id$NWE
    Nombre De la Lista: $NWB#vicidial_lists-list_name$NWE
    Campaña: $NWB#vicidial_lists-campaign_id$NWE
    Activo: $NWB#vicidial_lists-active$NWE
    \n"; - -} - - -###################### -# ADD=121 display the ADD NUMBER TO DNC FORM SCREEN and add a new number -###################### - -if ($ADD==121) -{ -echo "
    \n"; -echo ""; - -if (strlen($phone_number) > 2) - { - $stmt="SELECT count(*) from vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    DNC NO AGREGADO - este número de teléfono está en no llama ya lalista: $phone_number

    \n";} - else - { - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$phone_number');"; - $rslt=mysql_query($stmt, $link); - - echo "
    DNC AGREGADO: $phone_number

    \n"; - - ### LOG INSERTION TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW DNC NUMBER|$PHP_AUTH_USER|$ip|'$phone_number'|\n"); - fclose($fp); - } - } - } - -echo "
    AGREGUE Un NÚMERO A la LISTA De DNC\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    Número De Teléfono: (Solamente dígitos)$NWB#vicidial_list-dnc$NWE
    \n"; - -} - - -###################### -# ADD=1111 display the ADD NEW INBOUND GROUP SCREEN -###################### - -if ($ADD==1111) -{ -echo "
    \n"; -echo ""; - -echo "
    NUEVO GRUPO DE ENTRADA\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID De Grupo: (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE
    Nombre De Grupo: $NWB#vicidial_inbound_groups-group_name$NWE
    Color Del Grupo: $NWB#vicidial_inbound_groups-group_color$NWE
    Activo: $NWB#vicidial_inbound_groups-active$NWE
    Formulario Web: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Buzón de Voz: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Llamar al Siguiente Agente: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Mostrar Fronter: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Escritura: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Consiga El Lanzamiento De la Llamada: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN -###################### - -if ($ADD==11111) -{ -echo "
    \n"; -echo ""; - -echo "
    NUEVO AGENTE REMOTO\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Comienzo Del ID del usuario: (Solamente números, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Número de líneas: (Solamente números)$NWB#vicidial_remote_agents-number_of_lines$NWE
    IP Del Servidor: $NWB#vicidial_remote_agents-server_ip$NWE
    Extensión Externa: (número del dialplan para alcanzar agentes)$NWB#vicidial_remote_agents-conf_exten$NWE
    Estado: $NWB#vicidial_remote_agents-status$NWE
    Campaña: $NWB#vicidial_remote_agents-campaign_id$NWE
    Grupos De entrada: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTA: Puede tomar hasta 30 segundos para los cambios sometidos en esta pantalla para ir viva\n"; - -} - - -###################### -# ADD=111111 display the ADD NEW USERS GROUP SCREEN -###################### - -if ($ADD==111111) -{ -echo "
    \n"; -echo ""; - -echo "
    NUEVO GRUPO DE USUARIOS\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Grupo: (sin espacios o signos de puntuación)$NWB#vicidial_user_groups-user_group$NWE
    Descripción: (Descripción del grupo)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -} - - -###################### -# ADD=1111111 display the ADD NEW SCRIPT SCREEN -###################### - -if ($ADD==1111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW SCRIPT\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Identificación De la Escritura:: (sin espacios o signos de puntuación)$NWB#vicidial_scripts-script_id$NWE
    Nombre de la escritura: (título de la escritura)$NWB#vicidial_scripts-script_name$NWE
    Comentarios de la escritura: $NWB#vicidial_scripts-script_comments$NWE
    Activo: $NWB#vicidial_scripts-active$NWE
    Texto de la escritura: $NWB#vicidial_scripts-script_text$NWE
    \n"; - -} - - -###################### -# ADD=11111111 display the ADD NEW FILTER SCREEN -###################### - -if ($ADD==11111111) -{ -echo "
    \n"; -echo ""; - -echo "
    AGREGUE EL FILTRO NUEVO\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Identificación Del Filtro: (sin espacios o signos de puntuación)$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Nombre Del Filtro: (descripción corta del filtro)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Comentarios Del Filtro: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filtro Sql: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; -} - - -###################### -# ADD=111111111 display the ADD NEW CALL TIME SCREEN -###################### - -if ($ADD==111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    AGREGUE EL NUEVO TIEMPO DE LA LLAMADA\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    Identificación Del Tiempo De la Llamada: (sin espacios o signos de puntuación)$NWB#vicidial_call_times-call_time_id$NWE
    Nombre Del Tiempo De la Llamada: (descripción corta del tiempo de la llamada)$NWB#vicidial_call_times-call_time_name$NWE
    Comentarios Del Tiempo De la Llamada: $NWB#vicidial_call_times-call_time_comments$NWE
    Las opciones del día y del tiempo aparecerán una vez que usted hayacreado la definición del tiempo de la llamada
    \n"; -} - - -###################### -# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN -###################### - -if ($ADD==1111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    AGREGUE EL NUEVO TIEMPO DE LA LLAMADA DEL ESTADO\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    Identificación Del Tiempo De la Llamada Del Estado: (sin espacios o signos de puntuación)$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: (sin espacios o signos de puntuación)$NWB#vicidial_call_times-state_call_time_state$NWE
    _ Estado Llamar Tiempo Nombre: (descripción corta del tiempo de la llamada)$NWB#vicidial_call_times-call_time_name$NWE
    Comentarios Del Tiempo De la Llamada Del Estado: $NWB#vicidial_call_times-call_time_comments$NWE
    Las opciones del día y del tiempo aparecerán una vez que usted hayacreado la definición del tiempo de la llamada
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 2 series, validates form data and inserts the new record into the database -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=2 adds the new user to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USUARIO NO AGREGADO - hay ya un usuario en el sistema con este número del usuario\n";} - else - { - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) - { - echo "
    USUARIO NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    la ID del usuario debe estar entre 2 y 8 caracteres de largo\n"; - echo "
    el nombre completo y la contraseña deben ser por lo menos 2 caracteres de largo\n"; - } - else - { - echo "
    EL USUARIOAÑADIDO: $user\n"; - - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass) values('$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A USER |$PHP_AUTH_USER|$ip|'$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass'|\n"); - fclose($fp); - } - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new campaign to the system -###################### - -if ($ADD==21) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAÚA NO AGREGADA - hay ya una campaña en el sistema con esta identificación\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) - { - echo "
    CAMPAÚA NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    la ID de la campaña debe estar entre 2 y 8 caracteres en longitud\n"; - echo "
    el nombre de la campaña debe estar entre 6 y 40 caracteres en longitud\n"; - } - else - { - echo "
    CAMPAÑA AÑADIDA: $campaign_id\n"; - - $stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,active,dial_status_a,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,campaign_script,get_call_launch) values('$campaign_id','$campaign_name','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - echo ""; - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|NUEVA CAMPAÑA |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - - } - } -$ADD=31; -} - -###################### -# ADD=22 adds the new campaign status to the system -###################### - -if ($ADD==22) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ESTADO de la CAMPAÚA - hay ya una campaña - estado NO AGREGADO en el sistema con este nombre\n";} - else - { - $stmt="SELECT count(*) from vicidial_statuses where status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ESTADO de la CAMPAÚA NO AGREGADO - hay ya un global-estado en el sistema con este nombre\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) - { - echo "
    ESTADO de la CAMPAÚA NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el estado debe estar entre 1 y 8 caracteres en longitud\n"; - echo "
    el nombre del estado debe estar entre 2 y 30 caracteres en longitud\n"; - } - else - { - echo "
    ESTADO DE LA CAMPAÑA AÑADIDA: $campaign_id - $status\n"; - - $stmt="INSERT INTO vicidial_campaign_statuses values('$status','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|NUEVA CAMPAÑA STATUS |$PHP_AUTH_USER|$ip|'$status','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } - } -$ADD=31; -} - - -###################### -# ADD=23 adds the new campaign hotkey to the system -###################### - -if ($ADD==23) -{ - $HKstatus_data = explode('-----',$HKstatus); - $status = $HKstatus_data[0]; - $status_name = $HKstatus_data[1]; - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_hotkeys where campaign_id='$campaign_id' and hotkey='$hotkey' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAÚA HOTKEY NO AGREGADA - hay ya una campaña-hotkey en el sistema con este hotkey\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    CAMPAÚA HOTKEY NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el hotkey debe ser un solo carácter entre 1 y 9 \n"; - echo "
    el estado debe estar entre 1 y 8 caracteres en longitud\n"; - } - else - { - echo "
    ACCESO DIRECTO A LA CAMPAÑA AÑADIDO: $campaign_id - $status - $hotkey\n"; - - $stmt="INSERT INTO vicidial_campaign_hotkeys values('$status','$hotkey','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|NUEVA CAMPAÑA HOTKEY |$PHP_AUTH_USER|$ip|'$status','$hotkey','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=25 adds the new campaign lead recycle entry to the system -###################### - -if ($ADD==25) -{ - $status = eregi_replace("-----.*",'',$status); - echo ""; - $stmt="SELECT count(*) from vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    El PLOMO de la CAMPAÑA RECICLA NO AGREGADO - hay ya unconducir-reciclaje para esta campaña con este estado\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT ADDED - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el estado debe estar entre 1 y 6 caracteres en longitud\n"; - echo "
    la tentativa retrasa debe ser por lo menos 120 segundos\n"; - echo "
    las tentativas máximas deben ser a partir la 1 a 10\n"; - } - else - { - echo "
    EL PLOMO DE LA CAMPAÑA RECICLA AGREGADO: $campaign_id - $status - $attempt_delay\n"; - - $stmt="INSERT INTO vicidial_lead_recycle(campaign_id,status,attempt_delay,attempt_maximum,active) values('$campaign_id','$status','$attempt_delay','$attempt_maximum','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new list to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    LISTA NO AGREGADA - hay ya una lista en el sistema con esta ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or (strlen($list_id) < 2) or (strlen($list_id) > 8) ) - { - echo "
    LISTA NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La ID de la lista debe estar entre 2 y 8 caracteres en longitud\n"; - echo "
    El nombre de la lista debe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - echo "
    LISTA AÑADIDA: $list_id\n"; - - $stmt="INSERT INTO vicidial_lists values('$list_id','$list_name','$campaign_id','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LIST |$PHP_AUTH_USER|$ip|'$list_id','$list_name','$campaign_id','$active'|\n"); - fclose($fp); - } - } - } -$ADD=311; -} - - - -###################### -# ADD=2111 adds the new inbound group to the system -###################### - -if ($ADD==2111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    GRUPO NO AGREGADO - hay ya un grupo en el sistema con esta ID\n";} - else - { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) - { - echo "
    GRUPO NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La ID de grupo debe estar entre 2 y 20 caracteres en longitud y contener no ' -+'.\n"; - echo "
    El color del nombre de grupo y del grupo debe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - echo "
    GRUPO AÑADIDO: $group_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW GROUP |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000; -} - - -###################### -# ADD=21111 adds new remote agents to the system -###################### - -if ($ADD==21111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    AGENTES ALEJADOS NO AGREGADOS - hay ya una entrada alejada de los agentes comenzando con esta ID del usuario\n";} - else - { - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    AGENTES ALEJADOS NO AGREGADOS - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    El comienzo de la ID del usuario y la extensión externa deben ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; - $rslt=mysql_query($stmt, $link); - - echo "
    AGENTES REMOTO AÑADIDO: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW AGENTES REMOTOS ENTRY |$PHP_AUTH_USER|$ip|'$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value'|\n"); - fclose($fp); - } - } - } -$ADD=10000; -} - -###################### -# ADD=211111 adds new user group to the system -###################### - -if ($ADD==211111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    GRUPO de USUARIO NO AGREGADO - hay ya una entrada del grupo de usuario con este nombre\n";} - else - { - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    GRUPO de USUARIO NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    El nombre y la descripción de grupo deben ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="INSERT INTO vicidial_user_groups values('$user_group','$group_name');"; - $rslt=mysql_query($stmt, $link); - - echo "
    GRUPO DE USUARIO AÑADIDO: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|NUEVO USUARIO GROUP ENTRY |$PHP_AUTH_USER|$ip|'$user_group','$group_name'|\n"); - fclose($fp); - } - } - } -$ADD=100000; -} - -###################### -# ADD=2111111 adds new script to the system -###################### - -if ($ADD==2111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    ESCRITURA NO AGREGADA - hay ya una entrada de la escritura con este nombre\n";} - else - { - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    ESCRITURA NO AGREGADA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    El nombre, la descripción y el texto de la escritura deben ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="INSERT INTO vicidial_scripts values('$script_id','$script_name','$script_comments','" . mysql_real_escape_string($script_text) . "','$active');"; - $rslt=mysql_query($stmt, $link); - - echo "
    ESCRITURA AGREGADA: $script_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000000; -} - - -###################### -# ADD=21111111 adds new filter to the system -###################### - -if ($ADD==21111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    FILTRO NO AGREGADO - hay ya una entrada del filtro con esta identificación\n";} - else - { - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTRO NO AGREGADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Filtre la identificación, nombre y el SQL debe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql';"; - $rslt=mysql_query($stmt, $link); - - echo "
    EL FILTRO AGREGÓ: $lead_filter_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=10000000; -} - - -###################### -# ADD=211111111 adds new call time definition to the system -###################### - -if ($ADD==211111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    DEFINICIÓN DEL TIEMPO DE LA LLAMADA NO AGREGADA - hay ya una entrada de tiempo de la llamada con esta identificación\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    DEFINICIÓN DEL TIEMPO DE LA LLAMADA NO AGREGADA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La identificación del tiempo de la llamada y el nombre deben ser porlo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="INSERT INTO vicidial_call_times SET call_time_id='$call_time_id',call_time_name='$call_time_name',call_time_comments='$call_time_comments';"; - $rslt=mysql_query($stmt, $link); - - echo "
    TIEMPO DE LA LLAMADA AGREGADO: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111; -} - - -###################### -# ADD=2111111111 adds new state call time definition to the system -###################### - -if ($ADD==2111111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    DEFINICIÓN DEL TIEMPO DE LA LLAMADA DEL ESTADO NO AGREGADA - hay ya una entrada de tiempo de la llamada con esta identificación\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    DEFINICIÓN DEL TIEMPO DE LA LLAMADA DEL ESTADO NO AGREGADA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Indique que identificación del tiempo de la llamada, nombre y estadodebe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="INSERT INTO vicidial_state_call_times SET state_call_time_id='$call_time_id',state_call_time_name='$call_time_name',state_call_time_comments='$call_time_comments',state_call_time_state='$state_call_time_state';"; - $rslt=mysql_query($stmt, $link); - - echo "
    TIEMPO DE LA LLAMADA DEL ESTADO AGREGADO: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=3111111111; -} - - - - -###################################################################################################### -###################################################################################################### -####### 4 series, record modifications submitted and DB is modified, then on to 3 series forms below -###################################################################################################### -###################################################################################################### - - - -###################### -# ADD=4A submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4A") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USUARIO NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La contraseña y el nombre completo cada ot de la necesidad sean por lo menos 2 caracteres en longitud\n"; - } - else - { - echo "
    USUARIO MODIFICADO - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - -###################### -# ADD=4B submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4B") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USUARIO NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La contraseña y el nombre completo cada ot de la necesidad sean por lo menos 2 caracteres en longitud\n"; - } - else - { - echo "
    USUARIO MODIFICADO - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - - -###################### -# ADD=4 submit user modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USUARIO NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La contraseña y el nombre completo cada ot de la necesidad sean por lo menos 2 caracteres en longitud\n"; - } - else - { - echo "
    USUARIO MODIFICADO: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - -###################### -# ADD=41 submit campaign modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAÚA NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el nombre de la campaña necesita ser por lo menos 6 caracteres en longitud\n"; - } - else - { - echo "
    CAMPAÑA MODIFICADA: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    REAJUSTE DE LA TOLVA DEL PLOMO DE LA CAMPAÚA\n"; - echo "
    - Espera 1 minuto antes de marcar el número siguiente\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=42 delete campaign status in the system -###################### - -if ($ADD==42) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    ESTADO de la CAMPAÚA NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    la ID de la campaña necesita ser por lo menos 2 caracteres en longitud\n"; - echo "
    el estado de la campaña necesita ser por lo menos los caracteres 1 en longitud\n"; - } - else - { - echo "
    ESTADO DE ENCARGO DE LA CAMPAÚA SUPRIMIDO: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=43 delete campaign hotkey in the system -###################### - -if ($ADD==43) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    CAMPAÚA HOTKEY NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    la ID de la campaña necesita ser por lo menos 2 caracteres en longitud\n"; - echo "
    el estado de la campaña necesita ser por lo menos los caracteres 1 en longitud\n"; - echo "
    el hotkey de la campaña necesita ser por lo menos los caracteres 1 en longitud\n"; - } - else - { - echo "
    LA CAMPAÚA DE ENCARGO HOTKEY SUPRIMIÚ: $campaign_id - $status - $hotkey\n"; - - $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=44 submit campaign modifications to the system - Basic View -###################### - -if ($ADD==44) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAÚA NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el nombre de la campaña necesita ser por lo menos 6 caracteres en longitud\n"; - } - else - { - echo "
    CAMPAÑA MODIFICADA: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level',lead_filter_id='$lead_filter_id' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    REAJUSTE DE LA TOLVA DEL PLOMO DE LA CAMPAÚA\n"; - echo "
    - Espera 1 minuto antes de marcar el número siguiente\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG HOPPER RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=34; # go to campaign modification form below -} - -###################### -# ADD=45 modify campaign lead recycle in the system -###################### - -if ($ADD==45) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT MODIFIED - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el estado debe estar entre 1 y 6 caracteres en longitud\n"; - echo "
    la tentativa retrasa debe ser por lo menos 120 segundos\n"; - echo "
    las tentativas máximas deben ser a partir la 1 a 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD MODIFIED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=411 submit list modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) - { - echo "
    LISTA NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el nombre de la lista debe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - echo "
    LISTA MODIFICADA: $list_id\n"; - - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - if ($reset_list == 'Y') - { - echo "
    REAJUSTANDO LA LISTA - LLAMADA - ESTADO\n"; - $stmt="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|RESET LIST CALLED |$PHP_AUTH_USER|$ip|list_name='$list_name'|\n"); - fclose($fp); - } - } - if ($campaign_id != "$old_campaign_id") - { - echo "
    QUITAR LOS PLOMOS DE LA TOLVA DE LA LISTA DE VIEJA TOLVA DE LA CAMPAÚA ($old_campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LIST INFO |$PHP_AUTH_USER|$ip|list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id'|\n"); - fclose($fp); - } - } - -$ADD=311; # go to list modification form below -} - - -###################### -# ADD=4111 modify in-group info in the system -###################### - -if ($ADD==4111) -{ - echo ""; - - if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) - { - echo "
    GRUPO NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el color del nombre de grupo y del grupo debe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - echo "
    GRUPO MODIFICADO: $group_id\n"; - - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_message='$drop_message',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten' where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY GROUP INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111; # go to in-group modification form below -} - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    AGENTES ALEJADOS NO MODIFICADOS - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    El comienzo de la ID del usuario y la extensión externa deben ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    LOS AGENTES ALEJADOS SE MODIFICARON\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY AGENTES REMOTOS ENTRY |$PHP_AUTH_USER|$ip|set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - } - -$ADD=31111; # go to remote agents modification form below -} - - - -###################### -# ADD=411111 modify user group info in the system -###################### - -if ($ADD==411111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    GRUPO de USUARIO NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    El nombre y la descripción de grupo deben ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group';"; - $rslt=mysql_query($stmt, $link); - - echo "
    GRUPO DE USUARIO MODIFICADO\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER GROUP ENTRY |$PHP_AUTH_USER|$ip|UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group'|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    ESCRITURA NO MODIFICADA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    El nombre, la descripción y el texto de la escritura deben ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    LA ESCRITURA SE MODIFICÓ\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111; # go to script modification form below -} - - -###################### -# ADD=41111111 modify filter in the system -###################### - -if ($ADD==41111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTRO NO MODIFICADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Filtre la identificación, nombre y el SQL debe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTRO MODIFICADO\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31111111; # go to filter modification form below -} - - -###################### -# ADD=411111111 modify call time in the system -###################### - -if ($ADD==411111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    TIEMPO DE LA LLAMADA NO MODIFICADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La identificación del tiempo de la llamada y el nombre deben ser porlo menos 2 caracteres en longitud\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    TIEMPO DE LA LLAMADA MODIFICADO\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111; # go to call time modification form below -} - - -###################### -# ADD=4111111111 modify state call time in the system -###################### - -if ($ADD==4111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    TIEMPO DE LA LLAMADA DEL ESTADO NO MODIFICADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Indique que identificación del tiempo de la llamada, nombre y estadodebe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    TIEMPO DE LA LLAMADA DEL ESTADO MODIFICADO\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111111; # go to state call time modification form below -} - - - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of user -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) - { - echo "
    USUARIO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DEL USUARIO: $user\n"; - echo "

    Chasque aquí para suprimir a usuario $user


    \n"; - } - -$ADD='3'; # go to user modification below -} - -###################### -# ADD=51 confirmation before deletion of campaign -###################### - -if ($ADD==51) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) - { - echo "
    CAMPAÑA NO SUPRIMIDA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Campaña_id be at least 2 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DE LA CAMPAÑA: $campaign_id\n"; - echo "

    Chasque aquí para suprimir campaña $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=52 confirmation before logging all agents out of campaign of campaign -###################### - -if ($ADD==52) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    AGENTES NO REGISTRADOS FUERA DE CAMPAÑA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Campaña_id be at least 2 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN DEL REGISTRO DE ESTADO DE LA MÃQUINA DEL AGENTE: $campaign_id\n"; - echo "

    Chasque aquí para registrar todos los agentes fuera de $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=511 confirmation before deletion of list -###################### - -if ($ADD==511) -{ - echo ""; - - if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) - { - echo "
    LISTA NO SUPRIMIDA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DE LA LISTA: $list_id\n"; - echo "

    Chasque aquí para suprimir la lista y todos sus plomos $list_id


    \n"; - } - -$ADD='311'; # go to campaign modification below -} - -###################### -# ADD=5111 confirmation before deletion of in-group -###################### - -if ($ADD==5111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) - { - echo "
    EN-GRUPO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DE EN-GRUPO: $group_id\n"; - echo "

    Chasque aquí para suprimir a en-grupo $group_id


    \n"; - } - -$ADD='3111'; # go to in-group modification below -} - -###################### -# ADD=51111 confirmation before deletion of remote agent record -###################### - -if ($ADD==51111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) - { - echo "
    AGENTE ALEJADO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN ALEJADA DE LA CANCELADURA DEL AGENTE: $remote_agent_id\n"; - echo "

    Chasque aquí para suprimir el agente alejado $remote_agent_id


    \n"; - } - -$ADD='31111'; # go to remote agent modification below -} - -###################### -# ADD=511111 confirmation before deletion of user group record -###################### - -if ($ADD==511111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) - { - echo "
    GRUPO DE USUARIO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DEL GRUPO DE USUARIO: $user_group\n"; - echo "

    Chasque aquí para suprimir a grupo de usuario $user_group


    \n"; - } - -$ADD='311111'; # go to user group modification below -} - -###################### -# ADD=5111111 confirmation before deletion of script record -###################### - -if ($ADD==5111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) - { - echo "
    ESCRITURA NO SUPRIMIDA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Script_id must be at least 2 characters in length\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DE LA ESCRITURA: $script_id\n"; - echo "

    Chasque aquí para suprimir la escritura $script_id


    \n"; - } - -$ADD='3111111'; # go to script modification below -} - -###################### -# ADD=51111111 confirmation before deletion of filter record -###################### - -if ($ADD==51111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) - { - echo "
    FILTRO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La identificación del filtro debe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - echo "
    FILTER DELETION CONFIRMATION: $lead_filter_id\n"; - echo "

    Chasque aquí para suprimir el filtro$lead_filter_id


    \n"; - } - -$ADD='31111111'; # go to filter modification below -} - -###################### -# ADD=511111111 confirmation before deletion of call time record -###################### - -if ($ADD==511111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    TIEMPO DE LA LLAMADA NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    _ llamar tiempo identificación deber ser por lo menos 2 carácter enlongitud\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DEL TIEMPO DE LA LLAMADA: $call_time_id\n"; - echo "

    Click here to delete call time $call_time_id


    \n"; - } - -$ADD='311111111'; # go to call time modification below -} - -###################### -# ADD=5111111111 confirmation before deletion of call time record -###################### - -if ($ADD==5111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    TIEMPO DE LA LLAMADA DEL ESTADO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    _ llamar tiempo identificación deber ser por lo menos 2 carácter enlongitud\n"; - } - else - { - echo "
    CONFIRMACIÓN DE LA CANCELADURA DEL TIEMPO DE LA LLAMADA DEL ESTADO: $call_time_id\n"; - echo "

    Click here to delete state call time $call_time_id


    \n"; - } - -$ADD='3111111111'; # go to state call time modification below -} - - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete user record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) ) - { - echo "
    USUARIO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_users where user='$user' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|user='$user'|\n"); - fclose($fp); - } - echo "
    CANCELADURA DEL USUARIO TERMINADA: $user\n"; - echo "

    \n"; - } - -$ADD='0'; # go to user list -} - -###################### -# ADD=61 delete campaign record -###################### - -if ($ADD==61) -{ - echo ""; - - if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) ) - { - echo "
    CAMPAÑA NO SUPRIMIDA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Campaña_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_campaigns where campaign_id='$campaign_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    QUITAR LOS PLOMOS DE LA TOLVA DE LA LISTA DE VIEJA TOLVA DE LA CAMPAÚA ($campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!DELETING CAMPAIGN!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    LA CANCELADURA DE LA CAMPAÑA TERMINÓ: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='10'; # go to campaigns list -} - -###################### -# ADD=62 Logout all agents fro a campaign -###################### - -if ($ADD==62) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    AGENTES NO REGISTRADOS FUERA DE CAMPAÑA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Campaña_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_live_agents where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!AGENTE LOGOUT!!!!!!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    EL REGISTRO DE ESTADO DE LA MÃQUINA DEL AGENTE TERMINÓ: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='31'; # go to campaign modification below -} - - -###################### -# ADD=65 delete campaign lead recycle in the system -###################### - -if ($ADD==65) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    EL PLOMO DE LA CAMPAÑA RECICLA NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    el estado debe estar entre 1 y 6 caracteres en longitud\n"; - echo "
    la tentativa retrasa debe ser por lo menos 120 segundos\n"; - echo "
    las tentativas máximas deben ser a partir la 1 a 10\n"; - } - else - { - echo "
    EL PLOMO DE LA CAMPAÑA RECICLA SUPRIMIDO: $campaign_id - $status - $attempt_delay\n"; - - $stmt="DELETE FROM vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=611 delete list record and all leads within it -###################### - -if ($ADD==611) -{ - echo ""; - - if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) ) - { - echo "
    LISTA NO SUPRIMIDA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lists where list_id='$list_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    QUITAR LOS PLOMOS DE LA TOLVA DE LA LISTA DE VIEJA TOLVA DE LA CAMPAÚA ($list_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    QUITAR LOS PLOMOS DE LA LISTA DE LA TABLA DE VICIDIAL_LIST\n"; - $stmt="DELETE from vicidial_list where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING LIST!!!!|$PHP_AUTH_USER|$ip|list_id='$list_id'|\n"); - fclose($fp); - } - echo "
    LA CANCELADURA DE LA LISTA TERMINÓ: $list_id\n"; - echo "

    \n"; - } - -$ADD='100'; # go to lists list -} - -###################### -# ADD=6111 delete in-group record -###################### - -if ($ADD==6111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_ingroups < 1) ) - { - echo "
    EN-GRUPO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_inbound_groups where group_id='$group_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING IN-GROUP!!|$PHP_AUTH_USER|$ip|group_id='$group_id'|\n"); - fclose($fp); - } - echo "
    CANCELADURA DE EN-GRUPO TERMINADA: $group_id\n"; - echo "

    \n"; - } - -$ADD='1000'; # go to in-group list -} - -###################### -# ADD=61111 delete remote agent record -###################### - -if ($ADD==61111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) ) - { - echo "
    AGENTE ALEJADO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_remote_agents where remote_agent_id='$remote_agent_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING RMTAGENT!!|$PHP_AUTH_USER|$ip|remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - echo "
    CANCELADURA ALEJADA DEL AGENTE TERMINADA: $remote_agent_id\n"; - echo "

    \n"; - } - -$ADD='10000'; # go to remote agents list -} - -###################### -# ADD=611111 delete user group record -###################### - -if ($ADD==611111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_user_groups < 1) ) - { - echo "
    GRUPO DE USUARIO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_user_groups where user_group='$user_group' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING USRGROUP!!|$PHP_AUTH_USER|$ip|user_group='$user_group'|\n"); - fclose($fp); - } - echo "
    CANCELADURA DEL GRUPO DE USUARIO TERMINADA: $user_group\n"; - echo "

    \n"; - } - -$ADD='100000'; # go to user group list -} - -###################### -# ADD=6111111 delete script record -###################### - -if ($ADD==6111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_scripts < 1) ) - { - echo "
    ESCRITURA NO SUPRIMIDA - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    Script_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_scripts where script_id='$script_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING SCRIPT!!!!|$PHP_AUTH_USER|$ip|script_id='$script_id'|\n"); - fclose($fp); - } - echo "
    CANCELADURA DE LA ESCRITURA TERMINADA: $script_id\n"; - echo "

    \n"; - } - -$ADD='1000000'; # go to script list -} - - -###################### -# ADD=61111111 delete filter record -###################### - -if ($ADD==61111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) ) - { - echo "
    FILTRO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    La identificación del filtro debe ser por lo menos 2 caracteres en longitud\n"; - } - else - { - $stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING FILTER!!!!|$PHP_AUTH_USER|$ip|lead_filter_id='$lead_filter_id'|\n"); - fclose($fp); - } - echo "
    CANCELADURA DEL FILTRO TERMINADA: $lead_filter_id\n"; - echo "

    \n"; - } - -$ADD='10000000'; # go to filter list -} - - -###################### -# ADD=611111111 delete call times record -###################### - -if ($ADD==611111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    TIEMPO DE LA LLAMADA NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    _ llamar tiempo identificación deber ser por lo menos 2 carácter enlongitud\n"; - } - else - { - $stmt="DELETE from vicidial_call_times where call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    _ LLAMAR TIEMPO CANCELADURA TERMINAR: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='100000000'; # go to call times list -} - - -###################### -# ADD=6111111111 delete call times record -###################### - -if ($ADD==6111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    TIEMPO DE LA LLAMADA DEL ESTADO NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
    _ llamar tiempo identificación deber ser por lo menos 2 carácter enlongitud\n"; - } - else - { - $stmt="DELETE from vicidial_state_call_times where state_call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT call_time_id,ct_state_call_times from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\" order by call_time_id;"; - $rslt=mysql_query($stmt, $link); - $sct_to_print = mysql_num_rows($rslt); - $sct_list=''; - - $o=0; - while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_ids[$o] = "$rowx[0]"; - $sct_states[$o] = "$rowx[1]"; - $o++; - } - $o=0; - - while ($sct_to_print > $o) { - $sct_states[$o] = eregi_replace("\|$call_time_id\|",'|',$sct_states[$o]); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$sct_states[$o]' where call_time_id='$sct_ids[$o]';"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - echo "Regla Del Estado Quitada: $sct_ids[$o]
    \n"; - $o++; - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|state_call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    CANCELADURA DEL TIEMPO DE LA LLAMADA DEL ESTADO TERMINADA: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='1000000000'; # go to call times list -} - - - - - - -###################################################################################################### -###################################################################################################### -####### 3 series, record modification forms -###################################################################################################### -###################################################################################################### - - - - -###################### -# ADD=3 modify user info in the system -###################### - -if ($ADD==3) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_level = $row[4]; - $user_group = $row[5]; - $phone_login = $row[6]; - $phone_pass = $row[7]; - $delete_users = $row[8]; - $delete_user_groups = $row[9]; - $delete_lists = $row[10]; - $delete_campaigns = $row[11]; - $delete_ingroups = $row[12]; - $delete_remote_agents = $row[13]; - $load_leads = $row[14]; - $campaign_detail = $row[15]; - $ast_admin_access = $row[16]; - $ast_delete_phones = $row[17]; - $delete_scripts = $row[18]; - $modify_leads = $row[19]; - $hotkeys_active = $row[20]; - $change_agent_campaign =$row[21]; - $agent_choose_ingroups =$row[22]; - $scheduled_callbacks = $row[24]; - $agentonly_callbacks = $row[25]; - $agentcall_manual = $row[26]; - $vicidial_recording = $row[27]; - $vicidial_transfers = $row[28]; - $delete_filters = $row[29]; - $alter_agent_interface_options =$row[30]; - $closer_default_blended = $row[31]; - $delete_call_times = $row[32]; - $modify_call_times = $row[33]; - -if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) - { - echo "
    Usted no tiene permisos de modificar a este usuario: $row[1]\n"; - } -else - { - echo "
    MODIFIQUE Un EXPEDIENTE De los USUARIOS: $row[1]\n"; - if ($LOGuser_level > 8) - {echo "\n";} - else - { - if ($LOGalter_agent_interface == "1") - {echo "\n";} - else - {echo "\n";} - } - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") ) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($LOGuser_level > 8) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "\n"; - echo "
    NÚmero De Usuario: $row[1]$NWB#vicidial_users-user$NWE
    Contraseña: $NWB#vicidial_users-pass$NWE
    Nombre Completo: $NWB#vicidial_users-full_name$NWE
    Nivel Del Usuario: $NWB#vicidial_users-user_level$NWE
    Grupo Del Usuario: $NWB#vicidial_users-user_group$NWE
    Conexión Del Teléfono: $NWB#vicidial_users-phone_login$NWE
    Contraseña Del Teléfono: $NWB#vicidial_users-phone_pass$NWE
    OPCIONES DE INTERFAZ DEL AGENTE:
    El Agente Elige Ingroups: $NWB#vicidial_users-agent_choose_ingroups$NWE
    HotKeys Activo: $NWB#vicidial_users-hotkeys_active$NWE
    Servicios repetidos Programar: $NWB#vicidial_users-scheduled_callbacks$NWE
    Servicios repetidos Del Agente-Solamente: $NWB#vicidial_users-agentonly_callbacks$NWE
    Manual de la llamada del agente: $NWB#vicidial_users-agentcall_manual$NWE
    Grabación de Vicidial: $NWB#vicidial_users-vicidial_recording$NWE
    Vicidial transfiere: $NWB#vicidial_users-vicidial_transfers$NWE
    Un Defecto Más cercano Mezclado: $NWB#vicidial_users-closer_default_blended$NWE
    Grupos De entrada: \n"; - echo "$groups_list"; - echo "$NWB#vicidial_users-closer_campaigns$NWE
    OPCIONES DE INTERFAZ DEL ADMIN:
    Altere Las Opciones De Interfaz Del Agente: $NWB#vicidial_users-alter_agent_interface_options$NWE
    Usuarios de la cancelación: $NWB#vicidial_users-delete_users$NWE
    Suprima a grupos de usuario: $NWB#vicidial_users-delete_user_groups$NWE
    La cancelación enumera: $NWB#vicidial_users-delete_lists$NWE
    La cancelación hace campaña: $NWB#vicidial_users-delete_campaigns$NWE
    En-Grupos de la cancelación: $NWB#vicidial_users-delete_ingroups$NWE
    Suprima los agentes alejados: $NWB#vicidial_users-delete_remote_agents$NWE
    Escritura De la Cancelacións: $NWB#vicidial_users-delete_scripts$NWE
    La carga conduce: $NWB#vicidial_users-load_leads$NWE
    Detalle de la campaña: $NWB#vicidial_users-campaign_detail$NWE
    Acceso de AGC Admin: $NWB#vicidial_users-ast_admin_access$NWE
    La cancelación de AGC telefona: $NWB#vicidial_users-ast_delete_phones$NWE
    Modifique Los Plomos: $NWB#vicidial_users-modify_leads$NWE
    Cambie La Campaña Del Agente: $NWB#vicidial_users-change_agent_campaign$NWE
    Filtro De la Cancelacións: $NWB#vicidial_users-delete_filters$NWE
    Delete Tiempos De la Llamada: $NWB#vicidial_users-delete_call_times$NWE
    Modifique El Tiempo De la Llamadas: $NWB#vicidial_users-modify_call_times$NWE
    \n"; - - if ($LOGdelete_users > 0) - { - echo "

    SUPRIMA A ESTE USUARIO\n"; - } - echo "

    Chasque aquí para la hoja de tiempo del usuario\n"; - echo "

    Chasque aquí para el estado del usuario\n"; - echo "

    Clique aquí para ver las estadísticas del usuario\n"; - echo "

    Chasque aquí para los asimientos del servicio repetido del usuario\n"; - } - -} - - -###################### -# ADD=31 modify campaign info in the system - Detail view -###################### - -if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Basic if not allowed - -if ($ADD==31) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $campaign_rec_exten = $row[22]; - $campaign_recording = $row[23]; - $campaign_rec_filename = $row[24]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $am_message_exten = $row[27]; - $amd_send_to_vmx = $row[28]; - $xferconf_a_dtmf = $row[29]; - $xferconf_a_number = $row[30]; - $xferconf_b_dtmf = $row[31]; - $xferconf_b_number = $row[32]; - $alt_number_dialing = $row[33]; - $scheduled_callbacks = $row[34]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $drop_call_seconds = $row[36]; - $safe_harbor_message = $row[37]; - $safe_harbor_exten = $row[38]; - $display_dialable_count = $row[39]; - $wrapup_seconds = $row[40]; - $wrapup_message = $row[41]; -# $closer_campaigns = $row[42]; - $use_internal_dnc = $row[43]; - -echo "
    MODIFIQUE Un EXPEDIENTE De las CAMPAÚAS: $row[0] - Vista Básica"; -echo " | Vista Detallada | "; -echo "Pantalla En tiempo real\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -if (eregi("CLOSER", $campaign_id)) - { - echo "\n"; - } - - - -echo "\n"; -echo "
    ID De la Campaña: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Nombre de la Campaña: $NWB#vicidial_campaigns-campaign_name$NWE
    Activo: $NWB#vicidial_campaigns-active$NWE
    Extensión del parking: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
    Formulario Web: $NWB#vicidial_campaigns-web_form_address$NWE
    Permitir Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Estado del dial 1: $NWB#vicidial_campaigns-dial_status$NWE
    Estado del dial 2: $NWB#vicidial_campaigns-dial_status$NWE
    Estado del dial 3: $NWB#vicidial_campaigns-dial_status$NWE
    Estado del dial 4: $NWB#vicidial_campaigns-dial_status$NWE
    Estado del dial 5: $NWB#vicidial_campaigns-dial_status$NWE
    Orden De la Lista: $NWB#vicidial_campaigns-lead_order$NWE
    Filtro del plomo: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Nivel Del Hopper: $NWB#vicidial_campaigns-hopper_level$NWE
    Forzar el Reinicio del Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Nivel del Auto-Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Llamar al Siguiente Agente: $NWB#vicidial_campaigns-next_agent_call$NWE
    Franja horaria de llamada: $NWB#vicidial_campaigns-local_call_time$NWE
    Tiempo de espera Del Dial: in seconds$NWB#vicidial_campaigns-dial_timeout$NWE
    Prefijo al marcar: for 91NXXNXXXXXX value would be 9, for no dial prefix use X$NWB#vicidial_campaigns-dial_prefix$NWE
    CallerID de la Campaña: $NWB#vicidial_campaigns-campaign_cid$NWE
    Exten VDAD de La campaña: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE
    Extensión de Rec de la campaña: $NWB#vicidial_campaigns-campaign_rec_exten$NWE
    Grabación De la Campaña: $NWB#vicidial_campaigns-campaign_recording$NWE
    Nombre de fichero De Rec De la Campaña: $NWB#vicidial_campaigns-campaign_rec_filename$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Consiga El Lanzamiento De la Llamada: $NWB#vicidial_campaigns-get_call_launch$NWE
    Mensaje del contestador automático: $NWB#vicidial_campaigns-am_message_exten$NWE
    AMD envían a la VM exten: $NWB#vicidial_campaigns-amd_send_to_vmx$NWE
    Transfiera -Conf DTMF 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfiera -Conf El Número 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfiera -Conf DTMF 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfiera -Conf El Número 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    El Marcar Del Número Del Alt: $NWB#vicidial_campaigns-alt_number_dialing$NWE
    Servicios repetidos Programar: $NWB#vicidial_campaigns-scheduled_callbacks$NWE
    Segundos De la Llamada De la Gota: $NWB#vicidial_campaigns-drop_call_seconds$NWE
    Buzón de Voz: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Utilice El Mensaje Seguro Del Puerto: $NWB#vicidial_campaigns-safe_harbor_message$NWE
    Puerto Seguro Exten: $NWB#vicidial_campaigns-safe_harbor_exten$NWE
    Segundos De Wrapup: $NWB#vicidial_campaigns-wrapup_seconds$NWE
    Mensaje De Wrapup: $NWB#vicidial_campaigns-wrapup_message$NWE
    Utilice La Lista Interna de DNC: $NWB#vicidial_campaigns-use_internal_dnc$NWE
    Grupos De entrada Permitidos:
    "; - echo " $NWB#vicidial_campaigns-closer_campaigns$NWE
    \n"; - echo "$groups_list"; - echo "
    \n"; - -echo "
    \n"; -echo "
    LISTAS DENTRO DE ESTA CAMPAÑA:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ID DE LA LISTANOMBRE DE LA LISTAACTIVO
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Esta campaña tiene $active_lists listas activas y $inactive_lists listas inactivas

    \n"; - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - PIEL

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - DEMOSTRACIÓN

    "; - } - - - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "Esta campaña tiene $hopper_leads Leads en el Hopper

    \n"; -echo "Chasque aquí para ver qué plomos están en la tolva ahora

    \n"; -echo "Chasque aquí para ver todos los asimientos del servicio repetido en esta campaña

    \n"; -echo "
    \n"; - - - - -echo "
    \n"; -echo "
    ESTADOS DE ENCARGO DENTRO DE ESTA CAMPAÚA:   $NWB#vicidial_campaign_statuses$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ESTADODESCRIPCIÓNSELECCIONABLEELIMINAR
    $rowx[0]$rowx[1]$rowx[2]ELIMINAR
    \n"; - -echo "
    AGREGAR ESTADO PERSONALIZADO A LA CAMPAÑA
    \n"; -echo "\n"; -echo "\n"; -echo "Estado:   \n"; -echo "Descripción:   \n"; -echo "Seleccionable:   \n"; -echo "
    \n"; - -echo "

    \n"; - - - -echo "
    PERSONALIZAR ACCEDOS DIRECTOS PARA ESTA CAMPAÑA:   $NWB#vicidial_campaign_hotkeys$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ACCESO DIRECTOESTADODESCRIPCIÓNELIMINAR
    $rowx[1]$rowx[0]$rowx[2]ELIMINAR
    \n"; - -echo "
    AÑADIR ACCESO DIRECTO A LA CAMPAÑA
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Acceso Directo:   \n"; -echo "Estado:   \n"; -echo "
    \n"; -echo "

    \n"; - - - -echo "

    PLOMO QUE RECICLA DENTRO DE ESTA CAMPAÑA:   $NWB#vicidial_lead_recycle$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $recycle_to_print = mysql_num_rows($rslt); - $o=0; - while ($recycle_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - -echo "
    ESTADOLA TENTATIVA RETRASAMÃXIMO DE LA TENTATIVAACTIVO ELIMINAR
    $rowx[2]
    \n"; - echo "\n"; - echo "\n"; - echo "
    ELIMINAR
    \n"; - -echo "
    AGREGUE EL NUEVO PLOMO DE LA CAMPAÑA RECICLAN
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Estado:   \n"; -echo "La Tentativa Retrasa: \n"; -echo "Máximo De la Tentativa: \n"; -echo "
    \n"; - -echo "

    \n"; - -echo "REGISTRE TODOS LOS AGENTES FUERA DE ESTA CAMPAÑA

    \n"; - -if ($LOGdelete_campaigns > 0) - { - echo "

    SUPRIMA ESTA CAMPAÑA\n"; - } - -} - - -###################### -# ADD=34 modify campaign info in the system - Basic View -###################### - -if ($ADD==34) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $display_dialable_count = $row[39]; - -echo "
    MODIFY A CAMPAIGN'S RECORD: $row[0] - Vista Básica | "; -echo "Vista Detallada | "; -echo "Pantalla En tiempo real\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; -echo "
    ID De la Campaña: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Nombre de la Campaña: $NWB#vicidial_campaigns-campaign_name$NWE
    Activo: $NWB#vicidial_campaigns-active$NWE
    Extensión del parking: $row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE
    Formulario Web: $row[11]$NWB#vicidial_campaigns-web_form_address$NWE
    Permitir Closers: $row[12] $NWB#vicidial_campaigns-allow_closers$NWE
    Estado del dial 1: $NWB#vicidial_campaigns-dial_status$NWE
    Estado del dial 2: $NWB#vicidial_campaigns-dial_status$NWE
    Estado del dial 3: $NWB#vicidial_campaigns-dial_status$NWE
    Estado del dial 4: $NWB#vicidial_campaigns-dial_status$NWE
    Estado del dial 5: $NWB#vicidial_campaigns-dial_status$NWE
    Orden De la Lista: $NWB#vicidial_campaigns-lead_order$NWE
    Filtro del plomo: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Nivel Del Hopper: $NWB#vicidial_campaigns-hopper_level$NWE
    Forzar el Reinicio del Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Nivel del Auto-Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Script: $script_id
    Consiga El Lanzamiento De la Llamada: $get_call_launch
    \n"; - -echo "
    \n"; -echo "
    LISTAS DENTRO DE ESTA CAMPAÑA:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    ID DE LA LISTANOMBRE DE LA LISTAACTIVO
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "Esta campaña tiene $active_lists listas activas y $inactive_lists listas inactivas

    \n"; - - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - PIEL

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - DEMOSTRACIÓN

    "; - } - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "Esta campaña tiene $hopper_leads Leads en el Hopper

    \n"; -echo "Chasque aquí para ver qué plomos están en la tolva ahora

    \n"; -echo "Chasque aquí para ver todos los asimientos del servicio repetido en esta campaña

    \n"; -echo "
    \n"; - -echo "
    \n"; - -echo "REGISTRE TODOS LOS AGENTES FUERA DE ESTA CAMPAÑA

    \n"; - - -if ($LOGdelete_campaigns > 0) - { - echo "

    SUPRIMA ESTA CAMPAÑA\n"; - } - - -} - - -###################### -# ADD=311 modify list info in the system -###################### - -if ($ADD==311) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $campaign_id = $row[2]; - $active = $row[3]; - - # grab names of global statuses and statuses in the selected campaign - $stmt="SELECT * from vicidial_statuses order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $Cstatuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($Cstatuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - # end grab status names - - -echo "
    MODIFICAR UN REGISTRO DE LAS LISTAS: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ID De la Lista: $row[0]$NWB#vicidial_lists-list_id$NWE
    Nombre De la Lista: $NWB#vicidial_lists-list_name$NWE
    Campaña: $NWB#vicidial_lists-campaign_id$NWE
    Activo: $NWB#vicidial_lists-active$NWE
    Reiniciar el Lead-Called-Status para esta lista: $NWB#vicidial_lists-reset_list$NWE
    \n"; - -echo "
    \n"; -echo "
    ESTADOS DENTRO DE ESTA LISTA:
    \n"; -echo "\n"; -echo "\n"; - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by status,called_since_last_reset order by status,called_since_last_reset"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - $o=0; - if ($lead_list['count'] > 0) - { - while (list($dispo,) = each($lead_list[$since_reset])) - { - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($dispo == 'CBHOLD') - { - $CLB=""; - $CLE=""; - } - else - { - $CLB=''; - $CLE=''; - } - - echo "\n"; - $o++; - } - } - -echo "\n"; -echo "\n"; - -echo "
    ESTADONOMBRE DEL ESTADOLLAMADONO LLAMADO
    $CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
    SUBTOTALES$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; -unset($lead_list); - - - - - -echo "
    \n"; -echo "
    ZONAS DE TIEMPO DENTRO DE ESTA LISTA:
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT gmt_offset_now,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by gmt_offset_now,called_since_last_reset order by gmt_offset_now,called_since_last_reset"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $plus='+'; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - if ($lead_list['count'] > 0) - { - while (list($tzone,) = each($lead_list[$since_reset])) - { - $LOCALzone=3600 * $tzone; - $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); - - if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} - else {$DISPtzone = "$tzone";} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - } - -echo "\n"; -echo "\n"; - -echo "
    DESPLAZAMIENTO GMT AHORA (tiempo local)LLAMADONO LLAMADO
    ".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
    SUBTOTALES$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; -unset($lead_list); - - - - - - - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_count,count(*) from vicidial_list where list_id='$list_id' group by status,called_count order by status,called_count"; - $rslt=mysql_query($stmt, $link); - $status_called_to_print = mysql_num_rows($rslt); - - $o=0; - $sts=0; - $first_row=1; - $all_called_first=1000; - $all_called_last=0; - while ($status_called_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $leads_in_list = ($leads_in_list + $rowx[2]); - $count_statuses[$o] = "$rowx[0]"; - $count_called[$o] = "$rowx[1]"; - $count_count[$o] = "$rowx[2]"; - $all_called_count[$rowx[1]] = ($all_called_count[$rowx[1]] + $rowx[2]); - - if ( (strlen($status[$sts]) < 1) or ($status[$sts] != "$rowx[0]") ) - { - if ($first_row) {$first_row=0;} - else {$sts++;} - $status[$sts] = "$rowx[0]"; - $status_called_first[$sts] = "$rowx[1]"; - if ($status_called_first[$sts] < $all_called_first) {$all_called_first = $status_called_first[$sts];} - } - $leads_in_sts[$sts] = ($leads_in_sts[$sts] + $rowx[2]); - $status_called_last[$sts] = "$rowx[1]"; - if ($status_called_last[$sts] > $all_called_last) {$all_called_last = $status_called_last[$sts];} - - $o++; - } - - - - -echo "
    \n"; -echo "
    LLAMADAS REALIZADAS DENTRO DE ESTA LISTA:
    \n"; -echo "\n"; -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - - $sts=0; - $statuses_called_to_print = count($status); - while ($statuses_called_to_print > $sts) - { - $Pstatus = $status[$sts]; - if (eregi("1$|3$|5$|7$|9$", $sts)) - {$bgcolor='bgcolor="#B9CBFD"'; $AB='bgcolor="#9BB9FB"';} - else - {$bgcolor='bgcolor="#9BB9FB"'; $AB='bgcolor="#B9CBFD"';} -# echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n"; -# echo "$status[$sts]|"; - echo ""; - - $first = $all_called_first; - while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $sts)) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - else - { - if (eregi("0$|2$|4$|6$|8$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - - $called_printed=0; - $o=0; - while ($status_called_to_print > $o) - { - if ( ($count_statuses[$o] == "$Pstatus") and ($count_called[$o] == "$first") ) - { - $called_printed++; - echo ""; - } - - - $o++; - } - if (!$called_printed) - {echo "";} - $first++; - } - echo "\n\n"; - - $sts++; - } - -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - -echo "
    ESTADONOMBRE DEL ESTADO$firstSUBTOTAL
    $Pstatus$statuses_list[$Pstatus] $count_count[$o]  $leads_in_sts[$sts]
    TOTAL$all_called_count[$first]$leads_in_list

    \n"; - - - - - -echo "
    \n"; - -if ($LOGdelete_lists > 0) - { - echo "

    SUPRIMA ESTA LISTA\n"; - } - -} - - - -###################### -# ADD=3111 modify in-group info in the system -###################### - -if ($ADD==3111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = $row[4]; - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - $script_id = $row[8]; - $get_call_launch = $row[9]; - $xferconf_a_dtmf = $row[10]; - $xferconf_a_number = $row[11]; - $xferconf_b_dtmf = $row[12]; - $xferconf_b_number = $row[13]; - $drop_call_seconds = $row[14]; - $drop_message = $row[15]; - $drop_exten = $row[16]; - -echo "
    MODIFICAR UN REGISTRO DE LOS GRUPOS: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -echo "\n"; -echo "
    ID De Grupo: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
    Nombre De Grupo: $NWB#vicidial_inbound_groups-group_name$NWE
    Color Del Grupo: $NWB#vicidial_inbound_groups-group_color$NWE
    Activo: $NWB#vicidial_inbound_groups-active$NWE
    Formulario Web: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Llamar al Siguiente Agente: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Mostrar Fronter: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Consiga El Lanzamiento De la Llamada: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    Transfiera -Conf DTMF 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfiera -Conf El Número 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfiera -Conf DTMF 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfiera -Conf El Número 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Segundos De la Llamada De la Gota: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
    Buzón de Voz: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Utilice El Mensaje De la Gota: $NWB#vicidial_inbound_groups-drop_message$NWE
    Gota Exten: $NWB#vicidial_inbound_groups-drop_exten$NWE
    \n"; - -echo "

    \n"; - -echo "
    \n"; - -if ($LOGdelete_ingroups > 0) - { - echo "

    SUPRIMA A ESTE EN-GRUPO\n"; - } - -} - - - -###################### -# ADD=31111 modify remote agents info in the system -###################### - -if ($ADD==31111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFICAR UNA ENTRADA DE LOS AGENTES REMOTOS: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Comienzo Del ID del usuario: (Solamente números, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Número de líneas: (Solamente números)$NWB#vicidial_remote_agents-number_of_lines$NWE
    IP Del Servidor: $NWB#vicidial_remote_agents-server_ip$NWE
    Extensión Externa: (número del dialplan para alcanzar agentes)$NWB#vicidial_remote_agents-conf_exten$NWE
    Estado: $NWB#vicidial_remote_agents-status$NWE
    Campaña: $NWB#vicidial_remote_agents-campaign_id$NWE
    Grupos De entrada: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTA: Puede tomar hasta 30 segundos para los cambios sometidos en esta pantalla para ir viva\n"; - - -if ($LOGdelete_remote_agents > 0) - { - echo "

    SUPRIMA ESTE AGENTE ALEJADO\n"; - } - -} - - -###################### -# ADD=311111 modify user group info in the system -###################### - -if ($ADD==311111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[0]; - $group_name = $row[1]; -echo ""; - -echo "
    MODIFICAR UNA ENTRADA EN LOS GRUPOS DE USUARIOS\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Grupo: (sin espacios o signos de puntuación)$NWB#vicidial_user_groups-user_group$NWE
    Descripción: (Descripción del grupo)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -if ($LOGdelete_user_groups > 0) - { - echo "

    SUPRIMA A ESTE GRUPO DE USUARIO\n"; - } - -} - - -###################### -# ADD=3111111 modify script info in the system -###################### - -if ($ADD==3111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $script_name = $row[1]; - $script_comments = $row[2]; - $script_text = $row[3]; - $active = $row[4]; -echo ""; - -echo "
    MODIFIQUE Una ESCRITURA\n"; -echo "\n"; -echo "\n"; -echo "
    Identificación De la Escritura:: $script_id$NWB#vicidial_scripts-script_name$NWE
    Nombre de la escritura: (título de la escritura)$NWB#vicidial_scripts-script_name$NWE
    Comentarios de la escritura: $NWB#vicidial_scripts-script_comments$NWE
    Activo: $NWB#vicidial_scripts-active$NWE
    Texto de la escritura:

    Escritura De la Inspección previo
    $NWB#vicidial_scripts-script_text$NWE
    \n"; - -if ($LOGdelete_scripts > 0) - { - echo "

    SUPRIMA ESTA ESCRITURA\n"; - } - -} - - -###################### -# ADD=31111111 modify filter info in the system -###################### - -if ($ADD==31111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $lead_filter_name = $row[1]; - $lead_filter_comments = $row[2]; - $lead_filter_sql = $row[3]; -echo ""; - -echo "
    MODIFIQUE Un FILTRO\n"; -echo "\n"; -echo "\n"; -echo "
    Identificación Del Filtro:$lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Nombre Del Filtro: (descripción corta del filtro)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Comentarios Del Filtro: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filtro Sql: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - -echo "

    "; -echo "
    PRUEBE EN CAMPAÑA:
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -if ($LOGdelete_filters > 0) - { - echo "

    SUPRIMA ESTE FILTRO\n"; - } - -} - - -###################### -# ADD=321111111 modify call time definition info in the system -###################### - -if ($ADD==321111111) -{ -if ($LOGmodify_call_times==1) -{ - -if ( ($stage=="ADD") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - if (eregi("\|$",$ct_state_call_times)) - {$ct_state_call_times = "$ct_state_call_times$state_rule\|";} - else - {$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";} - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "Regla Del Estado Agregada: $state_rule
    \n"; - } -if ( ($stage=="REMOVE") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - $ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "Regla Del Estado Quitada: $state_rule
    \n"; - } - -$ADD=311111111; -} -else -{ -echo "Le no autorizan a visión esta página. Vaya por favor detrás."; -} - -} - - -###################### -# ADD=311111111 modify call time definition info in the system -###################### - -if ($ADD==311111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -$ct_srs=1; -$b=0; -$srs_SQL =''; -if (strlen($ct_state_call_times)>2) - { - $state_rules = explode('|',$ct_state_call_times); - $ct_srs = ((count($state_rules)) - 1); - } -echo "\n"; -echo "\n"; -while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>0) - { - $stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - echo "\n"; - $srs_SQL .= "'$state_rules[$b]',"; - $srs_state_SQL .= "'$row[0]',"; - } - $b++; - } -if (strlen($srs_SQL)>2) - { - $srs_SQL = "$srs_SQL''"; - $srs_state_SQL = "$srs_state_SQL''"; - $srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)"; - } -else - {$srs_SQL='';} -$stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;"; -$rslt=mysql_query($stmt, $link); -$sct_to_print = mysql_num_rows($rslt); -$sct_list=''; - -$o=0; -while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_list .= "\n"; - $o++; -} -echo "\n"; -echo "\n"; - -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $call_time_name = $row[1]; - $call_time_comments = $row[2]; - $ct_default_start = $row[3]; - $ct_default_stop = $row[4]; - $ct_sunday_start = $row[5]; - $ct_sunday_stop = $row[6]; - $ct_monday_start = $row[7]; - $ct_monday_stop = $row[8]; - $ct_tuesday_start = $row[9]; - $ct_tuesday_stop = $row[10]; - $ct_wednesday_start = $row[11]; - $ct_wednesday_stop = $row[12]; - $ct_thursday_start = $row[13]; - $ct_thursday_stop = $row[14]; - $ct_friday_start = $row[15]; - $ct_friday_stop = $row[16]; - $ct_saturday_start = $row[17]; - $ct_saturday_stop = $row[18]; - $ct_state_call_times = $row[19]; - -echo ""; - -echo "
    MODIFIQUE Un RATO De la LLAMADA\n"; -echo "\n"; -echo "\n"; -echo "
    Identificación Del Tiempo De la Llamada: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    Nombre Del Tiempo De la Llamada: (descripción corta del tiempo de la llamada)$NWB#vicidial_call_times-call_time_name$NWE
    Comentarios Del Tiempo De la Llamada: $NWB#vicidial_call_times-call_time_comments$NWE
    Comienzo Del Defecto: Parada Del Defecto: $NWB#vicidial_call_times-ct_default_start$NWE
    Comienzo De Domingo: Parada De Domingo: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Lunes: Parada De Lunes: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Martes: Parada De Martes: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Miércoles: Parada De Miércoles: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Thursday Start: Parada De Jueves: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Viernes: Parada De Viernes: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Sábado: Parada De Sábado: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Definiciones activas del tiempo de la llamada del estado para estoexpediente:  
    $state_rules[$b] - REMOVE $row[0] - $row[1]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Add state call time rule:


    \n"; -echo "CAMPAÑAS USANDO ESTE TIEMPO DE LA LLAMADA:
    \n"; -echo "\n"; - - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - $CT_camp_id = $row[1]; - $CT_camp_name = $row[2]; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    SUPRIMA ESTA DEFINICIÓN DEL TIEMPO DE LA LLAMADA\n"; - } -} -else -{ -echo "Le no autorizan a visión esta página. Vaya por favor detrás."; -} - -} - - -###################### -# ADD=3111111111 modify state call time definition info in the system -###################### - -if ($ADD==3111111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $state_call_time_state =$row[1]; - $call_time_name = $row[2]; - $call_time_comments = $row[3]; - $ct_default_start = $row[4]; - $ct_default_stop = $row[5]; - $ct_sunday_start = $row[6]; - $ct_sunday_stop = $row[7]; - $ct_monday_start = $row[8]; - $ct_monday_stop = $row[9]; - $ct_tuesday_start = $row[10]; - $ct_tuesday_stop = $row[11]; - $ct_wednesday_start = $row[12]; - $ct_wednesday_stop = $row[13]; - $ct_thursday_start = $row[14]; - $ct_thursday_stop = $row[15]; - $ct_friday_start = $row[16]; - $ct_friday_stop = $row[17]; - $ct_saturday_start = $row[18]; - $ct_saturday_stop = $row[19]; - -echo ""; - -echo "
    _ MODIFICAR Uno ESTADO LLAMAR TIEMPO
    \n"; -echo "\n"; -echo "\n"; -echo "
    Identificación Del Tiempo De la Llamada: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: $NWB#vicidial_call_times-state_call_time_state$NWE
    _ Estado Llamar Tiempo Nombre: (descripción corta del tiempo de la llamada)$NWB#vicidial_call_times-call_time_name$NWE
    Comentarios Del Tiempo De la Llamada Del Estado: $NWB#vicidial_call_times-call_time_comments$NWE
    Comienzo Del Defecto: Parada Del Defecto: $NWB#vicidial_call_times-ct_default_start$NWE
    Comienzo De Domingo: Parada De Domingo: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Lunes: Parada De Lunes: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Martes: Parada De Martes: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Miércoles: Parada De Miércoles: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Thursday Start: Parada De Jueves: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Viernes: Parada De Viernes: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Comienzo De Sábado: Parada De Sábado: $NWB#vicidial_call_times-ct_sunday_start$NWE


    \n"; -echo "TIEMPOS DE LA LLAMADA USANDO ESTE TIEMPO DE LA LLAMADA DEL ESTADO:
    \n"; -echo "\n"; - - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    SUPRIMA ESTA DEFINICIÓN DEL TIEMPO DE LA LLAMADA DEL ESTADO\n"; - } - -} -else -{ -echo "Le no autorizan a visión esta página. Vaya por favor detrás."; -} - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo "
    \n"; -echo ""; - -echo "
    BUSCAR UN USUARIO\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    NÚmero De Usuario:
    Nombre Completo:
    Nivel Del Usuario:
    Grupo Del Usuario:
    \n"; - -} - -###################### -# ADD=66 user search results -###################### - -if ($ADD==66) -{ -echo "
    \n"; - echo ""; - - $SQL = ''; - if ($user) {$SQL .= " user LIKE \"%$user%\" and";} - if ($full_name) {$SQL .= " full_name LIKE \"%$full_name%\" and";} - if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";} - if ($user_group) {$SQL .= " user_group = '$user_group' and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from vicidial_users $SQL order by full_name desc;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    RESULTADOS DE LA BÚSQUEDA:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFICAR | ESTADÃSTICAS | ESTADO | TIME
    \n"; - -} - - -###################################################################################################### -###################################################################################################### -####### 8 series, Callback lists -###################################################################################################### -###################################################################################################### - -###################### -# ADD=8 find all callbacks on hold by a User -###################### -if ($ADD==8) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    USER CALLBACK HOLD LISTINGS: $user\n"; -$ADD='82'; -} - -###################### -# ADD=81 find all callbacks on hold within a Campaign -###################### -if ($ADD==81) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; -$ADD='82'; -} - -###################### -# ADD=811 find all callbacks on hold within a List -###################### -if ($ADD==811) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    LIST CALLBACK HOLD LISTINGS: $list_id\n"; -$ADD='82'; -} - -###################### -# ADD=82 display all callbacks on hold -###################### -if ($ADD==82) -{ -echo "
    \n"; -echo "
    \n"; -echo "\n"; - - $o=0; - while ($cb_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    LEADLISTCAMPAIGNENTRY FECHACALLBACK FECHAUSERRECIPIENTESTADO
    $row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 0 series, displays and searches -###################################################################################################### -###################################################################################################### - -###################### -# ADD=0 display all active users -###################### -if ($ADD==0) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users order by full_name"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USUARIOS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFICAR | ESTADÃSTICAS | ESTADO | TIME
    \n"; -} - -###################### -# ADD=10 display all campaigns -###################### -if ($ADD==10) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAÑAS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3]$row[4]$row[5] $row[6]$row[7]  MODIFICAR
    \n"; -} - - -###################### -# ADD=100 display all lists -###################### -if ($ADD==100) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists order by list_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    LISTAS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  MODIFICAR
    \n"; -} - - - -###################### -# ADD=1000 display all inbound groups -###################### -if ($ADD==1000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    GRUPOS DE ENTRADA :\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[5]  MODIFICAR
    \n"; -} - - -###################### -# ADD=10000 display all remote agents -###################### -if ($ADD==10000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    AGENTES REMOTOS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFICAR
    \n"; -} - - -###################### -# ADD=100000 display all user groups -###################### -if ($ADD==100000) -{ -echo "\n"; -- } -- else -- { -- $leads_in_list_Y = ($leads_in_list_Y + $rowx[2]); -- echo "\n"; -- -- } -- -- $o++; -+ echo "\n"; -+ $o++; - } - --echo "\n"; --echo "\n"; -+echo "\n"; -+echo "\n"; - - echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups order by user_group"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    GRUPOS DE USUARIO :\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFICAR
    \n"; -} - - -###################### -# ADD=1000000 display all scripts -###################### -if ($ADD==1000000) -{ -echo "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    ESCRITURAS DE LA VISIÓN:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFICAR
    \n"; -} - - -###################### -# ADD=10000000 display all filters -###################### -if ($ADD==10000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    LISTADOS DEL FILTRO DEL PLOMO:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFICAR
    \n"; -} - - -###################### -# ADD=100000000 display all call times -###################### -if ($ADD==100000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    LISTADOS DEL TIEMPO DE LA LLAMADA:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[4] MODIFICAR
    \n"; -} - -###################### -# ADD=1000000000 display all state call times -###################### -if ($ADD==1000000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_state_call_times order by state_call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    LISTADOS DEL TIEMPO DE LA LLAMADA DEL ESTADO:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3] $row[4] MODIFICAR
    \n"; -} - - - - - -echo "
    \n"; - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds"; -echo "             VERSIÓN: $version"; -echo "             CONSTRUCCION: $build
    \n"; - - -?> - - -
    - - - -1) - { - $g=0; - $p='13'; - $GMT_gmt[0] = ''; - $GMT_hour[0] = ''; - $GMT_day[0] = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $pmin=(gmdate("i", time() + $pzone)); - $phour=( (gmdate("G", time() + $pzone)) * 100); - $pday=gmdate("w", time() + $pzone); - $tz = sprintf("%.2f", $p); - $GMT_gmt[$g] = "$tz"; - $GMT_day[$g] = "$pday"; - $GMT_hour[$g] = ($phour + $pmin); - $p = ($p - 0.25); - $g++; - } - - $stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $Gct_default_start = "$rowx[3]"; - $Gct_default_stop = "$rowx[4]"; - $Gct_sunday_start = "$rowx[5]"; - $Gct_sunday_stop = "$rowx[6]"; - $Gct_monday_start = "$rowx[7]"; - $Gct_monday_stop = "$rowx[8]"; - $Gct_tuesday_start = "$rowx[9]"; - $Gct_tuesday_stop = "$rowx[10]"; - $Gct_wednesday_start = "$rowx[11]"; - $Gct_wednesday_stop = "$rowx[12]"; - $Gct_thursday_start = "$rowx[13]"; - $Gct_thursday_stop = "$rowx[14]"; - $Gct_friday_start = "$rowx[15]"; - $Gct_friday_stop = "$rowx[16]"; - $Gct_saturday_start = "$rowx[17]"; - $Gct_saturday_stop = "$rowx[18]"; - $Gct_state_call_times = "$rowx[19]"; - - $ct_states = ''; - $ct_state_gmt_SQL = ''; - $ct_srs=0; - $b=0; - if (strlen($Gct_state_call_times)>2) - { - $state_rules = explode('|',$Gct_state_call_times); - $ct_srs = ((count($state_rules)) - 2); - } - while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>1) - { - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Gstate_call_time_id = "$row[0]"; - $Gstate_call_time_state = "$row[1]"; - $Gsct_default_start = "$row[4]"; - $Gsct_default_stop = "$row[5]"; - $Gsct_sunday_start = "$row[6]"; - $Gsct_sunday_stop = "$row[7]"; - $Gsct_monday_start = "$row[8]"; - $Gsct_monday_stop = "$row[9]"; - $Gsct_tuesday_start = "$row[10]"; - $Gsct_tuesday_stop = "$row[11]"; - $Gsct_wednesday_start = "$row[12]"; - $Gsct_wednesday_stop = "$row[13]"; - $Gsct_thursday_start = "$row[14]"; - $Gsct_thursday_stop = "$row[15]"; - $Gsct_friday_start = "$row[16]"; - $Gsct_friday_stop = "$row[17]"; - $Gsct_saturday_start = "$row[18]"; - $Gsct_saturday_stop = "$row[19]"; - - $ct_states .="'$Gstate_call_time_state',"; - - $r=0; - $state_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday tiempo local - { - if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday tiempo local - { - if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday tiempo local - { - if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday tiempo local - { - if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday tiempo local - { - if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday tiempo local - { - if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday tiempo local - { - if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - $state_gmt = "$state_gmt'99'"; - $ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) "; - } - - $b++; - } - if (strlen($ct_states)>2) - { - $ct_states = eregi_replace(",$",'',$ct_states); - $ct_statesSQL = "and state NOT IN($ct_states)"; - } - else - { - $ct_statesSQL = ""; - } - - $r=0; - $default_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday tiempo local - { - if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday tiempo local - { - if (($Gct_monday_start==0) and ($Gct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday tiempo local - { - if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday tiempo local - { - if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday tiempo local - { - if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday tiempo local - { - if (($Gct_friday_start==0) and ($Gct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday tiempo local - { - if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - - $default_gmt = "$default_gmt'99'"; - $all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL"; - - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and ($all_gmtSQL) $fSQL"; - #$DB=1; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rslt_rows = mysql_num_rows($rslt); - if ($rslt_rows) - { - $rowx=mysql_fetch_row($rslt); - $active_leads = "$rowx[0]"; - } - else {$active_leads = '0';} - - echo "Esta campaña tiene $active_leads Leads para ser llamados en estas listas\n"; - } - else - { - echo "ningunas listas activas seleccionadas para esta campaña\n"; - } - } -else - { - echo "ningunas listas activas seleccionadas para esta campaña\n"; - } -##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ### -} -?> diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/admin_changes_log.txt b/agc_2-X/trunk/LANG_admin/vicidial_es/admin_changes_log.txt deleted file mode 100644 index 9664215b..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/admin_changes_log.txt +++ /dev/null @@ -1,5 +0,0 @@ -Mon, 26 Sep 2005 12:20:13 -0400|MODIFY CAMPAIGN INFO|444|10.10.10.19|campaign_name='Test campaign for VICIDIAL 2',active='Y',dial_status_a='NEW',dial_status_b='N',dial_status_c='DROP',dial_status_d='A',dial_status_e='B',lead_order='DOWN',allow_closers='Y',hopper_level='100', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='24hours', voicemail_ext='138', dial_timeout='28', dial_prefix='9', campaign_cid='0000000000', campaign_vdad_exten='8365' where campaign_id='TESTCAMP'|N| -Mon, 26 Sep 2005 17:31:20 -0400|MODIFY USER INFO |444|10.10.10.19|pass='sales',full_name='1 - TESTCAMP remote agent',user_level='4',user_group='ADMIN' where user='123456'| -Fri, 28 Apr 2006 11:34:07 -0400|MODIFY CAMPAIGN INFO|123456|10.10.8.19|campaign_name='Test campaign for VICIDIAL 2',active='Y',dial_status_a='NA',dial_status_b='NP',dial_status_c='DROP',dial_status_d='N',dial_status_e='A',lead_order='DOWN COUNT',allow_closers='Y',hopper_level='50', auto_dial_level='1', next_agent_call='oldest_call_finish', local_call_time='24hours', voicemail_ext='138', dial_timeout='50', dial_prefix='9', campaign_cid='8775154102', campaign_vdad_exten='8365', web_form_address='http://10.10.10.196/vicidial/closer-fronter_popupX2-1.php', park_ext='8305', park_file_name='classical', campaign_rec_exten='8309', campaign_recording='ONDEMAND', campaign_rec_filename='TINYDATE_AGENT_CUSTPHONE', campaign_script='TESTCAMP04', get_call_launch='NONE', am_message_exten='8320', amd_send_to_vmx='N', xferconf_a_dtmf='1234',xferconf_a_number='7274514920', xferconf_b_dtmf='4321',xferconf_b_number='7274514032',lead_filter_id='NEWHIGH',alt_number_dialing='N',scheduled_callbacks='Y' where campaign_id='TESTCAMP'|N| -Fri, 28 Apr 2006 11:34:38 -0400|RESET LIST CALLED |123456|10.10.8.19|list_name='test domestic lists'| -Fri, 28 Apr 2006 11:34:38 -0400|MODIFY LIST INFO |123456|10.10.8.19|list_name='test domestic lists',campaign_id='TESTCAMP',active='Y' where list_id='101'| diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/admin_modify_lead.php b/agc_2-X/trunk/LANG_admin/vicidial_es/admin_modify_lead.php deleted file mode 100644 index 7cb31f31..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/admin_modify_lead.php +++ /dev/null @@ -1,476 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} -if (isset($_GET["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"];} - elseif (isset($_POST["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];} -if (isset($_GET["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"];} - elseif (isset($_POST["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];} -if (isset($_GET["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"];} - elseif (isset($_POST["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["CBuser"])) {$CBuser=$_GET["CBuser"];} - elseif (isset($_POST["CBuser"])) {$CBuser=$_POST["CBuser"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Registro del Lead modificado - - -
    - - 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Información modificada

    \n"; - echo "\n"; - - if ( ($dispo != $status) and ($dispo == 'CBHOLD') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status='ACTIVE';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - if ( ($dispo != $status) and ($dispo == 'CALLBK') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - - if ( ($dispo != $status) and ($status == 'DNC') ) - { - ### add lead to the internal DNC list - $stmt="INSERT INTO vicidial_dnc (phone_number) values('" . mysql_real_escape_string($phone_number) . "');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    Lead added to DNC List: $lead_id - $phone_number
    \n"; - } - -} -else -{ - - if ($CBchangeUSERtoANY == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set recipient='ANYONE' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to ANYONE
    \n"; - } - if ($CBchangeUSERtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record user changed to $CBuser
    \n"; - } - if ($CBchangeANYtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "',recipient='USERONLY' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to USERONLY, user: $CBuser
    \n"; - } - - - - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $dispo = "$row[3]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Información de la llamada: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Lead ID: $lead_id
    Fronter: $tsr     ID De la Lista: $list_id
    Nombre:   \n"; - echo " Apellidos:
    Dirección 1 :
    Dirección 2 :
    Dirección 3 :
    Ciudad :
    Estado:   \n"; - echo " Código Postal:
    Provincia:
    País :
    Alt Phone :
    Email :
    Seguridad:
    Comentarios :
    Disposición:
    \n"; - echo "


    \n"; - - if ( ($dispo == 'CALLBK') or ($dispo == 'CBHOLD') ) - { - ### find any vicidial_callback records for this lead - $stmt="select * from vicidial_callbacks where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $CB_to_print = mysql_num_rows($rslt); - $rowx=mysql_fetch_row($rslt); - - if ($CB_to_print>0) - { - if ($rowx[9] == 'USERONLY') - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    \n"; - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - else - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - } - else - { - echo "
    No Callback records found
    \n"; - } - } - - - - - - - } - else - { - echo "las operaciones de búsqueda del plomo FALLARON para el lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - -echo "

    \n"; - -echo "
    \n"; - -echo "LLAMADAS A ESTE LEAD:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS TSR CAMPAÑA LIST LEAD
    $row[4] $row[7] $row[8] $row[11] $row[3] $row[2] $row[1]
    \n"; - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/admin_search_lead.php b/agc_2-X/trunk/LANG_admin/vicidial_es/admin_search_lead.php deleted file mode 100644 index 9867543d..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/admin_search_lead.php +++ /dev/null @@ -1,224 +0,0 @@ - LICENSE: GPLv2 -### -### AST GUI database administration search for lead info -### admin_modify_lead.php -# -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead -# -# changes: -# 60620-1055 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - Changed results to multi-record -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Buscar Lead - -Operaciones de búsqueda del Lead - - - -
    \n"; - echo "
    \n"; - echo "\n"; - echo "Por favor, Introduzca un:
    Vendor ID(código del vendedor del Lead): or \n"; - echo "
    un número de teléfono de casa: or\n"; - echo "
    ID del Lead:

    \n"; - echo "
    \n"; - echo "\n
    \n"; - echo "\n"; - exit; - } - -else - { - - if ($vendor_id) - { - $stmt="SELECT * from vicidial_list where vendor_lead_code='" . mysql_real_escape_string($vendor_id) . "' order by modify_date desc limit 1000"; - } - else - { - if ($phone) - { - $stmt="SELECT * from vicidial_list where phone_number='" . mysql_real_escape_string($phone) . "' order by modify_date desc limit 1000"; - } - else - { - if ($lead_id) - { - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "' order by modify_date desc limit 1000"; - } - else - { - print "ERROR: you must search for something! Go back and search for something"; - exit; - } - } - } - if ($DB) - { - echo "\n\n$stmt\n\n"; - } - - $rslt=mysql_query($stmt, $link); - $results_to_print = mysql_num_rows($rslt); - if ($results_to_print < 1) - { - echo date("l F j, Y G:i:s A"); - echo "\n

    \n"; - echo "Las variables de la búsqueda que usted incorporó no son activas en el sistema

    \n"; - echo "Va por favor detrás y dobla el cheque la información que usted incorporó y somete otra vez\n"; - echo "
    \n"; - echo "\n"; - exit; - } - else - { - echo "RESULTS: $results_to_print

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $o=0; - while ($results_to_print > $o) - { - $row=mysql_fetch_row($rslt); - $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "
    #LEAD IDESTADOVENDOR IDLAST AGENTID DE LA LISTAPHONENOMBRECITYSECURITYLAST CALL
    $o$row[0]$row[3]$row[5]$row[4]$row[7]$row[11]$row[13] $row[15]$row[19]$row[28]$row[2]
    \n"; - } - } - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \nNUEVA BÚSQUEDA"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds"; - - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/count.htm b/agc_2-X/trunk/LANG_admin/vicidial_es/count.htm deleted file mode 100644 index 51f8a361..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/count.htm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/dbconnect.php b/agc_2-X/trunk/LANG_admin/vicidial_es/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/group_hourly_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_es/group_hourly_stats.php deleted file mode 100644 index 9323fcef..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/group_hourly_stats.php +++ /dev/null @@ -1,252 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1014 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["date_with_hour"])) {$date_with_hour=$_GET["date_with_hour"];} - elseif (isset($_POST["date_with_hour"])) {$date_with_hour=$_POST["date_with_hour"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$date_with_hour_default = date("Y-m-d H"); -$date_no_hour_default = $TODAY; - -if (!isset($date_with_hour)) {$date_with_hour = $date_with_hour_default;} - $date_no_hour = $date_with_hour; - $date_no_hour = eregi_replace(" ([0-9]{2})",'',$date_no_hour); -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - -# $stmt="SELECT full_name from vicidial_users where user='$user';"; -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: Stats Cada hora Del Grupo -\n"; -?> - - -
    - - - - - -= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDtotal[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_no_hour) . " 00:00:00' and call_date <= '" . mysql_real_escape_string($date_no_hour) . " 23:59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDday[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDcount[$o] = "$row[0]"; - $o++; - } - -echo "
      VICIDIAL ADMIN: Stats Cada hora Del Grupo  
    \n"; - -echo "
    \n"; - -echo "CUENTAS DE HORAS DE TSR: $group | $status | $date_with_hour | $date_no_hour\n"; - -echo "
    \n"; -echo "\n"; - - $day_calls=0; - $hour_calls=0; - $total_calls=0; - $o=0; - while($o < $tsrs_to_print) - { - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $VDtotal[$o]); - $hour_calls = ($hour_calls + $VDcount[$o]); - $day_calls = ($day_calls + $VDday[$o]); - - $o++; - } - -echo "\n"; - - -} - -echo "
    TSR ID   $status   LLAMADAS TOTALES   $status DAY    
    $VDuser[$o] $VDname[$o] $VDcount[$o] $VDtotal[$o] $VDday[$o]MODIFICAR | ESTADÃSTICAS
    TOTAL $status $hour_calls $total_calls $day_calls
    \n"; -echo "

    \n"; - - - echo "
    Inscriba por favor a grupo que usted desea conseguir el stats cada hora para:
    \n"; - echo "\n"; - echo "group:
    \n"; - echo "status:   (example: XFER)
    \n"; - echo "date with hour:   (example: 2004-06-25 14)
    \n"; - echo "\n"; - echo "


    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/help.gif b/agc_2-X/trunk/LANG_admin/vicidial_es/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/listloader.php b/agc_2-X/trunk/LANG_admin/vicidial_es/listloader.php deleted file mode 100644 index b4a89d27..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/listloader.php +++ /dev/null @@ -1,698 +0,0 @@ - LICENSE: GPLv2 -# -# AST Web GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1006 - added listID override and gmt_offset lookup while loading -# 60619-1652 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12'; -$build = '60619-1652'; - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -$submit_file=$_GET["submit_file"]; if (!$submit_file) {$submit_file=$_POST["submit_file"];} -$list_id_override=$_GET["list_id_override"]; if (!$list_id_override) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$ENVIAR=$_GET["ENVIAR"]; if (!$ENVIAR) {$ENVIAR=$_POST["ENVIAR"];} - - -#$DB=1; -#$DBX=1; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('listloader.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"AYUDA\""; - - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -?> - - - - - - method=post enctype="multipart/form-data"> -
    - - - - - - - - - - - - - -
    Cargar Leads de este archivo:
    ID De la Lista Override: (Solamente números or leave blank for values in the file)
    CHASQUE AQUà PARA IR AL CARGADOR ESTUPENDO DEL PLOMO (BETA VERSIÓN)     DE NUEVO AL ADMIN
    - -document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - $pulldate=date("Y-m-d H:i:s"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("./vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Procesando$delim_name-delimited file... ($tab_count|$pipe_count)\n"; - - if (strlen($list_id_override)>0) - { - print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city = $row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) - { - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $gmt_offset = '0'; - $called_since_last_reset='N'; - - if (strlen($list_id_override)>0) - { - # print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =='1') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### MEXICO ### - if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### AUSTRALIA ### - if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # tiempo local calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: El archivo no tiene el número requerido de los campos para procesarlo.
    "; - } - print ""; -} else if (filesize($leadfile)>8388608) { - print "
    ERROR: El archivo excede el límite 8MB.
    "; -} -?> - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/listloaderMAIN.php b/agc_2-X/trunk/LANG_admin/vicidial_es/listloaderMAIN.php deleted file mode 100644 index fa31b764..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/listloaderMAIN.php +++ /dev/null @@ -1,79 +0,0 @@ - LICENSE: GPLv2 -# -# this is the main frame page for the lead loading section. This is where you -# would upload a file and have it inserted into vicidial_list -# -# changes: -# 60620-1149 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - -VICIDIAL: Módulo Cargador de Leads - - - - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/new_listloader_superL.php b/agc_2-X/trunk/LANG_admin/vicidial_es/new_listloader_superL.php deleted file mode 100644 index dcc2935a..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/new_listloader_superL.php +++ /dev/null @@ -1,1364 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60113-1603 - Fixed a few bugs in Excel import -# 60421-1624 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1240 - added listID override -# 60616-1604 - added gmt lookup for each lead -# 60619-1651 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12-1'; -$build = '60619-1651'; - - -require("dbconnect.php"); - -### links used for testing -#$link=mysql_connect("10.10.10.15", "cron", "1234"); -#mysql_select_db("asterisk"); -#$WeBServeRRooT = '/home/www/htdocs'; - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];} - elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} -if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} - elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} -if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} - elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} -if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} - elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];} -if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];} - elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];} -if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];} - elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];} -if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];} - elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];} -if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];} - elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];} -if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];} - elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];} -if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];} - elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];} -if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];} - elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];} -if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];} - elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];} -if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];} - elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];} -if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];} - elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];} -if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];} - elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];} -if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];} - elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];} -if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];} - elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];} -if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];} - elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];} -if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];} - elseif (isset($_POST["province_field"])) {$province_field=$_POST["province_field"];} -if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];} - elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];} -if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];} - elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];} -if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];} - elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];} -if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];} - elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];} -if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];} - elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];} -if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];} - elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];} -if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];} - elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];} -if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];} - elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];} -if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];} - elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); - -# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"AYUDA\""; - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -function macfontfix($fontsize) { - - $browser = getenv("HTTP_USER_AGENT"); - $pctype = explode("(", $browser); - if (ereg("Mac",$pctype[1])) { - /* Browser is a Mac. If not Netscape 6, raise fonts */ - - $blownbrowser = explode('/', $browser); - $ver = explode(' ', $blownbrowser[1]); - $ver = $ver[0]; - if ($ver >= 5.0) return $fontsize; else return ($fontsize+2); - - } else return $fontsize; /* Browser is not a Mac - don't touch fonts */ -} - -echo "\n"; - -?> - - - -VICIDIAL ADMIN: Super Lead Loader - - -
    method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> - - - - - - - - - - - - - - - - - - - - -
    Cargar Leads de este archivo:
    ID De la Lista Override: (Solamente números or leave blank for values in the file)
    Disposición de archivo a utilizar:VICIDIAL Estándar    Disposición de encargo
            
    CHASQUE AQUÃ PARA IR AL CARGADOR DEL PLOMO DEL BASIC         DE NUEVO AL ADMIN
    CARGADOR ESTUPENDO DE LA LISTA-     VERSIÓN:     CONSTRUCCION:
    - - -document.forms[0].leadfile.disabled=true;document.forms[0].list_id_override.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - $total=0; $good=0; $bad=0; - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Procesando$delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - - if (strlen($list_id_override)>0) - { - # print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: El archivo no tiene el número requerido de los campos para procesarlo.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - print "
    ProcesandoExcel file... \n"; - if (strlen($list_id_override)>0) - { - print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    \n"; - } - # print "$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field"; - passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override"); - } else { - # copy($leadfile, "./vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    ProcesandoCSV file... \n"; - if (strlen($list_id_override)>0) - { - print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - } - print ""; - } - -if ($leadfile && filesize($LF_path)<=8388608) { - $total=0; $good=0; $bad=0; - if ($file_layout=="standard") { - - print ""; - flush(); - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Procesando$delim_name-delimited file... ($tab_count|$pipe_count)\n"; - if (strlen($list_id_override)>0) - { - print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: El archivo no tiene el número requerido de los campos para procesarlo.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    ProcesandoCSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } - print ""; - - } else { - print "
    "; - flush(); - print "\r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - - $rslt=mysql_query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1", $link); - - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Procesando$delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    ProcesandoCSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    ID DE LA LISTA OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - $total=0; $good=0; $bad=0; - $row=fgetcsv($file, 1000, ","); - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print "
    VICIDIAL ColumnaDatos del archivo
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
            
    \r\n"; - # } - print ""; - } -} else if (filesize($leadfile)>8388608) { - print "
    ERROR: El archivo excede el límite 8MB.
    "; -} -?> - - - - - - - - - 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### MEXICO ### -if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### AUSTRALIA ### -if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### ALL OTHER COUNTRY CODES ### -if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - -### Find out if DST to raise the gmt offset ### -$AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); -$AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - -$AC_processed=0; -if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # tiempo local calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # tiempo local calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } -if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - -return $gmt_offset; -} \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/project_auth_entries.txt b/agc_2-X/trunk/LANG_admin/vicidial_es/project_auth_entries.txt deleted file mode 100644 index 6269ce8e..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/project_auth_entries.txt +++ /dev/null @@ -1,170 +0,0 @@ -VICIDIAL|GOOD|Thu, 22 Sep 2005 17:42:04 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Thu, 22 Sep 2005 17:42:10 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Thu, 22 Sep 2005 18:35:53 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 11:28:16 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 11:32:26 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 11:32:28 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 12:39:09 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 12:52:43 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 12:52:45 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 14:33:18 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 14:33:20 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 16:31:02 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 16:31:09 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 16:31:11 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 16:31:13 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 16:31:15 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Fri, 23 Sep 2005 16:31:16 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:05:06 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:05:10 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:05:12 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:05:16 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:06 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:10 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:15 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:19 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:22 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:32 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:34 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:38 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:41 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:47 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:06:55 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:07:22 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:07:23 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:07:26 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:07:36 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:20:02 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:20:13 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:20:21 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:20:24 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 12:20:26 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 13:04:03 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -LIST_LOAD|GOOD|Mon, 26 Sep 2005 13:04:19 -0400|lead|load|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|| -VICIDIAL|GOOD|Mon, 26 Sep 2005 13:14:49 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 13:14:53 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -LIST_LOAD|GOOD|Mon, 26 Sep 2005 13:15:08 -0400|lead|load|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|| -VICIDIAL|GOOD|Mon, 26 Sep 2005 13:56:12 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 13:56:15 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VD_CLOSER|GOOD|Mon, 26 Sep 2005 13:56:28 -0400|over|ride|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|| -VICIDIAL|GOOD|Mon, 26 Sep 2005 16:17:15 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:01 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:04 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:05 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:07 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:13 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:20 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:29 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:34 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:37 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:39 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:41 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:47 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Mon, 26 Sep 2005 17:31:53 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:47:44 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:47:46 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:47:48 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:47:50 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:47:53 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Wed, 28 Sep 2005 17:47:54 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 30 Sep 2005 15:48:44 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 30 Sep 2005 15:48:46 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 30 Sep 2005 15:48:48 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 30 Sep 2005 15:48:52 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 30 Sep 2005 15:59:10 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:09:19 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:09:36 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:09:36 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:09:53 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:11:06 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:13 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:40 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:41 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:41 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:42 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:42 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:44 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:46 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:47 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:47 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:50 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:52 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:54 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:54 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -LIST_LOAD|GOOD|Thu, 06 Oct 2005 10:12:55 -0400|lead|load|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:58 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:12:59 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:00 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:00 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:02 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:04 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:04 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:06 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:06 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:09 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:52 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:13:59 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:26:16 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:26:17 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 06 Oct 2005 10:26:19 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 07 Oct 2005 10:09:58 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 07 Oct 2005 10:10:01 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 07 Oct 2005 10:10:05 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 07 Oct 2005 10:10:07 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 07 Oct 2005 10:10:12 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 07 Oct 2005 10:10:39 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Fri, 07 Oct 2005 10:36:07 -0400|444|444|10.10.10.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 10 Nov 2005 15:02:07 -0500|444|444|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 10 Nov 2005 15:02:19 -0500|444|444|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 10 Nov 2005 15:02:23 -0500|444|444|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 10 Nov 2005 15:02:29 -0500|444|444|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 10 Nov 2005 15:02:34 -0500|444|444|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Thu, 10 Nov 2005 15:03:08 -0500|444|444|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|Manager| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:02:45 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Tue, 22 Nov 2005 15:29:13 -0500|6666|sales|10.10.6.1|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|test user| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:05:59 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:06:07 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:06:10 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:06:33 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:06:38 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 22 Dec 2005 17:09:05 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Fri, 23 Dec 2005 14:39:34 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:10 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:13 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 19 Jan 2006 15:38:14 -0500|123456|bob5|10.10.6.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 03 Mar 2006 16:14:23 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 03 Mar 2006 16:14:38 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 03 Mar 2006 16:14:55 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 17 Mar 2006 14:22:24 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 17 Mar 2006 14:22:27 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 17 Mar 2006 14:22:29 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 17 Mar 2006 14:59:52 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 17 Mar 2006 14:59:53 -0500|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:03:08 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:34:00 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 17:34:03 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 18:00:32 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:09:43 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:12:38 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:13:31 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:13:43 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:13:50 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:13:53 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:13:55 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:13:57 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:14:01 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:08 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 22:18:12 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Thu, 27 Apr 2006 23:40:33 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:33:41 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:33:43 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:33:47 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:33:49 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:34:07 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:34:20 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:34:24 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:34:26 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:34:38 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:34:46 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:34:50 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| -VICIDIAL|GOOD|Fri, 28 Apr 2006 11:35:52 -0400|123456|bob5|10.10.8.19|Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7|1 - MATT admin| diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/remote_dispo.php b/agc_2-X/trunk/LANG_admin/vicidial_es/remote_dispo.php deleted file mode 100644 index 79c582c2..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/remote_dispo.php +++ /dev/null @@ -1,327 +0,0 @@ - LICENSE: GPLv2 -### -# this is the remote agent disposition screen for calls sent to remote agents. This allows the remote agent to modify customer information and disposition the call - -# CHANGES -# -# 60619-1626 - Added variable filtering to eliminate SQL injection attack threat -# - - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - -$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 > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -REMOTE VICIDIAL: Disposición De la Llamada -\n"; -?> - - -
    - -"; - -if ($end_call > 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="UPDATE vicidial_closer_log set end_epoch='$STARTtime', length_in_sec='" . mysql_real_escape_string($call_length) . "', status='" . mysql_real_escape_string($status) . "', user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by start_epoch desc limit 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "',user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "La llamada ha sido dispositioned       $NOW_TIME\n

    \n"; - - echo "
    \n"; - -} -else -{ - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Información de la llamada: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     ID De la Campaña: $campaign_id
    Fronter: $tsr     ID De la Lista: $list_id
    Nombre:   \n"; - echo " Apellidos:
    Dirección 1 :
    Dirección 2 :
    Dirección 3 :
    Ciudad :
    Estado:   \n"; - echo " Código Postal:
    Provincia:
    País :
    Alt Phone :
    Email :
    Seguridad:
    Comentarios :
    Disposición:
    \n"; - echo "


    \n"; - - } - else - { - echo "las operaciones de búsqueda del plomo FALLARON para el lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/server_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_es/server_stats.php deleted file mode 100644 index 6192c6d5..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/server_stats.php +++ /dev/null @@ -1,96 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1037 - Added Link back to Admin section -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select * from servers;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$servers_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $servers_to_print) - { - $row=mysql_fetch_row($rslt); - $server_id[$i] = $row[0]; - $server_description[$i] = $row[1]; - $server_ip[$i] = $row[2]; - $active[$i] = $row[3]; - $i++; - } -?> - - - - - -VICIDIAL: ESTADÃSTICAS DEL SERVIDOR and Reports -VICIDIAL: ESTADÃSTICAS DEL SERVIDOR and Reports                           -DE NUEVO AL ADMIN

    - - -
    
    -
    - $o)
    -	{
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	$o++;
    -	}
    -
    -?>
    -
    SERVERDESCRIPCIÓNIP ADDRESSACTIVOVDAD timeVDcall timePARK timeCLOSER/INBOUND time
    $server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINKLINK
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/user_stats.php b/agc_2-X/trunk/LANG_admin/vicidial_es/user_stats.php deleted file mode 100644 index 04d67509..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/user_stats.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1743 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: User Stats -\n"; -?> - - -
    - - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Stats for  
      \n"; - -echo "
    \n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_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' group by status order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - -echo "
    \n"; - -echo "TIEMPO Y ESTADO DE CONVERSACIÓN:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from vicidial_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'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - -echo "\n"; -echo "
    ESTADOCUENTAHORAS:MINUTOS
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    LLAMADAS TOTALES $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "TIEMPO LOGIN/LOGOUT:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT event,event_epoch,event_date,campaign_id from vicidial_user_log where user='" . mysql_real_escape_string($user) . "' and event_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("LOGIN", $row[0])) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if (ereg("LOGIN", $row[0])) - { - $event_start_seconds = $row[1]; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - if (ereg("LOGOUT", $row[0])) - { - if ($event_start_seconds) - { - $event_stop_seconds = $row[1]; - $event_seconds = ($event_stop_seconds - $event_start_seconds); - $total_login_time = ($total_login_time + $event_seconds); - $event_hours = ($event_seconds / 3600); - $event_hours = round($event_hours, 2); - $event_hours_int = intval("$event_hours"); - $event_minutes = ($event_hours - $event_hours_int); - $event_minutes = ($event_minutes * 60); - $event_minutes_int = round($event_minutes, 0); - if ($event_minutes_int < 10) {$event_minutes_int = "0$event_minutes_int";} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - $event_start_seconds=''; - $event_stop_seconds=''; - } - else - { - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - } - - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - -$total_login_hours = ($total_login_time / 3600); -$total_login_hours = round($total_login_hours, 2); -$total_login_hours_int = intval("$total_login_hours"); -$total_login_minutes = ($total_login_hours - $total_login_hours_int); -$total_login_minutes = ($total_login_minutes * 60); -$total_login_minutes_int = round($total_login_minutes, 0); -if ($total_login_minutes_int < 10) {$total_login_minutes_int = "0$total_login_minutes_int";} - -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "
    EVENTO FECHA CAMPAÑAHORAS:MINUTOS
    $row[0] $row[2] $row[3]
    $row[0] $row[2] $row[3] $event_hours_int:$event_minutes_int
    $row[0] $row[2] $row[3]
    TOTAL $total_login_hours_int:$total_login_minutes_int
    \n"; - - -echo "

    \n"; - -echo "
    \n"; - -echo "ÚLTIMAS 50 LLAMADAS:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where user='" . mysql_real_escape_string($user) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS PHONE CAMPAÑA LIST LEAD
    $row[4] $row[7] $row[8] $row[10] $row[3] $row[2] $row[1]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/user_status.php b/agc_2-X/trunk/LANG_admin/vicidial_es/user_status.php deleted file mode 100644 index 477db530..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/user_status.php +++ /dev/null @@ -1,238 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1738 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,change_agent_campaign from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $change_agent_campaign=$row[1]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $agents_to_print = mysql_num_rows($rslt); - $i=0; - while ($i < $agents_to_print) - { - $row=mysql_fetch_row($rslt); - $Aserver_ip = $row[2]; - $Asession_id = $row[3]; - $Aextension = $row[4]; - $Astatus = $row[5]; - $Acampaign = $row[7]; - $Alast_call = $row[14]; - $Acl_campaigns = $row[15]; - $i++; - } - - } - -$stmt="select * from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - - - -?> - - -VICIDIAL ADMIN: User Status -\n"; -?> - - -
    -
    - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Status for  
      \n"; - -if ($stage == "live_campaign_change") -{ - $stmt="UPDATE vicidial_live_agents set campaign_id='" . mysql_real_escape_string($group) . "' where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name changed to $group campaign
    \n"; - - exit; -} - -if ($stage == "log_agent_out") -{ - $stmt="DELETE from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name has been emergency logged out, make sure they close their web browser
    \n"; - - exit; -} - -if ($agents_to_print > 0) -{ - echo "
    ";
    -	echo "Agent Logged in at server:  $Aserver_ip\n";
    -	echo "               in session:  $Asession_id\n";
    -	echo "               from phone:  $Aextension\n";
    -	echo "Agent is in campaign:       $Acampaign\n";
    -	echo "              status:       $Astatus\n";
    -	echo " hungup last call at:       $Alast_call\n";
    -	echo "       Closer groups:       $Acl_campaigns\n\n";
    -
    -	echo "
    "; - - - if ($change_agent_campaign > 0) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "Current Campaña: \n"; - echo "
    \n"; - - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - } -} - -else -{ - echo "Agent is not logged in\n
    "; - -} - - -echo "           $user - $full_name - \n"; - -echo "VICIDIAL Time Sheet\n"; - -echo "
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - -echo "|$stage|$group|"; - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_admin/vicidial_es/vdremote.php b/agc_2-X/trunk/LANG_admin/vicidial_es/vdremote.php deleted file mode 100644 index b0eef2f5..00000000 --- a/agc_2-X/trunk/LANG_admin/vicidial_es/vdremote.php +++ /dev/null @@ -1,602 +0,0 @@ - LICENSE: GPLv2 -# -# Changes -# 50307-1721 - First version -# 51123-1502 - removed requirement of PHP Globals=on -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1603 - Added variable filtering to eliminate SQL injection attack threat -# -# make sure you have added a user to the vicidial_users MySQL table with at least user_level 4 to access this page the first time - -$version = '1.1.12'; -$build = '60619-1603'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} - elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} - -if (!isset($force_logout)) {$force_logout = 0;} - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Usted ahora ha salido. Gracias\n"; - exit; -} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -$popup_page = './closer_popup.php'; -$STARTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - - $stmt="SELECT count(*) from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $authx=$row[0]; - - if($authx>0) - { - $stmt="SELECT remote_agent_id,server_ip,number_of_lines from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id=$row[0]; - $server_ip=$row[1]; - if (!$number_of_lines) {$number_of_lines=$row[2];} - - fwrite ($fp, "VDremote|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - echo "This remote agent does not exist: |$PHP_AUTH_USER|\n"; - exit; - } - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -if ($ADD==61111) - { - echo"\n"; - } -echo "\n"; -?> - -VICIDIAL, AGENTES REMOTOS: $LOGfullname - $PHP_AUTH_USER "; - -if (!$ADD) {$ADD="31111";} -if ($ADD==31111) {echo "Modificar Agentes Remotos";} -if ($ADD==41111) {echo "Modificar Agentes Remotos";} -if ($ADD==61111) {echo "Remote Agent Status";} -if ($ADD==71111) {echo "Remote Agent Closer Stats";} - - -if (strlen($ADD)>4) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "2) {$groups_value .= " -";} - } - -?> - - - -
    -
    - - - -
      VICIDIAL, AGENTES REMOTOS:   Salir  
      MODIFICAR | ">ESTADO | ">ESTADÃSTICAS DE ENTRADA
    -"; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFICAR UNA ENTRADA DE LOS AGENTES REMOTOS: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Comienzo Del ID del usuario: $user_start
    Número de líneas: (Solamente números)
    IP Del Servidor: $row[3]
    Extensión Externa: (number dialed to reach agents [i.e. 913125551212])
    Estado:
    Campaña: $campaign_id
    Grupos De entrada: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "NOTA: Puede tomar hasta 30 segundos para los cambios sometidos en esta pantalla para ir viva\n"; - -} - - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($number_of_lines) < 1) or (strlen($conf_exten) < 2) ) - {echo "
    AGENTES ALEJADOS NO MODIFICADOS - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - $stmt="UPDATE vicidial_remote_agents set number_of_lines='" . mysql_real_escape_string($number_of_lines) . "', conf_exten='" . mysql_real_escape_string($conf_exten) . "', status='" . mysql_real_escape_string($status) . "', closer_campaigns='" . mysql_real_escape_string($groups_value) . "' where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - -# echo "$stmt\n"; - echo "
    LOS AGENTES ALEJADOS SE MODIFICARON\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY AGENTES REMOTOS ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - - } - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFICAR UNA ENTRADA DE LOS AGENTES REMOTOS: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Comienzo Del ID del usuario: $user_start
    Número de líneas: (Solamente números)
    IP Del Servidor: $row[3]
    Extensión Externa: (number dialed to reach agents [i.e. 913125551212])
    Estado:
    Campaña: $campaign_id
    Grupos De entrada: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "NOTA: Puede tomar hasta 30 segundos para los cambios sometidos en esta pantalla para ir viva\n"; - -} - - - - -###################### -# ADD=61111 status of remote agent in the system and active calls and queue -###################### - -if ($ADD==61111) -{ - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    ERROR AGENTES REMOTOS – Por favor, vuelva atrás y compruebe los datos que introdujo\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'" . mysql_real_escape_string($nextuser) . "',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - echo "VICIDIAL: Remote Agent Time On Calls $NOW_TIME\n\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo "| STATION | USER | LEADID | CHANNEL | STATUS | START TIME | MINUTES |\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select extension,user,lead_id,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' and user IN($users_list) order by extension;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $leadlink=0; - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[3]=''; - $row[5]='- ESPERANDO -'; - $row[6]=$row[7]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $leadid = sprintf("%-12s", $row[2]); - if ($row[2] > 0) - { - $leadidLINK=$row[2]; - $leadlink++; - if ( eregi("QUEUE",$row[4]) ) {$row[6]=$STARTtime;} - $leadid = "$leadid"; - } - $channel = sprintf("%-10s", $row[3]); - $cc=0; - while ( (strlen($channel) > 10) and ($cc < 100) ) - { - $channel = eregi_replace(".$","",$channel); - $cc++; - if (strlen($channel) <= 10) {$cc=101;} - } - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = ($STARTtime - $row[6]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} - if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$extension$EG | $G$user$EG | $G$leadid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo " $i agentes identificados en el servidor $server_ip\n\n"; - - echo " - Llamadas de 5 minutos o más\n"; - echo " - Sobre 10 minutos en llamada\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "*********************************AGENTES SIN LLAMADAS*********************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - -###################### -# ADD=71111 stats for remote agents from closer logs(vicidial_closer_log) -###################### - -if ($ADD==71111) -{ - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n\n"; - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    ERROR AGENTES REMOTOS – Por favor, vuelva atrás y compruebe los datos que introdujo\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'$nextuser',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - $stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list);"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $in_calls = $row[0]; - $in_time = $row[1]; - $in_time_M = ($in_time / 60); - $in_time_M = round($in_time_M, 2); - $in_time_M_int = intval("$in_time_M"); - $in_time_SEC = ($in_time_M - $in_time_M_int); - $in_time_SEC = ($in_time_SEC * 60); - $in_time_SEC = round($in_time_SEC, 0); - if ($in_time_SEC < 10) {$in_time_SEC = "0$in_time_SEC";} - $in_time_MS = "$in_time_M_int:$in_time_SEC"; - $in_time_MS = sprintf("%7s", $in_time_MS); - - echo "VICIDIAL: Stats de entrada del agente alejado $NOW_TIME\n\n"; - echo "\n"; - echo "Llamadas totales tomadas $query_date: $in_calls\n"; - echo "Tiempo total de conversación$query_date: $in_time_MS (minutes:seconds)\n"; - echo "\n"; - echo "\n"; - echo "Lista la llamada para $query_date:\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - echo "| USER | LEADID | GROUP | PHONE NUM | STATUS | CALL TIME | MINUTES |\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select user,lead_id,campaign_id,phone_number,status,call_date,length_in_sec from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list) order by call_date;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - $user = sprintf("%-8s", $row[0]); - $leadid = sprintf("%-10s", $row[1]); - $group = sprintf("%-14s", $row[2]); - $phone = sprintf("%-10s", $row[3]); - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = $row[6]; - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - # if ($call_time_M_int >= 5) {$G=''; $EG='';} - # if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$user$EG | $G$leadid$EG | $G$group$EG | $G$phone$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - # echo " $i agentes identificados en el servidor $server_ip\n\n"; - - # echo " - Llamadas de 5 minutos o más\n"; - # echo " - Sobre 10 minutos en llamada\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "*********************************NINGUNA LLAMADA PARA HOY*******************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nScript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc/active_list_refresh.php deleted file mode 100644 index dd977642..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "List Display: "; -if ($ADD==1) {echo "Live Extensions";} -if ($ADD==2) {echo "Busy Extensions";} -if ($ADD==3) {echo "Outside Lines";} -if ($ADD==4) {echo "Local Extensions";} -if ($ADD==5) {echo "Conferences";} -if ($ADD==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc/astguiclient.php deleted file mode 100644 index 6d39bae8..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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: Login\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login
     
    User Login:
    User Password:
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone Login
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Phone Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Phone Login
     
    Sorry, your phone login and password are not active in this system, please try again:
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -LOGOUT
    \n"; ?> -
    Main PanelActive Lines PanelConferences PanelCheck VoicemailLive Call
    -
    - - -

    Logout
    -
    - - -
    TRUNK HANGUP

    - Active Trunks Menu
    - Hangup Trunk   |   - Hijack Trunk   |   - Listen Trunk   |   - Refresh   |   - Back to Main Window -
    -
    - - -
    LOCAL HANGUP

    - Active Local Menu
    - Hangup Local   |   - Hijack Local   |   - Listen Local   |   - Refresh   |   - Back to Main Window -
    -
    - - - - - - - -
    LIVE CALL TRANSFER
    Channel to be transferred: Channel
    Extensions:
    Extensions Menu
    -
    - Send to selected extension

    - Send to selected vmail box

    - Send to this number:


    - Refresh


    - Back to Main Window

    -
    Conferences:
    (click on a number below to send to a conference)
    Send my channel too
    Conferences Menu
    -
    - - - - - -
    LOCAL Extensions Dial
    Phone calling from: Channel
    Extensions:
    Extensions Menu
    -
    - Call selected extension

    - Call selected vmail box

    - Refresh


    - Back to Main Window

    -
    -
    - - -
    PARKED CALLS:
    - Back to Main Window

    -
    -
    - - - - - - - - - - - - - - - -
      -
    VOICEMAIL     NEW:     OLD:             MANUAL DIAL       DIAL
    PARKED CALLS: 0                LOCAL DIAL EXTENSIONS
    OUTBOUND CALLS:
    INBOUND CALLS:
    astGUIclient web-client VERSION: BUILD:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    FAVORITES       edit
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    FAVORITES

     
    SUBMIT FAVORITES CHANGES - requires logout
    BACK TO MAIN WINDOW - ignore changes made
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSE | START     Refresh rate: 1000 ms Faster | Slower

    -
    Initializing..
    -
    Active Extensions
    -REFRESH | -ORDER | -
    Outside Lines
    -REFRESH | -ORDER | -
    Local Extensions
    -REFRESH | -ORDER | -
    - Data Goes Here

    -
    - Data Goes Here

    Trunk Action -
    - Data Goes Here

    Local Action -
    -
    - - - - -
    - - -Conferences List - - - -
    -Click on a conference room number on the left for info on that conference -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc/calendar.php b/agc_2-X/trunk/LANG_agc/agc/calendar.php deleted file mode 100644 index e4068019..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/calendar.php +++ /dev/null @@ -1,125 +0,0 @@ -"; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; - -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -echo "$CCAL_OUT\n"; - diff --git a/agc_2-X/trunk/LANG_agc/agc/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc/call_log_display.php deleted file mode 100644 index 4abec74d..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Call Log Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc/conf_exten_check.php deleted file mode 100644 index 1f93e8ec..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Conf Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ChannelA[$counter] ~"; - # echo "$ChannelA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid or Exten $exten is not valid\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conference $conf_exten has been registered to $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc/fix-dispo-list.patch b/agc_2-X/trunk/LANG_agc/agc/fix-dispo-list.patch deleted file mode 100644 index f3cca9ef..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/fix-dispo-list.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- /usr/src/astguiclient_snapshot_2006-04-10/VICIDIAL_web/admin.php 2006-02-27 15:58:50.000000000 -0800 -+++ /var/www/html/vicidial/admin.php 2006-04-10 23:12:19.000000000 -0700 -@@ -3320,15 +3320,38 @@ - $o=0; - while ($statuses_to_print > $o) - { -- $rowx=mysql_fetch_row($rsltx); -- $leads_in_list = ($leads_in_list + $rowx[2]); -+ $rowx=mysql_fetch_row($rsltx); -+ -+ $lead_list['count'] = ($lead_list['count'] + $rowx[2]); -+ if ($rowx[1] == 'N') -+ { -+ $since_reset = 'N'; -+ $since_resetX = 'Y'; -+ } -+ else -+ { -+ $since_reset = 'Y'; -+ $since_resetX = 'N'; -+ } -+ $lead_list[$since_reset][$rowx[0]] = $rowx[2]; -+ $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); -+ #If opposite side is not set, it may not in the future so give it a value of zero -+ if (!isset($lead_list[$since_resetX][$rowx[0]])) -+ { -+ $lead_list[$since_resetX][$rowx[0]]=0; -+ } -+ $o++; -+ } - -+ $o=0; -+ while (list($dispo,) = each($lead_list[$since_reset])) -+ { - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - -- if ($rowx[0] == 'CBHOLD') -+ if ($dispo == 'CBHOLD') - { - $CLB=""; - $CLE=""; -@@ -3338,24 +3361,12 @@ - $CLB=''; - $CLE=''; - } -- -- if ($rowx[1] == 'N') -- { -- $leads_in_list_N = ($leads_in_list_N + $rowx[2]); -- echo "
    $CLB$rowx[0]$CLE $rowx[2]
    $CLB$rowx[0]$CLE$rowx[2]
    $CLB$dispo$CLE".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
    SUBTOTALS$leads_in_list_Y$leads_in_list_N
    TOTAL$leads_in_list
    SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; - diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK.gif deleted file mode 100644 index 30703a781b7c0372eb9970cc001f1d8f0c5afba1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2627 zcmb`|dpr{g8^G~tqm7+%G8&ncgSL(eNulWCmRwSjQ)n)Qj@&kkp=}IfvY7k*Hfzdt z$EJ~6q+ANQU&7o*Zi&+6_3HFF?>V3M^Zxlhe?5Obe|$f`$M}NLNo_|qKmqU!2`Db^ z?R``g7x%o3{(Qb~xaEFEkR6?F=RPs?4v*)j`||AU=mRaIR#u)X!WBL~%G1jB)B0v} z&1iE;A3L(i)8<}#8Z$4rwkGFQrCX4jTcwkgXH#)6!>w}b&pEIqVPR-}<^0)8h8joI zfFb|@;J_wGR0DtnsBZ6o?`Hr+x5f|NcX7{hW0!a=JoQ$6g}eI}U$Pv$yj7p$ZK5g{ z*E$8M_t43H&BB>JzFs=uVM7OtbH>Z?W=F7l$GieNJoyh@H7}hh9bW!a6Z&fT%NCJz z4RQezEe<=SHLl6Srk`1e9}?hNK5tA_iOoCVNl^`){en?xj}H{(2!uqz|hE) z0ssOYgwl2mQ^yqYSEj+4fWc8=#pAVWC7EI&3InpLS37M^?iPS`%rqAz(LsygtS?C> z^17gxY8tEf-9(U2f$!G0;q|y2kjTN+@()DQf|k@hbi|tt!+j^oACyqY5P&bsd+E`pYl;02LrjX*emjI`3sHFjDtVX zEN|Yl9GHvk0VJ#F1{xL~J6IBR*G#02pPa8-Bso7P`^e_2GIfNea?%1(AH2Xj;B8LXq<}k^WuX-u3$F1`Mae zGJ~2T9x5nPzIx508kcuTMkd_RLC?0*Y#}ql|MNNUpPXUeIqw080;mAk zch39&!TBf?3isINyijqri@(j;dOf&~!JOoIgG-EC$YaKnO`>B!s7? zJA0eJ@UTd~IG~>t#y^$gN2{&kiSOb&HCG~`O`Kig2r0ji*2uWmoa)FL9!5Meh2K}? zSZZJX#4q1(*HATr&*jA@_bseQLFYT2`g*(ipuiPnf=mZOCkT`Pna7$WWcnw)Qv(A_ za^SwcI_B?)j>KblrZYXN2x8WD2l-A8=XsF4_dL?7V7AQp9HK7IX_M|;8heY{qVDQ#KM)q;swGE@bG^J4Qh&N;knDJV1LSi2 z#!ikZft35rW?g&MLbOV%QrGO+#ZXe4s!{OX5({$Owa;zWKd<%Es?lAu5$#aMde2u3 zVMg!US3taoJrN}1HckRKeP}lL6{@+I|L$bzI?VffC)f`N0 z>t{##B~U3iks2MOC>wXv!&uZy6v-?KXNuS{L0LsbC52_khe*Hjn?(sl zyE)7oBFw6?q`G1dzmn@+CS(6NrYXnc`XhEDv$S2ds}e^jQhdoS^P=_)YO>0@{}>(M z4|2m~Uo@>1FY)_J=HJ{kTAhe=ZR7eNUH)KCT^v>22pN4O!wQJSaF!iWKA*5J(6?z{0jO zM05)vn3rv6S@zsZ14dt) zd`i@b$6^^Xv$JKnf<(Q*;9vcb5lx75J%mGcDoN J{p~X8{u>&T{`3F< diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_e.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_e.gif deleted file mode 100644 index 600cef8995d2783ac2eee7fbb1928ba1f98ca006..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 780 zcmV+n1M~bxNk%w1VX6Qg0J8u9>D1N1iHggcoV$I0hFV*kVq?&yrhQjfwsUpXu(6L_ zUdEAM)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH})(hUFe-fsslWFUI- zkS??8lI#Plog^f{XrNc6S8jhkWtc~n3tISyedEYitkSu0gGu;TRc293%K{(9DCib| zk;Dq0swPevW63y$Wek~=+1#LYq2auk*k~`mo}Ky>Y&5g6qMQU~P70e7D?t>fnhyDT z83IhTWn(@Ktm5j_bRjvcrBebcdRtR>UZ|E{W{xS-J`k{0fK=-exKA6jd7jMZkhfpn z-raT9kkA7o2d#W)Ed-l`IlwQ?4{GWq5o43Nb#2`QOh%*>7||fq9K#rL~=%I)vs_3GOHtOi3kVY!$ Kq?CRT0RTI6+hm;p diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_es.gif deleted file mode 100644 index 600cef8995d2783ac2eee7fbb1928ba1f98ca006..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 780 zcmV+n1M~bxNk%w1VX6Qg0J8u9>D1N1iHggcoV$I0hFV*kVq?&yrhQjfwsUpXu(6L_ zUdEAM)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH})(hUFe-fsslWFUI- zkS??8lI#Plog^f{XrNc6S8jhkWtc~n3tISyedEYitkSu0gGu;TRc293%K{(9DCib| zk;Dq0swPevW63y$Wek~=+1#LYq2auk*k~`mo}Ky>Y&5g6qMQU~P70e7D?t>fnhyDT z83IhTWn(@Ktm5j_bRjvcrBebcdRtR>UZ|E{W{xS-J`k{0fK=-exKA6jd7jMZkhfpn z-raT9kkA7o2d#W)Ed-l`IlwQ?4{GWq5o43Nb#2`QOh%*>7||fq9K#rL~=%I)vs_3GOHtOi3kVY!$ Kq?CRT0RTI6+hm;p diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_BLINK_ptbr.gif deleted file mode 100644 index 3670af28aa0d98d290db1bb982da788bc3ded829..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 886 zcmZ?wbhEHb>|_vOxXQqAYT}fhgrp;F9cO3EK2THt@$r*i-@e`7xBuIlx7Sv$eS7QH zrA13l_D_6r{KS&1oEH}^o|`qNBR-)lJfb-!?qFlf{EV!I=-B{ta_YGa8>gkDot-i3_LgmhpR zZ2JHI|L)>42C{(SPZqE~9S{lf69e0Shl^PrI#T^7mK2@Lv6_G3`61?$F6(csDccDuo=Fw*EFtMAD zacT}j^Q2j`=ggfqYs$2y`Ae2ATRwSeBZG`4bBm@X%f>BC%v&^@x3Ay9sk^adv*x}Q zo{j5uw{LAfbVT>qx|ZFCHf-8|pnb^N}Y#BSY%tEF}Lb(wTHbalRb z+5T0B?V*n5=dWDgou7#h9A)VOj-I9S2={WlX=Bnn*-$JZ$>#lWJM{K_BNYK|CTCEF`_Aar_eemAQi< zX|(~XWL`qUBHKAqqAFj%PLE&LFg03cg6Qo9dv0vzeR|K9duje^ma=VMrY9{o-fLQ{ zpOKz@plNO;b67}$OkS3c?xv^|x$OC?YmU}#l9k<-&A5=QW0lD<{@g!K?;f5$?!I3> zxLMPuz27=p@=|EVxzf~zw9w4yBJ~@WCNOa>YFHkjruFs8p@fYQUnUDzZ{TS;!1Q55 zs921Q)S(9*szOCd_Df@@hIFx9_{`g(^=`|8ZY8VDLEXD@mq^&khRop9@=#m(MESn# z&L@)tv}Q`ND$GfEIyE9~<d-Y;*sh5G10E0CEgM^Gd diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_OFF.gif deleted file mode 100644 index 5b7e4c758bd5acee9357c1baab87a4c0c4f7b44f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 919 zcmV;I18Dq5Nk%w1VX6Qg0K^{v=jZ8=kd(N%y{xRU$;r&~^YpQ?w%gm??d|UQ`T4iE zyw%m%!^6j%oT0L^x8dRAudlR^kCKOnikX?6jEs-Jzr%}*j>yQ&m6e&#&(giU!G(o~ z&CSrIrK|t{|NsC0A^8LW0018VEC2ui0IC2U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEns;rRFxUd}r$;QBu z+^>?y*uIgVigl%s3JD(X9tp%6?-`Kq0MPL8`R)7i`aEP9fZ*MONd@Audv}1~J`V^6 zbja{7m^*j?DL%9Z0A4_WkOu5y5DDMJij&a)iSj|pR6-Bj-XRERuY*Z?9st~;^)eq=#5NHO|y{;8v`T6*Yp~_AX)5dpVuPlB81IBLfVTX^@Ch zr^bA3t)gYBmaR;9<|57I=%GM|gnl6b7CZMVfwfMnO6$`pA#ge9^6*XglObe(2DUvCJcO+fs%S?7NBS)P( zFd!Dt?M-}EXDerZ+9V|c@34DlW&O4X*{!F`VtA{SV+09Pfz-Y#t#GlL(;Z*e!QIT> zGo?S@8p(bK{2v{F)icGolTbb#K;{AeF$x$2pML-n7l~sF0OweOqFMHygpiaqpD9wk zWRHGfRriil=(UDZL^uUD$x<*~^G*T)Tog-YA+}bVNsj%tonyTf@CsHWnY80~9e6kj za*$LA&jK=TwckTc?gM3VOO+N0P8veOz)SJyLY$NDTzO8GHED(a}Dej0&%qf|=42CTN~>Z`EED(kGY)@tjmxaK;m1QwhcgsQp*E9|hu7E3Iz t5d_h|s>U|!?6c6?DuDz_RBP=Nwb*8>?Y7)@>+QGThAZy4M)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH}<_V2CXU%BXZotyYrLA+6X`$Galz<85$YLV3QL|c!TGo<* ziro^*j49TbXG2b7-UyUMFCQK=yhPxF_%~=s7)V#%Wq5 z0RDk^@2;|lJV*{IfRMxDi;bWt2#qn?c*qut*ws)U z#|TnjkVF<)q>nB1aex9$HtFP(P(m3%08v(H<&{`wspXbjGRfR50Tdtr17wzI=9y@w zspgt&w&~`ZaK_1|03x~&=9qHkspp=2_Q@xmF^K8spoA7`Xq-AEs_3GOHtOi3kVY!$ Pq?A@_>7|%{5CH%?p}u%; diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_OFF_ptbr.gif deleted file mode 100644 index 3b1c464400dafdde5153aac50b724f54656043cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 880 zcmZ?wbhEHb>|_vOxXQqA_3G6rQ>I+FaN+FPvtPb^`ThI%vuDqK{P=PI{{4?1KiTO1ckkZ%_3O`^ zIkR!&#zl)3J%0T7^5x5O=g!@|dv`-a!~FU4A3b_>{rdIt^74ldAO8RU|K!P&4AcOM zKUu)W=zvI&pBUKwJ9KAy=t%XSSW|6xas-}>9{f9#pJZXwI1EGCWSme#iRj?S*`p5DIx30=JP4Gc{aXUv>6d(Mo> z^;y&AE?%;9*`z58#gtW=m6e&-Z(>r}q};T1?KTdL_01cV_cU{_U#qcobK8MK8b{VN z?>w+>!`^*u+om&f9As{0T7PKUzH`TRYRsQ1tInsvq|UCP{^`@!&+4rA)s;Vf=KS-P z^%rlFLVtsH^$!kC4vq8jTutgc-!6Us(9$HR&a-9q@&f{g7`dN6ls@pG#lHHJmYdBE z{#Xru#;vJOo~J$9$E^P9t+%JfQpW$a%p58&+9n_1bd<<{rt(F2TEHT~{#!1NpBx&Q z?+Uo2KKRJOwOFMtOT_!p+|Bdi*hQz#`VzCsfkn{5Vq?SoJ)NIM z3c=)iPW8RK(l(oQ;}VNSkLal6yErg*_RkEdOt`NwuZdG&-YcUC32dw?m$How8w2C2 zzux^NF4@W$At5Z#GW~by!du&uXWp?bWjHtWkK2QkwDPoE*4G&m0~$8J+kfrI?P+4E zQOe4aAH0Y;6+2c?`|RtrB|*B1F$GEbXPc0q50b!O+)Ypty^FBChPJ68B-gh;wR zV)#_DIkD41az;}7nI$cYawR3z&a(-06`h*kBKGq{*>s7OPbRrdGh^gXa?yM`B_u5K z>C}j{l~1R|l)Y4)Chx&;ibdQZ;LyyBWhe3O`4RMHn-;6 d%jfeOepN1Kk$fZhVqu5cDvddUEdneI)&MzUm68Ae diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_ON.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_ON.gif deleted file mode 100644 index ad55916d60f2ee323295232f3b9982245ca11034..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 919 zcmV;I18Dq5Nk%w1VX6Qg0K^{v*VpTah{Rc0h;nkcq@>a7>-Btmz2V{T!^7eA_4atT@p+OT*`E|ns;rRFxUd}r$;QBu z+^>?y*uIgVigl%s3JD(X9tp%6?-`Kq0MPL8`R)7i`aEP9aNym8Nd@AudxwDFJ`V>5 zbja{7m^*j?DL%9Z0A4_WkOu5?5DDMJij&a)iSj|pR6-Bj-W>>NuY*Z?9st~;^)e`pA#ge9^6*XglObe(2DUzv!cO+fs%S?7NBS)P( zI3O0#?M-}EXDerZ+9V|c@34DlW&O4X*{!F`VtA{S;{yp(fz-Y#t#GlL(;Z*e!QIT> zGo?S@8p(bK{2w8J)icGolTbb#K;{AeF$x$2pML-n7l~sF0OweOqFMHygpiaqpD9wk zWRHGfRriil=(UDZL^uUD$x<*~^G*T)Tog-YA+}bVNsj%tonyTf@CsHWnY80~9e6kj za*$LA&jK=TwckTc?gM3VOO+N0P8veuz)SJyLY$NDTzO8GHED(a}Dema4Cqf}bK2CTN~>Z`EED(kGY)@tjmxaK-*1QnbbgsQp*E9|hu7E3Iz t69mD)s>U|!?6c6?8bJg~RBP=Nwb*8>?Y7)@>+QGThAZy4VwNk%w1VX6Qg0J8u9)YR%(S%|N%*P5Elhlj&*a=3hay;W6xq@>YcV4hrD zk&uwbQBiKItJP>|v;Y79A^8LV00000EC2ui0IC2U000F4@X1N5y*TU5yZ>M)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH}3xM%BXZotyYBo68xBR0C57SU%!A&SVtk+geDLF92gVX(Ln`J!zSe72ucDU3Me0R zO6iiMN|O{a1~ZV8(z1mP8qVsYETo`j%7S4`Nv-7rQ!;T1z|_ka$Zb*C4Fhm>WFUI- zkS??8lI#Plog@grh@e-cS8jhkWtc~n3tISyedEYitkSu0gGu;TRc293%K{(9DCib| zk;Dq0swPevW63y$Wek~=+1#LYq2auk*k~`mo}Ky>Y&5g6qMQU~P70e7D?t>fnhyDT zSpiJ7Wn(@Ktm5j_bRjvcrBebcdRtR>UZ|E{W{xS-J{YiefK=-exKA6jd7jMZkhfpn z-raT9kkA7o2d#W)tpb~aIlwQ?4{GWq5o43Ob#2`QOh%*>7||fq9K#- diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_ON_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_check_voicemail_ON_ptbr.gif deleted file mode 100644 index ae53a393d4be0ee1922ea185cd90843830be8ab8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmZ?wbhEHb>|_vOxXQrL(Qza)vZJVI$HRvozJC2xQ?vK=>#sX^-noAL^^zqQ+u9Bt zKKw8tVcx7+XKHKrojv<3D5y9rtbX$3le1=>Eid045z!JKKeMQ4=ZY0qLPKklk`^vr ze6h84MNCY8aBx|E{)|K|No4P z%?uO(#h)x--8vu=*ZfR|6@96C6?&;{U%oRO=_&#Ti0&m)L!4bQEhKC*ZQ?Px9w;> zcv$=Bn&w>x*KOFhzwP7!&O=Pitm_YN+kgJ}F75eKm9_Y_S+&@-wLX2?`dN$RzLwg@ z&m4c=vi#zWQpj)6uKvLx%As-oK39_#&#z1016-MfwfMHozJ5T!iIMyHL*WAft@hQQ zwA^fV@W*PfGP0_iIC1{$ky^HpE4Qal3OMzj`4v45B*>9$oR|&{(t3Rat58 z&ZZ@dOl-T(+Uz>8xJ%UCpW&*-wVkvZ93D%q zrztfp-uvU#?yvrzx|lZ@C@FCGo4;||R(Ra#e7wP`nngZ%%k*!%tW6d@DAyK=j?w4Qk) zS!^s=a5Ln_P4n~B95WaWu`ghmG~Gz!?G~nl^#NCetJblk^f@rUTVXmaT0*SoLAxTK z(IUG=p`{_6OeZe$wyQl$Sy$1^_!Fhu#1H diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF.gif deleted file mode 100644 index 3752fb5ec4186f9563a250d45a9fb8e76187c5d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 541 zcmZ?wbhEHb%w>>cI3mFC@#Du^w{HFT@#FI4%YXj-xpwW^lP6EkpFjWq|NqyoUw{4j z^}&M&@7}$;d-v}1=g-faIRg}DAO$G?WMO1r5Ma;&X#&~F!1`Z7r7tCOUdF0*Ij{E> z=$tRfyrP{#Hr_vwUI8lJNk*U9{O_hs% zPLDEc7n^cpyUGfa*%Mpa`&lCznfs^ zeh$}qflhuV4vrgD0+V-4xZZgG=+n0R6y?+W+)A7bVbxO`dj&2mzhu)*r?o19pn*<6H4i*TVpB1T;)-Yvv zar_F25Y47W+cIXEhN8Ch$*XFgNN8AL8jk;TOz#U%bKjn0f(l5Q!VEw0}F zaamovNZ?=TrB<%2Q^j)_d{VFLEWE~E%Oq;R-6*2Me#2*P@0Rb%5ll;hG&yEmWI5uH zB{(UhMnZ>kW9v=T=7OzZ_xIVDob_>XSi47KfpfQ<@2)K`FRut*9d~xu*4NkloER9a E0ZDk_tpET3 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF_es.gif deleted file mode 100644 index 1ff376d80923153360849a7c35a2252adb5eb4fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 513 zcmV+c0{;C+Nk%w1VQl~&0J8u9@$vE6+S>T|`0MNI&(F`+*4Fj)_2lH_{QUgj;Nace z-R|!0)6>)E=jY7K%>V!YA^8LV00000EC2ui0Brys000F4@X1N5y*TU5yZ>M)j$~<` zXsWJk>%MR-&vb3yc&_h!@BhG+pwW;38i2>3A;1xv6Jl#P00A71YQs?sIFdIkSb}X` z16C{nu`L<^2n0ZIG)SoOCLl@I8-@!LOGp-C6lD)b4OI_x2ulJ(V}p~64roe5V;5Ig z2W<~tdkzI^aRgYUMP;B445(iZ2Uu8)6Na}A4-2#o2@hMPq_B3gv{eedXvVb}SFm1P zU(X8+Ujvt+To0_$I6ox!O&APSg*RW&Do=v;9?c2C*L;wIg Dj27oH diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_OFF_ptbr.gif deleted file mode 100644 index 86a7172371b28a1da5643a06ed43fcf97c86d89c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 459 zcmV;+0W|(cNk%w1VQ&Bn0J8u9+A0B z?$*}U@$vEJ=jY7K%>V!YA^8LV00000EC2ui0B-;b000F4@X1N5y*TU5yZ>M)j^w8_ zO(3Ccz@R~ZGS!=|4K4|@WXHV+Yr?uccnw+wNwcvSFUCoULNF^0ht@&cYG2w!LYtca zyj_PxD=BCftMJ&73v3nZtwHc`JKz<5a9Lg`bYlb$b_0EH6$f-v4_{D14g&xH19TGz z4h9Gf3ptc*51R`PDp{DCoMWj4c@Jl@sHzpWDwbtg4G0Df2x9=Jf4CC@!43p`UTRqc z3kL+8J`M*J&uRjHS;f)Q)j8D)!3dLT4A|YH4#mmd?{U4HZVA-_?cWqo3}=Zb(eOpa z+L1pG{-uG!Cd&agj0n=VCq2Wk)8z5Jp;pFB~1zf zAUP6MO~9G-;f0f1J5S_yS&&3no#j;g$OO9&oJxUk{Fhz&;o06UW8 B$_fAg diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON.gif deleted file mode 100644 index ed8ba2dd6e9d4cceed03fc567c6b3fbbb085561c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 793 zcmV+!1LpikNk%w1VQl~&0K^{vva+&SSy|rR-U+KJ@$vEc`ub&MWe{y6A|fK9qN0?P zlloUFB{3p$$!F00QW=3Q;5y)`Vk0Rdl~*h`Nh~jusTfBoL4! zFwe63nk_3LcpqD4d~P}g4gnpD9RUtg5{#0I2o?sDn2ZwwN&*&{7k819695yE7ZC&k zql^-qI}E3!3;>z8xRMo60<#?r8X66ZilCSm7`B)IJP#Kg86F-P9TyJ@i_#t)2htmi z4cZMG+T|J@1`7lbiy9o|8^ep?+6Rmp-iuY)(u)c_4iG?-Mh$@jb{(`Wdgno2HxC0k zkSizcTmS|EJK&?};oG8z(jvCY*C7Hzg&iRO02CN)S_gwC`wev2VSqGy6Eg%0HcSG6 z3X5`TWN5FZw09itku=F~TgsI)3m$AbvLnBw5<_O#O09ze0;lL<!S`I+5a{3Jesfy|s6v$iW>fQALO0!2&}y;u6G!a^?Y>9?oU$ zxS_Mh1c5b@#DrNV(yAUMRYq_@!UM=NB-2za^H<1ssV8cdq+mhVql^X&$k2cuM|+5A z-*vU%hU^VoiQAQAlVR7*I(H5WARs}|$s0W!07)_8Mh?->X^U>ppmUZSGf!tkUfyPk z)U08679O6_X~8^{RDbK)0+o_zM{=bwO{5CQ-@9+^tj diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON_es.gif deleted file mode 100644 index 041d398fa52f1f7c533744eab7a60320c32633d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 871 zcmV-t1DO0rNk%w1VQl~&0J8u97#kQ5Qx9)%ZwiMB*x1-cNJh7}x5&uI`T6FEN+ z0+*MU^78Wj{{8^}0RR90A^8LV00000EC2ui0Brys000F4@X1N5y*TU5yZ>M)j$~<` zXu36Q>#EYb%5w`pETZo`&yua4?nlW95k#EvXe${RjD&Pbg))Y&tTu?SPN6%O4qCkm z$y6yAxovbB-6&yBug|~Mync^P*zsdget&9xc64}pK5iIrf&>Q#29uPOk%(!Tnskwt z2X|?6lAechQr+Lg1`$iK$Y)yLh|)8E^l1PND+6tA(<1@rXv-G;Dj7^&;LR8Nh)8q&o{5Kc?CCegF;%Sw8)aXo~a1(ExIrC{# z#y|lWj!byKTEvZQGOp;fspGhi9q_&ODFFh&2?Rf`Z1ZVX$vAHUohg>=+SjyOYtBg* z=;wVZYU;`A6roza%zQN1akR&4)8rlEGQspuhX@J%)01oUBLpKOeQ2+?MR33#4y zjkyRHNj&oQp;G;chvbV3viMkoG0OK21JKwvPfazAR6v$)Npx417J<1XPf3OKrI}j- zuoGTt0%Xf4S12S$G!2ny=bd=wsVABJ$QY+fRf?0*poA7`=%I-AS=w_nJ~K)_kVY!$ zq?A^QO=$^L;K(4wY~$&tpn|%KE}?2es;TO*)Ql2wNKwkGu*NFuthClzMK0ctg&XSs_7C(H0$gXv(QE>?X+Pid&9NZW~=SC+&&Ni06S$%ui^jz diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_live_call_ON_ptbr.gif deleted file mode 100644 index c0601666192c90273ff44138e9417135ef69c137..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2750 zcmV;v3PJTpNk%w1VQl~t0QUd@NJvOxVq!i%J_4))ii(O#TS|t8h7_C>tgNhrgoKZe zk3m5}adB}R92^^x8v(olMMXugudifeWC2A1Awwaao}MvNF;-SqC5t6QL_~UedSGB+ zIyyRnf`S0<00II6OG`_foSX*I28f7=mX?+rM;ry>1;WC@3~~%qR8$cW5tNja(b3TW znE(q53t3rN2`dQ=l?|$@s=&a&1J46&Y-}8)95yyKXlQ6oPEIm*G60AG7L68uetsKp z8wJ1xT3T8Q#tVFWd@Cy}8$BBgwhRr(4Fd220~7;*fPh|JUQ$w0GBPqCARrP}5}BEq z1X%=TW@Z5+0VgLXYHDf)d<7$#BNbT{4uuW}O9vTl87Mg@0yP3HPc0u(A1Ej&=;-L? z=H~G5@Bq62^78V^%F6Na@!8qg<>lq=?d?rXP0r5Fd3kxw&CSWl$)u#Dsi~;}cmZ8q zUChkP?(Xi~+}ympy#D_F)z#GsfeMn6lIQ2=sHmvv>FEI70C;$KqN1Yj@9*T~j7{rmg-xVX4;b8~cbbfcrA?Ck8z%gguo_ot_)`uh5j zk&&gPrL?rP0Cxby#KgL~x^{MUv9YmkZf+lzAJ^B{*4EY?lpV9Pv-S1$rlzL1x3{68 zp?7z8a&mHvjEud#z2M;BprD`vc>>4B#{%C1-QC^%{QT6^)b#Z9xw*O1)6>$@(zdp? zZ*Om0TwJ@myO5BO+0(2#l^+4va0h5!Hu&}VczP<`h z3MgzS1iu6uUmFZi35S1`i+)7=9QKsSpvn5g~^m3t$Tfp$I==KM6buC21usU@a?NDL>m?1-v zjG2oR&4>v^r(;8j88K!Q(=m{lW}|?Onne+%u|*_o?Y6BU9r2v(gsg$jL5bmkK%Ja|BTI+N&Y*somc zl&xB4l^`^NR&`y4Ce18k(VwXxWT3t%DCOg@ZWm9EGmo7VYG%>n$NtCEdw-~*yeOpy*JG6M;vU7q^ z8A2zLCCjv?P-Ze|4B>GzLsM(s#W-RA8-Kc3F;U}6(XvBZmnK@PH6?RpYZatXv63p1 zlxC0{Q57g)KmrDgKtM0Oq@rLi3h1!{2_#&jMixL|IAOQ|hND#o9Yi=M15L$2hYWI!@xDA;2}(uiZr7PF|3@DLN)(H{7(!GToJJo4PX&*6C8^W zF~t>23=TLFU(rAVF+?l^$4yAA@)ytyp@qZ+bW+JA2vm@S95zHuLjz8@EOF5PV1dFv zM{rz1#6+MRaWxlc@CG5g%%Vsvft*3hE)rl6F*5^13_}(XXW;@f5xd|*I{zTjw%TMz z38^nQHvj{_<6fWR_+Fa{-r!GZ`RVF^a~#{=LOyxj@yAHn;@KdiBX zf9wExW5}Qeo%ewXw!jzv_{H`9k-guI;R7J_1Lyvsjzerf0xwv=0sip~5Q?yU?;9Z| zK46Uyt}u5Vq+2lmAi#hMWI`FU7@#d8(18>raDlgLAn!2oI|xdFcVY7b2ATH{Dsqr? zW2oRiau=~3n(zbE^FtiI2M-PaAO{Oz0^}Yb#@v0teJ9l62Ugg_8-h`c76^a>G?54~ zEP@W7xCH@t_74wyAR3L7f&-s7JP5|&fn3<#119Od2}Dn5*~1C|i z2ZGz?Kk^{|xT8fZ9V!UtJo7-#Y5*Yt5wOKD6fuf0v;hGI2ml6-5V0e8;S1r2SU9G@ zgNRWeVm=tc5N2qCZu}z%QwT;drVxaGbOUk+5UCHC<}wlZ;0y8iM=(UXg@|Eb0T~cL zJN|Kin9cMb6kzE|p%Jr)@qnp4)#((b08^Pp>>LCTMJjqg(Gr{3kKZwwhSmPDjabN;BKN3xTpaRs8EAW$QBu= zIK>};+gu^^;71+kK@T*bf#4zox69qccG>WU_OgMzY}mwb8IayTl$Q-X7=bf5(S}l? ziV|c911K^f3QJTV1QlS#BP?NwH#is&rbw_U9zhB?z+n<^fUqe5;ot|GV#9BkgoR1* z2v!^z!K~o0B}g#|KDfBWa6mu=B7gt{$iTuEw!|X<@rXB&!o_@;1dQPz13r-A4Le@& zk1fmx1aLwXb9j;@1fqy(G@}oLs6`owkqKhBq70FUL>b2H212;P70#K%8rCp}GL)H{ z5N;SVnF#^sGN_r&WpD+TyX=ZMM`8|hXoH{wy@qA5;Lyuh#+unIW;et+(1R9q8`j*0 zMmze?lU~E5ZE*%e+~-tOHi#I8fd)e;!w`Z9gQ{1J2D}I&)q4N~81@i`R^MgSwZ01) z!Vv3Ohd~g$FoYp^aqB(wTGqYp!!U#~j6OJ9*1m2vuc1xtXVY5R)28+?(m)1Da3&xC EJH5!D-v9sr diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_active_lines.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_active_lines.gif deleted file mode 100644 index 9f8eaf67dda1a9f7790905c84baa7002dceedefd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 886 zcmV-+1Bv`cNk%w1VT%AB0K^{v?)2)>;>P0b+t1;|(&NcDJTz^0XATby8y*^@vzxNQ zs9_z(X~=qPKlL)dxmuW{{BQuLHqst^7rr7=FR;5{NC%=-Rjod>eZH{j??7I z`TO?(007P4!vFvOA^8LW0018VEC2ui0E++~000I5;3tk`X`X1Ru59bRa4gSsZQppV z?>s$mz@TtQEER?)S$Uj7EjlKd22SU=)|T$E^h)4 zXz-u_SO*0jcxiCZfq}*b&lI@&hvtDRjK>`RXygS^pD%tdt(`OWN}$S>-Vk(fV2atT zL@ZRXG6#$ungqMji1er?UcP-gC8SwkPT7lH+Hfu<1JCf+$<4g^-NO_y{Uow;oTbSL_y*3z$9 z9Zy;;A?w zEkM$go<=Z{IA2EYsYv0Iym-*SHVj~7WHE2-X95OpB&ddCu%rXv8c9;Qq6Z^BHjO)P zTB(bhGt$_VJ3+crU>g{iV8H-x+_hFmN8N+KpM4%!XJBhM7o(lI;Atb80`VE7I_6;L z#sC)ZcnC=KiDK#;q#zb%2^pN~>Z^QYK*FG~)@th;ppMYvt-SUs<_E3zDy*%ticrC@ M$i7;E2q6FfJ5czjNB{r; diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_active_lines_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_active_lines_es.gif deleted file mode 100644 index bdefd01514c2e122ca1b6017d3b8deb994f4fc03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 704 zcmV;x0zdsnNk%w1VT%AB0J8u9GdM9!Q%L;%{L2xt zXVc`$`TO?(00960|IOgSA^8LV00000EC2ui0E++~000F4(8)=wy*TU5yZ>M)j$~<` zXsWI(DKKy>&vb3yc&_jKE{KA{Vn{3+kI1BQ$!t2G&cZJ=cv!F4tai)odcWYXI6M#; z#^|(q%^n*W7uV)KXyME92mOp2Gf`fZ+9&u<23WSV}4|pC`SPBgQTmTJ=j$Hu_ z4Q!N_eSaK*la*Wz0h?X~o~vOB1e&3Ph8u{dqFIWpU6h^#Vwjo_#eI+)lDb^Sw8vJ8 z(8j&I)tsuH)6!U&0kl`p*WA|A52P8U%v!Y%#ID*`@D0Mzp7+J`s$JThu=4k2xx4qN z7NvT|_H`miiy%TQw=m>d#|za!0sv%L#FUYv6<6Q?FnxO9PmwEg2NRC8!chSxVHzK^?_)Sb-&+WinGZm+^pAGDlU~QKH@4W?h@`pRoY&J_h^7C1M2x%`6sWsaLIB zhAJyfef%&SL4x*tUP-HX=}E@)L;}3$_X+|G0)!4#jJ9!2y!He>m>Lc6zAPdyyCqtU z^Dci~_o{s>dhC=62Y$_!*3hWyku`N%Y6ol)0NJo->(v^3s#Djy|~H;xXQpVZAl*=KkuePE0%1Y9Ter4kQv=MwQ>K&t<`NMn!4)Ja#Akd zj{pAsyY}qt!#B4sK05yC`}+%zj{f=k=jr?VAHKdh_wexFe}6AMK5^&O)i=A0B!4<<+IfC-1zx^8V}VM{n=keRb{gkB|3WU;ps!t+|a!Zh89UC#TLFdhq}M ze+CAIvkwjdN%DZ=PZqF79S{lf69e0Shp7b`cYLH)EGasfV>SQ6iW0B2Uec3!3r~ku zMm*S1;iEVE{EIDBXXC1O6k$kL1^kOF8GiHV@E9k^H}z(f9Mxp( znKh&A7E^_B!~5A@$vTk=AJWz^NHFU63K}FkEIjo;S0`iMuBip;Gg#L0DSQ=s5NE!O z?c$V<#S52&imhRqVX@H2@pOJnc!lkPqJx}a+F61TjtmS;Qw@)=VcmZ1^>r4r{IgSB z&&_BEV)PRU*ct4g!^|LbD|9g9-8# zMs8_d{VV)<;dUvlgv_3qFZNCNqkqq&qLz zx$+}hcd7fvQ0{yo*>s+|G?#>fVhVEty_kf*cJO)~PLP<>_U`SCd-ZB(*d9nsZ9Kx1 zn6Tu=nHsru0>awM6%r05$**EOB&PHtBS8sZO!a)JqImX>KsWJu^<+olG43zw6a@~#HIYHs|h9mPD z8wG?y0^V#o6ZRpC?TlM=4x3hu!rQISYZf>$-zdB7$*kF;{cgvTY1!{~zF4-J>)oz5 O+g`uht;xd3U=09Zp}lGV diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_astguiclient.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_astguiclient.gif deleted file mode 100644 index 3037357602871896af76d7e1ba02b910c0256318..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1092 zcmb7<={p;C0LOnciLl1iIc7#!Bcw^$)>$^=Nj#YnS7dQNLp*fVCnhzG@u(-R63-qp zS0aMAT1vH6M4yeuEmR$2&D`QB5~Pl*3fa2slst2fJY+lr0-g%|Qk$?9nD z^7FpsNy*Bt;&5(yYi)6N@oz;*UhU-Y>YJkz0DxMpe%7<}ul%oB9Yg->vG4fq6M(4+ zT&6qL?3bb1cnRaH%JKRH@`I3v(k9l(b~5+62L^{q^?mdtd^iRJe?HZq=Z&}^)`XNopyzNh*?A0a zr4-0OF-E3QwS!aI?;Uim3oi6}_IJUTq~B4$Xcl&8a>wb`w&P)cByJ-YK4l8C?nQg@ zk0bF+bM_DRa0gS7xS%HwXGT`7Dzn(vk+J1-3Em#<-kQch+TcpCQ5!jFV0i(Xv&5Lo zy=@NpoNhMox-{C<*Rn87h9_tancNJk<65g5m)R&vObF7rgzpDrj_{;Bw@+~ zR%A@0*s+N$h+ZcDZS@ULZt8n8+vMFx?7kJbPh3O##gC ziUHi`02JxaVv=O;Hia7-28yr$mS?1dX`8uC=w^(n74TBQXZQG$D@w& zsK;>R3jSOX%{192%n(6A8(ia&7Gn&po%1K^=)W#Ohbquk=5!*9e-S2*?@h}QFwi@A zI&~wsx->30EIyQmLnU%Sr~%rKA06<)%UoZUbsE$yO3aA~p9l&9H7FW4^X>BIJ{m|X zK*&&Y3ReOlZ3J457Rfz7al2kt%8!&p!_`h*(BNOE$^=Nj#YnS7dQNLp*fVCnhzG@u(-R63-qp zS0aMAT1vH6M4yeuEmR$2&D`QB5~Pl*3fa2slst2fJY+lr0-g%|Qk$?9nD z^7FpsNy*Bt;&5(yYi)6N@oz;*UhU-Y>YJkz0DxMpe%7<}ul%oB9Yg->vG4fq6M(4+ zT&6qL?3bb1cnRaH%JKRH@`I3v(k9l(b~5+62L^{q^?mdtd^iRJe?HZq=Z&}^)`XNopyzNh*?A0a zr4-0OF-E3QwS!aI?;Uim3oi6}_IJUTq~B4$Xcl&8a>wb`w&P)cByJ-YK4l8C?nQg@ zk0bF+bM_DRa0gS7xS%HwXGT`7Dzn(vk+J1-3Em#<-kQch+TcpCQ5!jFV0i(Xv&5Lo zy=@NpoNhMox-{C<*Rn87h9_tancNJk<65g5m)R&vObF7rgzpDrj_{;Bw@+~ zR%A@0*s+N$h+ZcDZS@ULZt8n8+vMFx?7kJbPh3O##gC ziUHi`02JxaVv=O;Hia7-28yr$mS?1dX`8uC=w^(n74TBQXZQG$D@w& zsK;>R3jSOX%{192%n(6A8(ia&7Gn&po%1K^=)W#Ohbquk=5!*9e-S2*?@h}QFwi@A zI&~wsx->30EIyQmLnU%Sr~%rKA06<)%UoZUbsE$yO3aA~p9l&9H7FW4^X>BIJ{m|X zK*&&Y3ReOlZ3J457Rfz7al2kt%8!&p!_`h*(BNOE0PFA|ZLn2-`LgKP{8ZycbRq-mdg92{?o zEsSdh3LPB^25JZova_{mvJhzo9km>}#Aw912gbw-5u?M$!5+^EX$KvuXt1)h)zBSj z4!PWHlP#8N;m5lk4bTp}9SgtF&&SHg$sXSF(%!UFfHDq=K>v(Q*GU=rJc zo4E2NV&Mv02cZZ$G@#b*U7Du%_yPMTRE;b*SG!SdQ!k(gnjXR-RZ0yk8(9b-9;lk8 zoQiW=ZNVFrFyFQgzNYqLs|@S6r}U0;oyGC%HN)#P3T*SU0fe-08m4$ya`4|Y&y)d^ zr+1iwwQEsA!zR&yfe5o=dP6g8ZHIthQ@S}=Fk!9;*xIl{5dgy)*=#ba5so$%gwCVy z5hHy}LCby!_fCs_xDD-G>$K%s$OZ!?6a>yzUn3lI)~lP5FEDMoV@i{dC8F*?ci2mk zdksIJo_ozsn6^OhKr9xyK|l%vu+dKcVh%9ZA24=(gFq}lZ6%&xXrQJ5WUURB%rif! zvLHIxm}LtG+#wL68w2p>+ZsWoVG}6rc!kDKPGz-HV0?Lmp$9fO)nRagc`)B$F+wB@ zC?=Z6k51#Q;oS-0d6H2A?eK#UP=)z;V@5;%c1=%x*{0fkC*=oZE~+qaWtLF#1Yc6G zrL_`dZ5(Jqf^86#%X93w15X-TS}108S!onYK=lywVUZr-Qk|c&Ja-+N9_*Nljcv48 z!UP4pq1^)9X++RCWqxU>RjYYvW~0ccx#oDIa(5|kenx<28wE^ILX~ic5(-_VWFqVy zsqFfOo+I#C?6c7J;i(9qMr-XIwQ}@20n$400`Tp)-2yNI1>~k1Ed?Kh002A3 CNw=W@ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_conferences_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_conferences_es.gif deleted file mode 100644 index 14ab7171317548a3c3dc8cac47235b0569bbf9c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 718 zcmV;<0x|tZNk%w1VT%AB0J8u9m4k6>UQzhv)BE%4{{8#(*}nDN#M)j$~<` zXsWI(Nic9M&vb3yc&_jKPKX47VL>b!kI1BQ$!t2G(56A~3oRbltai)odcWYXcuXEI zM1!(=&2GEPgOK1&uiNiiL8yT5`~P4CAZdVwhJJA#b8QC)ca4XUTzVdSYX}XQ4G44r znF*3xnSg>Fgle9enVfA3pRA!+qkxGUi)F5x4+;shYzGaXv09LTlpB_1p2EAq3RnsN z2mr*63e(V-2?x*72#(O)(%sVFyW9`sTHfZxy9m?I(9#IxhTsxrayUz4CTpty8c-us3&X84AHDQSfM6w-fEP0< z04Q)-OOX#hfwD;u;j4`=gQapbYvs*@o&p@uR^}LnWGEY$Bj#*ZFGsx`UiB$VCfA(I zyaEH2@L55!!LYO>+5n5RifOZ&wI>GO1$|McW`UT+6Q`{YwvOcr4^vydgyD@E{1sC_ zS#9UV1Z6nbNH`fz?$g!Rk>kC(01Hm*QBzJ==fR zWVpixkn0GkhJO4FqvVobIHe(zP)6B>jW|kaUQzhv)BE%4{{8#(*}nDN#M)j$~<` zXsWI(Nic9M&vb3yc&_jKPKX47VL>b!kI1BQ$!t2G(56A~3oRbltai)odcWYXcuXEI zM1!(=&2GEPgOK1&uiNiiL8yT5`~P4CAZdVwhJJA#b8QC)ca4XUTzVdSYX}XQ4G44r znF*3xnSg>Fgle9enVfA3pRA!+qkxGUi)F5x4+;shYzGaXv09LTlpB_1p2EAq3RnsN z2mr*63e(V-2?x*72#(O)(%sVFyW9`sTHfZxy9m?I(9#IxhTsxrayUz4CTpty8c-us3&X84AHDQSfM6w-fEP0< z04Q)-OOX#hfwD;u;j4`=gQapbYvs*@o&p@uR^}LnWGEY$Bj#*ZFGsx`UiB$VCfA(I zyaEH2@L55!!LYO>+5n5RifOZ&wI>GO1$|McW`UT+6Q`{YwvOcr4^vydgyD@E{1sC_ zS#9UV1Z6nbNH`fz?$g!Rk>kC(01Hm*QBzJ==fR zWVpixkn0GkhJO4FqvVobIHe(zP)6B>jW|kah0?E(a7U%XLpv4q&74>8yX&ZbcPNM z5B~oCqnoo*PFlXT(TIVSL_tfjsKQ@cY1Pf<{QUjk+U)%M{m{qaDJL!E-|ykv?b6ER z`1kt&007Lw;Q#;sA^8LW0018VEC2ui08;=S000I5;3tk`X`X1Ru59bRa4gSsZIc$K z?|kq7z@QLliCHp}jdICsI-k&})H%r%VH=Nj%k6r<;IJ6Hi3P^!w0a$YY1Z&~T=QBG zr~n~$B4l3b%-gDQoMuMb-duU@W|30}LNnYy-Mi7Ja;st1n^Te8;AT-(gF zqTI}o3|qTir7EbYj|UJP3R(=0xXvK`6JupZ2m_gJ0t((A-8dj~Le5GLVKgn`?V zDFkOu9KCJWJPhm-?Zg5AU#dOqfK3*ybMxTQWqY(w%QAWn04CeW1%N3N1He@CfB{}g z2^zV1AQs7h(RcUw-Rhu8m4cN0zzjekKxaFD?H(Bj+Hd5mO2S-PWU8fMhn_;e2=E9p zOjSQ%rt31OS9(95jm}PuM)j$~<4 z!lJHh>%MR-!$K$wO0MsG@BhHyZ%_j%9>}C}$!t2GP^Thfh+41MtN}F0dcWTRC;%>- zoq`2uJ3DAAq?tF)?(Id2v z(1UVFSY0@<5I#7NjETc}(typwh$K@=B^)Uo zjF{`0L6Hy6Q6OLv(Jf!|B&u^6G)YWss@N6aHxtzZ0v7}@Y&eR^%akmezU+0hqEA4H zLPkt-pa=zJ%&JNXidC&KiyPm??c+|CTyE=bjx}e2XU`^ASGrX-2wt9k2LB;|cI}V7 z!%dk$MKP5sV77vhYGP+_u0(b+zYPk6bEH`ZXy-inX;m9*U{0Z&^Q-#IOE!}oNUhE0 f_L;I0QuFqbYuA}Kw1+GIGWp2z=UJvWhyVaP^xXZL diff --git a/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_main_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/agc_tab_main_ptbr.gif deleted file mode 100644 index b5fc2a5e5136d1fc47a06c48a30a4dbd3920ce58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 541 zcmV+&0^M)j$~<4 z!lJHh>%MR-!$K$wO0MsG@BhHyZ%_j%9>}C}$!t2GP^Thfh+41MtN}F0dcWTRC;%>- zoq`2uJ3DAAq?tF)?(Id2v z(1UVFSY0@<5I#7NjETc}(typwh$K@=B^)Uo zjF{`0L6Hy6Q6OLv(Jf!|B&u^6G)YWss@N6aHxtzZ0v7}@Y&eR^%akmezU+0hqEA4H zLPkt-pa=zJ%&JNXidC&KiyPm??c+|CTyE=bjx}e2XU`^ASGrX-2wt9k2LB;|cI}V7 z!%dk$MKP5sV77vhYGP+_u0(b+zYPk6bEH`ZXy-inX;m9*U{0Z&^Q-#IOE!}oNUhE0 f_L;I0QuFqbYuA}Kw1+GIGWp2z=UJvWhyVaP^xXZL diff --git a/agc_2-X/trunk/LANG_agc/agc/images/blank.gif b/agc_2-X/trunk/LANG_agc/agc/images/blank.gif deleted file mode 100644 index 3a46969559121702f82e857181bf431069555d91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 scmZ?wbhEHbWMp7uXkcJCaNs~11B2pE7Dfgj&;b!383raM7e)qa0KNkTq5uE@ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/br.gif b/agc_2-X/trunk/LANG_agc/agc/images/br.gif deleted file mode 100644 index 423b8a0cc6e0f1370e9f9a9a7249323954c30a27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 397 zcmV;80doFFNk%w1VIBY!0K@08l zZ05uTk+2&7$^o^BC3C4F?zsj4k3(NXQ(0w^7M3~yi96T46Z^#gAPsQ#!vO%0LI9CK z0F6BWjy(XAKLCKEys2>)Ndy`Wi9#W9Gy+g*j%vjL zAB)QX!|x9o3lAR}I&?^70R{~g6B7jr1buE70SQq!h8hPC8BG@mjR*jskrEjf1{n_r zgmfDM7EPxR3Vj3x2nYoP5ErKg7GSQhvKO=j$dMSh2))0-8=0G(z7ojw9_XVR=`^Tv`KO#R~Z(847j7(zn~ r9pQ0+0jekNA|@Qd!$*uG{5sH>5o6?w4k9`Vs9edirAwC;LI40es)CL7 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/de.gif b/agc_2-X/trunk/LANG_agc/agc/images/de.gif deleted file mode 100644 index 4dd34f6a6bbfdbdbfdfb23f49aad444b14ca1981..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmZ?wbhEHblw%NK*v!E2jDg|*d4^{@7@oy2{J+ca>d996FAK}<=@NL!p2OG?M^s0|PGm%)EXME#b2@8WY E04O>?s{jB1 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/down.gif b/agc_2-X/trunk/LANG_agc/agc/images/down.gif deleted file mode 100644 index 32d0a007e39335e82e173fc5d1045ef81eb224d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmZ?wbhEHb2HoM{iq4)$AGUsXRvwvJPL$185tD~8M&*HX)Vh&S;OpkRMD6}##SOWmv2robY diff --git a/agc_2-X/trunk/LANG_agc/agc/images/el.gif b/agc_2-X/trunk/LANG_agc/agc/images/el.gif deleted file mode 100644 index 9e79d8bfee73ff55997a1643470b07bf73d5c23c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmVs;j1#u1!_3va__Z0Askhy1Tp#9Sgw0!o$SH3K0N1P<3y8 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/en.gif b/agc_2-X/trunk/LANG_agc/agc/images/en.gif deleted file mode 100644 index cb45f5f4e26b8b9f4bb93784217f944c8bb92198..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmV-I0lof5Nk%w1VIBY!0J8u9Ra%|T4-e#-oCE}9-&a-Y)Y;CulsiDHs6cf)3 z3;pr&|K{V%007JY0RR90A^8LV00000EC2ui03HAo000EfF4pFeUM1`-7j0Pkn6e`vWm23rLv)bU6+f_1DUj;S<8Idce%XnH9 z3{YC3X9d0haQK>#Jfs-{`f3~3EdC1y3kM4fe+&Ub1%D5O27-Va36qqSCLJ9CmYWIBhGT_NHR-64$boy3Ny;>2Ya##uJ6{KZqyPW_ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/es.gif b/agc_2-X/trunk/LANG_agc/agc/images/es.gif deleted file mode 100644 index 308ea3cb1fed4dc419f0fbb49c051ded44e42fef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmZ?wbhEHblw%NK*v!E2I8o}wRL)Ot_+HOVzI%`H%i+LBC9|KO5#6#|=fnlY|8)$v z85r&}F#Jzr_zxuiGbsLKVE_Rg5CJlSfu*}(qwDIuKh8bf^*=$wFDbL`$;vjK3wsK5 z&YL*cRIGbn<9}y2ixT4-N%{SE84s{<^c`E`C&0kMcOm1WV=e;^^Fia)lZ)7|H8RF1 zOz&=LTx7W7`d!Q7KMNAfxN<8zqB&~nI60e|tvJj%*_k@JSQxmbO`kDy)@%kD?fJ5r W3$zz4Ru|@3xoY*Awd=SA8LR5;2;kGE}IHDpba>c-5LnxOg`M> z^8Whz05F{ZF`V8Z5dZ)GA^8LV00000EC2ui03HAo000Dr@UTW}G3x29S3*uGhEio= z9Or?fSenh1rQO%M6D-p;d%va~Z*?Q(f~cXb2t3VbMCQ@SdqjUziV(WQ!eU9TuhrCs zQ&(~p{6u%v->rK*DzmHU`dY4f>*HsAbU1)*f<+E?d>eT#0t}Fm0)dPl1echX00Eqx ToB#?7qNAb;2?MC9sSyA>Do$Bc diff --git a/agc_2-X/trunk/LANG_agc/agc/images/it.gif b/agc_2-X/trunk/LANG_agc/agc/images/it.gif deleted file mode 100644 index 6c7b17921936a8feb27e9a0cf2c668f07732c6a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 198 zcmZ?wbhEHblw%NK*v!Ci_1*R3Dn?h{0!hO&eDYV{UHkF=?J*UjBX;mDRX;}1?48FH%GSCwrkils5-`0E4O*Y=?XGf0{}SvQi1>g diff --git a/agc_2-X/trunk/LANG_agc/agc/images/pt.gif b/agc_2-X/trunk/LANG_agc/agc/images/pt.gif deleted file mode 100644 index 646b76ac68792d5bb88a7ac96f94cbaccc4da1a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 208 zcmZ?wbhEHblw%NK*v!CiOF>4aRsMFU-pwiV{TCZ-UE*+NiA&EO$14XfoUb=8uho2) zkZ}04|K`*08K%jMdj3txF;<0617+v zZcjQ=DAB1h($ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/remove.gif b/agc_2-X/trunk/LANG_agc/agc/images/remove.gif deleted file mode 100644 index 89b0521ce1d802a03fc69a7a788f8b57b3d2475e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 176 zcmZ?wbhEHbIu<3BU=e;b?syLbQB z*Z)6%{(nZs|1~xLCr%>!PzOYU>||ioT_D)=B!k0Y)v~57>lzR6 ml&qEE3wiUWNQJ+t;D&{aQqvM4!>W}@e$!UC7_~4kSOWmeJT*-K diff --git a/agc_2-X/trunk/LANG_agc/agc/images/up.gif b/agc_2-X/trunk/LANG_agc/agc/images/up.gif deleted file mode 100644 index 0d55544fb366ab4c9e91ee6b3b697504a7744326..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmZ?wbhEHb2HoM{iq4&&E7|i2jFi5{Dk=4*6vSihv5Z6<+@~y4TLK{nLt0=4^9fum%9x{xDtu diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber.gif deleted file mode 100644 index a5a080d6787aa49e59d18da261d38a105816b240..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 831 zcmV-F1Hk-8Nk%w1VUYk50K@rJbV{vSuh^`1%k6rj0s`YP5PZ()w0g~MyWjA*d`_>U z1CR*WZ14O3fPsK`dS!787l{`Z3Lgy@3}_Y?5@{C+ZHOIbj}0FQiir#p7Y1h?i;tm@ zmZoP3n24SqvY(V^3Zk}(60@rpo~sFsZG?Mq79I;13(5)=9u{Z_2p+Q^9v5xN4vo+i z9~aq*kqOZX)Dx=Jx@aEJXNe!l;PW2f;vS71@6zIm9uPDN7|IhtX4%{rGX#g;nPd#0 zN&CPr8KyG{*(8JaEu4on=nxoyhejNmcLKxzX>(`~pSVq+;F)}N51TeM89y{rnCDo- znjaK+Fd*@a1bqt}xVyO~nFN6y#Z{PEffzq!YG&d*>Te}bhl(&QNapX})CDP(QLU%8 zLI(s&i}hsqhNaD-9}q0~WDO%zHOVF*kP!8q;d*&Vmi)LTnmJNl>w#UgKxol?h9?>} zjB&GrYikzrsSETjJbsIgUd##jBiWi#sS?}R%@Sjrj6}*~Ihh{=eKO5fkcw@=T8zd= zM&em$v>TQciyrmtciTq=4yxh1jYcp6a~I=rcPA|w0`m}aW!rkp}* JfB_)@06V80bb9~* diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF.gif deleted file mode 100644 index 75bc0e8fed5acb00b66cc6e2319f3c2d499fafd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 827 zcmV-B1H}ACNk%w1VUYk50K@iHV7~x3}iz z=IiV0A0Hpv+uO3TvgqjOe}8{mTwKS;$L{X#VPRpYsHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL^000I5peBxFX`X1Ru59bR@VP0|wB2~F z?|kq7z@TtQEanyp$6~>0I-k&}bV{vSuh^`1`}_b9i-+PvE}PHjw0g~MyWjA*yxed= z!sEGq&+q&Db$4QJ2p5JI76l&(7YJn*7ZGL`25N;JWQ++P28V_S5*Gqw9f*vcjgzBf z29<@IAFrH|WCfqIhY_%-7n`UCifVy)ZWbN~7YD}$6&@C41Oy(iA08KK#te$h6(1MY zhmHo$1alXxOww{rW^qQ?aF*h!|tEAYYXT9)%%92Q@fF@=vBLR#^MKM2kj73DDy)B z4+0*NiE!@#gLO2~7>n>vD+J4T>1IG5zgL=T^v8eLSR_H+B zs4$%g*`%B)^aFtdoTgPwdd8Rp0uh|D8!XRmNRb@TI2#vgtGup=4*V2qZ!pBcgDYZY zKn)GTJaT)|ZI=%bQHnPEattf;Y1CjCwM|M~GttL)DIw=WaPQ^V3QwyYKwEJ*NJlvZ zfnJkRqEMon_hRE%fPu7nw9EV@Fpi?T?CYKxBd`^d%9B42;PqWbXlm&0+o_zM{=bwNED(Iku=4k;1b4Gx{qKr1`=%bKED(R$@R%+>`m}c6j00M*n F06Sl0hfDwf diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_es.gif deleted file mode 100644 index 405ff336c759af317ff601d5142701ad7b3145a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 914 zcmV;D18w|ANk%w1VUYk50K@#>QM+TrMsy>+9?0=H_c_YqGMke}8|uxw(3JdObZo)z#HhR8;Zt@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL^000I5peBxFX`X1Ru59bR@VP}>ZQppV z?|kq7z@TuLgG43}2xrM`I-k&}bV{vSuh?w!BTzs9k&k#xE}PHjw0g~MyWj9}U_$wZ zB^Sb{ak(hsfD#g99S9x>3m*#?iEIiNZU>ELj|XCYV+4PIX>)a89~T}T9|xlroN#?( z3<(LM2#Sntk8KMcmS`3pkRKkX9~}=2sc4>dp`r^GqNoc57ad|29RwW=4$)#Ad5H%W z3VLJAz^h`W(h9f@77f7{-w~qxXlOKW2@{ ziK!<66|;h3j)Cffpo0W}s1l6w;LgLVMI#&k+!_^Y*MmXRMxru@?@+sQ>qd!0rEt}* zP$LtH4Cw3B$X+pD`QkYflF3mISniV^*FT&9>No0`@F0|X9yT{sMBmxT-n80>Nvb5~ixt9a2( zfQ?k$4|l7IL9iIEJFdwr5J(VMuLDB~QTb)1TIAF+BS#G;!=Rc61%7`n9qtoXZl_I4 z;Sv?}U@JqIkq`cvo0K_)vr+dE=7GU4bryETR`k0;0tK%v0K82mLE;Y5Xzr!_D>%u* zz6Oz=daGfgo{;zz+5!p~bX!(D=_g(PaUZxBOnkjKs7@lBY+fLQ=^KF#zH-;{tGv00Dd|`AHbX6naJj2T(S~0Vz6W=%bJdicF-Gnqi1ZidL$r8=e5b zK>!$pD(a}DmTKy$sHRG41qK*UfvT{^D(kGNHc$X60u%t>uDtf@>#x8DE9|hu7HjOW o$o6W%00kJ}KnBo8EA6z@R%`7Kwb*8>?Y7)@>#ei|5D)?YJGt|cMF0Q* diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif deleted file mode 100644 index 0d297820b18336af1e10a01b08f968ba32f21cca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 961 zcmZ?wbhEHboX8-=aFv09pP#?8v-8-oW7n=-+rE9fyu7@RkB^?7UQA3(c6Ro&XU|^0 zetrA)?fUxq7cX9H+O+A@r%&(Rz4P|=E-o&9`0(L}4<8mTT)1@U(%|6W{rmSPCMHHi zMC{qK=jF?nTefVeuCA`As5pK4^s85|mMvR$=gytUlPBBS+E!Intyr-lBqZeO)vF&r zeth%h&GYBaXU?3-z`*eI=~Ey{JW%|}0#>X8B0+v)VEgaDk>aW&)qi41(a9XE`4?7P ziAdB`5}a0c`fb(z2OBDU^k$#Wc<1ymvLouljvBx9x8MKRQ+NLT@23WmjNE)&2JIc4 zUEMvsef<+APMSPrY6lNLZ%bQ0r`mk=c1E>ny)5(9*jRd))K+&dUq6kLt(}vzW9_D; zQ)kR-ouH42d^ci|MIhL*4bBNJke#iL}OZUw_xP)2ltj0nXHZ@M>c6GId z22a)W44BmQ)R@{&X&9*MYdmJ$8X#e?AYZPLQ9a;{uzn{A@UCq`ogW-QFtH;CF+w-4w zGjmQ6j28XE(lGz;AzteT#SZ5a-|}%*8+M8KN*w+1l_ely`PD=QHU`r|G3_PO=Exj8 zTw1L;L?+5B?I+w4RW4HGGD_%4M_P zeBG8?x?O*h^tC?%nG!z_%)8KO`uqC&jrB)!SuPtLy3NF4q5736s*z>F_V1_l=4dQh z&&I`bL;8a5=S4Rpw{|g}^)P2Bb>&q!P-Po*FW@K)6;*jcHym!#um+$t*`yjVQJP3z^7DPdVJ zm(ECA^>W!9JE=pg3IPWiS@ou5y;`|q*{WBo)@*zAYW0R=TCdkEoA#lRP1$FIBiEj9 fuU@Y|z^46X!x6FUHycl=t?X zC>8Q&a!Gt57Z(n7gcB2J9Sj}}4<8Q~jc^VZato1blM7~oX9i8{+x9;7k zldK%R`UMhY!;=MttwI^h<}6`BaZ*}&N-~LK{qTyf(IRV3G)+S z*nerE>1cQ2kYh+z0U$Ltiivy3Jb&6xQ(KVi5z(_#k1ByU)93_l3@Bm%v zp;6qK?p&beo4R?q2$;b@kiefzj#5T4h^`UA0{5M<0E@p6ljx+Bu14vlY$&o)qnLI| z$1)rgfWfGwmTKy$sHUpws-`|5fB+A$D(kGY*1GDVtRS$!e7yGR>#x8DE9|hu7HjOW o$R_J+dkYAlKnBo8EA6z@R%`7Kwb*8>?Y7)@>#ej2BoG1sJMyubQ~&?~ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_dialnextnumber_ptbr.gif deleted file mode 100644 index 8625b1c99bc27790c1337f10357142f177c95348..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 965 zcmV;$13LUiNk%w1VUYk50M!5h4iOG|nR>C^v7^kRzV5yoA{#_iL@6^VQf5+LcVEu` z&e#9fp2nWT^uyBs(s7M(<^Sc{|Jv36)yezGR%}*7R6}lwZsh;ulem*+fM(JE(Zuz{ zkF$?XVospQplgO}wc@o(TuPL=l;Z#5-T&Rq|IMe-r-P(}s@1CB|KB!5Hf@M)mb;cp zT}r;~zT^Mn+5g$k|Idi3hyVZp%>T>)00000000000000000000000000000000000 z00000A^8LV00000EC2ui0FeL^000L6KnUdWDjJW-q;kn@I-k&}bZQ($6e&^!#_f8) z;IMd1E}PHjw7R=ccwiDuY)-G+@A$la&+q&HfPr)+C;+n;6EA#4*Z+;&looU0LKJ0D{yKbKz}x897xdYm@A?y00;$0&e(yV1b`ZY zr>NKrQ>SjyK=uzPfC4_V8UsLJs0y`PC&By_X(qp$N@d6@V1Ph@6#@(hs2LC$qo&3< z{&R%@z<>b&rUiILiXS-w2>?!JF*yK%0~|FTIIB%8S%5VGBb)sAYqMluKZkzF37pKL zcV{4d*3a;w00__)?zgDf0amWW&YXFbo#n8)bGOs2@trZ~icZtuH+DtOt=z?mr7esu zq?wr)>J~5{>Zuvi3M8299U%AOM;D1TP=J76f^j{E)OJa^VgNMN5pW$+1PGuVcc%%k z&{X{_M#F(})fQ7-0H|={6;CrbhyV)(Ok;pjr;TP`ent^DT`4mZfEGO-Hr5tZ*zw~a z09TdN)hP(f09^q<)kk1&s>!$_LeKP=VR^(H)7O9j0F@67;|Pi6RV(OpUyF>47Zm`o zv5?h>I1b323}_+1PIdKY`PmGa83|!BK<#oLoAA9!o^9O(D(Iku20B-vh$gD2qQOWI z!v-!yD(R$@R%+>`m}aW!rkr-_>8Fx{fWZe7n81MysHUpws;su^>Z`EED(kGY)@p02 nCs;s%2pM$H!mq#vE9|hu7HjOW$R?}ovdlIMYzP$?5Ci}_R${Kb diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall.gif deleted file mode 100644 index a6779255a93d90921769e3400414eb3e2211c1e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 804 zcmV+<1Ka#ZNk%w1VUYk30K@T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehDU>MY< z?|kq7z@TtQEEU z0~1L(4oO@t2@q!ve}4rXX$=<^X@!3Y3~GLbjAx3KXO4i84;Kz+ehD9hj-s7~4G(M% z1s4q!X%?<&erklOYq-AOd`b(7Ry;cry$Y?hG|6qo^e(nmO}^#T8@I)0L?#_0@D!W^`@LC zauq5VL#B-12L=c(AeA|BfdvZ*Jp8n|O_qlSNR`F}msDKKa=?t9Sy$+j%1juknzV+1 z!G&-B(xO4RW@oQ9XXTAsr)`0tnF%Uf`>R(T0!(Q2Vs#)@um{3Pd4m2JLo(oopTcv zwtz(MfdZn5h~T!(Spza~Oko&NCXZ8VK+pg%G%7Tej&T)M!Hd4>q#93l6lvsA+slxgOfXr`&=nryb|=9_TFDd(JL ijud7C804wvo_zM{=bwNED(Iku7Ha6BdlpbY2mm`eFn6Z_ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF.gif deleted file mode 100644 index 74b1f5a1369d2b352e85a76987e28dfbc797e2ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmV+-1Ks>bNk%w1VUYk30K@+9y`=IH3?+uPf+va)}Ff9~$?b8~a3sHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPnDwB2~F z?|kq7z@TtQEan=HNTb1NI-k&}bV{vSuh^`1`}_bDjfdkyE}PHjw0g~MyWjA*ybOs* z!sGU$aJdu~WD0$K0v%=v7ZzrNeFX?-e1nQ)h?8WDevb?n3S@i*AA*dan}Z1qX$k@t z2^D4*tY&;?f~aYAcVcZF1RfU#9t5Zs9tM5At{)7+1ZKf~z!zs1z841`ipvDeWzWC9 z9~Iai3B`}Z#*N_~2YntM$z{Op@111Z9=0FUXTVWKz-s zVa1N+`+$JJg`zJZ9Lp9f50#9(d#vFFb~mfC-+&QNY)-XJp@{Eseo8)*e(kC7&QfSBkU%dm9t4$*ZV6Vwio4x(T26BWDddnu7C9s?4{!iM z223{T0+o_zM{=bwNED(Iku7MiC30)zknJ85fv2LJ#7 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_es.gif deleted file mode 100644 index 21991dd5746c7752dcf53417fbf89ab68d4fc87b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 827 zcmV-B1H}ACNk%w1VUYk30K@=H}+>>+64if3mW&=;-J@Jw2$XsCs&O)z#HhR8;Zt@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VP--ZQppV z?|kq7z@TuLi$Erk2xrM`I-k&}bV{vSuh?w!BVa@*kdJswE}PHjw0g~MyWj9}U?Ta3 zKMsQDaB*7}ab_1D9~BjWf`o`134D4CYzvf&mV}0+rKn4zp~Tb{`$19}S?51Ro3)gB1@69tjH-fCva52n`7h76-`=%LpD0tEPv* z!WG)SuMZ!3e8R7Kc*qJJWDE!C&U(SAAD7kF*&Ym(9gGbtbOBi(c?vEZ`haWGB{B{? z5YS_xn6`q+230y$!2<#d3KCqLl%P+yLKPzaPNXzwrAQAK{vkm2;6O=hz4#nh_(2qb z1|F7qkQTI5t5+XFj?6fz!+~Ff_8^$|!RAy&4Z}RdBWA$@Z52J3OHe_UER=;3&|2{C zLQ_WGdVXao_AShw7COGw_Tj;T4hnb{>!?ue*=~*?;b9B&?IfEgJ?5k20Ulq5baL&g zRI|Z?z(B)}ElcSvS+ox-ymZU!q@m9hLhBm^lYs&PdMiUCgg`-qz@<7^u;Ad-;mKrD zuRc3T!8YV~HR`^cRg3~Y$igDfYq9ZAQPVseGA{pNG93F z0UvcTBpnoR5C8^LR%xY`0C;famRxq}<(FWFDdw1DZdrgM9soe40|pGhg#jJJDd(JX zG5`Rbc;>0+o_zM{=bwNEnx~x%%y~fp1_01N28=f9=%bKED(R$@R%+>`m}aV}qZ5Sy F06SRAboKxM diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif deleted file mode 100644 index 19932ad2e14d91f75d5c1f535d625d6217b1e833..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 981 zcmV;`11kJSNk%w1VUYk30M!5h4-XHhsHkgeYabsUTwGi(E-p+=OxD)ciHV8E#>Tg| zx9jWc=H}+;=;(icf7{#Jva+&paB!TQobvMW?(Xi7kB{*1@N;u>%gf8*;o(b5OT4_i zczAfKs;cVh>SJSLlarI7p`m+wd+F)vzrVlS+}t@iIa50000000000 z00000A^8LV00000EC2ui0FeL?000L6z{$i$EE41ejE#XMEwws3q!T|&c37-SaGM)np2mk;AtEX1*$xE(+#xQYs3qcVIs6t&01nm71PJ^FcAB%{;ZC63LCwswSxba6KDh#*mT@y` zb7ce#P8GHADnSksgeoZpDR7X%1|jI+>Z`EE8o>*()@tjm zxXKzquDtf@E3XwqP{FUYf*?W+D_o#L4a_#{?6c5DEA6z@R%`9G*k-G3vnOa^Ko9^s D=?t=h diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_es.gif deleted file mode 100644 index 9acc363a85b980c650f992720c785e1b234646e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 826 zcmV-A1I7GDNk%w1VUYk30K@RL|vEA;z?#7SV z?|kq7z@TtQEE?P zCKR$ca_}fFauyDCY8M_K6%~Yqhl^;29v%&YZ5AFDXNGcjc?M-441awOa1NJ_nTLs} zsjOy(7Z(Z*ZkCvPw{V<#9j6}u+64;6+L5)2*;4i$q73m*#*3=kFy%Mr~B9ucpq zio(Pd+`zLEAANtsvwa^C$_*W84+`theZ#FEn%CLe9v)okfUFpz3(5f1Yj8o)hh3id zH98Z)!+|~)j&Vb{%n+tk6+A4k(15{4OAG-2eM3~C;>AmbUYhi9LEr*q5)`Dw_Un%V zhaXHGfZ(B-2WmxA#hUe@1ZK{w=kJ?fU0xzncxf0UJ7;8$bhqo%5PP-NU9QP#PTCo;qx?}xQCEBtYu)g;el zSAhz>+E>x>uVz>>)OVQJQVn!~7?P8>ebwplPDoR|gPkD{us5Cr5;*5TAF7e(P)Ijf z)0%oMO&HK@n9w8@L)|Ro&N06|f=x8#0+o_zM{=bwP$S?2?CUI0M?2tbg*qKr1`=%bKED(R$@R%+>`m}c7OMIitH EI~($RE&u=k diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_grabparkedcall_ptbr.gif deleted file mode 100644 index e37d0fb4ed85d38b8ae318b4d77687903f75a284..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 985 zcmV;~119`ONk%w1VUYk30M!5h5e^Z%mb-UfcOn}iGbuAwL{(-|X70Z3nR=PsvE9t0 z%>T~+|JVPGagFrD^#9WT#-7G~WPShI|E`O!|Kd|35Q7FD5U@pveE^|JAD1R6|s`l(|GUM2KyO?Y`|@N?rfs|Nq(l|Ih!bh^hbp z0RPPYA^8LV00000EC2ui0FeL?000L6Kng{sD;kf;q;kn@I-k&}bZSIN7Os_K$L)H* z;IMd1E}PHjw7Sb!#C8=EZ%(h<@A$la&+q&HfPr)vGYAY13qOjBjE#L43Y7;4nU6j=EIskOF^o1KV?Jw63D0JM|^ueXY;j0&Zh z2>}5;#?hI%o{9v;0R{;Pq65%2p#usC0008#KM1c1HUd5gHa-BX0tN&Ii^z-U?l(55 zJplM1kl=>_d8oMg@Rm+gfdhZG=<41u1fj1DWBG5CQfB^YeEpqjOP|zdlO94OJ z{m`kCr%xZyekceKZ!v*JFc*XK5g1v5ajSGDKoFR4RGttOgBlfYD(9cjU@o*FDi(mY zkD*<&YlCP2)IUB8RqEGTF`fx#&3fenv0}!r9REa0j#$xRNn361eB%HCxuGwQ#yVg* zaMgHwI7=Yi2U6K>odp+A8}^Ug1Dpjo;MhBO;+#~IjxSy@Czn<<%|x3&s|fTMQg(%M z9cJK6rCC!?-O$uQu2psR)md7F)y`LngjIl7zx6cTOG^Eq)(r#{5Rhw=owW*81q{HS ziel+g94G>jgqIDoyrh;mc*z*dQxE2D{FtM{xDF>PP(?KL*h0vLcHOFON0lHL4X3|I!0F*qn*a(b$+OlFTxm3VI1~@e8 z=%bMOZ~>&0R%+>`kHSEu3MW*W0tqi*D(a}CPT<1?q*e-o1}&7}fe1asD(kGYMi2t6 zxaO+suC+$M>#x8D`>O>JSRgE}9gM(14I6xr!?VyvEA6z@R%`9G*k-Hkw%m3LEekXh H5Ci}_ZMDrc diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer.gif deleted file mode 100644 index b4fdfae8fe0eb85e6efbb6b8b98210353b4aa749..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmV+;1Kj*aNk%w1VUYk30K@e zo12cQ7Y?hev8IKNt%aqzoo#u0W^WfBX~St29tsF)6&@ZIAI;DZ4;~G}9*)vz+sM}q z9)N1#57>^#l;|JB*U1ox7YgB+3-ayR(ayx{&d|xNrT$$2CvMFzKEn3#OY`6X0S~j9 zx!d;8(FX_$0By?$P2C4@YLG#@sO*DBbsir7pb=S2Ap(3P733RsDBQCT;n?Iv1Cq_b zU~YzOlE>}Y#%9$F-L%H2f>Vw~J9;2s;i1Zwp4Oc7aLAhj2D8u@L&G!>S7}C{EzP)z zEL(8PeCk0MbY8rD6)PyXDs9+Hf8wwaJ9-nDz6+&Vs+qNw5(Enl9w_Lbm~26lXPxIS=+0tXge%KRXYYPGJr+hA1S{^o*Y z4jd@Bo}B71;|t-2p9R(2Ce3|m`SXCF1q@nHlQ_9ihsIB)v4NT~;9!^GMt?E#QcAKg z0!~U6c_beJ@+_DJ1JziQ7z7{EhaGCseAvK9+sHH9QmZXhP>0!-cE^xJ7HQ;>NB)uk z2L@!|0+o_zM{=bwNED(Iku7HX)T2p|vw06W$8bglpZ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF.gif deleted file mode 100644 index e5736ae0d003492fed8edc78dee85dea732dc9e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmV+;1Kj*aNk%w1VUYk30K@X8Z8kPGN=nbq&)M18 zh=_>3zPgTX`X1Ru59bRa4ehCBM8%` z?|kq7z@TtQEE}Y#%9$F-L%H2f>Vw~J9=L&G!>S7}C{EzP)z zEL(8PeCk0MbY8rD6)POLDs9+Hf8wwaJ9-nDz6+&Vs+qNwQUePM7#!fBm~26lXPIS>nfdv*`%KRXYYPGJr+h9E4{w9KC z3lo}B71;|t-2p9R(2Ce3|m`NM#q1q@nHlQ_9ihsIB)v4NT~;9!^GMt?E#QcAKg z0!~U6c_g0$@+_D}0@YZPSOXu@haGCse5k-k+sHH9QmZXhP>0!-cE^xJ7HQ;>NB%;A z1_5;70+o_zM{=bwNED(Iku7HX)T1r!hh06V?Od?)|_ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_es.gif deleted file mode 100644 index 570a6e5ab1d915650a9360b2f4125dc32b3c006a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 693 zcmV;m0!sZyNk%w1VUYk30K@k)K&eGD-!^6WVDJkCG-fL@XL_|boWo3_# zkAs7QmX?+d4h|a|8(&{vdU|@Xv9Y70qu1Bho}Qj@adB;JZ8kPGN=nbq&)M18 zzP`SQh=>3H0L;wHA^8LV00000EC2ui0FeL?000I5U?5^-X`X1Ru59bRa4egfU>IAj z?|kq7z@TtQEE?T zC>3&j&9OK<4Hj({9t?YL9v5j501X}v9cGCi7anwihi`Xz17(?Kl>io%4{U^npKFt6 z91RT*ejbsN5~y(qmZ@x;dZ`Q^rDh0%9E~0b5g(@?5Uvmx5X_Da63iD59?@nJe+}BJ zW`vO+5f`(H4~iVPuV&ZS)Xj+!5Pt>Ly1bpb%V_||*a|2sB;ipk3lTgNz@~^$0fc89 z1ac%v5vW{gCRO_I?*T4B9y|cRg+Sf~1qvZyVbRPrQ*;9tYFXMQcD z7#B?hR}UUI>WkMBE&$l>R^_?CU;zh&Q*qVBL9{_L#T+3UXh>ybo)P|BK+vEM=8Fz& zcJ_=*;kdu+LINP{R}s(#^!`9%Ih!RN2Co?W!{oiZc{jW?5a7VRz5Dm@`*uDB*+@R%qdc3@%^+01PAmKn5U& bDB_4DmT2OMD5j|5iY&J1qKF6}5CQ-@6hbN| diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif deleted file mode 100644 index 57918268a48e7e057b24d7d1b1502d9e88867e6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 811 zcmV+`1JwLSNk%w1VUYk30M!5h4h{}qUtcLHDMUm>Qc_YI8yn8f&ezx1adC0O!^57Q zp3>6NdU|@JqoaR+f3dN#WMpLJ<>d_x4RUgF)z#J7+S=dW-)n1YR#sMngM;GY;y*t> zPEJl{W@hB%P4$;ruCSy_{llWuNqs;a7#l$2#-QC@_ zwYAaF(QR#QmX?+_Ha5P#zT@NLN=i!4&(GP}*@%dU0002Y%*+4)000000000000000 z00000A^8LV00000EC2ui0FeL?000L6z(~Y1D;kf;q;kn@I-k&}bZXR83>H?!#_f8) z;IMd1E}PHjw7PpRq-+#dZBDP-@A$la&+q&HfPr);Bn$@&204n0jE#_o1KWeilQ$s1ULeysyQ$X zz_E?Xzzi}kH^7m-p4Os^FF4f!0HrcH3VSIS--)0j@HlIP5tw1OmE>&W!8r z@8ac{H_BcE0XPa&BUn#Sg8}CPj01-47qD&oR52(Opi~Y31z-dqAj26ghy;q^$WiPC zLKv*-F<8`Z(McRBN3m4(@*{x%7XSdrXxY4$e%ggG-3w7MVuZVwkU%w)u8b){ z$Pb1nm|9^ao0aug4z9|);(*}{hP1R_Q`tkiOR2V%in`qpb%QNTasmd&zTS0awv(5;NgYvo2x$|>7LRm8M*ive_ii~<5+bbCPKqNsDa>I$*~5qvllxj~t^Pd$H*N&Ae?R|zNDrCCpCr9dP{Rr`B>m3^wTCgAg|8 zfCQvW5aERkPFNv?CTtK$0)`-h*n$WbfS>{j`K74hiY&J1;)^ai009IJz-VKOGSYbC pjy&F&!3Y?X&;bWD6lvs z?|kq7z@TtQEE_M76Bd)7H<|F4t{YS7i$y<4;}#>XpA2h9(IL_ad~@YoNAZ|7MKujhl!zW zmT40Y4-kPKl$HXja|D^IZk~L+4j!jy1ceij9t0F0sUH%s5*HHAkpTkE7Z4uPXaa%{ z+^uMblphoqwT%#s6S}cz+1l36i~;qeBrC zrU^hOQl&;|FtKW+F(3q8g*H3Pq%5 zLRJJwonl0ztz58>95YFB!1r3Kr?Do3pe3 z&z{}j>lPWe&aM3H_!2tH_uu+Ja%B_zh>cJ?&x6o;LOX{ zXWqU)&BVaS`t|bdyC;61I&yc1BSQy6$*ZOZ1q=ppn_C&AC3bvdPS{d+Pp2!ojM?KT z1H&mvj!O#|1Zud1pK%C0X|!Nsydx>V-jX^&hK1!t@UsawPfgQLW}9hwZW%M916PPj zRPfAZMs?;MmX43|2YPL;nretIh!J35EnrbdIG|{|f`yBTGw1_bkj$I^S!NN}if=|L zWFFrb`u&@BgERw!M8@swDGXc0R@dEbH+{-mXj#;h{Wl)lddljb!1rd;m`N-?W(UrkGfAJoY`3{sJ!;~WOQy|Pt3e+J9hIeEJqnWwWC zt~dWzv%i7!+5Id>3AU-eTT9bLlb=i}_7hN$JaU0wZK2B?Z`0f>7vniEDn~Vc*x8)u zlbyRGPJnO5k`MtkwJ#wd!KyFLCy8CHn9N}RM_@*;`Li9$CjK*zEjIaE^WZSImCDK| zNt1lcUOt%|U}nk4`ou%v=~N%TNYyEdX95_fB{Xq1vumz6aFEM#*~(|La<;vEHapKr zz>!7ZKxX>vqDz&}=hfWHWad>ZxxmC_Et2(OVTanP7mIq#UcFd6!AT z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5U?FB?X`X1Ru59bRa4egf5d>SV z?|kq7z@TtQEE?T z8V_=PkG}XX2pwk;7Xy8N7Yh&{6c-F;3yEqB2p16vXakmLk!g*Od~|nt2W6pq9twU6 z9+(uV3TUZ*5*`;H2_A+K9ukXawG$T}9-toztQ2R%X}N}{a-(|Cbhc(4x*xm)#b?%L zwYa*xzG>Xg4hjfn47wf>%O1_y)NsZE*0|OJq5L5+RXJ*!gTI+JL@}MluuwM=p zK)4Xg3^O#&^1ZodO5+=1#1t56w;;hV2L)Bu5qp-)RxdRd&7l0?z*d3<-9E%LlhGp^ zjy^x$0tRwr!CMrNEy}eH=Ylji1$_v33un=xJHcgW6PdRySDAyxK}%xqep*4Ea>#>TR;vVVVnA0HnsE-qYLT(`Hk?(Xh$b92kf%RN0kR8&;e)z$Iw@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VO-vwcU8G z?|kq7z@TtQEansmheE+=I-k&}bV{vSuh^`1`}_Wz}S~ zx4FB$XWPyV2Lxmbxg8S9%-GXz(WUcn9S{Kl5X20r|J0F@b%B;TT&p@HJ0r{&!vhR1 zz#=0op0j&v>gB=MX4tR;h1el5AgsZ_RKuLy;i|<8O~o=MKQyRi00FlTFUvIJn9+_j zo@~68q2*CtwF$=*;ZkQ)5~mJsV_4+kUSesElApRf}Z-A}nAew0)VU@lQ*PLSR zAW2x!vPHx4BwV<(>C<%V0N@}XgX`C@W6PdRySDAyxO3~?&HJ^50)++?@Ibt{@#Dyo tD__pMx%21Hqf0j)Kth2E5-@1r&b_<$@8H9WA5Xr#`Sa+x6Ce-*06SAnAT0m@ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_OFF_es.gif deleted file mode 100644 index 110ce6b01a093bac934c742c76f268dfa7e76130..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 644 zcmV-~0(<>ONk%w1VUYk30K@+9&~=-b=dzP`S4a&mZhcuY)8sHmuGYikb= z57yS!iHV6HA0OuC=3HD{va+%+E-rt6f48@{$H&L+?(TYedObZo)z#HhR8;Zt@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPlvwcU8G z?|kq7z@TtQEan0ZNFcyzI-k&}bV{vSuh^`1`}`0X0fFN~E}PHjw0g~MyWjA*ygYzN z!sEI6(P`-aXcrwH799wHYK4c0YIS#FjAaXb9UhT?f`o>bW{R9=j(D659i$Ir6BibO z31kckeG?xH7YU^c2OSC)WVRg_3m*v=d=zDwp1#1sstOGVg3HRm3w#Z^htrp#ke3k( zAGyH@y2Bk76de(^7n%|1xd{=5qzAdYf(N|EgNpU{AENQ;@Ia7-f9EvSf`tI#K1ST~ zFq-fSfh}I-T1{$4q2Vu0mOiNaKmpx{2^JIo3JPWh*(Q`119k{Dk{mCXDrX9Nneri` zh?jhI7#iV2#t$1OG+6i1lgOeaDZC<dPfKNN8@#aD6AXlbUO?&%h>T2{HD}xFXFg%Q4S_?C&BfZTxwk||)m za6rKVr?_kUPVBf?`gk;ZMHVuZs#>avtK(-+wGGXo4$h!2joZqhXELp zD__pMx%1_b3p}4ry}I@5*t1)w0KkA303O1NA5Xr#`SA=2FgVY?z5Dm@IWA&%eL_{{RLk;D7`cXyAbe@@G#02mm|$|0|LJ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_parkcall_OFF_ptbr.gif deleted file mode 100644 index 25a6a2f2ace8cab78ce6f27644c31bd8aa2e3449..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 830 zcmV-E1Ht@9Nk%w1VUYk30M!5hmX?-8L_`}K8(&{v4h{}dQc@`?DWjvKv9Ynv&dz#z zde_(2!^6X#o}SXu(s6Nd<>lqo)z#YC+NYP4 z-{0Te-Q8|(Zpq2XprD|&wY9{=#Hy;QR#sNc&CQdOla!Q{c6N4TWMqPZf@^DQ(b3U1 zHa2Z-ZR6wPN=i!4&(GP}*@%dUzP`Qy007L)%m4rY0000000000000000000000000 z00000A^8LV00000EC2ui0FeL?000L6KnO(hDjJW-q;kn@I-k&}bZWFn5}b}i#_f8) z;IMd1E}PHjw7R=UfMgL?Y)-G+@A$la&+q&HfPr)+BMJ)+2{ww0jE#ursI`u)!i+U7F3AYR z!ndBT0|YcSGywpp3N-8Z_3TnwjpN*sfo> zs;c-2RJ3VZ6$IM~;6TfE{4!2PsZu4vz^rH(Fi;L|3jqL93%;lMr=psQQW6j_R z)7AsT&00LwqAIkc3K~bpbDVY?lu_}f&5l@8hyk@jfKmRnW=t%sARx|wHnpSB0Rt5z z6n)tEMiny{W(W#i8b)$kO9U~95ZH($mT2OMD5j|5iY&H>A_joDC}WBtn6SbJ6HqY2 zjy(40RLNfue?MhX2?9|K9)IvEB5;^#A4m|IYva(*IRN zReoiDyOz6mUw07>5$?Y3nR=Nb8zPNyjWa1T#-7H_qs@qIh(tC-?Y`|@N?rfs|Nq(l z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5;2~;cX`X1Ru59bRa4ee}LJ(W7 z?|kq7z@TtQEE?b zC=znL4e&(vfNB>W9~K@Afoz6|iEMXy31y9D4}KmUlYoPThnZ-Lo@tMInGhbP0A>{z z7K06D5DtD79}pJ}rwyS{@8zR84(_ws$1*2e>YK^6k0<8(_F1BLw> zd6U$rLNErne3^Sy>0N<`!8l?1!0tl0d<0_LIUgby1(bgU4eT}V(QkDe6cz}QYf|Lj%mqmK~DcQ|8N?K%wC!>tP^37rIu zf!kdwi=wk&NI{=>Q0LW?=3y>Ptep7z-Sib{I#&o8HgJeItwcPe5_RZ%W^w~_3L;Q0 zp!tFV2M?g?;^nJ@tOgO@5q_DKf$6@f{}#si8uh!L*$&l?trqgPP-$=iA5J{bC=LcN zC|}OJx%21DCoh0by}I@5*t2WD{!u_m*B!!(A5Xr#dGP@jKse97z5Dm@rdueFVvorshK0RaFq0y?Iswv()`#gDNw zGR-o{wz!^@0K$p}GYC7V1*8W%2%`eu2+RTj2-V}@;@lY5-j(j@y?U+$ufdB#mbpWU&P1huWk7N~)H^2a@YN=QWkTGgT zwUQ@^v2r;o1_B);br@9C4S>A=X98V{{7I11jH4S_$;dIoR8RoDcJw4F3jl&{G8W96 z)bW!fkc$kQT5u|r0h=CHP3quS1G0ge)jn{Y?Lq5_V(^ec;**tpeV zD9hRNULE%mhoh*I5h=(qzJVq7_i^h+ z24n~nAUbuc*O0$uhB`nXvdNsLO)}660MvPzQL!4(E#Zo>&1D%7%nSnrKtO2N35ZI8zQxl@4x<1N z*g>)ka1VCq6*Y@2F}x#pi$bEQ;|@X=0ti|}N>Q>OG%U8*B3Lfo!bu1?fI!2IIOeG1 zjy(40KN=1u9_BK@LzxDdm(@R%zvxSZ1l^mRia{0heG-`GN%# ktZ)GfHKeKLnryb|=9_TFDd(JY)@kRRYN7za06_o%J1ez>lK=n! diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause.gif deleted file mode 100644 index 3486a1c1a2a6e5ea87f0f093eead6eef02fc5787..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 483 zcmV<90UZ8ENk%w1VMYKF0K@QTIzV5!G%%dqYDH|di+W*>?yOuUYHf@M)N?l66?Y`sx{O7Z($`wdZ%AfJ9lthDe?;FT|`Id$+8asag#H zSOF#K7nxwHSW)xPp$a*33>Y}50IJ;qOcgp{i2{%>UqLkoyCkdvYE~6ovmE?+Wa>+7jhyH1&(k?EEem4J~J7Y&w>9t~}UTZd|79u|S0 z4G|I^4^x@4pBAtm4;F=ybZ1|PsHz_dmJS{Z9Ugd?pUi*@ipW%v7ZuizrN5_Rii`{n zksS{nlg_k&xs84hpz6(C+G5;`782~97Z(w?v*vZ3en3^bW++}FVR76w!c&RVtOXLN zcmmaHj463sQdJ2zWn4K13=~xG#7=;v3Y$P+NywM4U>b~DG)lZR#a1i@eHxK+;Hgmr zc99gi1ZKtz!730cuq#>x4FV1cGDw|DwW`&tShH%)>R>CcCYHEpzi9J0%R8&;e)z$Iw z@$BsE=jZ2{nVA3p0OjT7A^8LV00000EC2ui07d{3000F4P{~QFy*TSF7h7N`j$~<` zXbLjJA~0|)&vb3yIQ|TV%RIoKa7Zi~kH}+U0PrQB&}ekod_4_^>;aGf0uBga;Sd}H z2M32EFbF2HgelXR1UR&g@I&or1Jgl(32FreYC(2ua#cTd4sj2F4Gwk%fex1s1P+!D zUw&B#4qZ=FbVzoPfTC|?f0(ZigLhnRoRbDnrdE!4mUj<^ps$;%~S<(%Y7YSm@ yoJq5$&6_xL>NL26K!cw^g9;r=w5ZXeM*$Qth@h#{r%x;#z07+S%D{Ikv?s){Bvm@#)j247h>fPZqGG4u}NV$-w%5 zfofk$=Ddtm>vCT2`yg?oAv#ukPy*1*6dNsk`UlL=c4 z{w=xDl~^q#q}`NVsBIwSa^CBT(N-O8F6WO5UJ1`jGK6@l9i7!mxm+1|U8_Xx3yVv$ zcsXr3z4}DCl}kBFQ`=SDS#u{;F)b+a3rGmzT%N(6lFQaBI|g(L1_;S4t4;8fzSlPQB# zfngwl&6_xL>fFh*r_Y`%3m72Kps3NKNRujE%CxD|0ssO4KtQ#s)vH*uYTe4UE7b@9 EI|81q{{R30 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_pause_ptbr.gif deleted file mode 100644 index bea56d65628a5056533247952e994e5f4d8d2de8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 989 zcmZ?wbhEHbbYl==_|Cv^^3TcKj@-p(7V``7Z@jxv%S3D6yM5I&t7VjBT*F+0(t{Ez z5;|6Oc*S~6+da+P)qKg>C5()WXa1jI7zLvtF!Vz}@h1z|6FMLglqVQCb}^`O$arj6 zaIl#}SS#klhJ}aQ1(dz!cx+sBw40eR;f_b(Q<&w9ODKjaf%%j); z*I##EzV5zpjd7mFo(>TX8zLK0W>R{Yda~ZK+W*=%L^f@RZI-*1N?l66?Y`sxkLQzm#ZQppV z?|kpu3V~yz7;uirq;kn@I-gLafFLOfKG>{w%k6r<;BYqJXjsMQv|3Fz53bxqWj?oH zCG`0MyLfmYb{}{NcNK(nSQm4Ld4^$aXIvM5a}XYO79I$6dzlp$2$vt37g(ep9-4fq zr5+D?gkX?wU6X+f9u=b=rCJpp3?B>?oxG;TxxgQr$hvH0kz11y7Z;fkyB5_K6CVq% z3msXfyRDfWxTl)iy|U1>lBx0)!I|=+!}1V>8$aZ)P;>?Kllc7@WTb1g8gr{~wF`!Ct zs~4VYz9hI1E6dso!Q!HU#34Y2zkmY^9!$8f;lqdlPdH$QzyYR^BTJr4xw7TUm?c|? Zz&HYi&!9t#9!C>n~0{{>L06T30_^bc` diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF.gif deleted file mode 100644 index 0ae4cb9ad8838d1d853f5e494d3f9f5ba5a0753f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 533 zcmV+w0_y!oNk%w1VM_oK0K@uYOkx3{;}*4DDJ zvgqjOe}8}5+uIKh4<8>NTwGjzj9tj@_6`HxD!?wL2n8mkfuw__~5EmDg5V#i77ZM)_s|Ouc zq`0b<9kryF*t)M`jzkfE>NzkmY^9!$8fVZRat1b89CXcOga80Le(>@_ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF_es.gif deleted file mode 100644 index 921d5d5e38e6e3ce11a6898e5511517585050892..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmVn_>yZXI(+5)D8fyS3nP;kwaTU@^5el38LJY#9Wp(p+aEp z8n7S-gKT034IY4L2^cxBb|{-22ek1DsjpE0e5ArxNjM@_UPK&BxUk{Fh!ZPbY`B0K ly$vEuo=my2<;$2eYo46QF@n#aLyI0wy0q!js7Xfv06Pnd%zgj> diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_OFF_ptbr.gif deleted file mode 100644 index 43bb9235492045f41452893cdfc8e1e7f78f794a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmZ?wbhEHbbYl==IKsei{`UET?g9Y;f$iJ3S65dbKYm)N$z^78UAF)_Zr zzS-H?kDorCIdf)QSzPPv))gyO*xA`_Ikv?s){Bvm@#)j247h>fPZqGG4u}NV$-w%5 zfofk$=Ddtm>vCT2`@nIeo;%e zTkKuKvEk&7z3MCa1(}nJLMDl(v9ocx%$&U|YUWLr3(NOk-V%OYjJ1-jqH4oyQMMMZ z9Wyx&omtxPV%mz$3l4~?a5JybI63LGlTkf?`qfnl@8Ty4Id#OiBxWsk7nQZ|Qn~oR rqnT49Sawy+$xTa7Pd7+rt6+G**gD&y_|=`0o0p%T?~vcdz+epknKqsg diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_resume_es.gif deleted file mode 100644 index 1b096144c2d29f00b803c8f5331b20b2afca3d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 500 zcmV|Nk%w1VM_oK0J8u9S#Mbs85Gk0(y-jHkF$@KyOwQ;Z8k(UN?l66?Y`sx zu?PYq&vb3yc&_jBGZ-(%V@NC-kI1BQ$s{HUz*uuityZ5=A+d3AI1qzj0uXQn z3`D>IAU+(>>xaQjXU`kM!C|1MyYmQM2Y60UL0e`90A>jfT?lgyY>r-y4PIyt2XdNq zoB@pm4h4N~UOoW<00w1*4_Jposf}_04F(QqLtSB}cxt&1nw$kjxWS^uL|tf$$_c53 zS$UF2fnh_qaBggG!Nb}G;$gUCPorto57Ft^uu>1Ax&zlh(9RTCvC5()WXa1jIAPy-0WC1JG0g)g(8Cd@>Q0Ys_oR_g`UC!%$ z1v=+Ta_=iQ%x`-9MoadTVCSDMEXoC4T0jmJ)+q_U|~7G@0rX<7^``^Mtrv6ZyE(h02u*1giu?Cr7ZccB&_< zdAkP-a`1He&8|?LBE;Ai$Qc_a$lc`Zx`d~sq+->&wVm_a%Gp*Q*}Ox2aTgy`T&{nw zU?Mv!m;ID!TSKQ@VLZKP*SYmUmxNeKSc^+nKNDoFcilXNZSU~~nrEK~ajooD;phlz z;nL+i@=3LXRols;*1_Y;4?)4Cquq`MSuTQEkKGuK^EgO&Zd!73vPLlbs+f~PPR#-g F)&Rd2gq#2X diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf.gif deleted file mode 100644 index d19888ad1b70cd3e65fd2d38e46267353bc872bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 567 zcmV-70?7SGNk%w1VO;B-v9K&^oVVU)2Y+{<^TWA|NqkeRYX<)*Z+54 zca3q4#-7F^8zRi3%n=R|nR=NsDKp-(-tNBcW>RMV)&Hb}q+Lo~|KtDdzU}|n|Nqbb zs)(vYHbejb0RPPYA^8LV00000EC2ui09^nQ000I5U?E~;X`X1Ru59bFnh^wAZQppV z?|kq7y@Y|GsT?-Qq;kn@I-k&}^l2bK5(mR)%k6r<;IMd1E{g?>1y*ZryWem!TAdwF z2Az&VvQ^~&5FdU3eH~kW9S9s>et!d75QupWe_ND#ACZU-U~_9@9Uc*(4}77BfuRi( zAE8?w4|xwBk6ou74IYM?u#+CYgaf~Z!lRR&X`f;q4O_yGu3n)Y3auWmh946R57O6L z2p*i+T)MQarys(EW1e+l#R?F7)|=M30MWW!>$cw?0M3!amgfVleZ}%rLq>;<7zqOu za9eciSg3#vB7EED%mcea{{q%Bn2qE*aR^1UDGcMz;TH)FD3mi4&7YuO8%u^_#igdO zMFUAX(A6#FN0!Onh0#a>j|Z8d21p%{>e{wnuNp`VCDWf&3e382B>7<$0Z=2X}qAcN)0m@{kM z%(=7Y&!9U?0Pu(a01l{At6t5zwd>cgW6OSRVE_fv6fWrA&AYen-@t*nU>sHmuGYiqKy zvVVVnA0HpLx3>=u4~dD1E-o&{#>Upx)?8d%?(Xh$b92kf%T!cU)z#JU@$u~J?C0m_ zJv}{{nVA3p0OjT7A^8LV00000EC2ui09^nQ000I5U?z@aX`X1Ru57Cv6s65{ZQppV z?|i=-2Zh0~DH@N+q;kn@I-kwY;9&q9KG>{w%k6r<;IQ}`P%Ns~v3kvJhs$RxSR&wX z5)o{|&VPLN2zne?d>jNFTzh;1SPzAE4SZOUcOQ<04P9_(U>qJ0o(_4Qg?^q45+9ye z9u9U69*kO~91I?Vm#vTE&jH_Fo9to-*tb-pC3=YrKSOgxK z)mgW(s-z#kfnb|*U&09wdDEEFwg}F*S?IIe9|+{()$DwTg-@6rX~p8C`4T}uf^3Lr z5%c7a0R(RNmU&1=h@U@M1FeNb_pRWkgI?CKE#wk`!31%GobCI=3!_L+sj|rYg$Q8C z2Dh}CXo?h;IIw6^sj3Gb3A`n)eI-@IDdTTWy z6||Z$xdFvk(?NoqI%|3$5YHz*Z;Xb%LF=Zl;lpGIBVNq74IBU)0$`X-xw7TUm@{kM z%(=5>3k4VrDA1v_>C>oFt6t5zwd>cd1xzSVVZw#mxO3~?&AYen-@t?aCO{wr06Sl} B4E+EA diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_senddtmf_OFF_es.gif deleted file mode 100644 index 2d32c5e96ebf85c685d86208da558b548cce8fa2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 563 zcmV-30?hqKNk%w1VO;*nU>Yinz=va;LT z+vw=%e}8|sx3?c3AJ*2^E-o%yTwKS;$L{X#;o;$^sHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui09^nQ000I5peBxFX`X1Ru57y<)3nWWZQppV z?|i=-hlIhvDH@N+q;kn@I-kuCpkP=WKG>{w%k6r<;IR0sNHD6`v3kvJhs$THw{WS~ z5o>ybZNCUQSbcX5cUW{61s{TVTX1Mz79J3GjAIoR5^Np>bp#$3iWd%&7YG#|sDY@U zo0MFRa$S)XTL_2*1c??GScDyV9|fKcdvq2Al^-6w9}f-$S+iKD7ap|BpUTW$uxVV8 zlXZ#JrJKPXi4h(Wvl5aB%O8;h7PMLMSkm&=)1RNGkyvr6v!{`nN3uwXQ{>?RLo5z1 zJRlHZA1w(L3dD<)XbV1z`S^VRDB!{|fXW82UMQ%g8zhlgs;LSoZB_#Z5a99Br{!Zc zhag9OisT37$1W}tMzFvXl+1_C2t*8d$%6oOJ7L~)z_eOLs{Jf9SY>n@(u1+Sp<3$! z>eCPEI<_0-hrk1#_tqi<8Wg3c24%q{bwjwY;j?kP9bU|M4V(oW6l9o8xw7TUm@{kM z%(=5>2?GL905G6~>C>oFt6t5zwd>cgU0a9{Is%5*nU>Yinz=va;LT z+vw=%e}8|sx3?c3AJ*2^E-o%yTwKS;$L{X#;o;$^sHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui09^nQ000I5peBxFX`X1Ru57y<)3nWWZQppV z?|i=-hlIhvDH@N+q;kn@I-kuCpkP=WKG>{w%k6r<;IR0sNHD6`v3kvJhs$THw{WS~ z5o>ybZNCUQSbcX5cUW{61s{TVTX1Mz79J3GjAIoR5^Np>bp#$3iWd%&7YG#|sDY@U zo0MFRa$S)XTL_2*1c??GScDyV9|fKcdvq2Al^-6w9}f-$S+iKD7ap|BpUTW$uxVV8 zlXZ#JrJKPXi4h(Wvl5aB%O8;h7PMLMSkm&=)1RNGkyvr6v!{`nN3uwXQ{>?RLo5z1 zJRlHZA1w(L3dD<)XbV1z`S^VRDB!{|fXW82UMQ%g8zhlgs;LSoZB_#Z5a99Br{!Zc zhag9OisT37$1W}tMzFvXl+1_C2t*8d$%6oOJ7L~)z_eOLs{Jf9SY>n@(u1+Sp<3$! z>eCPEI<_0-hrk1#_tqi<8Wg3c24%q{bwjwY;j?kP9bU|M4V(oW6l9o8xw7TUm@{kM z%(=5>2?GL905G6~>C>oFt6t5zwd>cgU0a9{Is%5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui09^nQ000I5pde;sX`X1Ru59bF)KC=EX5VTmtT=|VU!hK3X2E`j20JLhaG(%384>ucNPekA0EFS5Dy4kwp*$f9=Fb-&Cg-8 zbzhX0c#PPnp2QxE5*`z_6O{_iACw3dw_NmF)%DrdqC}~p^y(8HKakQ$5_hUxBM%TB zZh3G40s;yCZcV6=fF31AUiM|=_wU0%0~eIB4Qyuc0>UofYL(=Itrf{?wj4Z&Fz;8t zE+Vl-9BEP%r9dl1f{8iFg9HmuN7a-F4FN@xnmib2=X0jM2T-wL#0t=Y16N7CEmcUX z>8iI>r+#P$5}v6*2q65__jcJ(qANo=NIQlpoWqC{ubmT4vE#>WB5?qqp|a)6m@{kM z%(=7Y&zvV57!}|^htsH2t6t5zwd>cgW52c_VYCDcxO3~?&AYen-@tT z|Ih!bh^hbp0RPPYA^8LV00000EC2ui09^nQ000I5pde;sX`X1Ru59bF)KC=EX5VTmtT=|VU!hK3X2E`j20JLhaG(%384>ucNPekA0EFS5Dy4kwp*$f9=Fb-&Cg-8 zbzhX0c#PPnp2QxE5*`z_6O{_iACw3dw_NmF)%DrdqC}~p^y(8HKakQ$5_hUxBM%TB zZh3G40s;yCZcV6=fF31AUiM|=_wU0%0~eIB4Qyuc0>UofYL(=Itrf{?wj4Z&Fz;8t zE+Vl-9BEP%r9dl1f{8iFg9HmuN7a-F4FN@xnmib2=X0jM2T-wL#0t=Y16N7CEmcUX z>8iI>r+#P$5}v6*2q65__jcJ(qANo=NIQlpoWqC{ubmT4vE#>WB5?qqp|a)6m@{kM z%(=7Y&zvV57!}|^htsH2t6t5zwd>cgW52c_VYCDcxO3~?&AYen-@tA{!#^zV6JU%y(aRnR=OKQf7^DjmDnFgK2|ePGX2{h(tC-T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zCK7VIVYyr$3m*=CgclGW2!0J`5QPUFf`xvEXOa(#gOZE~7ZC_&e13qHg_j?Vgr*;V zkr8Htl%buUZ+CeHWpEcB3cCplnF$_~9|yt~XBNDE!U(~`hG-rMehR~g9t?$M*4iE( zhYrHM-;~qU*UG)t35(YV-^lRD3k=KUwRn1P*=EYfW_F!f;2{D72FX0o>fiz3Di3R} zaf3K7%|9~>5*#Q74r77@W+Z;F_CXn~i|@Yw{i+zDn%C98&vnbO{cio9MS7%OuhoCOvhFh~HY z=$W+$AQS{@k3mkiYR<(o!!*@HG&x0P{iL@cPg+*F#+9!MFpQ}z`2%5rQX*4k7#?{G zjzJRFNBOMdX%Rs6R|8?0L7-I9Igky9RMj07lNpX#01s#1e6m0U!Z6?v0{Ixc_! zG6Epb!IMx%Ddm(@R%zvxSZ1l^mRxojr3Ic)Pyq&HmTBghXr`&=nryb|=9_TFDW{nS I91sEkJJ-f+VgLXD diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF.gif deleted file mode 100644 index 3ee4ca62464a9aabe253bf236ac4e5d1f24971c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 778 zcmV+l1NHnzNk%w1VUYk30K@U1UA0O7% z*0;B}YinzXiHTfXTYIkI-k&}bV{vSuh^`1`}_nNj|k*LE}PHjw0g~MyWjA*ybO>` z!eh6>a=9=N9}9hh7Y!c;eF|j_gaaLcgnfo(kqnB0k&6Qt4h3a1_+o29+Dpez!qf|x_!U}zrlrO9tM2}!G|6Rgk;p%9v+4Z zz`Na((bLt)yVM4X)dk(g?#2iS$>X$kcyHHa$i`&3We|99kRZV^53@RW@TbZ{nrhk{ z#yiuG3<3iKhIzASzyKMDAE@ebP&ClP#KZ@5m@c)zHjMkXJq7U8r*wRjn`Mu_=nqoYDv%b^gHQ$Z*p2SU8LK-6hfQD1o2%!70wUSeBHM zuIvyNnW4_D4FeR7`Q!x)*exKqXy7FMII5k~|Q7@6fm<8@=){Q3!H~>rn3>DDd0StlkpnTmN zFbjMR5*A2*35b$kOmnp8;)^iG7-KCFZ~#CCIOeG1jy(40mTBghXr`&=nryb|=9_TFDW{nO I3=jeUJ9?XCO#lD@ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF_es.gif deleted file mode 100644 index ff9a3447481573b9d6e54da199c844ad7a754bf2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 788 zcmV+v1MB=pNk%w1VUYk30K@U3x=H~0`>wkZL=;-L%+uO3TvhMEgVPRoA^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPb9wB2~F z?|kq7z@TtQEan^yiNnEZI-k&}bV{vSuh^`1`}_bB4oKreE}PHjw0g~MyWjA*yd04{ z!eg{zVdx+ZbAfRe7jYg49UTIIZG>}aCLWLX$S@d6$Azhf}w1XZjuBQ1qK9e zq;Lm}A08fYmUw6$9kU+{0v53Z9T$KJ7X`rbC3=gSU~201$rkbnfdn0 z7)&xUPbR9_P1^yt0}+s!XVS()xj~R!MK0Udm$zmo7=}I#lg&HEPyu;Urb4 z>5JjOLSo5&NI*aUTEyg5mL+h3VqyX2Xl6#etTpAldxf!f{dctBtOpHeLwzP8V>6oi z88D#0p~i@w<1$oL0RczLgcvNZAo2n>uf)Bb;?A8Uy~L(a0W*6$T!HgD1^9FiUufK- zB#~Y|nV5|6G<)NG7S| zl1w(~0+o^QGo0suRf`d+O7 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_OFF_ptbr.gif deleted file mode 100644 index 221057781e3724d1d457e17ae173cc85f590ddc8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 783 zcmV+q1MvJuNk%w1VUYk30M!5hmX?+d4h|a|8?mvmL_|b-dU{`9U!$X=DJdz=&d%4@ z*HTha($dny!^57Qo^f$;<>lqo)z#YC+F4mylarH9PEMeppxxcw-{0SlkB{W!mn;DV04=4w zk-#&r%#*pE(Tu1DEi5!FGBqp(H3QlL#0Ca61*{0c1qQ~!HL|vfEyV4{2igIqGrsu; z258VAph#RRd+Ok|V6~uIHAT~QJ@ht8TLERJmJtvD0D%CCH4qq(Wl9+VXv!2F004lP z$rdvL03bjk9E}+@3`%al2! zSJRuoQCd~DK+u%{Qdi+x(6qITYK^M_O|d|rC}7g1NuBzV3Uz8#ZUG1s$l7($ft!m^ zrL3{A#e%LeWeos80~-yteq{t6ESGN1!qxCj)T@XuP>&QTx4_64v?6237J}`{f+N{Q z0t66LHskS6+Z;===6v)nCu*ZB?#(!L95JWc2+VdQ!vHG*3xX| z5zM2^GbuBfdYSIN?q*VE-Lc*O*Z+-ijmDnF|JwhEZHT*;yF@lbT}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehDU>MY< z?|kq7z@TtQEEU z0~1M^?RY3W3=4LHbQc$N9Sj~G1%hyfc93Tl9u0GNdIV-`3hk6v%f#vl2|o1E#_hv}3ikr8!KG;pxit^~ zRcJMi*aK||LVZxcV4^v4-^>{rR-u811d90oNgPG*5SoYuvIRrqftv#hIB%|GB-5aW z2Nx^A?8z}1H%J!~WV3`((X2apa;16rvZA_O7RaePS&@>xVO9;gT%h2=nFSW^skD?v zoUCLs&(u`82q(C13*Z`LaK;{9xRh))sCJ0!2fth?#f6$_Q<`19D8=(|)k9Vfa=DSC zQ~_r&s*uQ<{m=kG0kw+Hxjc*D!o|e}(%syg+L>$1d;1n^{W>sd!XFGH=9XFwL&s@4 z0aT#CLBx&}sm^`asse+Ln8iY1UZLcLZD5OsQ`Nou$$N`atr~_FH@O7peHIA%K7P@; zNKY;eP8_%Ks12>r#~;P4^Nb+UX@;4RGaev-V0MO3vIsF9aA%o#^h~%21jA%h5E>RJ z!bmWwad?s{d)-rja~-1C&jsp0GSD`eskGP`$CaYvjy(3rBQ6{Spuvzt7HQ;>NG7S| zl1w(~rwPdN~mRxq}<(FWFDdw1DmTBge6+BSo0~oaF=9_TFDd(JY S)@kRRc;>0+o^Qq!0suS8{BPa> diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_startrecording_ptbr.gif deleted file mode 100644 index 15b25990c217f66c0c06cadaa54da9323734c84b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 784 zcmV+r1MmDtNk%w1VUYk30M!5hyOz5V4iO?7BHgjwRYX;HUw4^$narci?!N9bDKr1h z|Nqzj^uzT3(*KQdjmDnFW>RMV<^TWM|Nqth|IPool(}zNZ{oG$$e_rEYli>b|5QU% z|Iz>T#Py_uq}8g`er0}QPGbAX`)pQhxRbcEkF$VgfQfF2|KI;yN?iZq|NrFwPd`u5 zr_n?`H{o1KWar=yPm1CIv>mo5PY057Gy zk-#;t%#*pE(Tu1CFD^DN2sbVUHv`%N#03R62CNCe1_j2!H?p>hFU0M}2igIqHNN== z1#H+Lph#RRd+Ol5UW!-bO}R**C}7g1NuBzV3Uz8#ZUG1w$l7($ft!m^ zrM$851%$3KWeose1Dg%Deh~y7ESGN1!qxCj)T@XuP>&QTzre^Cv?6237J}{Sf+N{Q z0t66LR^#zc+Z;===6v)nCu*ZB?#(!L95JWc2+Vebpa3fY5P~g^x$iPpoC5?@Mr)9q zR~ORhG29yZxWuIJ<3~C`z_a{FxhBx)0HeSE{{RLk;D7`cXyAbe{s#gJ79{B4fftaF zfe0;>P{V~7W~kwY9Cqj};fElGDB_4DmWZJTCyY>m2_eMb;)^iGDC3MY)@b96IOeG1 Ojy%4Y!UhBc0RTHeduROs diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording.gif deleted file mode 100644 index 6f3bfedef7d3482f2667125fb2e348054fe81098..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 758 zcmVT z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zCK7Tza=0`QW(*gDgk~0fe`kV(7HJWL7Y7}IkQWhV5Q`QHXB`cZmu8QIl9Y^Q50)Q- zfU6g02%i_5b9Z?LWpfrD2^S6?lY$Gpg9^jFzYS&=9)k%Ujc2j91W^y~=lRTyd zzY;JIDtap6fb%e8S40sEBhW?)Sn!N<0|#vM9DoW9*dTcq1vHmI=N%A=O?dEA$A=(> zDB_4A?!&k!H+-&Dddnu7HQ;>NG7S| ol1w%kBzC{Nk%w1VUYk30K@YinFw zTn`Tqx3{;(#>VF6=IiV0iHV7Se}A&FvgqjO?(XjD>gsxWdObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPk@wcU8G z?|kq7z@TtQEan~#$)mz)I-k&}bV{vSuh^`1`}_nTkBQ?$E}PHjw0g~MyWjA*ybO>; z!ecpPa8VS<2^WHcWEOmWWr2ehXApxI108^m7Z79(iWUcD9SV?^WR8Q8lZ#{wl^=nB zsuyJio)?;Nb$4QN79Iu{3m%ez2)cp?!MnW*WEUQS1|E!Mxd?*2f69-R9UjZg2%8EX z3m4p*(bFE)%i_x)1<*t%`hfQC&;PW1LPu>sroW+#;hs1Dr;vT7{Q3`w7G3_cAtSVhzBMZ z_`#&4tY|`h_y+fkLj({DWD7`-rD)Q7A$CyAaI-e80S^?&HJMH2IGbgCyG(}bhX%)r zzKpF#^oL;Rh!VB58G(i2n}P`k*Uvfhg+zzHC3&D(Tx%8*H0!NG7S| nl1w%k*r&ga80LJ#}7} diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_es.gif deleted file mode 100644 index 2806311fd1ccdfba0fd88e5dd7940e9d2351ef09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 701 zcmV;u0z&;qNk%w1VUYk30K@A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VP}*wcU8G z?|kq7z@TtQEan~&$>YIkI-k&}bV{vSuh^`1`}_zX4?yHYE}PHjw0g~MyWjA*yd02F z!sGd+!|yZ}b7uz~atj1}3KwsC26F}-ie!%vfogSkVu5=M7YrQ=m1To*3kV1a7YZE- zZj5sd1`}l-9-(QMc$yuJAEOJZ2$Ty42?z`hho^#sW)6d^XNQ1f1gsFm9S{%*pMaaD zkqLYU4j;%J2#UkP$qD5N2iw7cxS4t#oSp|C3hCS*kJ1_Nl;BV#GNa58Y_Q8rhkYLw z7?}8BPlF2+{D|APCy}ZJ5IPVr_~B3jh7%$G@mqC>L9d765YV%e>t3G&fM9u01rXW? zbO#1OM99p{#6i5s_#w)tVuxBECKw3G@#zN-DkX|jv~&W-M;9Kk`oQpIxrB1+<&opc z%mD=qc!E``V4{I(M9*A6Kme&3X%P*Sbu~djgN;sWVZGo1!2wTP8$|sINi3PN3DL$; zt1D^G!~f=%#JANgqzkA6rfOKG)Ts-}oHp7+K%die9|yrxX%gjJRRy7CF1nefJ+`bx zeG->4(m8zPl=nG}ZqGq7h7cu?MOf7V0tg&@o7Z@if_>-G^;FmHEHlk;INO>}zrKC? zmjG}GkfFc-{{RLk;D7`cXyAbeCaB;#g8ofVzyMwpK+A*_R%qdc7-p#9h8%Y2;fEkn jXhA0rGJwH}D5j|5iY&J1;)^iGDC3MY)|lc*Apih7IqX2* diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif deleted file mode 100644 index c0259410348526d42f3ae43c3aa57a7eaa1caad6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 778 zcmV+l1NHnzNk%w1VUYk30M!5hHa0d64i1)(DJdHp8_v$oQc_YxL`2uu z*TciZ($dm#adEM+v7Vluqobqc<>l4Y)!N$H&CSiHr>9m{R>Z`_larHXW@dwfgWcWT z$;ruUYis1>ISV^jcK|Z>Z9Qc*o+wg1SFuLh@pT217f-2Hg3_i8W4QRBS~NY z0D}Jr&^TBCfdgZ`Y6M7t5kU?AkRofSdKOILLr&BriW=oj5rh^6IMyhoNJh(SH2|=) zCY2kFe_Gpx`=^tD1Bx{qwAknit-Kmmfw`jkldMCCpB$bv=?#HYtTJ}W9BJ1njeLp# zfF-LHDp{B6Y6vLRYjQ1lffEd#%CA7-Xn2k8O>E%fUssb`B+L3at1)B&7I)+sThZB8 z6KD9XwX9p~af@YXaGgWDHnkz$R;Wtfn7qe$c_a0k{c%J;)8f zbGUw+8ZBKJiY&J1;)^iGDC3MY)@b96II>7W I0zm)(J7?2Y82|tP diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_es.gif deleted file mode 100644 index 94f9de9d67f7767cad0dbf53bd0c8900613cc8f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 699 zcmV;s0z~~sNk%w1VUYk30K@?!NAsdYQ(a#@(^qjd6{MZi$0wgNSX2T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zBouP}bMg2+4-I>02_AF}2Yw6}aeWAN2p)`Pkr9JycXJppdtcm3)5U!a6l=VY9A_zEhAPdb~c{1hPRtTqMW=Mx~ucZqa zlv6oL9cgq%|M*G0u8+cri9{)=MYvUh0}CLCv)9-a1Apq+{cHyhEkn(5jOUt9zrOuC zyEqKcz`wu${{RLk;D7`cXyAbeCa7RIe^W6c00Or}DB*+@R%qdc7-p#9h8%Y2;e-`9 hfPe)KU|`~jD5j|5iY&J1;)^iGDC3MYqDWE*06UjbG~NIJ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_stoprecording_ptbr.gif deleted file mode 100644 index 8a76e8605464cf9539f20a04d82aa76d4450d482..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 779 zcmV+m1N8hyNk%w1VUYk30M!5hL^edbmb(!S5qDpAnR=NsDKjD)BJRHKW>RMV&i_?J zRsYxj^uzSsvE9a=#*J}}|I+`=qs;&1|Nq+m|JDDbgQRR$Z2QUk|IPn^W`O_X|MkT6 z$e_r%l(~j$hKX*8|K0zykF(;n;#^8x|Kk7u(f?FKRANqI(WlY4lej-KKmXtVj&hEE zWq#GF)rf6~?Y`|@N?rfs|Nq(l|Ih!bh^hbp0RPPY0000000000000000000000000 z00000A^8LV00000EC2ui0FeL?000L6K#4>nD;kf;q;kn@I-k&}bZR6`5-ZST#_f8) z;IMd1E}PHjw7R=UaAuSeZBDP-@A$la&+q&HfPr)vE(8k@2{($1jE#wort!Oq5%N|HUzti00IO7qOQY^ z0Sz_E%agdC(Tt*tHZKPNHUi23F9HJus|5`=11|;zi?OweFA?bK1rY|UH8(G&Hv|Ca zqZB9#a1X$Ne&x=k>ISXajcK|Z>a*bsSdAJ20w}Pdh+%*N17f-2Hg3_i8xefTBS~NY z0D}Jr*f>}KK?7sGZU|6-5y1`rkRorWdKOILLr&BriW=ojQG^!-INm6w=s?SCHvq7+ zCY76we_Gpx`=^sY1By2qyx8aqt-Kpnfw`jkldMCCpB$bv=?#HYtOs_=9BJ37jeLp# zfF-LHDp{B6ZUiXRYjQ1lffWp%%CA7-Xn2k8O>E%fUssb~B+L3at1)B(7I)+sThZB8 z6KnXbwX72q=Te@W`Kxoh(tC-T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zA`-H^aq0UPe0~QVXcHF}XnhZ67Z7F$h6fF13x0i*mVFB!5SA00aSaC-69{Jy7JU#5 zl%%bbfq!y$c?M;neI5y#79I|L2_B{&3%Utt9v%l~9v2@7x)%x_j?fBzlhLvl&AADS zZw?;U$&(Agzva)#h|q|=znZgndUVZay~7hpbC>2`8g6GG z2z%43AAfCC^MO{qISxPnzys!C(}P_vmoc06?H&V#2P_P;=7-s? zo*%gR83(Qnx1wi!p^=EdS~HQpRLwDIt4>OI(-g4!(102OZd;r6(&)@g2Mc7^UF+l1 z5~F6p4j^S

    84%Xu_5?lg}MDjqjp1no6&#y}cv<^%Iwj9W!T)o%Pzr5xVz|hWF4xvP$HiAfinYTO%W(i@R(RKXZsXbfDkOCWn{wZ z>I{naLr0`*I!>@K4bi>?5U5jI7ud3EIqiKFn|UWR%qdc7-p#9h8%Y2;fElG zC}M>nAtC?*9i*t@iY&J1;)^iGDC3MY)@b96DpFuUDHTkB!H+-&Dddnu7HQ;>NG7S| Ol1w%kNx3{-0E-uE# z#)*lE*4EZ*YisN4>*nU>=;-Kwe}7zDT(YvV?(Xh$b8~undObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPw{wcU8G z?|kq7z@TtQEan`KiNnEZI-k&}bV{vSuh^`1`}_nJ4#?v}E}PHjw0g~MyWjA*ybPE` z!sGYi!tW#YeFGh45*HR`d<XeKVFW*|NpUbZNDhu$W%A9~gWC z=7@1p4}&t}`ta?OK@SYpQEUuyj?_Gc$+q6C;Mmdv2M#z6W^5V00~Q+i@|aH{aJo2u z-uPi&p-p|(a-@d-dfJZ*!;*PzNr88>cd^_Uw4 z5_|zKQ{dt*eU<&S7iWXb0$WH3CaB<9f(*VP3j`bhkimo$R%qdc7-p#9h8%Y2;fElG zNTC7*2;c<)9i*t@iY&J1;)^iGDC3MY)@b96D_S4{0ToDq!H+-&Dddnu7HQ;>NG7S| Ol1w%k+9=(e}Cxc=-b=dva+&VTwKS;$L{X#b8~ZgdU`!QJ*cRtR8&;e)z$Iw@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPD1wB2~F z?|kq7z@TtQEan&s2!p|CI-k&}bV{vSuh^`1`}_bB49DU_E}PHjw0g~MyWjA*y!?PP z!eh9>!si?2X%!X`fNvHFfCqvW6$f&Hgl~0sVsU#29S9bGg=H6+7M*Ps7jp-g2&j&4 zpPF!!cyphn3XB8>3I!bnr3r@w1qvUz9k(B-hz1=UoQwqs2NuPMwFw0Th#v_A9RiMr z!@9hq9i<;01Rm$Q7Q)rnh{&&Yv2wE?p9G}W6$GIb9X56QAb?ke2&Xb70BAs2g%8UN zBoLraKnDe%3iKl|ETBV(5Bd3PV*vpg37Pu;6~MP^<1vNvDCLQB?^Ct|7d#aB*Wnw_ z0uf5xv*3?ts1A{K@##RSgF1j806Iz_jOhoQIzyFNNU97UGZLcqJXh}1(+(`nNupQD zUb(baOB&cImdw`!2@GILFqGGY3soON6!7Y6~0h8%Y2;fElG uDB_4DmT2OMD0Xlqo)z#YC+Gb{E;^N}u{f9gM)*hprFLW#A|D7 zkB^T|PEMMdnzgmH-{0S-r>B#Xld7t!Zf zN=nbq&)M18h=_>3zPnT`qqG6$0~q?9VC1Fe=SG6MvYF#@)iD=U_porsVsDl4oi0Huwz z0S1!*3a&CMDg`nDmof+{(ULGQ1hSL_x0S%2lC+8j)G{yz1Jls~^wTjj@G=4h1gI+n zF^mmxMu6IY04to)TQQ*9q8Ol=pJvt{WlDZkRwt1MQk(9Cj1J+2%C;%XUik1Hg#Ii;Jz(uD%hl*3=R3;;f0jxRu z8I)rH0#XMQm|?5{v1>hN)Czz=#;pO{2KeeVLx2Dkav{V=BzWwLS^`YKt~DU2BaUek>c8?s(b z=xjQ^*>6Q!x}otMK&9a3PyomU%aEDa*CU9kOkU>fnXL1|g=xV+o(%Ykn8+Du40rBmZ@S&^16cHVT}7?~0BD7CtW^F00+o_zM{=bwPmi2(@~pfEuPEhMVwqKr1` W=%bKED(R$@R%+>`i=I$G5CA(uS(GjS diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_transferconf_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_transferconf_es.gif deleted file mode 100644 index 10cfa495e22198ce1fe7c347d6befa0ad7a00e78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 714 zcmV;*0yX_dNk%w1VUYk30K@UQ_#-7HFagAnDX5O;i|JDD9ZHPoRM7x%|T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehKU>IAj z?|kq7z@TtQEEU z1CR*WJXcu$e+qVN6&4bMauy7O3xyUH3w4Eua(H@WbbbvU4HklkXcwFopl}rzb_<&g ztC4b|opY9ZcA}^bj|d752_6Zk42lQ|4j;T8x*w~H3LYMxj|mM67RZaZ3<(H}9}EZ{ z1(Axzy}za&s2?2&9qPRn#n{@5%d&a2b+#X(2&dW=2uM}%;0fG^0>3IqP{oPCKn2Yz zd~l|KL4ke+JU9@Q03ZTm1S3wA_%9$F3k}x)OyC4C!9HIel{K_?i4PrpqPQ)%&>?|9 z58{3%kbp{`g@8v%d7$L$kB3tp+70|LFcO1ePe1JJNeYd_Q)vFAnLrh&I&`9>dU%~_uTtni0suF^K{ zfL88QeKhgil#3Ib0+Uleh)s~7181nH21+RJ|DKr1h z|J||O|JVP|Iw$>;MuY000000000000000000000000000000 z00000A^8LV00000EC2ui0FeL?000L6z{v#jDjJW-q;kn@I-k&}bZYEG6dF+^#_f8) z;IMd1E}PHjw7SbssA7_gY)-G+@A$la&+q&HfPr)z76uFt3N?z0jE#a2LiU2EiIOtorsVuEG?`o0i}(! z00xr*3$8RRECnl=pJvt{WlDZnSwr!ZEk(4q21lCB=C=dVuihR)B=!z#;pO{2Kee#Lx2Dlav{nEKTHO`|Fu;mz0!4+5 zCHRWduUY}USUGj3)~5hSRTp(DStG&R!<9qR>V=BzWwLS^`YKt~>5LiyUei4g8?s(b z=xjQ^*{?-fx}otQK(*lJ&;ZB<(~z0i*CU9kOkU>fnXL1|g=x(|o(y=4n8+Jy40rBmZ@S&^0a)~TokcDL0ceGDtW^F00+o_zM{=bwPm=>ZBMd{Dv#E+nexqKr1` Y=%bKED(R$@R%+>`ih^K50YLx&JE4W7SpWb4 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform.gif deleted file mode 100644 index 4d5228f315a95554722d2f1f2ba7a652cfbfe1d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 542 zcmV+(0^$8fNk%w1VUYk30K@(4h=@c)L|t87 z?d|QVs;U400RR90A^8LV00000EC2ui0FeL?000I5;3tk`X`X1Ru59bRa4gSsZQpH$ z?|kpK7{zZ$EYcDOgwYfTh%y?@Q^PPsuR_ID6X=w*+kvRF;0i_7>q0z;8bsjp5~*C0 z0v^Jr;qfp&1p*%$9$P{g9tBYX9sneWicw+<9s(MC1$u;6l>`8N9wLMu8Fn9ZrXz?Q z1ce@~9!`WNh>jl}q>qgx1BrSc2D!6njh}>$uBCRUsUN)=xSs}}rJGk`hzl7Rfq$xr zZXc^7ty0#64W6W=)Va$^%_5eFfEtKm=Nj0cefqkQZ)%Y!G^h}x0D7neuqS|;DQ3;^ zXea>8pr}wK1UieQ%hni(BTJr4xw7TUm=`

    C>oFt6t5zwQJE90)zknJMka$ga7~l diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF.gif deleted file mode 100644 index 64316ced737605d7f1754494f4d37c999f6a11ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 615 zcmV-t0+{_rNk%w1VUYk30K@hg4aqR5uR#sL^OG}}lp{1pz4-XHtw6xOF z(&FOcEiEl+X=&%@=ZA-fe0+S@*VnJFuUlJN#KgoN9v*mjcsx8j(b3UTQc~~l@8jd+ z>FMc~mX-hj0O8@`A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@X0O1z}AfY z3b-EN9(}iHyTKnF*TTSN3B0Wz4ejTcz|yzD;@I78rMUfL6VC!WX$_=db7n}=t_c<_ z(2`YVn5Pfl%7hEV@K%Lr*RCmSH;_%hQzhHvB-=IX!Y)Z2FF2eAOQt(wpVFDZWeeA@ z0<9DlaEU-+$~7lZ9Zj?90t0$Jt5G|n^FzEo72lO%hZUoTPv;acc&Bg|Bcn^vBu$%U z*VjbI0`-g-QI`jZ7LHADr>@Lcm&Xvux<>&40+1Hsi6qIE&Nh^d;lXl50hT{&(*n7j z29)m^1r}Z*C_wR^*8)a=B|sbb!`jxcV@EF4Bm#!pxO3~?&AYen-@t^x%21Hqf4Joy}I@5*t2Wj{yeV%0R%FLA5Xr#`Sa-0t6$H)z5Dm@$@2*T06V9> BAbJ1* diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF_es.gif deleted file mode 100644 index 75a5619688a3e2a42a61dbbe8fa79b3db34ebd4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4w7Nk%w1VUYk30K@{eD*OG`_kp`mGMX%7z%EiEmyw6q=` z9^&HS($doB=jVrqhu7EFudlD=<>h>Qe8a=T@bK`ZrKNaycsx8j(b3UTQc~~l@8jd+ z>FMc~mX-hj0O8@`A^8LV00000EC2ui0FeL?000I5AVq0pX`X1Ru59bRa4etPA_!cr z?|kq7z@TtQEE?< zAQEzY?YQ{;343uD25<=%4sQemW)^;p7ZYlSiGpl*c@brnXBHj^e}SBB9v5&E78Qyf z3?B*}9+C(LYZV?AqiUFXxt^+M9S9x@xF3WU2Zsh19tI8v2Z?=w(;uZD49v}D$H|Bv z2?QPo2CbbQ9So)D>Wm4(3W>G^uK?zwyPCNlo}h$b<17g4V9f)8RO1Z1A~uen2UWhT znF7#Em?~HYZQ*)lKwP0S32t?G*i56V0|Gt&B(Oz}SuuQgc#Z1kr;sOt>P!tYW6LHw zV;&qrd?=A;1!fl&@VwR2jIcBZE_nI?%G1hW7la`!lyhIcO*4s}!+Gu62a^$*3H@Mz z=rsce2p}zbmgzRCLD7iI%C;1(c@+XrXxcT`*L@MsOb9rTE?S~$`@waq6XmOmrs{5N z<}r<@Z4Sm|hSu>wU|7p;d5x*Bm)JAGh7~jWSe4prpTuEyh*C9e)!`D}GZXUXV%6Y; zp{z^qu3^?-_eq~ly}GWL8y;ZT&b_<$@8H9WA5Xr#`Sa-0bDvNESAqf^;>({;zrOwZ v`19-E&%eL_|MOV@Kmh>^kimfnCaB;Nf($n3;DZoGDB*+@R+!)-Apih73uZNM diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_OFF_ptbr.gif deleted file mode 100644 index 75a5619688a3e2a42a61dbbe8fa79b3db34ebd4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4w7Nk%w1VUYk30K@{eD*OG`_kp`mGMX%7z%EiEmyw6q=` z9^&HS($doB=jVrqhu7EFudlD=<>h>Qe8a=T@bK`ZrKNaycsx8j(b3UTQc~~l@8jd+ z>FMc~mX-hj0O8@`A^8LV00000EC2ui0FeL?000I5AVq0pX`X1Ru59bRa4etPA_!cr z?|kq7z@TtQEE?< zAQEzY?YQ{;343uD25<=%4sQemW)^;p7ZYlSiGpl*c@brnXBHj^e}SBB9v5&E78Qyf z3?B*}9+C(LYZV?AqiUFXxt^+M9S9x@xF3WU2Zsh19tI8v2Z?=w(;uZD49v}D$H|Bv z2?QPo2CbbQ9So)D>Wm4(3W>G^uK?zwyPCNlo}h$b<17g4V9f)8RO1Z1A~uen2UWhT znF7#Em?~HYZQ*)lKwP0S32t?G*i56V0|Gt&B(Oz}SuuQgc#Z1kr;sOt>P!tYW6LHw zV;&qrd?=A;1!fl&@VwR2jIcBZE_nI?%G1hW7la`!lyhIcO*4s}!+Gu62a^$*3H@Mz z=rsce2p}zbmgzRCLD7iI%C;1(c@+XrXxcT`*L@MsOb9rTE?S~$`@waq6XmOmrs{5N z<}r<@Z4Sm|hSu>wU|7p;d5x*Bm)JAGh7~jWSe4prpTuEyh*C9e)!`D}GZXUXV%6Y; zp{z^qu3^?-_eq~ly}GWL8y;ZT&b_<$@8H9WA5Xr#`Sa-0bDvNESAqf^;>({;zrOwZ v`19-E&%eL_|MOV@Kmh>^kimfnCaB;Nf($n3;DZoGDB*+@R+!)-Apih73uZNM diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_LB_webform_es.gif deleted file mode 100644 index d7590d66ce46679810c1cf0441b664cde042b36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 583 zcmV-N0=WH0Nk%w1VUYk30K@E0aXAR9smac0YXern;&i;29%W|kC9d%1a$!b zcOz&W25ug(9$Ey71ww!Wc?_*KglB0@Qwtse8HydAwQ|P*d5p&&hSVN&pA40X*v)`~ zc>r}&BLsmR*OlLR$chAjtCWqvNrl5w*2}SPiz0wiuN-->HmBOB4;U~|!dAdvpnoD1 zl?b2#%?CAT-YwFg$k~*AID+k{=4uwGPY2h;Rii}k1AuFu-T(+NU|~#$9wQDUQHP^T zH-2^{#IOJ&$QvSYkQ8C8oynAeTCzkVU?xnI$ns!&gD`5iaV5}X{T3 zX+2?wMkHF)2&$l!14E^$v(*~1sCH4QVpYPNNn>qq9TT)G+>WG1B1@he>;Z?%m@{kM z%(=7Y&!9t#9!E0aXAR9smac0YXern;&i;29%W|kC9d%1a$!b zcOz&W25ug(9$Ey71ww!Wc?_*KglB0@Qwtse8HydAwQ|P*d5p&&hSVN&pA40X*v)`~ zc>r}&BLsmR*OlLR$chAjtCWqvNrl5w*2}SPiz0wiuN-->HmBOB4;U~|!dAdvpnoD1 zl?b2#%?CAT-YwFg$k~*AID+k{=4uwGPY2h;Rii}k1AuFu-T(+NU|~#$9wQDUQHP^T zH-2^{#IOJ&$QvSYkQ8C8oynAeTCzkVU?xnI$ns!&gD`5iaV5}X{T3 zX+2?wMkHF)2&$l!14E^$v(*~1sCH4QVpYPNNn>qq9TT)G+>WG1B1@he>;Z?%m@{kM z%(=7Y&!9t#9!%-i^U<0Yt_C0RzD+x(KRp!W}C(G2Ae5N+^6UdOwJZ4Oo quxlvrAp`*)0%+XGvExPxAVZ1-sjEa*$p9i`z{62!H!8#Drd?ok z2@{2e$3Ywv3K0MlfB*(`4j3Oj9|UwB8cGBjfdG^fe`yMY01R{jKp0YO7m@%RU=ezM z2pks*2nqlLFGfs4w2?X=5FG#(8~}f+2OX+CL$n4J%*#3iA9ny53IQDu!V0Vu$7&7| z4Gj`>;8LK{ud!x-2OJy_-D_1?Q%N9kSU6u_naB*T#btI{5%dJEH*1KUDz+ xBAnPp-;yRx|_vNxXQrb?p`h;qQu1|7!xzIs_Klqyz%no|2J;@UsrdjzyDoY+N##p zyT-<$wzg^W=l_q4oU(WC|3ioVo0>)%83iv`@c-)7|LN(gTUzey-~T@)W%-pW{|gFs z2L*L#YPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>C*Kb<9~us{h22 zqLVpR^Dn$GessXW;l`S>({HQxKiE*=qt`DxvpMld-tPM!cGUQ-zy1ElA6dqL*Z&(D zo0?l{>gr`XI~h2YS!9{>Wf_#2Wo2@vu_!ZiP0#P2H(_Ddj9eL6-n_ZeIdgNk=T7fc zUNmLeyzTRNxJuiy>y?-~S(Rj!rInWD9#fW4Qks2!t?V&b#>H_+niBwZKG$J zmg6?YQ!Xp4*n2PSN|Bb&6FQN0OM0@hh{T`k>@(y987&GJ6qN!KVLa zw)wP?A(GZgOhM$|{BI8+xBx+9Wk2UnK9onV5WIs^f#R znc;TlJvw{6`l~n{W=HTWTX}`E_1fIJmksVG8adQfJdo?vees}KfawrBt9VVq!&Zs3 y6%X5F%3dfxY*%R0c+{b2r_jhM+_K|_vNxXQo~A0IC*EzQfzTUAxHc=2LQP0bZ6R$RV(`NoYK`}XbY=;+wE zaifciOJHE&`Sa&nTU$45*x>H&{_54MmoH!5yLYdwtn9&q2lwyacXD#-?ChL6b!u*I zu9=zH#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T9Zo)R){*Kzv83o^ zj@A4NFD^gY5nyv;P1)(URr?=osPNJ2m*qd=cqDK4{SP~8{MO%o|KrbHhJe@q8ycIM zTWad+WjZ?Al$d3tbEdH3ma}bx8)w%#mTjK zMnjyEn8alV;~?Foxzd{yH!N&yVBmIfd1_E9zodqB1LL==Mh^_ll&+pSy)s1AWQ*!a zw=1tV2bs-^-Mp6h?uIpYXRCjg)(HzfLGMow<(rNMd%E z+A;=46ODR_idd!`UhxUc8yIK5JHFiH)RdJ~3fVXGKDV?}40l7xq?5@{zP`SwsHoG^ z)7aS9qobqG&(G@W>fYYou&}U4M@P`m(20qO;o;%m-`@@n4wjadHa0eGZEcZ}k=fbV z=jZ1%G&BGJ0L;wHA^8LV00000EC2ui0Eqw)000I5pyP04X`X1Ru59bRaQsqD^=x>q z?|kq7z@TtQEDjrmh2q0(I-k&}bV{vSuh{H0Ay8_+;IMd1=6XLF4~FUST$lk%Gu^fr zn1zAoz-Y$jZ60<`7=Z(Q7#W0$9so>+0|lJ}85suy9|UR{1HiYryS=}Ji5V6FACOIuZJ*Qt8HI11Y1jnB z%Ekz|x@e7{q5!4<9(|3yckjJuyuQG%ofsAb1_8DP2Lw1mv*tqqQ34JyArRmbK!N%2 zh?;gvz#3_f7+G*cZ5xJxl(uD)$mHQbXC4Uug!&Lb022W5wy}{(kR(2W0SsWX6(GX} zPR=msyLie;&!3$v2vtgGfKU&*Fh*nKsbfSZwqh+Ucoe8m04skE08p;dn>|8Z1|9n0 zX0{9oLtPl>6RK7Z0T4`WqL*$cT|x2co#s@ZOQ{`&TCIsyq*B4R>H@|PD$PQjgXDce zi$U$BcnkRmdJv_>KCpv#sFeiWguXc9V2Y)Xr8`Go~3nX zHHD?KAV9#z`IKPO%Qpqp7u{Y^F=s(@0oloAkRBK?Fpf+MHppBdZ4B@RhL%_*3?p@D z(%4mhDac?!?2O_MWXz!w$R!2IbrTsh)@b96Rm_Ovjy(3L1s4)Ppuvzt7HQ;>NG7S| ol1w(~|_vNxXQpFEiD}%A0HGHR8>{AZ{I!_7nhEXjuk6bT)uqy#*G^rH*VC_ z)LguH@%i)TU%h&@VZ#O|C#SNqvU~ULUAS=J;lqb*ZEg4O-|y_~ba!{>x zS#ECb#EBDc-n{wz`EwH!69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T9oio|>qzyVSW77k}^tCU5YXbx@Puv_A4##UclTTrNq#v zt7HLVClkx6g;Gm$dgtZLR-C*3@Vtdb+p?$2C^E@#NlVMfNHXQHF(~fazix&S(_ALS zgNtsyx+$~n`pw&`ZrtQrFiq*D5(C2w#qUlM+>8erW-}@>v3Q7`ms`Oz!AK=JxsTZ@ z;&+JQ;xL8<9qIW-Ny)+r!8;kaV^*F@=)BX$Ai{nl%Xo6o#z|6lZAzw|b7=ctz(MI^0ym&SDTV31Xj6>FD1auU_o#1#6A=sZDoSzF*Ds3Y=g#F!KQCxD9cTO)Qm18j_0HQgm2atyt{JaAZ*B8wGMZDL8-aF}iHN z;mhPjA#9AiY7Pds6ij{Nr5ng9R* diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_blindtransfer_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_blindtransfer_es.gif deleted file mode 100644 index fdad633a72c62d52421726d166b2b1c4c1fc6604..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 758 zcmV+0|lJ}85sxz9|UR{1HiYryS=}Ji5V6FACOIuZJ*Qt8HI11Y1jnB z%Ekw{x@e7{q5!4<9(|3yckjJuyuQG%ofsAb1_8DP2n0Anv*tqqQ34P!ArRmbK!N%2 zh?;gvz#3_f7+G*cZ5xJxl(uD)$mHQbXC4Uug!&Lb022W5wy}{(kR(2W0SsWX6(GX} zPR=msyLie;&!3$v2vtgGfKU&*Fh*nKsbfSZwqh+Ucoe8m04skE08p;dn>|8Z1|9n0 zX0{9oLtPl>6RK7Z0S-)UqL*$cT|x2co#s@ZOQ{`&TCIsyq*B4R>H@|PD$PQjgXDce zi$U$BcnkRmdJv_>KCpv#sFeiWguXc9V2Y)Xr8`Go~3nX zHHD?KAV9#z`IKPO%Qpqp7u{Y^F=s(@0oloAkRBK?Fpf+MHppBdZ4B@RhL%_*3?p@D z(%4mhDac?!?2O_MWXz!w$R!2IbrTsh)@b96Rm_Ovjy(3L1s4rWu)&Z-7HQ;>NG7S| ol1w(~|_vNxXQpFBBJE(UT$lf785hGzyF=FacElFs=B&M%a{M(xbc5$>s@(y z*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E)NJnF0?)qi41 z(a9XE`4?UoUn)p&xUr_}^xLZa4>nZz==Dp_WJx-bxBLEw9W{RIZ@>TX=dVD(>;Dan zP0cMebva6%ozgO03_Q6~thq7_IkGa!EWJ{)%F zvQct_0>gGQS+STV%Sp>Rn3zQ}GFEY=SFU8Ct0F7bJ`Dq{aA_t6717l$;p>hvvaZ;~`XFp(SXQq{ z%^T*mXRotz?*7ZVJW%?aAQxN6li9v{vAY+nHQJ{(-C_BDHPe$5S zW%CVRCNG-8#>lJYU~o&p)Hi;b$&!T*y-$v~wQv_6K4|&h^1EB3*{&76j7>+G{DKoQ zFI@~~36S9GKAKV7qqLZ#O+aUpz!xzK$=(GA^Obc}4lzwwb7{7No~HYO39LVama>I~ zTFR!kY&@hWvVOG_!Jyuule@!`TPbptrrVg#Ijy2>`<%HU=_1raO9Za aruA~kl(4LqOJ}65dbw;)*{w_g25SJL^|W)2P!L_}4iqs(7lcN-fbv9aALDKm(O zs+N|!Ha0|UZHNE>0L;w)A^8LV00000EC2ui07L)|000E%@X1N5y*TU5yZ>Od2n?Y} zg+T$pgb=Gh8O38X6eBTwzk`AVU;#L^7P?6TClL@@l7@r%U@WSRtHiNgc)iu#v#fZA z!e)u)K#8XU2j&F}Og_SWAVYzR?|@@~14~0QE7QkIj64=`ZU$>?<}n=fb5&qrX<*e3 zl!y@Kd@EM#DRJa+ql<%lfpngAkyM~47mJy95(8sZA`=TYR}FV#vos@5AtzUI#+=G( qCT9EahOp_9EUp~9JPvm5?5sU~HD1AUO{}-C+_(S0!9((b4AuZE&rgg1 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_channel_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_channel_ptbr.gif deleted file mode 100644 index a4fbf1f57848740d610db3eab175d98fc1bb2548..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmZ?wbhEHbbYb9Q*v!Ci=FERHGnd@lj%m|&@7woIT3V^9YG!u#v#fZA z!e)u)K#8XU2j&F}Og_SWAVYzR?|@@~14~0QE7QkIj64=`ZU$>?<}n=fb5&qrX<*e3 zl!y@Kd@EM#DRJa+ql<%lfpngAkyM~47mJy95(8sZA`=TYR}FV#vos@5AtzUI#+=G( qCT9EahOp_9EUp~9JPvm5?5sU~HD1AUO{}-C+_(S0!9((b4AuZE&rgg1 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_code.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_code.gif deleted file mode 100644 index 8fb2b8c52d136fe0dde19cb30b348c465b4ea4f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 247 zcmV|W<*3)8yg~)mb+hHccY`sh={7OvE3;t zGkSWNZEc7)Hbejb0L;w)A^8LV00000EC2ui04o3x000D}@X1N5y*TU5yZ>M)T7}RI z3&jkLP)tT6H_SB8M`k!c12}?5K;a*rKNfoTTK84YzYEC1hRb&x&wS=y1$Mi!o$SH#>c}E06Sd+Tg?Cf diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer.gif deleted file mode 100644 index 68697edca82b97cd549e24bb7f031ba0b74c8fba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmZ?wbhEHboWLN!aFv09i%Zbmy}YXGOiav7d3odh{&ylGN@;1U>gp~T8;34m{(s}f z|E;ZeZEe%$&;P$*!T&2){_oxUKQeMkdirWp)5t@I{$IWN-^eI<|Nj3iEq78c3-v|vry>9ZSD1q%CbGOoa}kbvP^lbJ<|D1vdqOYvOLP{JyRC3Phy(Y+rzwk;^ZP`PFda= z%4@f+=V9!TVO3taY7WzG*}dy#=N(zGsweLZ1`%>8|w3o2x(MeJx;7Vv~I}=lciNXHS(saL?`tWxi5+g1sSVdvo5EO6BeA z1CL~LD|!Vl+1S9yaA(g>!vqD{6@pK;ofK41I>5p7Cq{^&GJj%+`G1#3I_6D|JN{3& zuhy0EK&^4N`Ja0X884nSa1`F1H0kkn#icU6`uTZF+C<~_P6-SAG^KcL!?xC|3tny6 zDV)a6oSo~|JXu(He-it%O`@+q`R08r+s+H~>TKm*z_3X)|clTsF{Cslnbk0M@4^tTAj=Ht2Um3h}N7Um>tPEaL zIylYlHY;&iJbhm9HhsYY&;AVdOqT=4?yf4fV`!Khac}-vsg7fl6l@}I<@DDw2ObF8 zt1MJ#df?#YfCZeEA*Eg=S+#ukRxaan_u9$Grse(4K1`iH&C?etN_co!kx7u+^K&xk5p9{#&5#9KMDWkK@AqX!wX ze|<1xh*=oe6lCXk=;It+k1~M}n`;cNj|*lbq>AK!^esLyEvD?{Q#tKA&1W-G#6BHo zmaJLuY*x;;m(OMw9MgP0r{r4Z^SKq9G#OciV+0P(Z(!4Uv7kjP>&3zjwN)<`^_W>@ I2ryU!0KPqJ;s5{u diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF.gif deleted file mode 100644 index 8bf2e44b703b46e4cbd6fccaf960afea356b8fda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmZ?wbhEHboWLN!aFv09mzOs_K7R4y#Z^^R($dnJnwtCe?d$01aB*?DeEIT<6)SGs zxUq5L#=yY9^XJdszkh$jh7C?mPWSHJd-dwo%a<=7Jb2*l?p{__*4f$F+S)pG>eSra zTr)GXi4!N@ym|B4vu7qICJYP=XU?1flC%JdKUu)W>VQa)pBUKwAK-lItRvNbVoA}- z9IN>kR$PfFv{9M2rtI|Fs{Ic(RQTx4J|FF#Hc?>b{SP~8{MO%o|6@@qO_8<;?}zi9QjhW<|lu?xabNmn$xn>DABAThb;Pw|7cd;HN3YXB)P)US05N%T8f6 zcBbrHx8}*h!uylhpKTI-{mFOVgt)DoYfmg(Z|e5*NN(?m#N};OFWE8}91i$KSh}6e z%t+sw7F4Zx=g``xKC5R>F1@=a+u`Svd#7_AGJa@bkUQ$uwti*s&K*&YFR?LrP3hn? zyW6bDWAXHP!Q1o&3p~3s*gahi9J{-!*p8uLa>Tv)XN5YBO;WIlyp_{m%N%$hXs?n` zq3VW%mjf1XnunBnm1O&1c=v8)#hJJeRaSkz-?l_9`j F4FH_pY;XVo diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif deleted file mode 100644 index 7ef98a94dd44bdb7586a2095872a72cada57f81f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776 zcmV+j1NZz#Nk%w1VUPe20K@000I5;PY@~X`X1Ru59bRa4egWBS~AX z?|kq7z@TtQEEbsrv%mWFbdRFH=YA8Uzr7$0|drFR9P z9v76FuXs*rO=|)Oj{=+rhX8f~85xYL00ILDe@?sszJ(aU0s&A3(HVDc3myO&$O9jg z0fC%P9?!vv<5Ahqkp-eq7^%R)Zg&Q(7p}+%8LpSXduXvT;A;RKIRx5xSY@izhin(J zf%@j{kwS*!26%v?G0+DCZU9Jgg6zPnO_fMdLZ8sHHuJ;w2*`C7mcrNa3Um5D!Cxr&CnoqiHH>yn4j|?A(bp zUd5lS1SD*5i5G$kE}bA{1RxNlCk*Z4ZFVRUF0xKAI=Z^h!$Bxf<9!vo67X26NW0d< zkdThfnLN9`1yie4Q2|dA8d?>PCn$+}rK!fVic?mO9s(V>^+Dv5l7CM^W=Xksvo!>E z>a7{2^{LOJ{`w@1kJ7zM1oHuH=p?|%Vg`w-m5K7r)Wp>oCCUcuj<>(NRh9$jX8yS+ z>oN!sa9|C;U27mDddn^{7B@HNG3_f z7Z6aO!IMx%Ddm(@R%zvxSZ1l^mRxojWds#WU_l3DmTBghXr`&=nryb|=9_TFDJPmC G002A1=T#*D diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif deleted file mode 100644 index 1ac7dbbb6fc70ce069c6ec44b09a8fdbad971fd7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 873 zcmZ?wbhEHboWLN!aFu~!+O%o$@$r0oeA3d=K|w)_7cbtpabs0gm8PcVzJ2>TIyzij zTyEUBaryG)6)RS}diCo3`SbVg-770AYinzBcXz*V;ewNs)5C`kJ3Bi!Y}j!B{(Unu zv)tU=i4!N@ym|Ba^XDceCJYP=XU?1flC%JdKUu)W>VQa)pBUKwA2|NlSx2h>#FCl+Ig6nmK%^JEm2SUD7#Wb)aW6`8s6S?A_Y>Q!VZnmu>E5+`@BG^ z@67zQ>o*oMGAV9QnpCJbbLkGHMTaL#pHSSqbZ1d#Zuc^obu*7J&p5}R#C1?+4qG1M zoYj+LZf+@fB>hD38AtyUCbk}?T8pX9uqh3&omv^LTVlSST0Qj?m8|vKJ^k_4o+F#els2r=)X0!wapBt57_4s|x3ufVhQ^6Y zSU9fr&ic~!c6MLkqD8i54Qn?f+<4*j_R04gnbqYBdwU}n+})VT!pk(_i{~XaMkXVx z)-}^|-5J@PT4pV~zD|128le?)SFO>%9dV4KrNH$1%Irib#z^lug^o_1tZYxVbTcf` zDWBstSLqmskniIjK8~xB3m!L}UUS!H|I?Ud#h#w5@6YbL$zX6W@ba^;DKi+@Z{Aib z%E{Df6|QCyXt=O$8Dz4UQUX51&gu6%%sW zXUUbewrOplFOLOk_UnXsDzmImbJF5Ck~E>KM`J+<6Vn0~_U^qZ3eg4|OH87gtv)Fo z*WbL-%}aBQZS$nSITb5-jLd?RA1Q`}Wj>u+rO@_tT1=Vc33<_!3kPSUOv`*WGh^Ax wXR~s)y?i#i;8^4`7LkMmMvjVSE1%D+`S$Yp{026y7Yka%vNYy9GB8*J09;pJhyVZp diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_es.gif deleted file mode 100644 index d71bca154129935a3575853146678737e8ead24e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776 zcmV+j1NZz#Nk%w1VUPe20K@000I5;3R2eX`X1Ru59bRa4egZQ(0WD z?|kq7z@TtQEEbsrv%mWFbdRFH=XA8Uzr7$0|drFR9P z9v76FuXs*rO=|)Oj{=+qhX8f~85xYL00ILDe@?sszJ(aU0s&A3(HVDc3LXF%$O9jg z0fC%P9?!vv<5Ahqkp-eq7^%R)Zg&T)7p}+%8LpSXduXvb;A;RKIRx5xSY@izhin(J zf%@j{kwS*!26%v?G0=wtZU9Jgg3Q3HO_fMdLZ8sHHuJ;w2*`C7mcrNa3Um5D!Cxr&CnoqiHH>yn4j|?A(bp zUd5lS1SD*5i5G$kE}bA{1RxNlCk*Z4ZFVRUF0xKAI=Z^h!$Bxf<9!vo67X26NW0d< zkdThfnLN9`1yie4Q2|dA8d?>PCn$+}rK!fVic?mO9s(J-^+Dv5l7CM^W=Xksvo!>E z>a7{2^{LOJ{`w@1kJ7zM1oHuH=p?|%Vg`w-m5K7r)Wp>oCCUcuj<>(NRh9$jX8yS+ z>oN!sU|27mDddn^{7B@HNG3_f z7Y;zM!IMx%Ddm(@R%zvxSZ1l^mRxojWdsi>KtTs&mTBghXr`&=nryb|=9_TFDJPmC G0027-y;48` diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_dialwithcustomer_ptbr.gif deleted file mode 100644 index 90ec03f81c903c0b7800dacaff8a7b71609565f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 873 zcmZ?wbhEHboWLN!aFv0fpkTMVdpQ@EpooZ)t!-LW)tT1TyD>2{`}^O?%NwVqtui(a zUB3K(UEQUP8~@Lr|35NvN=wU~t5^T;-~ZppDA?3A^2(L}hYtNuPhY)v@Bal0{->lY z*VJ?g3hFp_?tgCX*3Fy$tE)RQFfh!V`5#D99Vq@}0h_4w+v|vry>9eRZ?cniKS@v-1*8J+`Tfa$~{W# z%51$e^VhE5Sjfnvv_W}Nq0-EyJCqk4o-A`hY4g&ZMV-0b%VgKhJi(K%tE;LsGz6)D+VZ1mKtaBEIy$`*zchX1+w z1$iLQzb*wR1-#l(<--82< z6IEC^ul3IQ()M@F>{mR(;by=RTUin*)S=--Yw#?et=dVOVfq7-AK_nbmUCr?(kCtGGS zEYT^S<26_57>AJW;~qYatC9;IH=SN{*JuCJm}SMDo~-ZB?z_oga4_)lv#=>M9N2H( zRx9OJ_${($1Cu}x8$&}w#L`WIOYU0CSee#YJ>x0!wVWr6Ext_!5-tsn8fy=qOFk77 za@uFfmA1BNZJ{rZ1#0%|gn25ntT1!Z;yjWxp{qw@fd~`R0v7h}y$TA^1{+IEqMEHf zDIM3}ywc4}bB%5Dq`)~9D|n2|f|MUAhJP_H|qdKxXQp#=I$=Y#ib-7Vk9T`y07n4Rn>~r)DUCi>Cw@DmM#0capQ&B z+EiQHTP-br=FR(e<;ueDr3^3c5NS$=iMZ!;Tui^|#;u*i*+C@cMs4V^ecW zZcSaDJVS0*u9UnyOD>1Jbj}pk9A1VA47@q4@*E2mDb1NMHGj$qcD7vB<r6#H4w1%l^L0xY@3cmwtmxlt z#>nWFEzs1+!1!?+ufRj!7KY*+o+Zxhy-(LRDRHEzNIsI@QNkE-FJuMZY`6bC%*6*) zIt*G?XX@R}kam5bV%(j7Y9ZGP-)Oa2@69Tl-2x9TPimP0C{p4;WY*te0DZc4yz4GC_$XO4CuKDcZ&Ad@M)%x72 zX_8TmOPn75n&M@?;;u`Dw&%Oq-}9xJrTNa}h?PDtnL6|Pr7I1))fyR?R4TXn1TJ0L zT;$cIF(DwWAVAUW8;h6h*SoDxbbdeilezt2H@CQv!K>1hIS$K*_87-u8z3KfR>YbEMTx#w?)d6wj!FbVSX zUCN&4SH^sT$*YV>$5>wGR!Z3c9gdXmj)^=+rv}EpN%`iHHD}|so8})nzsO6Ah$%gp z;38(}KEX|G<&#O39~2o`|qdKxXQo~7Z=CN%PTD{y=TuJ4GoP&ix#!DwK+RGFI%?k;>C-Vm6d^k zf$P_=KYRA<%aLoJfF$jJ;!hT^;W{7^4CzceQ%(0q(Va1n= zJ3_2(tSLMFwrc-_4HZ6mv!y5aF&)X zZda~^j0|%wmyBf26xJLbh6xNjIjk~V3l=HNnJ_hf$_jS2T-N21la{Smq0pPNBX>^z zp6wHNb}!s2lOw?`!@fALJv&eSXwHRPc1HPWIg;}7GjB;Kuw9d3k!PGKasAj!nF}&Z zFLQ6POt^NR>-OWPGv_>EnxJrbiEHwghrHIA@_ZaDjpyd;mN4F_jYwJ1zuAnD(JlEy zVj~0N$8CZP4|!V{igS3DIJfscUE8FWkuJNjPwo*V6q1gIkNq z=cSG_FU>5;cP2-y^nuCLncpuRY1sX&fq_Y-a;s0^(xuHsUQHSk z0@4ZsCMf}M@L88+}z*a-$Ft{&d$z+goNJS-mb2$Ha0eFY;5M{=8un$ z*VorGGcy1H0LseBA^8LV00000EC2ui0E_?-000I5pyOy{X`X1Ru59bRa4buY6>)g3 z?|kq7z@TtQEE*pb4&%dYI-k&}bV{vSuTw!_f$cgQ0Ht?KE}N+e?%4_!I{^U?Moma~ zuMl$DKh8P(c0l7~Fl7f`c9|(VcLV}T zCC*@Hkv=goY0p?1;RDM6RMzFj8eDei<(F8L2j-Y$mRSZE6kM>unryb|=9_TFDd(JY n)@kRRc;|qdKxXQqgl$0bRBg4nXw|)C|EiJ8(kdXTN`lCmWy1BWnT)DEhxA*4F zo9ouCyLRo`+qZAKy1J^Ws$5-Ny}Z1hK7D%i>eX%Awmo_B#n{*ihl4H(Q$jJkyc9-SBYvr(b0{kjK8C zC5Ks_Wg$~vE(;UuqntZ)=XWhN;CLP06T?uf@aQaefIi=53wf_bfr&gKfIPDy;oRDjBTWNz&bW{`FcZ6iCeepQPgZ={G}gvrl{N zti2m8d4w4K=ks+`J>yuep2uvGF@v*7L}lH68^fyR2lHLRRd?=FTz>7<{(>uPr#`DZ z2oC3ozqx>Q!MC%AU4%+4TTeY}V4BRRmG|Yi?*fye3VVf;?+Y9D9-3+@P;s1}xskut zQRT$+?2rDNf5l{0&046(abkji-6tL?%|%OvSkp{>Gv_AU+j}gn)+#7;RnXeNjR(bE z&SD7hx!LnCqAI+Ahgs*O>Nn5(N(pT93Dpr z%E~8`e9kqdOb&3yC~x9v)>qJ(pWs+JuBuGc(G1 zdZ=Y({jst9rl!z+eg4$c{GOiu!osCwWZ8p*QZX_7pP&7_y#2qwLn$eSQBnTR&i%5o zvutcYCno>^0Q{JkA^8LV00000EC2ui0E_?-000I5;PYr?X`X1Ru59bRa4bjAWo>w_ z?|kq7z@TtQEE*vaM&rY5I-k&}bV{vSuhT(5f$cgS0Ht?KE}N+f?%4_!I{^U?Moma~ zuMl$DKh8P(c0l7~Fl7f`c9|(VcLV}T zCC*@Hkv=goY0p?1;RA~RRMzFj8eDei<(F8L2j-Y$mRSZE6->avnryb|=9_TFDd(JY n)@kRRc;|qdKxXQp#=I*W}A|lAeb*rVtNKP)*)^>Vy^y|L95M$$0RaGleQ!muk z{@u9o&$4BI=FR(e<;vefhyL!_GbtkCW^;3dscDd*;mWkMr70`@RvAMCP?DX5J{SP)&_~^}+6?bz!lDGT*haEM3>uN5`XK&8(jhlDpwP$xqOEFBJ#VU1`nXPB){9So_FP@iPpTo7EA$R&! zrUQBG`&n|B6J+G05O3fv zwJrD6wuP~cW*iBf8V(Extm1_h?>*S2E3CrWZ>EyLs+}a=z2{%Al|q5U?EgtBzMr@m zCpY`F*Us9z(UM1q(SJT)N7XZqtNUhOZq z!glJj%7fr=-uRmfSQmUdd)P&&)Ux%|vj(Qgj9PhLj{7b!DXMT*C=p-Ou=mhZOM!~x z{>+U6wXP~Bre}Zj-~1~kvufAEbsQ%q2-tn%kf*qDP5K( zla!9fx2mjsGRfy$W6I=9`zpH7P@d--&FLYwBZ87b2;m$8UM1Tb>s dY!<@oc5~Y)1wLYXFSfP?i7y diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline.gif deleted file mode 100644 index d25a105ae5164b0fcd7dd0f1940a3980842cd26f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmZ?wbhEHb>|_vNxXQp#=I$=Y#ib-7^183@R8^IcoZO#f%T}bO{@u9oLTzoTt!;?0 z@$~5ETP-br=FR(eEHePCq+d3nLmGNO3KQ#w7+}y{5^Ci$k6a+bMwyp{IeDwNdMOqw>TYjv8lPG zrY>KBA-6MENyyRqqqC9EInn&Nk$}Hak>(h5z}=RsGxko<826y}y{z?%bSH9SQT3G}caXb~9{X zW8+@fdO$46kz>(|C7RZqA@7}Ha@pnxH+Ub^P7VW$Ketr~TD(h?w5JOY8Qw>1lIMZwb|!;cYT& zMQ7RjUm^=av}dPrna$aJ&5+M6y*v3SvUz5I zZO<#iM=l3Xt^cUEfl-|C9#h99?(F;?u?BVC8)gT}^nZq)bSyJ9TM*y(;#io8aba3- zb-TbLhllM7Z9i^TD^1II)Y>r= alL;|_vNxXQo~7Z=CN%PTD{y=Tv!MT-_`XlS&xwOzb;aoMtEfq{X}&d!yU zmFw59KYRA<%a<=(T3YVhxl>wN>gMLQZr!?j_wKc~x8J{i-_g-=%9JVD+1byYJ?ro9 zzkdC?nVFffu`vS!!>LoJfF$jJ;!hT^;W{7^4CzceQ%(0q(;l<@k z3mhzNtSLMFwrc-_4HZ6m{nGsB7?0%bzW-rIjoyuweO;jr}t=Gfd2zoxe+= ze@D-TjU{c_`SP;4$8)(D<)`LI%FEBVD51c1R+d$safZaXocmK{kIOPW=#^(xxP9$D z)AB`kHqQ8b>r~#84*8r*Tz^m868<%>LS*SB8&V z4xU>7QEvjHIO9F0j!WFx`8{F{>O42h4wUKt3_a;sW@@$|zVF4cFcag#wBG7=fkzGx z+ZEb=+^$xdmhq^w;lsrPEYe$EJnA+$rt!GPD=7hb#-;l&dx$YLf+oquCA`%-`__^N0gM5Y;0^cHa6zw=8un$ z*VorGGcy1H0LseBA^8LV00000EC2ui0Eqw)000I5pyOy{X`X1Ru59bRaQs%y^l*5t z?|kq7z@TtQEDjq5j^e{?I-k&}bV{un1ca(~%jG5j%C2}!USP=RwDcRUE;1egz`z6u zJb?l;lX)5lcLRD&0UiiU7aodu7fyUmi5H1k9~d5$i;7JL9+XW59%q&XiJ2d8i+z@< zhg57!R0skA7z7>w9{?T<7;t)zP6M47g{`0gxF3@k7_*LjO_8OImYB@UO#_8=jsmiM z%h(yT%m>yOx}Ixbuv5C+=mwpH1ETI0{{d-1zT}(V<8PojCk3;NH46Q-DP)*rb|BOiUL4NIE1B!vYU_5_N>5?xeI^p&EMNlOdU% z4-D!(u|=trqB9u;@HA(MkFbd!+es05kt7q79vz}O!-p4K$9zdk~+2;_?oCon4m^U?FNpVl6Ug#$<*ghAaj733>Y99?r8GF4HPQA2vo8U zpa$t`ln8+6@uqB~&1Bp8rN)5>CaB;$7~C!B;DZpV@kIm_Y+&Jq7-p#9h8%Y2;fElG kDB_4ALSR7w5_F*AiY&J1;)^iGDC3MY)@b96H--QJJ9*hPPXGV_ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif deleted file mode 100644 index f6d9080b113a23fd577b028c7d083301499abe68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 828 zcmZ?wbhEHb>|_vNxXQpFBO{ZPloS#Y!pFy_rKPoU<;vdP-un9bqeqY4ym@oox^>&P zZ+CNZyLRo`+qZA8UcLJC>C>vJDlacDS6A0<+qOM=^r)+=>&cTRg@uK)XV12 zX-A07jWuPb-&XB^u%W_7uU}fspXo^6?)x8h)cCEx{r<cnp@+IWE z7}#^V`Xv-tS>%}~Do9D?NyyqLwY|HLAA~9v2yp+WCc?{E}=5Ag;ZwiwHgZvo<#wSY^IdB4eIbsF}SQQu;BL(b3dzPP+*Gc^z^^7_2lZp&uS4!a=%k|P6|Cw~9zg0d{Te>}P zrpXO&7KesibLR$$IUIWv!p6gVL*oq?t@uPyQ7OHxr3V;d;$xLw0|Pw3C(U$0=$sYuv-|(t z;84*pUl~(W@ma{XRN@FjnD$MP1eIA~7y2eE`>yrKyK1#>j@mBG8tyG`=iO{GObOmu z^fv!~9c#APmqe4iD{Er2m*_J1g)QFxoLjy3#>%FJb(;@n`h9WusBc?n-S^vO)0Z{H z)y0~8(fgPc4n7nx={{iWV>&5dlK@kP=45`2MFJN(oOsGo9K815VVmCkvGGErSnc+J z8pS^0Q{JkA^8LV00000EC2ui0Eqw)000I5;PYr?X`X1Ru59bRaQsG2RBd>! z?|kq7z@TtQEDjw8M&iS4I-k&}bV{uj0)(n|%jGTr%C2}!R$$2JwDcRUDl(n`puhwK zJOTqVlX(^hcLRD&0v-rV7aodu7fyUmi5H1k9~d5$i;7JL9+XW69%q&YiJ2d8i+z@< zhg57!R0shA7z7>w9{?T=7;t)zP6M47g{`0hxF3@k7_*LjO_8OImYB@UO#_8=jsdcL z%h(yT%m>yOx}Ixbuv5C+=mnjG1E1zT}(V<8PojCk3;NH46Q-DP)*rb|BOiUF2NIE1Bg8~nF5_N>5?xeI^p&EMNlOdU% z4-M))u|=trqB9u+@HA(MkFbd!+es05kt7q79vz}O!--UY2Fg5W3-!dN!h%T;HszB{ zKtEjyo(K~fu2IsZn34t<Y99?r8GF3lu882vo8U zpa$t`ln8+6@uqB~&1Bp8rN)5>CaB;$7~C!B;DZpV@r45raA4tu7-p#9h8%Y2;fElG kDB_4AN?^eR6m+2CiY&J1;)^iGDC3MY)@b96H--QJJ0|QfxBvhE diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hangupxferline_ptbr.gif deleted file mode 100644 index c7d264173c8b9ef83a2031fac39fcfd36474596d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 828 zcmZ?wbhEHb>|_vNxXQqwBqCDg?w)FEE6BxVBqw*Os%m<4^y|L9Kg*V_NKO5_apQ&B z+FLCxA;!jk=FR(e<;tXph`)RG{5^E&@BaNao10grrTv*dKgiH9!qjwWN=jQ`;LiMf zXHCt2=g$4zv}torj)S^70|UdK88d(+Er8-r7O=58AQI#!2DbkPjxToBk?KFOr08Uh z)%*)Df*;LrvAMCP?DX5J{SP)&_~`Y^O0qf~$=iMZ!;Tui^|#;u_){ww@cMs4V^ecW zOXnLKGlX(e_hW<>_hT-L?8o&8MtGiT48vu4JubxL#Q zO0@0oJcVu99Y>_5%u|$+x;~F#n#|nI>*q~jl44Liqr~`R zsZ!^4Ud7(rtvTC|vEJLdJ?DkutK2!)?^-bI2-6XBWMgA)neg?P=q`I(pLvJmFGy99AH&oV2l*75A9igQeG$Zd(<=Gz)vbNj9n>(b1c`-=J?N~EB&qV zncC9rfio>`c(XV(?3z0_NX+5bn=5R*%r{g{xtx>N*QM1Sc9>|H z*KfsCdX!URskalqDDOwnOttl_COf)WzG}rMii%30L;w)A^8LV00000EC2ui0OM)j$~<` zXsWJk>rw}F4L-P^01E-1 z3p)?83k3l_(9%1|6U)55i@|5D&J^3W)#yUr65s;F;{Xbn*_aOtdjtoq1v2j(06DYZ zOae>|4(zI+>f68v(IhM~FwlsoSos1_0Mc;d!*>t=BTh*0u)&T4)ZRhTM-rs6kNPfj zeDE({GDSInfNS|}2ZMqbVlrfBljqKoDSzU8pg*w*2M9DURc#qKWnGuuiu;w}!i*IFsL}`EKtXU-+!kEWPjD=^1O^nyS9sar zE`DEDyL$$KTbPaE%#6u5GB~Rllu8sLwL;Bh@sKDrFu-z30e5ExCLr+20#*&OB`Mgl zqXGl`AhmV-F78^mQfm*jAe6#hA*lh!9o)Fp;oJeJ5x)GG7Zo2fDKM~199?F!qiuTs ztU=#;9olPFFMFn|O7 zj0$UuomR?Xq-G}MKx?MJCjcr6BtU5)uf)C}?X=WZYwfkzW~=SC+;;2jx8Q~=?zrTZ KYc2>800283h;Ot2 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_header_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_header_es.gif deleted file mode 100644 index a92c2df01aa8d9aea2d97d0d6511661cb01b7cd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YKTNk%w1Vd(%40J8u9%*_97ZHP8DM3$Dj0002KzV4%=%u-TjUtf0)4iT}j z-5VPsdU}~DDKkVwRfveHA^8LV00000EC2ui0OM)j$~<` zXsWJk>%MR-&-6STg7bieaJUSH2q7pI5vYPgP-q#DwJ7M&Uro{;^ zg)#-1DOC}ZaRxM~z(*xGtx;tzLh9w_0;B^JH2o?QTmhj}=y{`Hom7XO{P{&3v2=?SkEDJ={ Z-GvxtsNsejcIe@UAciR7h-gIs06Vm=^J)M9 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_header_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_header_ptbr.gif deleted file mode 100644 index a92c2df01aa8d9aea2d97d0d6511661cb01b7cd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YKTNk%w1Vd(%40J8u9%*_97ZHP8DM3$Dj0002KzV4%=%u-TjUtf0)4iT}j z-5VPsdU}~DDKkVwRfveHA^8LV00000EC2ui0OM)j$~<` zXsWJk>%MR-&-6STg7bieaJUSH2q7pI5vYPgP-q#DwJ7M&Uro{;^ zg)#-1DOC}ZaRxM~z(*xGtx;tzLh9w_0;B^JH2o?QTmhj}=y{`Hom7XO{P{&3v2=?SkEDJ={ Z-GvxtsNsejcIe@UAciR7h-gIs06Vm=^J)M9 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive.gif deleted file mode 100644 index 8382205e6fc8bea086053783549dc60c04626c82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 791 zcmV+y1L*umNk%w1VTk}B0J8u985IxCt$cQ4M~ZY)sEuV{Q99bVg#F~d{Mx2NIVt|? z&a;+m{ok@cHYWf80Q}ULA^8LV00000EC2ui0Eqw~000F4P{~QFy*TU5yZ_(u90y~b zXsWJk>%MR-&+$Vr$fNIk@BhG{a7Zi~kHvrhhip2Z(5O_&lv=OYERmYidcR;NH%u;@ zcjL2qeND69aHBg;uk+^eg~7fvEEZ9I0c>~<4m^fC1OSE(340F-jgx>oi8=y?fRl|2 z1&%ulhI^TY00Te)hNwISpQeKkoSmSIl@9|B1(CC?I)#Up!J-ZT35)=HlC!t6!33*1 zvkrQrI-k3_jt!bW+PgfG#>jiq)S#cfk_5b*z7N2N!HnPr+~7Kr&BE~X{65$o7_gS^ znyw$q0Px7wV2?cq0_24Pl`DZTWz>SiM2O1{k?=z)BJ;0|Vaa z80bjkgHP;qED+G_(gRTzY3g*)AfHVi!2bM6lnb8@MzMJ9lcvj1RA);6?5J1_lC}l| zAo+k+AXmhv4#fWO2^1}$TrF8RLmYl3mVhackFB0|XD|q4Gg%XG0p7t|-eRuLh*AZlrqG zscQ#OJImWukT;OFKLUKR{mT$$Myy^7yb610X_}(&3GcBRw&IV>w^Ma^y7~{~M#cKn zp=}bl;tw)8mA!+J%e_arSMIU?l0Sj>gfx}Jc>$T{1A4rGBMNg5a5I2X)+`7JF@FW~ zlVgurW7L4Z>?hGb#EetkhM%Ef%{0Cs2n|uoyhD>%+~o91Bc+{$o;KmlQX@PbF6PrB zG*Ty?fs*Wk;zT>%WmpdkEp!lj$Oxd8dFat}SUZ#Kh({87@DWOvUdqv9m}H)@WtnJt zab}uqTCrxEaEdWzoOH@rMV)vep#%bcWaa0dfCeh)poA7`=%I)v`o{nT5Kuq^kVY!$ Vq?A@_>7|%vs_CYjcG_tK06Rd}cxV6s diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF.gif deleted file mode 100644 index 3357ed2be1c10e76f3dfc5e992c9356475384dc7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 786 zcmV+t1MU1rNk%w1VTk}B0J8u9d3kw%MR-&+!v5#iQ?h@BhG{a7Zi~kHx_Ohip2Z(5O_&lv=OYERmYidcR;NH%u;@ zcjL2qeND69aHBg;uk+@`M4~>}hx=!E4hB004m$`AiVXughKi5~I|&Yw4*-e}l#q%E z4GxVupN*f22R)RMiKm*CJPr*#1COo`oRF!QmaPYyoPIijgpP+ci=~aUk&~_iiUF;+ z37D+Z4+pT1(9Eitt-F|@Jf98Pwzm$c&chFh0KT|)OIJC z94s9H9I(PI+z4fJ?ATn5j%MOfUbfC@oA!MCx4)AX0Peq zl5eZj8)V>7U$=>XC1#ebB&Bkd`*o6+mq){NpAuPW5X)K2z^2EpK4hrT=g@&e66^a@ zDAdgvK_#?=vxgxd4r6zlw#*r2j50MT4=VICb&zoRiG)c~J4#j@i}N@hOe@czna{a$ z$f*(4-z$O2#{}^D(d_luk^e*!+rqok^(BeFc;}sC7Fc^YB#9wPsdf<~Lg^)2Fk#sz z3w|c)S4={%Amd$twiI>CF62ezmm)2l<_C%)zOs@s;!uZ^htY7-l5YQ$6b>w30qBp3 zVvSf}j((xEoQVjibx$Y~8SvF&yI>RFV>e=$hg)y-(W4zt;KAjWYj_Ffm}H1a=9yZU ziRPM9Sjpy_QK$*$oJkx|zyJ&6spp=2_UY%JfCeh)poA7`D4_rl5C8$JHR|Z2kVY!$ Qq?A@_>7|%vs%ZoOJGAd}TL1t6 diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif deleted file mode 100644 index 638ef859afb2ed25d03b46cf000bbfc80f92055a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1231 zcmV;=1TgzYNk%w1VTk}B0K@FLeQ&2@EkLPA2{-`~#8&fMJGuCA`$-rh$?M{I0tl$4YZ z?|kq7z@TtQEDjw9&f>#tI-k&}bV{vSuh{IB5m0KsOajIL4r2yiG5I;bTn%F=#$D!m zzn;AQlF{ccOaXcs1Rob3Q3f6eP6&DeYfl0NPl9=bOalUW0E`%Zc}xX^O$Y#-2Vizf zUl|#jt_T?buCaz58GIgqhf#+LO#~hS7o)&z9so{005M< zoGX*?!#XF57%^E>u}Q{78;2n%=R`n&1Q9d;dK49K<-ta{4%GV~;20AHEwfAnQ?ZYq zIUeXNLxj)+fdn=!;cD1qfQJLrn7njy(a9%2?h@!JP-xfCFFU{Vq*bd;P$(UlAiXsc z!@gmalsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!6y9xi6hgqbSfBv`)FP9Vk%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKgKfRqA(C;%D)UUJW70QnQ0Lm&bmqJJc2F`p}& z2z3fmwrv88SF_x9oHu=}*~Fbq4O0v*9A=iHteU~J~0IVS|tyBJs#=7>jOWUYW9^5LucoB4#FbK@W zpEGYq&d$!>-rh$?M}&lgb#-;z+}uJ!LX?!0Y;0`i=H`!&kJs1N zHa0dhGcy1H0LseBA^8LV00000EC2ui0Eqw~000I5pyOm@X`X1Ru59bRaQr?^RBd>! z?|kq7z@TtQEDjr!&EmssI-k&}bV{vSuh{IB5m0KsOu|I~4qpymG5LA8Tm@t3#a-rl zzn;7v!_nt4OaXcv1Roe4Q34(YP6m1aYfk_LPl9=bOa}mY1B@4bc}xX^O$Gy;3Sf3i zUmP5pt_B!9s^E?xqW~H00RL50|R0n2(=s^3b?v} ziqg~`kyxu`w@t240NYHj=}-upg&&`Eqfh~xsZ8za06sXP^U1)yC%yb_8-?b>fdQ1X zoGX*?!#XF57%^E>u}Q{78;2Pv=LA3i1Q9d;dK49K<-ta{6x90w;24txEwfAnQ?ZYq zIUeXNLxj)+0R%QJ;cD3AfCmNCn7njy(a9%2?hxoHP-xfCFFU{Vq*bd;P$(UlAiXv7 z!oFdZlsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!3x9xi6hgqf=Wz#R4KCe&%RSIR!ji;bHbV1}PZ z)f4oAVI~g|b*4r)R@>fBv`)FP9SZ@1CV~hMs5Y&dlkiNs(M>k%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKg>fS zm~ie01Hg9&HZdBa6^%j$0I)IPh>wOwS=Cz<{_{>wFZD8)n6DYt1YiSk`d<}*2~e6q zi$oa@hlup)(IS^Q5#g_Z{7FgwRVJYnQfTGmN|ZGI0P|63(O^(xoWnK=3LOa`AWUKj z7K00_wCz&Ymt1n7>P2%!WsiGuxR+1?0jYGzQ8smxhk?Q}IR%}0^z*K0q*}Q!8qQLC z?_v2WQouz~?fO|0-c|~kuWKFb5e8Z*J4L630^&%ZppbFM971Kh<}T4TF)b7MHbjOS?NeR^dp`MTV}!QUErZ8wrr*%(8YZd&sJ--U4g2+cdU~Z>~i18gWPq z%vu6?-cn0(itMGd)KS1pZAgT8V7GAJ3D#$wfF3w#*g%sl%Dm_qw_bJtCygwBfP?32 z9|d5r$+=GGow$_29(Xck6n$PPWgc33s`$>^*viDT3QUL>9Th23@TUtpw8zA{<> diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif deleted file mode 100644 index 335e635665e8555552db46e1547275437ae845ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 948 zcmZ?wbhEHb>|{`2xXQp_VPTP!lr($xY#AAun>TOr@$qSCX{}qguD-rLBqZeM(WAY+ zy>4!9D_5@EzJ2?(YuDbsecRR5_2|)~r%#`Hd3jyEdUe~jZLY4aRaI3_o;)cmESxrN z+N)Qu%*@R0-Mh!Yz;OBUWgtmAp!kyoY`6}H1o?@9?Y{#@i?fbY|A{3#n{*ihl4*Do)~&v+zn_x%q$YW&vUe*fdoUx9$v{~H>cnpS~@zr zy35+KdnQbr)X+D1+VmN@Q)kYZ+c|sQ!bKGe7B5?#w{*qoMXT1VpSfv&vg3w(ftR{KT%*{ z&XKx)fcy2H_fniZxreyV6-?!jVrIzDnC8&jmbjbA;KzjnbEH|Aw=@=fXk^?__>L`u zBf!CVYZLq302zh%@dp|ORKpH)Jd%|z=4`AidH!1LP&PB0jj?7x!-4;``dd{c81zEt zyT4BBI&5a#$k3iE#3LKl6V;SxV!W=0IWSAQF=q+ifn6rrhRJM~GBsWaIW(5(X)^t> z5`J@uVV_A|!3Q>x8(C}&3=&~xFJ?1wi)=c1jA3S&Ecc?VlYRBJto?qSU7_*_Ph7QV^2G}d zY!<2xQ5y{p_%NN$aJl6!zfG`#(O;E;FGA5SRiTaTZ*ZUCZWV>eRtbt1PTTpv-Nakb z{j%kZ!_gCqJ#+ts9zJb(XwFq$=P1L=+@|lI81+sO+4NAhxQ5eZV$m;Cj|I*$ADN%{ zFy5Vf-hjVsCj-;@z_v$|UtfHbuCnQm<_m>JzN{5;t#Yd}WIOd-Kzm Q^?LmQHtjVV92pp_0jU;(yZ`_I diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_hotkeysactive_es.gif deleted file mode 100644 index b064725c50f6ae0e8b8a0adcd4d6e92c19197c74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1231 zcmV;=1TgzYNk%w1VTk}B0K@&A{{RXy6cgs6>Wmw#I_Djrlv zGyK}7{ob+AuYLaQ)TN7L{MVmSMKS!>o|1c5sg7p-005M< zoGX*?!#XF57%^E>u}Q{78;2n%=R`n&1Q9d;dK49K<-ta{4%GV~;20AHEwfAnQ?ZYq zIUeXNLxj)+fdn=!;cD1qfQJLrn7njy(a9%2?h@!JP-xfCFFU{Vq*bd;P$(UlAiXsc z!@gmalsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!6y9xi6hgqbSfBv`)FP9Vk%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKgKfRqA(C;%D)UUJW70QnQ0Lm&bmqJJc2F`p}& z2z3fmwrv88SF_x9oHu=}*~Fbq4O0v*9A=iHteU~J~0IVS|tyBJs#=7>jOWUYW9^5LucoB4#FbK@W zp|{`2xXQrLRv1{8?0#xh)rIx7fA4Mlb8DF(AJ^++ebeisjkM&HWJFR! zZEx*p32`@G(VP13?UkF`n}b{pmv*Q8eX{@0^?84;&!1Es@%QPWm3?UuUZ#H^@A-3W z-p<+i|6ZNjJT2$%{Y?&L>duy$3=9l^uFL?ER0oPbS-@uMfJl&^7})+FIKJ3fN2>qC zlA@D2R`V~s_`GRmhTV-dWvAa(?SHVL!bh)PQ^+atNZ#)IA9mFEt-t;L$Ddk(fY<*U z8k?G1YU)}#I=i~d+Om5lOq|rvH+kCh8M#wu&Y9aed)~rD6$=(GTb{Rc#p*??)~uho zZo}qDeT<4b6d9Rz?#N-{RN`V%=1?qPP?X7KU{g|L&)dF(A?NZAj{K9S_v}5wdttxg zkw;GyZ?f|$u`w3#C~{xh%XsWP-=psjF0QO)Ra9b_U&z5xaD-T++5+mr-hHMe5W| zDUX9z9bcD!fcGj_*>k4#%2ENj9n5PPp_T zfp22Hk=k~%{EoED+bnW#gkC&3mdB&=`RCRw!z*l$8kygI7ffh6K0&YU@#&?e4Qw6T z{ALAbX5aU`$>nxeQq_^6Yxd?Pwl&Wiw<*2bDdW+1cG+$21?k2i=C8i_hq`G@Fv7 z9N>0=k#WM+|1v?05ld%FORFTwQvjYUm{QAVmcs zhf_05oAQ|~n1fSHSEkHrdd}z~RMh+L#|c%Y1UGJ(mQtnDE7vG(%38f4C@Eyk7QRne zYj>P0%wD(0>&EN#yUuaF+3+WXp^^QB+Uhr(&X~P^v-yIX_S-F2!mQV_N+t*}a@;9< a{dW6&A{{RXvw~Tgs|>GAbTaM>D96 zW&GNv{ob+AuYLaQ)cn?-{p7#=*Po?}WZAcal6zQEMKP(4X1SYhhH+8;>dv#4Z2jM| zKsF~sIVk`D0Q}ULA^8LV00000EC2ui0Eqw~000I5pyOm@X`X1Ru59bRaQs3K1Z{Y( z?|kq7z@TtQEDj?Q#^S?lI-k&}bV{vSuh{Ih5m0KsOu}UV4qpymG5LA8TnA(5#a-rl zzn;7v)6wTKOaXcw1Roe4Q3D!9s*8>xqW~H00IF40s>+l2(=v_3b?v} ziqg~`kyxu`w@t240NYHj=}-upg&&`Eqfh~xsZ8za06sXP^U1)yC%yb_8-?b>0Rfb> zoGX*?!#XF57%^E>u}Q{78;2Pv=LA3i1Q9d;dK49K<-ta{6x90w;24txEwfAnQ?ZYq zIUeXNLxj)+0R%QJ;cD3AfCmNCn7njy(a9%2?hxoHP-xfCFFU{Vq*bd;P$(UlAiXv7 z!oFdZlsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM52FEzZwaO8hmxYm1%UPS z2tYwyhZ;X5KvdHSPOx2A@g!>Tuv!3x9xi6hgqbS=z#R4KCe&%RSIR!ji;bHbV1}PZ z)f4oAVI~g|b*4r)R@>fBv`)FP9SZ@1CV~hMs5Y&dlkiNs(M>k%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKg>fS zm~ie01Hg9&HZdBa6^%j$0I)IPh>wOwS=Cz<{_{>wFZD8)n6DYt1YiSk`d<}*4N#gu zi$oa@hlup)(IS^Q5#g_Z{7FgwRVJYnQfTGmN|ZGI0P|63(O^(xoWnK=3LOa`AWUKj z7K00_wCz&Ymt1zB>P2%!WsiGuxR+1?0jYGzQ8smxhk?Q}IR%}0^z*K0q*}Q!8qQLC z?_v2WQouz~?fO|0-c|~kuWKFb5e8Z*J4L630^&%ZppbFM971Kh<}T4TF)b7MHbjOS?NeR^dp`MTV}!QUErZ8wrr*%(8YZd&sJ--U4g2+cdU~Z>~i18gWPq z%vu6?-cn0(itMGd)KS1pZAgT8V7GAJ3D#$wfF3w#*g%sl%Dm_qw_bJtCygwBfP?32 z9|d5r$+=GGow$_29(Xck6n$PPWgc33s`$>^*viDT3QUL>9Th23@TUtpw8~`K{|gFs z2L*MUJNG{~cdMqR%jV7h)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E&9yVzMrs{h22 zqLVpR^Dn$OQrOwB?#7z3({HQxKiE*=Qx+l6IkD<&-tPM!cGUQ-zx|$_;n%tMzyCK> zRAnl&$+Idm$V+E+DYME?oWwR^k~~BIG%lXr?z!146MM4SItsYEla&itwgx`hwbHXZ zVD6#xEGCu=g{Em6i}P7nK5#fNEN;sZ=`h&p(7@2H?JmIaq3AxlIWO}jMYj_RHvKP? z7F(A&!&hk0qT4P%eqHlj;W%G@@=nWT>v>PrGT&f$v8`bl6Q97($ROo!&IgK^yMLCH z=`@^MXns|}mZjKX_r$fkbgNHqJis=Q)p1*+R`89`Dg5e10g~HuR5o3@;^}+)^PNL$ zUr8Km9yyp*yrl+?_ zZ)9wLd{U^N<3(@D?sV1(xi==PJLn#Iyi|47u}0+`sV62c6=rB~-Y58ysX!xB+NS8b zaNxf_sdX0$HqBl+vu@d)1DgUQet!3H*eh7kleykjXaWaU#TI!t=@m!jTAb%SaMJF# z>g5Sulh2CVooH8R(@;uPo|f^bv*?MUBdgq&7mvCPj%hsZF}arUxYy#@iexsC1O`VA b2R6+o6I{eHpG@>nTlr*?j~Qo*0E0CEWCuUM diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF.gif deleted file mode 100644 index 9d3489fa69695efe455efeb36ae42ac915aae10d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 801 zcmZ?wbhEHbtYHvfxXQo~A0IC*Ev>1k$;->TZ{NPEs;b3{7hk@7dButqH*VZ;adFwW zabrhEM_^#!`Sa&DY}oMN!GnAE?zy|WJ2^SEwzj@}`SSk#`>$TTDl04N?ChL6b!u*I zu9=zH#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T4|qRy){*Kzv83o^ zj@A4N8b=a4E7sjuQ+E1o)&2(?DtyWUgxDumoz2^Q|HFL)7w2an`L58R$E5_cbAMbOV;!}7U_u$+}TpR zGF;1)rcGqqJ&j>ac4f7al%n)*MaDHUiZjnK@0C_$nl$6eH5q2bo^xkTWnW?D+IpgZ zM^RCR@#>n_xomf?z3MoA>Fo?9#Y>Za|7Ci>E4}1dgi*Spfn~CC0L#|EN4r*fmIur| zl%B=Jk|EGEZDVmh8_Nfd1ct?JSt2b4TN4g2v}?NxaC|6|XE*0%-lXVuV!@{WWm016 zGH3V-En0Nj>Bp~YzAGH(%TL~Exokb}samER3@^4dENkKw_!$|bJk9w)5p(y?k}{o! za|_L{D%i3FJM5mgc9(AT>5UC+6ImU%HEIRl2%W;Oo);jwJx68Jr7NDkw?E%GwDy(6 zu~yE&buN8D`m3wm624@(wcMO??$ysHX{L;|Cv(_WCuh&L$Uh~m;KO_VfM|MpoAkzm zZI4e1b#uJvE!myUIwAAIgmnkqLywoLuG-e9yd(9*yuh{p-8rx+K;q|jABVky6+M~jZG{3jxGJ{DyGgA$GS}if=Yf-Uzf~_! z@S1#9-0noXLYszCs`9jqN1a7a9v)zp-SXm5x4|)u$2}(3G9LF@JX@j6CX`~p$l<`I Z`DB8NSmu+79%?I}O!6_~Oc7wP1^@>AKm`B* diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_es.gif deleted file mode 100644 index 45bc42903668d2b577952a8946d2bd179c5726c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmV-`0)PESNk%w1VSE4(0K@ zO@aXcXC7+@gt3=;8Mzq@f*84R2ZxDrtBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP6?_@25Z+$1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#n;~4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IA|atS+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYEnk9b# diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif deleted file mode 100644 index 45bc42903668d2b577952a8946d2bd179c5726c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmV-`0)PESNk%w1VSE4(0K@ zO@aXcXC7+@gt3=;8Mzq@f*84R2ZxDrtBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP6?_@25Z+$1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#n;~4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IA|atS+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYEnk9b# diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_internalcloser_es.gif deleted file mode 100644 index d5c05657affed58bd7db42399b8e774277bff82c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmV-`0)PESNk%w1VSE4(0K@|FN zO@aXcXC7+_gt3=;8Mzq@f*84R35SVttBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP710^2y53&1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#oaF4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IEWx2S+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYE|FN zO@aXcXC7+_gt3=;8Mzq@f*84R35SVttBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP710^2y53&1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#oaF4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IEWx2S+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYE|_vNxXQrb?p|I{u)Dwi9T%5iTG}cR5v7=zney_+t*v)$ZPTi%&eYXi z+PLxm^5y@HjYH?p|9|!Be^b-Q^z_w6M!{FE{9mx(e@e>o$jB*s_x?Y0=>Pux|65w_ z1O;_yYPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E)7IO?n;)qi41 z(a9XE`4?Uof4-35aAQr`>9TXr8w&d^XwM-mV-OSFT)C5#8TxwJ@)`MLS@KyHDRazSE-RD6xq9m2Ra5df zX0K+-W$Iph zrld6G%9`sJa+ogcxV0zu%JE0+JCsi`^W`$SY$z(uiI|^M!nG?f>^!ek>Si{X1ZIaQ zGr?j9)`ahFi9CQSjq}U)jzOk{CSZ&|Y9QJ2oL)|hUCV;af|H6a@gvRgb`@wm_C+l$Bj4s4oF nCb)=MK4BH~FmUAXF?;!Ba)6uW(|_vNxXQo~A0Iz;>ePMv_VM!ac64+|OG|5NYF1TM1qKFg+_-V^;>9ag zthjvn@{JoeTwGkvpFjWL!2>5JrBKpDbWwbwDJ@PYi7T4|F|o){*Kzv83o^ zj@A4NFN8l`h_Jb_rtI|Fs{Ic(RQTxi%TH!=K9aZl{)Zhke(P_)|M91mG2r$8hQ_Am zmYTX!8HRjzncm*69BCPji85Tdla(0ydfD?C`D9q~Sr#dA&Rs4eox`zu>f%*X@;GO& zX3AyiWz6N0nU~jD+Lm3aD3dR($ksPOiJ4h(I*Z~2uB%Ei$NLWCa4IshDsIfV-o>t{ zIOWQk>lbpEF6_9qC-=(nM{GNkPBHW4GCFN2D$a?RpH#xND=_RluT|=1Hi-mghp24= z#SW|q-`y51OBU9Sb5by1G00*FDASqH@Tj4Rm1{zdrqY80W?at&HcvLbWb{8T$AagA z>4MOXX@<>t*(IG<82EnQvN&+UM>0_GFAGFF#2(CMe#tmVt2g-K0k%o3EH+d8 zdV>yxHrTcX?ECX$Vaq{N@i|^OD@uG*#2==~FkH0wASxaF(@n@tbYk$sszRB9Xb!$D zCBD%i@@z{Ma2!lzaZhhqvf@#f&a&2+Zi8bQ$_h0$6CBwso~?M?XY=jF<9-J=%_kFF k#4J@(asHj9l zMA+Ea>gwvx&(C&tcHiIMLPA2`-rk0WhOn@(;o;$5Utb#=8#XpJZEbCqmX?u`k=fbV z=jZ1%G&BGJ0L;wHA^8LV00000EC2ui0Eqw)000I5Aj5EEX`X1Ru59bRaQsru6K!~| z?|kq7z@TtQEDjrz1>(bOI-k&}bV{vSuh{H0QBi8Y;IMd1=6XK`kD%#k3kuAN$H2^Z zGM@|P)An58A94c$Odfj}7jbh;7=3?DdQEmu0v>>Ec$gms9u;+co{Dr$1Qr$tO&DvO zo)rool?4PIgtGx=OPdy!g#Z`>d$1Ovc8QT502KqCjjnfm0|kgo0>g|J7{9@J+mlUc z7NZ`(2LsO)7Hc1N7yygHp-cb*0Jdx6<`sCrjF+2ca z1-sy>O}0b|)lK6DshbBU1}r2iMA5*7X961k!SSX502)K;>SVxR@53wt7cLC=U?D)r zk+Td864)hI&yjot=p^tVfQ4BrJ&1g`?&C9jiKJpnca z1N~)aObD4O0Jda+4r`4_=F2kpbfUn&Gj|jd;DFPN2T5D|8Inx^1MGK!OLv?U-Y^-E zMgTi<81Ud=u+W2Ig0D1k0frj76drIz@f1u;e6(>2hD;pb!H6Fzl%pSj2y!1DO7ZxC zj|6O_9a()~V8?a#M07_%e2|992ZK!6NmDy5`D2d*46r2=oa|u-T2&5)UyWqMDd(JY zS}{`m}aW!rkr-_ M>8GHE8fpjtJLwc=dH?_b diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif deleted file mode 100644 index 63594d6570eee9c43792a3620cb74e10791af6b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 816 zcmZ?wbhEHb>|_vNxXQo~A0Iz;>ePMv_VM!ac64+|OG|5NYF1TM1qKFg+_-V^;>9ag zthjvn@{JoeTwGkvpFjWL!2>5JrBKpDbWwbwDJ@PYi7T4|F|o){*Kzv83o^ zj@A4NFN8l`h_Jb_rtI|Fs{Ic(RQTxi%TH!=K9aZl{)Zhke(P_)|M91mG2r$8hQ_Am zmYTX!8HRjzncm*69BCPji85Tdla(0ydfD?C`D9q~Sr#dA&Rs4eox`zu>f%*X@;GO& zX3AyiWz6N0nU~jD+Lm3aD3dR($ksPOiJ4h(I*Z~2uB%Ei$NLWCa4IshDsIfV-o>t{ zIOWQk>lbpEF6_9qC-=(nM{GNkPBHW4GCFN2D$a?RpH#xND=_RluT|=1Hi-mghp24= z#SW|q-`y51OBU9Sb5by1G00*FDASqH@Tj4Rm1{zdrqY80W?at&HcvLbWb{8T$AagA z>4MOXX@<>t*(IG<82EnQvN&+UM>0_GFAGFF#2(CMe#tmVt2g-K0k%o3EH+d8 zdV>yxHrTcX?ECX$Vaq{N@i|^OD@uG*#2==~FkH0wASxaF(@n@tbYk$sszRB9Xb!$D zCBD%i@@z{Ma2!lzaZhhqvf@#f&a&2+Zi8bQ$_h0$6CBwso~?M?XY=jF<9-J=%_kFF k#4J@s(O0Nr>FljGgYy% z|9*bbpP&C(S(Me)|GvKeWMrpjXR9(YQ^LakprHRpM|TtyA}J|EQc{R;aJ$aV|7~rx zv$OvvCqV!J0GXNpA^8LV00000EC2ui0Eqw)000I5pyOy{X`X1Ru59bRaQsfp^Kf{s z?|kq7z@TtQEDjkE1>(bOI-k&}bV{vSuh{H$QBi8Y;IMd1=6XK`kD%#k3kuAN$H2^Z zGM@|P)An58A94c$Odfj}7jbh;7=3?DdQEmu0v>>Ec$gms9u;+co{Dr$1Qr$tO&DvO zo)rlnl?4PIgtGx=OPdy!g#Z`>d$1Ovc8QT502KqCjjnfm0|kgo0>g|J7{9@J+mlUc z7NZ`(2LsO)7Hc1N7yygHp-cb*0Jdx6<`sCrjF+2ca z1-sy>O}0b|)lK6DshbBU1}r2iMA5*7X961k!SR*=02)K;>SVxR@53wt7cLC=U?D)r zk+Td864)hI&yjot=p^tVfQ4BrJ&1g`?&C9jiKJpnca z1N~)aObD4O0Jda+4r`4_=F2kpbdtcoGj|jd;DFPN2T5D|8Inx^1MGK!OLv?U-Y^-E zMgTi<81Ud=u+W2Ig0D1k0frj76drIz@f1u;e6(>2hD;pb!H6Fzl%pSj2y!1DO7ZxC zj|6O_9a()~V8?a#M07_%e2|992ZK!6NmDy5`D2d*46r2=oa|u-T2&5)UyWqMDd(JY zS}{`m}aW!rkr-_ M>8GHE8fpjtJ9O4$D*ylh diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_leave3waycall_ptbr.gif deleted file mode 100644 index 7bca06f94630a6e8ad47d9e2b5fa7768cac0d2a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 816 zcmZ?wbhEHb>|_vNxXQrb?p|I{u)Dwi9T%5iTG}cR5v7=zney_+t*v)$ZPTi%&eYXi z+PLxm^5y@HjYH?p|9|!Be^b-Q^z_w6M!{FE{9mx(e@e>o$jB*s_x?Y0=>Pux|65w_ z1O;_yYPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E)7IO?n;)qi41 z(a9XE`4?Uof4-35aAQr`>9TXr8w&d^XwM-mV-OSFT)C5#8TxwJ@)`MLS@KyHDRazSE-RD6xq9m2Ra5df zX0K+-W$Iph zrld6G%9`sJa+ogcxV0zu%JE0+JCsi`^W`$SY$z(uiI|^M!nG?f>^!ek>Si{X1ZIaQ zGr?j9)`ahFi9CQSjq}U)jzOk{CSZ&|Y9QJ2oL)|hUCV;af|H6a@gvRgb`@wm_C+l$Bj4s4oF nCb)=MK4BH~FmUAXF?;!Ba)6uW(FKNY?){&VvV6gU|A!9!zk2n5WaJbhqhM3h$SYU= z2L*L#YPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>C)9`k1qhRR4)3 zMJIEt=KGyyHe!rie`8JA>9 z?7EV%Icr-s*D+=06Hk?7GCpx-uzyvWd|D}Q$<1zYh51`b__i%%49GuXV8Zlr>Ew=O zj)(2bGZtnZU&pXCbMKCgF9jGFJslZtx1iGTa8o$4P zczAoIz{BRhzkhsweg8Z#;r(Y|<4|Ce@|fVr!J)R|K@*SJiwDgDZW<3;MA#S^tO0TG BA87yp diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_OFF.gif deleted file mode 100644 index ed11b7aca56f642f2c94b6f0aaf0dc776759e7c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 728 zcmZ?wbhEHb%w`Z^xXQo~A0N-l%R6=I)QuZAN=r*?YH9`s23A#7?c2BS#*G^;E-oup zthjvnaz{tU;>C;4pFe;9{{0ObHoScKva_?($;rvx-TmIZdu3&14<0;dZEbz^>Xn(9 zS#ECb#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T9eSTQ>qzyVSWopnQa{mU9&q@x6E11#hcTRo~bx3 zi;q!}Ra#MTi4vDD~f zQq6|QSs~0hoCzFfUYwZnUBOTJ)Vpg8d<+~c9j(R9=a_DBEIA~Ru{glw&=kcBZ4HV( zEH_*XzC3+B?XqcJ^0C~R$CB(;uHg7loY9#-YuYuoNmpM?U}!)7O^1!)fTOfxB_mHr zo<~DN!}<3jUz^S(>ZF~$^~Uq^ABjmDcxBeG2B`QHulHQ-8O&o=YG}P{-vy3}?cN_5 zn0Lu^Z}3==#Nl-G#WL%8H4980eB;T~?wC@MmUq4Jy`P7}l3hJ@msZE`XV>`s{lmlC zl>!T!|Nj2*`Stzt`}hC<&%nmW>d(*5M@L8B-`|OeiLkJ+(9qD~;o;ui-jqodih?0s={*k6}y;ut*mI37MO79tq0HyhsGX#7oH^0ozF4 zNVR7Hz@{E+rUeEc2C&i4#gR;+a!Jlg)k&2f36vSq=JtGBg`w5658yHZ@r*%5D?EmO9BquB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp#! z1{{&tT*r>ohXKAmILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=F@pl;@@62qL~N4)*Zi*G z>NU{<23;AT!`yX%G*MoYc^gomUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- tP?(^hx%21Hqf4Joy}I@5*snK$Ab~-L@8H9WA5Xr#`Sa-0t6v`i06U$v6t(~W diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_OFF_ptbr.gif deleted file mode 100644 index fbad052dc2e69833d6c28150b84307a91a0a6645..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 607 zcmV-l0-*gzNk%w1VQT;o0K@W>d(*5M@L8B-`|OeiLkJ+(9qD~;o;ui-jqodih?0s={*k6}y;ut*mI37MO79tq0HyhsGX#7oH^0ozF4 zNVR7Hz@{E+rUeEc2C&i4#gR;+a!Jlg)k&2f36vSq=JtGBg`w5658yHZ@r*%5D?EmO9BquB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp#! z1{{&tT*r>ohXKAmILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=F@pl;@@62qL~N4)*Zi*G z>NU{<23;AT!`yX%G*MoYc^gomUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- tP?(^hx%21Hqf4Joy}I@5*snK$Ab~-L@8H9WA5Xr#`Sa-0t6v`i06U$v6t(~W diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_es.gif deleted file mode 100644 index d36e1944c7976070d7192840703d0a7963d2ebe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcmV-k0-^m!Nk%w1VQT;o0K@ z|9X1NTwIwmGgY6T|Dd4%GBQ)u)&JDg|GmBc!ovS#WT(Hs|8Q`-DJeu!Qi#sZ|7~rx zv$OvvCqV!J0GXNpA^8LV00000EC2ui0BZmc000I5U?gc|X`X1Ru59bRF6CGgXWw|P z?|kq7z#!03K`1`Rq;kn@I-k&}bSg~%jMS`l%k3(y*e9cb0R%n^%wieHU@)08(hWy4 z-uN~C%~)dkOBZAW7fEez8A=y*b{JJxM@|GD0vMD57aoO%0+gKsXBnOz03V`zYaRt} z1)548iAoF}0~iAyeF2>qodih@0|QB-k6}y;ut*mJ2br659tX@r*v5D?EmO9KwuB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp!J z1{{&tT*r>o2LZl5ILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=af1Tp@@62qL~N4)*Zi*G z>NU}V23;GV!`xMXG*MoYc@t2eUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- sJTS1Kx%21Hqf4Joy}I@5*sqT{0HK5T@8H9WA5Xr#`Sa-0s}BJHJIMbIl>h($ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_localcloser_ptbr.gif deleted file mode 100644 index d36e1944c7976070d7192840703d0a7963d2ebe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcmV-k0-^m!Nk%w1VQT;o0K@ z|9X1NTwIwmGgY6T|Dd4%GBQ)u)&JDg|GmBc!ovS#WT(Hs|8Q`-DJeu!Qi#sZ|7~rx zv$OvvCqV!J0GXNpA^8LV00000EC2ui0BZmc000I5U?gc|X`X1Ru59bRF6CGgXWw|P z?|kq7z#!03K`1`Rq;kn@I-k&}bSg~%jMS`l%k3(y*e9cb0R%n^%wieHU@)08(hWy4 z-uN~C%~)dkOBZAW7fEez8A=y*b{JJxM@|GD0vMD57aoO%0+gKsXBnOz03V`zYaRt} z1)548iAoF}0~iAyeF2>qodih@0|QB-k6}y;ut*mJ2br659tX@r*v5D?EmO9KwuB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp!J z1{{&tT*r>o2LZl5ILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=af1Tp@@62qL~N4)*Zi*G z>NU}V23;GV!`xMXG*MoYc@t2eUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- sJTS1Kx%21Hqf4Joy}I@5*sqT{0HK5T@8H9WA5Xr#`Sa-0s}BJHJIMbIl>h($ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_number.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_number.gif deleted file mode 100644 index 33f303308b856190585ce243cd5c6585bd7de6eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 480 zcmV<60U!QHNk%w1VR8Tt0J8u98yg~{qs)4GnGOySUtf1bL{(B!X0fr|DJe6)zV3*K zs+N|!Ha0|UZHNE>0L;w)A^8LV00000EC2ui0CE5h000F4@X1N5y*TU5yZ>M)j%4{T z%M=jLN(sUvpi{#HGNUt%6zn?I52&aBb+O07z$hdwf&#;Un;Z(Sr-V@5I0gyHf}teW zdX0f$0vMzkhJ~D`M9Ag1gi|f`BzR zLr$asu|)v~4w^-5-~fjyv}h6JfeV-EmYAF>MEWw&LV&Xl49UPXp&MJcWEjxx!PA7} W$B-jSo=my2<;$2eYu;QU0suSAL%4$g diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_number_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_number_es.gif deleted file mode 100644 index 6d672accc6b9494df75a7665685349aea7210c73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmV;R0bl+{Nk%w1VQv5p0J8u9%*_97ZHNE>05mX^D|zV4%=%wJ!38yg}H4iS2K znNm__L_}4wvE3;tGl+<)A^8LV00000EC2ui0B!&d000F45XecZy*TU5yZ>M)j$~<` zXlf0_WE|?LDAf>;LQ+VCeUpJeMeqv=0=^z#CV2r40YpM^$Qb~IMGgj73mKnf0uguuMeBd!NkTmViRL<~YoZvaXI3 zR}+C)h!l$xL=6ZHj6_il1qhFk01s@FHjV(Q5|A83uLO!hjJGWSM8n1d$__Ti1P-9W zEI6DkOQMMNOp8E5G9Zk2$CBd}TeJoPiJ?5zY61d164b$~w;-RW0qrEb}&;kIPaY+F-tfOt?uiw9VBLDz9KM0~| diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial.gif deleted file mode 100644 index 195b1a9032282c3fe36670f53ef490eb05a366a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 896 zcmZ?wbhEHboXjA=aFv09i%Zbmy9H(@)%_qi&)rXIi>ShWSLj4R%Vr%!7+P! z@4OA0^5!gDJ6Cz@x~(${7xYb4UbQA~^6{QUbq%?BN({XWN-LPJFce(rWm1w=mR6d| zsl+s^-~qd=lF~ex8+o5rykmODz_I)KHsz>R;FAl#sOABQATBHO0 zuW!rad#W+XEa?#k>r=Nmlb>fsxfMJ6*{hlEU15dylbK$8S%wL?OYLXe|N&la5 z=fuvwRK=aIiF+zp!uEyx4idqYK|;wH7flI50)EF5zWhWJy?{_CVnUU-`YpBMD85 z-YoUCe4aRUt|+_9PR0Zo*TMomzpoF{@74Xi`z6s>+2NUdoYESzLnX$$E(&*8F>aM( z;*4p&D$U~2(r3i+#l@E?`)cWoNlY@%w@sPnw9ko`eEVZU3fq|={=WHFZd{!DMYrk1 z%#39#pUE1nd--g30oSMFEJ8I2&*xS=Tlsum&9|4&=Qprvy;#ul&hsF%n2W%nMLlM( ZUM!yAruA~kl(4LqOJ}5MWePA@0|3E^b0h!& diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF.gif deleted file mode 100644 index 7c2757329221b9c5c8cb424de56c21a5f601e295..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 896 zcmZ?wbhEHboXjA=aFv09mzOs_K3-E(bMfNE($dl{E-qD7Rr~hs+qiLKU|?WJN5_pD zH!fekykffcJa{m5>eSra zTr)GXi4!N@ym|B4vu7qICJYP=XU?1flC%JdKUu)W>VQa)pBUKwJNP_x){*Kzv83o^ zj@A4ND@2pO0%#IViC6{)Zhke(P_)|FNg;{Csn!oZ6=5 zme#iR{QAZ`nO+%Iu6#}z>4LsqMs_7;8MZt|8O9zF8 z^7x)=Oj1i)#KHR1WzOX1nNe;9k5A3@7I(jA$il!CFvnatl!NJulT=MG!#wH#Gwz(& zx%nku;xThM*9A2vjE^*QDV_dl;+d`-#3XIzVN$RlDtzYURfP=dlkb==FS@g`nR)9X z8%9Q+GgXiIRx(&HZkSlS(>&#nTjKs!25<8tv-gVbF8a~+MMGxw<$HmvQxsenc;7v% zvVPI_VDFZ;`)6{!g%7qdurRpX^8D(%ckfa&h8wp7bspS$S7P)wW?jWDyHsIJBt8?A43K W6Wp|3E}0UR^>XQqG_6bl25SJM3vzk@ diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif deleted file mode 100644 index ef710c9c52b9504fcc81678712bb63d7f50799f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4w7Nk%w1VUqw50J8u9dU|@()6NTJVmjb zXsWJk>%MR-&veZ`!V)}u@BhG{a7Zi~kI1AlI7sN0(5Q4ut@fJFN5a893?2>y&XM3D z9KdaNaOOG==b*swW}|zDM7w(i@WO6nYFuRxdj?_$foEbqhhkd-Jc9;)2n`O1hIe2H zif#y4J6Z+_2?ht9qzz`AJ*TFqXQl}NaX$kN1g8YIJbAOGwwZqb2?wPJu%?Z{1_lEM zd8WCIJ;4nI57~vw*#ia*3E#e9(zFAjlc}54+go40uk3xU^6O^3uE6%0eqmbJ9RqR; z9DqDN06MyJCf7K8V+1((0!~0VPlb4>3)lltsEG#uB;Diq=Zv%i!+;>XwolI+X~Ryr z8%XM8GfsJsom90jRwZZ?YwD!=fL}*XsH8pENYo<$b7e+0H3@U%%6KiQqHI_SAk9-Y zTj4pDG?hY@To4gxfFNYeIz)|@)Txvyy@_E6xX~u{?$d>71R~1XkCaz|>;Utqw6f$6 zd33lC;0RA*lSmDhLiNG46xdG5p4y?+XqhZQwSwtswTp~ujH**UpaV%T=~kwYMVpo& z*REP(H9D|$iev)<;0)-622Px!-RPLQ@dD;)qe^?oOqyJ11KQjgcMe2 v;e{AxsNsejcIe@UAYKRn0RpVmz=!EFvck3j5OBRVgvv?;L$4! diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif deleted file mode 100644 index 72dee5c09484be2ce4a5a9a274703f47d6492d2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 916 zcmZ?wbhEHboXjA=aFu}}DJe-tMuv}%FC-+SzP|qG(W6>gTHCj8U%7JSx^?Sr-n`k{ z+w11$cJ11=w{PD*efsptlP8ZJJ?iS}a&>j}^77iYZQIqWSF5V3X3w5&VPR2NSU7Fk zv{$cQnVFg0yLXR)f#LGy%RrKLK=CIF*l-;X3Gx#I+kc1lW@jC#{u4`zPUcw6zp%pO z=LQF*d27l}zpdK;U_*tE-t6=D+Kwz{*m?iMjvBx9x8MKRQ+Iy8IzvuvQ*%peTYG+e zW0916A2X|hyaWfMyyQd$26-lyd^Y)+eSHiCtdjDK91467X`yLy&9cWGB{52F+V)4IvbcbS& z60;PuJo~-}Y)os8oZcw8_R{VzYJwRo@8_EM=l${&R%>A7V0>_|reXQP;0B)AVh1Lv zB^+?elrSj~wmi_=$gu4X!!0p)XMF*s{KS^XQw)av3Sul03E4s%|H~xqF#J9Fz+rXx zpD%B(QQN9beNNPP}?_CTy~ZSIC>p%NP4)6ThBraAwmsUQeQW(u#uLhH`&?tl7T$p!n{{ z55CMMKC^z8iZPtJ#=tDWvSV`btc#~-OlGQhb?a^Va^}r8zD@!cd4Da~(8K1(<-S1q z!H=ggXOAZs7Oha&;C?=QqXKJt1oIcxCe{8K%f!s@xtMS=e`8??wp=08z{9q~Ky>4j z^qD4VlUlh#Rc6>fWJ&d`V+%F8>h#m3iJ?fO(rIqGoM=XLhC*j3gT;$N)`nIs-Ak7= zCfsRa&{)-Tv{Rkgf@N~6-QN}GHCL|r1#Qb_0L!w8+0K4caPH9 z@&^xuAK18VYB@2t;@QgOvUlIUd_KQ{?~^;TXimb5g&k_EUM%V{d-Y=R1UIdhOQz^m kF|u;|TsXLFPT8xM%NMk1y;`wkTGp$TE0$?x2{2d#07AEQZvX%Q diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_es.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_es.gif deleted file mode 100644 index accda01c85b5f905d644563725477b017d5950f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 659 zcmV;E0&M+9Nk%w1VUqw50J8u9rl$WmI9^;_nPz6He}B}!zyHM)X2nw! zOscMI>%MR-&vb3y?lUmJ}YLgz^M z5DsDY`#^gg2lQ~zfVb1XL&E(<3&MP5YhGq|UJV2f2XA6xL4jjk13rTee*|@icRyl_ zZwOjFTn!0bV2%k54QF^jsikmer3nIZK?Du~T>-W}da|Xp4yzBA2?wMIucc#mrFDvW zrMS&Mz^V_bh0EB(scF5P(g_5ilwfz%*&Md}Y1wE%BcK~3rdSJQ&=qK@ha*IJr2k@^WW%t^pi zf{cIE@e+V<7Xl4oJp>rBP+y9aNTs@&tSJFtdqO{pBZwC2W@vPkd5v#Y)jEk)Gs}4_ zO~_febkQ<-)RMAQ{u)#sh8K^wMbUuMeS^-D#xTO(Y@=?d4!EFvck3j4Va~06Po*Dyskh diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_parkcustomerdial_ptbr.gif deleted file mode 100644 index 0101ea9e8939ac0f00b6ccfc170e45c9fb9e029c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 916 zcmZ?wbhEHboXjA=aFv0<-Mw5yM2U+_(AG9BCT3=T|2uhkMm{E_<#BG z|7mHfjEzI*&;Nhu(Et7W{~H+vx3t{3a^-(Y%5qcF$OQ}jM@CM$diDR_z5mnGR~HoQ z*3@(f3hFp_?tgCX*3Fy$tE)RQFfh!V`5#D99Vq@}0h_48{c$!AlV+1JNVz$&A}$gV6Sn=h@jX7NU) zrIVyrES|JjCVyw&rgbaUu9)s zFqnaFw#0!+Y6%D2GNr9bge?#BHZpAc!*EM%x$}BKrToN}$Wsi4{mK$75((LtIR2MO z-(mQBlfiLy_@6ItwO)P>+qj^x@7JS*hPffjg*NgkFr4l^y)Hjy7vqKQSa#-{Vdn&Q zzZYW`WMgp2`jvJdY|A8`0uBWQ;fVNOyWYJG&w8|HS;yBRhZCFlGB93830-P6}{EbE`K zI5y}&{O=y6v*iyS2tTlK-PCeoZpE{e%VqDreffNT1K+21R-u}N7YjSoR=rr%WA^IB t;t6hAFPBWwt8!$OauGPRY);v$m&+HlX}wypWLnm%l`EEMWeG4?0|3}ucW?jz diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_seconds.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_XB_seconds.gif deleted file mode 100644 index 92fc7f2b380b00341c73446d06dec171457d0a9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 352 zcmV-m0iXUyNk%w1VMG890J8u9zP|2ydYKLm5no?-v9aALDKkVwRT~>3qod4HQf7#V zsx~%6ZEc8_mb(A|0L;w)A^8LV00000EC2ui07L)|000F4@X1N5y*TU5yZ<0X49mg* zQmHP}STa{U;9zSA z0@Fh7(kM`JV2c1jNdO23)TG8^2=sAr5(EMd3L{z1#|#@C^U2g?z;~N0^0-zhylwF?FSm#IB?Jp y*1&_`7#tXAK$W3|0un@`XDHCYEa?_HFc3*sh>su*Ly805mX^B?4iR5pcPS||v9aC0zU~_v zB6@n6qod4-h^j!BA^8LV00000EC2ui07L)|000E~5XecZy*TU5yZ>M)jvrzS zLy(Z&z*kR~XgheYDw8W1D_pa6&{Fc<}C4>|#C2@f{|QUOc|X&eX(1_}=V0SYJs1q60M zb$6C}6LxtL2|5D}ri2A4D;*0!69)tV4m30godBFuprtwzq*nl_ssN`F423=&eNq4o zfq-{z2@7#^E)IppwFe8UPJA5C)>f3^Xp1hyVaP7j05mX^B?4iR5pcPS||v9aC0zU~_v zB6@n6qod4-h^j!BA^8LV00000EC2ui07L)|000E~5XecZy*TU5yZ>M)jvrzS zLy(Z&z*kR~XgheYDw8W1D_pa6&{Fc<}C4>|#C2@f{|QUOc|X&eX(1_}=V0SYJs1q60M zb$6C}6LxtL2|5D}ri2A4D;*0!69)tV4m30godBFuprtwzq*nl_ssN`F423=&eNq4o zfq-{z2@7#^E)IppwFe8UPJA5C)>f3^Xp1hyVaP7j9<{j1f?`|A2*3%N?=bPDG zt0XUz7887C=dw^=*SjaS{Qv*&|H~_@W_AC6edGU&%m06V{{Qju|9^k}Kfn0@@1OFV z#Q)#l|9}7B|Hmi)e|-4={lotckN&^E|Nqi-v){{Q^) z|J{9{?PLSRpDbX#Iv^6{CkD3v2O0`Ibfo%EEGasfV>SQ6iW0B2QR{EKPB{IxYX5@` z6+U|Xrv7I;olXec`>>Duo=f<9tPSFh<2^AYc0-Q2^+DzJ8EtGM^VR$(@#Lx(uo+qgLo zAL8e0W<7O^hmE`WAQNlj`3p>3Y{wd}-9F6Lw%lt~3;Ux(yv-aZUthWT`taKahi)+3 zdd>O$3)2&xyWz7{h7JMPlO?5(x#Wr0>=9LU{4%sf@ebu;|eTUkHpQhOg zEIh5X(j{eq9m;}Q7nX9pZH%nx{+1hj;ecAhzW?9EwAQR(TBRf}qNq{upfQ;7{u4K` zwCUQ+Qw0>8=f>O=NOzU*DKSWSeZbZ6)jYOERuUB*ui-; zxHZyLqvu)hX@+fFe5XF&b-Xd-u->e`6-}H<3NI$@d2wLYV}}nyHdomF8_zy@XnB+& z{@g@W&gzZ^hZc?w0o6XH4Ku$h@CY)gTz~g)~|G?A} zzRVh790!EFzjAA^Z%cp|6g5mu`}-J+Z}DPpdp9an-Eu|NsB}e|hEq>l^=ne*XXO&;J*f|9^b^|L>pw z&oBP}_~ie)d;h<^{r~R%|Mw66zq(v2~AU`p%{Xfu9;GrYce_~0|$sDWs7gm&bt&LiLLp$;G+p7H! zHdOfN^_%*iT@`dgkKY z-mOOk51(Q`bWnh+k(r6@>V<xe2BRWletwj^At}bY@$Tn>c{fHn(NnTsyf(0L$`U@APZS@wNv-KFeoHEM?3C0u7YJENj6fEL59y<7h z(IX}!VZ)?}&%>6zsY+8|V|w%OT^0xPDkWt;#$t|-caCuIHF>7^W)!Avp7iwCGN0d{ z9?x!?(JJ#{hx$T6HwTXO)-M`c=6&hui{W-?YKqD$be<P5(q*eij;5 zc4S_vgXp3|tWFCqoYbkl> diff --git a/agc_2-X/trunk/LANG_agc/agc/images/vdc_tab_script_ptbr.gif b/agc_2-X/trunk/LANG_agc/agc/images/vdc_tab_script_ptbr.gif deleted file mode 100644 index 69e43b796cf4e54e22bffc09ba16377d76657104..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 825 zcmZ?wbhEHb%w&*bxXQrr|M`Xg|Nk=p8GnBMe|2s5%9$>9<{j1f?`|A2*3%N?=bPDG zt0XUz7887C=dw^=*SjaS{Qv*&|H~_@W_AC6edGU&%m06V{{Qju|9^k}Kfn0@@1OFV z#Q)#l|9}7B|Hmi)e|-4={lotckN&^E|Nqi-v){{Q^) z|J{9{?PLSRpDbX#Iv^6{CkD3v2O0`Ibfo%EEGasfV>SQ6iW0B2QR{EKPB{IxYX5@` z6+U|Xrv7I;olXec`>>Duo=f<9tPSFh<2^AYc0-Q2^+DzJ8EtGM^VR$(@#Lx(uo+qgLo zAL8e0W<7O^hmE`WAQNlj`3p>3Y{wd}-9F6Lw%lt~3;Ux(yv-aZUthWT`taKahi)+3 zdd>O$3)2&xyWz7{h7JMPlO?5(x#Wr0>=9LU{4%sf@ebu;|eTUkHpQhOg zEIh5X(j{eq9m;}Q7nX9pZH%nx{+1hj;ecAhzW?9EwAQR(TBRf}qNq{upfQ;7{u4K` zwCUQ+Qw0>8=f>O=NOzU*DKSWSeZbZ6)jYOERuUB*ui-; zxHZyLqvu)hX@+fFe5XF&b-Xd-u->e`6-}H<3NI$@d2wLYV}}nyHdomF8_zy@XnB+& z{@g@W&gzZ^hZc?w0o6XH4Ku$h@CY)gTz~g)~|G?A} zzRVh790!EFqEekJvnvz_xE2*`sO}3e7&ut;o{a4a#FH3 zCYJoXe7fq|QGQ{ER_ye4bl*IC^}m1rrZ)Ef{qy(l?>~=@-uV9hYi4xHn_JJGoxS_$ z_|1ohufMwX_|?_NpI^Lxc;x!)>rWn^y#4sZtsfu1zPzb$=i>P-2l3TB%t_{1*~2NM1uUp!1n(@LxG2mRR4)3MJIEt=3iJ* z;e{VImjv#8*iqxRUYPI4p1Skri{tdlnwnXp)H3~) z7`l6U`}!wLoHTjL)M@=n{wmYw%$+xXfr_8%f~Cur&r|gkQeLrc{RReQAs_LL+jq

    >?4tw&tk9Gv&APT)Fo zZo;i8(px;Y^>W_g=;P!$bN9-F?h8jciw~TTS8imIw$b?UR*00C9>)WylN(-M+a|S~ ziKDw=vAcV|>Rg9INTzb*Lo*JK-R@~}&x&P>ycl*vrz0*_`b61I&U?SOI zm&Prt&-L3PDCu;M1h>H169yK$D+0YYDfD}EduB2gv^1EFqEekJvnvz_xE2*`sO}3e7&ut;o{a4a#FH3 zCYJoXe7fq|QGQ{ER_ye4bl*IC^}m1rrZ)Ef{qy(l?>~=@-uV9hYi4xHn_JJGoxS_$ z_|1ohufMwX_|?_NpI^Lxc;x!)>rWn^y#4sZtsfu1zPzb$=i>P-2l3TB%t_{1*~2NM1uUp!1n(@LxG2mRR4)3MJIEt=3iJ* z;e{VImjv#8*iqxRUYPI4p1Skri{tdlnwnXp)H3~) z7`l6U`}!wLoHTjL)M@=n{wmYw%$+xXfr_8%f~Cur&r|gkQeLrc{RReQAs_LL+jq

    >?4tw&tk9Gv&APT)Fo zZo;i8(px;Y^>W_g=;P!$bN9-F?h8jciw~TTS8imIw$b?UR*00C9>)WylN(-M+a|S~ ziKDw=vAcV|>Rg9INTzb*Lo*JK-R@~}&x&P>ycl*vrz0*_`b61I&U?SOI zm&Prt&-L3PDCu;M1h>H169yK$D+0YYDfD}EduB2gv^1 LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -LIVE INBOUND CALL"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    LIVE INBOUND CALL

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid is not valid\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Channel: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "CUSTOM - \n"; - - echo "
    Number Dialed: $row[8]
    Notes: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "HANGUP - \n"; - echo "SEND TO MY VOICEMAIL\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc/live_exten_check.php deleted file mode 100644 index e0ca96c8..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Live Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ChannelA[$loop_count] = "$row[0]"; - $ChannelB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $ChannelA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc/manager_send.php b/agc_2-X/trunk/LANG_agc/agc/manager_send.php deleted file mode 100644 index b934cbb8..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Manager Send: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten is not valid or ext_context $ext_context or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel is not live on $call_server_ip, Checking Live Channel...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup command sent for Channel $channel on $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "auto_dial_level $auto_dial_level must be set\n"; - echo "campaign $campaign must be set\n"; - echo "uniqueid $uniqueid must be set\n"; - echo "lead_id $lead_id must be set\n"; - echo "\nRedirectVD Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "parkedby $parkedby must be set\n"; - echo "\nRedirectToPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectFromPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "ExtraChannel $extrachannel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Cannot find empty conference on $server_ip, Redirect command not inserted\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel on $call_server_ip and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for Channel $channel on $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, $ACTION command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or exten $exten is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going on in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc/park_calls_display.php deleted file mode 100644 index 246591b1..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Parked Calls Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc/vdc_db_query.php deleted file mode 100644 index ef287987..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Invalid Username/Password: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Database Query Script"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Group Choice $closer_choice is not valid\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Group Choice $closer_choice has been registered to user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "HOPPER EMPTY\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC NUMBER\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "HOPPER EMPTY\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CALL NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID is not valid\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign is not valid\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inserted: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "LOG NOT ENTERED\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CALL_LOG Inserted: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "LOG NOT ENTERED\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id is not valid\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "LOG NOT ENTERED\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campaign $campaign is not valid\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCALL - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCALL - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send on to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If CALLBK, change vicidial_callback record to INACTIVE - if ($dispo == 'CALLBK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user on $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten is not valid\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation on the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CALLBACK ENTRY - if ( ($dispo_choice == 'CBHOLD') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id information has been updated\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage is not valid\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' is now in status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list is not valid\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc/vicidial.php b/agc_2-X/trunk/LANG_agc/agc/vicidial.php deleted file mode 100644 index 9d3763bb..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIDIAL web client: Re-Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Re-Login
     
    Phone Login:
    Phone Password:
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    User Login

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Campaign Login
     
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIDIAL web client: Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login
     
    Phone Login:
    Phone Password:
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIDIAL web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone Login
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_seconds=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Campaign not active, please try again
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Login incorrect, please try again
    "; - } - } - if ($VDloginDISPLAY) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Campaign Login
     
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIDIAL web client: Phone Login Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login Error
     
    Sorry, your phone login and password are not active in this system, please try again:
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIDIAL web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed on this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login on phone: $SIP_user to campaign: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "Sorry, there are no leads in the hopper for this campaign\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
    "; - echo "Password:
    \n"; - echo "Campaign: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
    "; - echo "Password:
    \n"; - echo "Campaign: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -LOGOUT\n"; ?> -
    -
    - - - - - - - - -
    VICIDIALSCRIPT   LIVE     session ID: Live Call
    -
    - - - - -

    VICIDIAL
    -
    - - -MANUAL DIAL
    -
    - - -X ACTIVE CALLBACKS
    -
    - - -
    CALLBACKS FOR AGENT :
    Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list. -
    -
    -
      - Refresh -                 - Go Back -
    -
    - - -
    NEW MANUAL DIAL LEAD FOR :

    Enter information below for the new lead you wish to call. -
    - \n"; - } - ?> - Note: all new manual dial leads will go into list 999

    - - - - - - - - - - - - - - - -
    Dial Code:   (This is usually a 1 in the USA-Canada)
    Phone Number:   (10 digits max - digits only)
    Search Existing Leads:   (This option if checked will attempt to find the phone number in the system before inserting it as a new lead)


    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 Dial Override field below. To hangup this call you will have to open the CALLS IN THIS SESSION link at the bottom of the screen and hang it up by clicking on its channel link there.
     
    Dial Override:   (digits only please)
    -
    - Dial Now -                 - Go Back -
    -
    - - - - -Your Status:
    Calls Dialing: -
    - - - - - -
    - - Transfer - Conference
    - INTERNAL CLOSER - LOCAL CLOSER - CODE - Hangup Xfer Line - Hangup Both Lines - -
    - - Number to call   - seconds   - channel - - OVERRIDE   - D1 - D2 -
    - - Dial With Customer - Park Customer Dial - LEAVE 3-WAY CALL - Dial Blind Transfer - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Lead Dispositioned As:

    - -
    -
    -
    - - - - - - - -
    Disposition Hot Keys: - When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically:
    - - - - - -
    -
    - - -
    Noone is in your session:
    - Go Back -

    - Call Agent Again -
    -
    - - -
    Customer has hung up:
    - Go Back -

    - Finish and Disposition Call - -
    -
    - - -
    Call Wrapup: seconds remaining in wrapup

    - -

    - Finish Wrapup and Move On - -
    -
    - - -

    LOGOUT
    -
    - - -
    -
    - - -
     
    -
    - - -
    Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call.
    -
    - - -
    DISPOSITION CALL :       Hangup Again       minimize
    - End-of-call Disposition Selection -
    - PAUSE AGENT DIALING
    - CLEAR FORM | - SUBMIT -

    - WEB FORM SUBMIT -

      -
    -
    - - - -
    Select a CallBack Date :
    - - - Select a Date Below   -     - Hour: -   - Minutes: -   - -  
    - MY CALLBACK ONLY
    ";} - ?> - CB Comments:

    - - SUBMIT

    - -

      -
    -
    - - -
    CLOSER INBOUND GROUP SELECTION
    - Closer Inbound Group Selection -
    - BLENDED CALLING(outbound activated)
    - RESET | - SUBMIT -



      -
    -
    - - - - Channel - Channel - MY CALLBACK ONLY
    ";} - ?> -
    - - - - - - - -
    LIVE CALL TRANSFER
    Channel to be transferred: Channel
    Extensions:
    Extensions Menu
    -
    - Send to selected extension

    - Send to selected vmail box

    - Send to this number:


    - REFRESH


    - Back to Main Window

    -
    Conferences:
    (click on a number below to send to a conference)
    Send my channel too
    Conferences Menu
    -
    - - - - -
    VICIDIAL SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    STATUS:
    -
    -Dial Next Number
    - LEAD PREVIEW
    - ALT PHONE DIAL
    - - -RECORDING FILE:
    -
    -
    -RECORD ID:
    -
    - -Start Recording
    -
    -Web Form
    -
    -Park Call
    -Transfer - Conference
    -
    -Hangup Customer
    -
    -Send DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    seconds:   Channel:   Cust Time:
    Customer Information:
    Title:   First:   MI:   Last:
    Address1:
    Address2:   Address3:
    City:   State:   PostCode:
    Province:   Vendor ID:
    Phone:   DialCode:   Alt. Phone:
    Show:   Email:
    Comments:
    - -
    -


      - -
    - - - - -
    VICIDIAL web-client version:     BUILD:               Server:              
    -Show conference call channel information
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -HOT KEYS INACTIVE - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc/voicemail_check.php deleted file mode 100644 index 9cc655c6..00000000 --- a/agc_2-X/trunk/LANG_agc/agc/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Voicemail Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "voicemail box $vmail_box is not valid\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_br/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc_br/active_list_refresh.php deleted file mode 100644 index 1f1e784a..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuário/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Mostrar Lista: "; -if ($ADD==1) {echo "Extensões Ativas";} -if ($ADD==2) {echo "Extensões Ocupadas";} -if ($ADD==3) {echo "Linhas externas";} -if ($ADD==4) {echo "Extensões Locais";} -if ($ADD==5) {echo "Conferencias";} -if ($ADD==99999) {echo "AJUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_br/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc_br/astguiclient.php deleted file mode 100644 index 8c11bcba..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Você fez o logoff. Obrigado\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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: Login\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Brazil
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login
     
    Login do Usuário:
    Senha do Usuário:
    Login do Telefone:
    Senha do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDISCAR|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDISCAR|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Login do Telefone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Brazil
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Login do Telefone
     
    Login do Telefone:
    Senha do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Login do Telefone\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Brazil
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login do Telefone
     
    Desculpe seu login de telefone e senha não estão ativos nesta campanha, por favor tente novamente:
     
    Login do Telefone:
    Senha do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -SAIR
    \n"; ?> -
    Painel PrincipalLinhas Ativas no PainelPainel de ConferênciasVerificar Caixa PostalChamadas Ativas
    -
    - - -

    Logout
    -
    - - -
    TRUNK DESLIGAR

    - Active Trunks Menu
    - Desligar o Canal   |   - Capturar o Canal   |   - Ouvir o Canal   |   - Atualizar   |   - Voltar a página principal -
    -
    - - -
    DESLIGAR LOCAL

    - Menu Local Ativo
    - Desligar Local   |   - Capturar Local   |   - Ouvir Local   |   - Atualizar   |   - Voltar a página principal -
    -
    - - - - - - - -
    TRANSFERIR CHAMADAS ATIVAS
    Canal a ser transferido: Canal
    Extensões:
    Extensões do Menu
    -
    - Enviar para a extensão selecionada

    - Enviar para a caixa postal selecionada

    - Envie para este número:


    - Atualizar


    - Voltar a página principal

    -
    Conferencias:
    (Clique no número abaixo para enviar a conferência)
    Enviar meu canal para
    Menu das conferências
    -
    - - - - - -
    Discar a extensão local
    Telefone ligando de: Canal
    Extensões:
    Extensões do Menu
    -
    - Ligar para a extensão selecionada

    - Ligar para a caixa postal selecionada

    - Atualizar


    - Voltar a página principal

    -
    -
    - - -
    CHAMADAS EM ESPERA:
    - Voltar a página principal

    -
    -
    - - - - - - - - - - - - - - - -
      -
    CAIXA POSTAL     NOVO:     VELHO:             DISCAGEM MANUAL       DISCAR
    CHAMADAS EM ESPERA: 0                DISCAR A EXTENSÃO LOCAL
    CHAMADAS SAINTES:
    CHAMADAS ENTRANTES:
    Versão do cliente web do astGUIClient: CONFIGURAÇÃO:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    FAVORITOS       editar
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    FAVORITOS

     
    PARA ENVIAR MODIFICACOES FAVORITAS E NECESSARIO FAZER O SAIR
    VOLTAR A TELA PRINCIPAL - as alterações serão ignoradas
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSAR | INICIAR     Atualizar a taxa: 1000 ms Mais rápido | Mais devagar

    -
    Inicializando..
    -
    Extensões Ativas
    -ATUALIZAR | -ORDEM | -
    Linhas externas
    -ATUALIZAR | -ORDEM | -
    Extensões Locais
    -ATUALIZAR | -ORDEM | -
    - Data vai aqui

    -
    - Data vai aqui

    Atividade do Tronco -
    - Data vai aqui

    Atividade Local -
    -
    - - - - -
    - - -Lista das conferências - - - -
    -Clique no número da conferência, a esquerda, para entrar na conferência -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_br/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc_br/call_log_display.php deleted file mode 100644 index 11771e35..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuário/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Registro de Ligações"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten não é válido ou protocolo $protocol não é válido\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_br/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_br/conf_exten_check.php deleted file mode 100644 index ac0d543b..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuário/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificação da Extensão de Conferência"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten não é válido\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanalA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanalA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$CanalA[$counter] ~"; - # echo "$CanalA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten não é válido or Exten $exten não é válido\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conferencia $conf_exten já foi registrado para $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_br/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc_br/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc_br/inbound_popup.php b/agc_2-X/trunk/LANG_agc/agc_br/inbound_popup.php deleted file mode 100644 index 089e809f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/inbound_popup.php +++ /dev/null @@ -1,348 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuário/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -CHAMADA ENTRANDO"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    CHAMADA ENTRANDO

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid não é válido\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Canal: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Canal=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "CUSTOMIZADO - \n"; - - echo "
    Número Discado: $row[8]
    Notas: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "DESLIGAR - \n"; - echo "ENVIAR PARA MINHA CAIXA POSTAL\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_br/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_br/live_exten_check.php deleted file mode 100644 index 845ae60c..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuário/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificação de extensões ativas"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten não é válido ou protocolo $protocol não é válido\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $CanalA[$loop_count] = "$row[0]"; - $CanalB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $CanalA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_br/manager_send.php b/agc_2-X/trunk/LANG_agc/agc_br/manager_send.php deleted file mode 100644 index 7a23c861..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuário/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Gerente Envia: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AJUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten não é válido or queryCID $queryCID não é válido, Originate comando não inserido\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando enviado para Exten $exten Canal $channelligado$server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "extenName $extenName Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "\nOriginateName Action não enviado\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "extenName $extenName Deve ser definido\n"; - echo "exten $exten Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "\nOriginateNameVmail Action não enviado\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten não é válido or queryCID $queryCID não é válido, Originate comando não inserido\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando enviado para Exten $exten Canal $channelligado$server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten não é válido or ext_context $ext_context or queryCID $queryCID não é válido, Hangup comando não inserido\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Canal $channel não é válido or queryCID $queryCID não é válido, Hangup comando não inserido\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel não está ativoligado$call_server_ip, Checking Live Canal...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Canal $channel não está ativoligado$call_server_ip, Hangup comando não inserido $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup comando enviado para Canal $channelligado$call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "exten $exten Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "auto_dial_level $auto_dial_level Deve ser definido\n"; - echo "campaign $campaign Deve ser definido\n"; - echo "uniqueid $uniqueid Deve ser definido\n"; - echo "lead_id $lead_id Deve ser definido\n"; - echo "\nRedirectVD Action não enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='TRANFERENCIA' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='TRANFERENCIA' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "exten $exten Deve ser definido\n"; - echo "extenName $extenName Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "parkedby $parkedby Deve ser definido\n"; - echo "\nRedirectToPark Action não enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "exten $exten Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "\nRedirectFromPark Action não enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "extenName $extenName Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "\nRedirectName Action não enviado\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "extenName $extenName Deve ser definido\n"; - echo "exten $exten Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "\nRedirectNameVmail Action não enviado\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "ExtraCanal $extrachannel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "exten $exten Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "\nRedirect Action não enviado\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Não foi possível achar uma conferência vazialigado$server_ip, Redirect comando não inserido\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Canal $channel não está ativoligado$call_server_ip, Redirect comando não inserido\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Canal $channel não está ativoligado$server_ip, Redirect comando não inserido\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando enviado para Canal $channel and \nExtraCanal $extrachannel\n to $extenligado$server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando enviado para Canal $channelligado$call_server_ip and \nExtraCanal $extrachannel\n to $extenligado$server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 "Uma dessas variáveis não é válido:\n"; - echo "Canal $channel Deve ser maior que 2 caracteres\n"; - echo "queryCID $queryCID Deve ser maior que 14 caracateres\n"; - echo "exten $exten Deve ser definido\n"; - echo "ext_context $ext_context Deve ser definido\n"; - echo "ext_priority $ext_priority Deve ser definido\n"; - echo "\nRedirect Action não enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canal $channel não está ativoligado$server_ip, Redirect comando não inserido\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect comando enviado para Canal $channelligado$server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canal $channel não é válido or queryCID $queryCID não é válido or filename: $filename não é válido, $ACTION comando não inserido\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canal $channel não está ativoligado$server_ip, $ACTION comando não inserido\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION comando enviado para Canal $channelligado$server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canal $channel não é válido or exten $exten não é válido or filename: $filename não é válido, $ACTION comando não inserido\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings goingligadoin this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION comando enviado para Canal $channelligado$server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n AS GRAVAÇÕES VÃO DURAR 60 MINUTOS\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_br/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc_br/park_calls_display.php deleted file mode 100644 index 8b4310da..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Inválido Usuário/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Mostra as ligações em espera"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten não é válido ou protocolo $protocol não é válido\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_br/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc_br/vdc_db_query.php deleted file mode 100644 index a312b0bf..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Inválido Usuário/Senha: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Script de consulta ao banco de dados"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Escolha do Grupo $closer_choice não é válido\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Escolha do Grupo $closer_choice foi registrado para o usuário $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "LISTA DE DISCAGEM VAZIA\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context não é válido\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC NUMERO\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "LISTA DE DISCAGEM VAZIA\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context não é válido\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CHAMADA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context não é válido\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID não é válido\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "REGISTRO NÃO DEFINIDO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign não é válido\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inserido: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "REGISTRO NÃO DEFINIDO\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CHAMADA_LOG Inserido: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "REGISTRO NÃO DEFINIDO\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "REGISTRO NÃO DEFINIDO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id não é válido\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "REGISTRO NÃO DEFINIDO\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campanha $campaign não é válido\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCHAMADA in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCHAMADA - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCHAMADA - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then sendligadoto vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If CHAMADABK, change vicidial_callback record to INACTIVE - if ($dispo == 'CHAMADABK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $userligado$server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten não é válido\n"; - exit; - } -else - { - ##### Insert a SAIR record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','SAIR','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservationligadothe vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id não é válido\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CHAMADABACK ENTRY - if ( ($dispo_choice == 'CBHVELHO') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' foi modificado para ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id não é válido\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id a informação foi atualizada\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage não é válido\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' está agora com o status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list não é válido\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_br/vicidial.php b/agc_2-X/trunk/LANG_agc/agc_br/vicidial.php deleted file mode 100644 index 227202f0..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "Você fez o logoff. Obrigado\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -#$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of segundos for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIDISCAR web client: Re-Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Brazil
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Re-Login
     
    Login do Telefone:
    Senha do Telefone:
    Login do Usuário:
    Senha do Usuário:
    Campanha: $camp_form_code

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIDISCAR web client: Login da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Brazil
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    Login do Usuário

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login da Campanha
     
    Login do Usuário:
    Senha do Usuário:
    Campanha: $camp_form_code

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIDISCAR web client: Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Brazil
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login
     
    Login do Telefone:
    Senha do Telefone:
    Login do Usuário:
    Senha do Usuário:
    Campanha: $camp_form_code

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIDISCAR web client: Login do Telefone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Brazil
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Login do Telefone
     
    Login do Telefone:
    Senha do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_segundos=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "A campanha não está ativa, por favor tente novamente
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Usuário incorreto, por favor tente novamente
    "; - } - } - if ($VDloginDISPLAY) - { - echo "VICIDISCAR web client: Login da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Brazil
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login da Campanha
     
    Login do Usuário:
    Senha do Usuário:
    Campanha: $camp_form_code

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIDISCAR web client: Login do Telefone Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Brazil
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login Error
     
    Desculpe seu login de telefone e senha não estão ativos nesta campanha, por favor tente novamente:
     
    Login do Telefone:
    Senha do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIDISCAR web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowedligadothis campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_loginligadophone: $SIP_userpara a campanha: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NOVO record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIDISCAR web client: VICIDISCAR Login da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Brazil
    \n"; - echo "Desculpe, não existem registros na fila de discagem\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
    "; - echo "Senha:
    \n"; - echo "Campanha: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIDISCAR web client: VICIDISCAR Login da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Brazil
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
    "; - echo "Senha:
    \n"; - echo "Campanha: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -SAIR\n"; ?> -
    -
    - - - - - - - - -
    VICIDISCARSCRIPT   LIVE    ID da sessão: Chamadas Ativas
    -
    - - - - -

    VICIDISCAR
    -
    - - -DISCAGEM MANUAL
    -
    - - -X AGENDAMENTOS ATIVOS
    -
    - - -
    AGENDAMENTOS POR AGENTE :
    Clique em um dos contatos abaixo para ligar. Se você clicar em um contatos abaixo o mesmo será removido da lista de Agendamentos. -
    -
    -
      - Atualizar -                 - Voltar -
    -
    - - -
    NOVA DISCAGEM MANUAL PARA :

    Digite abaixo a informação do novo contato que você deseja ligar. -
    - \n"; - } - ?> - Nota: todos os novos contatos da discagem manual serão inseridos na lista 999

    - - - - - - - - - - - - - - - -
    Codigo de Ãrea:   (Normalmente é 1 nos EUA-Canada)
    Telefone Number:   (Maximo de 10 digitos - apenas número)
    Ligações Existentes Da Busca:   (Esta opção se verificado tentará encontrar o número de telefone no sistema antes de introduzi-lo como uma ligação nova)


    Se você deseja ligar para um número que não está na lista de contatos, digite o número que voc6e deseja discar no campo Discagem Sobreposta abaixo. Para desligar essa ligação você deve abrir o link Ligações em sua sessão link no rodapé da página e desligar clicando no link do canal.
     
    Discagem Sobreposta:   (digitos apenas por favor)
    -
    - Discar Agora -                 - Voltar -
    -
    - - - - -Your Status:
    Calls Dialing: -
    - - - - - -
    - - Transferir a conferência
    - CLOSER INTERNO - CLOSER LOCAL - CODE - Desligar linha Xfer - Desligar ambas as linhas - -
    - - Número a ser discado   - segundos   - channel - - OVERRIDE   - D1 - D2 -
    - - Discar com o cliente - Colocar chamada do cliente em espera - ABANDONAR CHAMADA A TRES - Transferência sem acompanhamento - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Status da ligação definida como:

    - -
    -
    -
    - - - - - - - -
    Atalhos para os status: - Quanto ativo apenas pressione a tecla do teclado referente ao status desejado. A ligação será desligada e salva com o status definido automaticamemente:
    - - - - - -
    -
    - - -
    Não existe ninguem na sua sessão:
    - Voltar -

    - Ligar novamente para o agente -
    -
    - - -
    O cliente desligou:
    - Voltar -

    - Finalize e coloque o status da ligação - -
    -
    - - -
    Chamada Wrapup: segundos restantes no wrapup

    - -

    - Revestimento Wrapup e movimento sobre - -
    -
    - - -

    SAIR
    -
    - - -
    -
    - - -
     
    -
    - - -
    Qualquer alteração feita nesta página não será salva. Você deve mudar as informações do cliente antes de desligar a ligação.
    -
    - - -
    SELEÇÃO DE STATUS :       Desligue novamente       minimizar
    - Fim da seleção de status -
    - PAUSAR DISCAGEM DO AGENTE
    - LIMPAR FORMULARIO | - ENVIAR -

    - WEB FORM ENVIAR -

      -
    -
    - - - -
    Selecione uma data para o retorno :
    - - - Selecione uma data abaixo   -     - Hour: -   - Minutes: -   - -  
    - ESTE AGENDAMENTO SO APARECE PARA MIM
    ";} - ?> - Comentarios do CB:

    - - ENVIAR

    - -

      -
    -
    - - -
    SELECAO DO GRUPO DE ENTRADA DO CLOSER
    - Seleção do grupo de entrada do closer -
    - LIGACAO MISTURADA(ligações externas ativadas)
    - REINICIAR | - ENVIAR -



      -
    -
    - - - - Canal - Canal - ESTE AGENDAMENTO SO APARECE PARA MIM
    ";} - ?> -
    - - - - - - - -
    TRANSFERIR CHAMADAS ATIVAS
    Canal a ser transferido: Canal
    Extensões:
    Extensões do Menu
    -
    - Enviar para a extensão selecionada

    - Enviar para a caixa postal selecionada

    - Envie para este número:


    - ATUALIZAR


    - Voltar a página principal

    -
    Conferencias:
    (Clique no número abaixo para enviar a conferência)
    Enviar meu canal para
    Menu das conferências
    -
    - - - - -
    VICIDISCAR SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    STATUS:
    -
    -Discar proximo número
    - VISUALIZAR CONTATO
    - DISCAR TELEFONE ALTERNATIVO
    - - -GRAVANDO ARQUIVO:
    -
    -
    -ID da gravação:
    -
    - -Inicia Gravação
    -
    -Web Form
    -
    -Colocar em espera
    -Transferir a conferência
    -
    -Desligar Cliente
    -
    -Enviar DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    segundos:   Canal:   Tempo de cliente:
    Informações do cliente:
    Título:   Primeiro:   MI:  Ultimo:
    Endereço1:
    Endereço2:   Endereço3:
    Cidade:   Estado:   CEP:
    Bairro:   ID do Vendedor:
    Telefone:   Codigo de Area:   Telefone Alternativo:
    Mostrar:   Email:
    Comentários:
    - -
    -


      - -
    - - - - -
    VICIDISCAR web-client version:     CONFIGURAÇÃO:               Servidor:              
    -Mostrar informações de discagem do canal
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -ATALHOS DE STATUS INATIVOS - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_br/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc_br/voicemail_check.php deleted file mode 100644 index 40f2fc42..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_br/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuário/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificar caixa postal"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "Caixa Postal $vmail_box não é válido\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_de/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc_de/active_list_refresh.php deleted file mode 100644 index 586890cb..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Liste Anzeige: "; -if ($ADD==1) {echo "Phasenverlängerungen";} -if ($ADD==2) {echo "Beschäftigte Verlängerungen";} -if ($ADD==3) {echo "Äußere Linien";} -if ($ADD==4) {echo "Lokale Verlängerungen";} -if ($ADD==5) {echo "Konferenzen";} -if ($ADD==99999) {echo "HILFE";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_de/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc_de/astguiclient.php deleted file mode 100644 index 461b51ff..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Sie haben jetzt heraus geloggt. Danke\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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: LOGON\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Deutsch
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    LOGON
     
    Benutzer-LOGON:
    Benutzer-Kennwort:
    Telefon-LOGON:
    Telefon-Kennwort:

    VERSION: $version       BAU: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIVORWAHLKNOPF|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIVORWAHLKNOPF|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Telefon-LOGON\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Deutsch
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Telefon-LOGON
     
    Telefon-LOGON:
    Telefon-Kennwort:

    VERSION: $version       BAU: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Telefon-LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Deutsch
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Telefon-LOGON
     
    Traurig, Ihr Telefon-LOGON und Kennwort seien Sie nicht in diesem:
     
    Telefon-LOGON:
    Telefon-Kennwort:

    VERSION: $version       BAU: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -LOGOUT
    \n"; ?> -
    HauptverkleidungAktive Linien VerkleidungKonferenz-VerkleidungÜberprüfen Sie VoicemailLeben Anruf
    -
    - - -

    Logout
    -
    - - -
    TRUNK HÄNGEZUSTAND

    - Active Trunks Menu
    - Hängezustand-Stamm   |   - Straßenräuber-Stamm   |   - Hören Stamm   |   - ErneuernSie   |   - Zurück zu Hauptfenster -
    -
    - - -
    LOKALER HÄNGEZUSTAND

    - Aktives Lokales Menü
    - Hängezustand-Einheimischer   |   - Straßenräuber-Einheimischer   |   - Hören Einheimischer   |   - ErneuernSie   |   - Zurück zu Hauptfenster -
    -
    - - - - - - - -
    PHASENANRUF-ÜBERTRAGUNG
    Gebracht zu werden Führung: Führung
    Verlängerungen:
    Verlängerungen Menü
    -
    - Senden Sie zu vorgewählter Verlängerung

    - Senden Sie zu vorgewähltem vmail Kasten

    - Senden Sie zu dieser Zahl:


    - ErneuernSie


    - Zurück zu Hauptfenster

    -
    Konferenzen:
    (klicken Sie an eine Zahl unten, um zu einer Konferenz zu senden)
    Senden Sie meine Führung auch
    Konferenz-Menü
    -
    - - - - - -
    LOKALER Verlängerungen Vorwahlknopf
    Telefon, das von benennt: Führung
    Verlängerungen:
    Verlängerungen Menü
    -
    - Anruf vorgewählte Verlängerung

    - Anruf vorgewählter vmail Kasten

    - ErneuernSie


    - Zurück zu Hauptfenster

    -
    -
    - - -
    GEPARKTE ANRUFE:
    - Zurück zu Hauptfenster

    -
    -
    - - - - - - - - - - - - - - - -
      -
    VOICEMAIL     NEU:     ALT:             MANUELLER VORWAHLKNOPF       VORWAHLKNOPF
    GEPARKTE ANRUFE: 0                LOKALE VORWAHLKNOPF-VERLÄNGERUNGEN
    OUTBOUND ANRUFE:
    INBOUND ANRUFE:
    astGUIclient Netz-Klient VERSION: BAU:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    LIEBLINGE       redigieren sie
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    LIEBLINGE

     
    SUBMITSie Sie LIEBLINGE ÄNDERUNGEN - erfordert Logout
    ZURÜCK ZU MAIN FENSTER - ignorieren Sie die vorgenommenen Änderungen
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSE | ANFANG     Erneuern Sie Rate: 1000 ms Schneller | Langsamer

    -
    Initialisierung..
    -
    Aktive Verlängerungen
    -ERNEUERNSie | -AUFTRAG | -
    Äußere Linien
    -ERNEUERNSie | -AUFTRAG | -
    Lokale Verlängerungen
    -ERNEUERNSie | -AUFTRAG | -
    - Daten Gehen Hier

    -
    - Daten Gehen Hier

    Stamm-Tätigkeit -
    - Daten Gehen Hier

    Lokale Tätigkeit -
    -
    - - - - -
    - - -Konferenz-Liste - - - -
    -Klicken Sie an Konferenzzimmernummer auf dem links für Info auf -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_de/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc_de/call_log_display.php deleted file mode 100644 index ed6d8f68..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Anruf-Maschinenbordbuch-Anzeige"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten ist unzulässig oder Protokoll $protocol ist unzulässig\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_de/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_de/conf_exten_check.php deleted file mode 100644 index de56646a..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Conf Verlängerung Überprüfung"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten ist unzulässig\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $FührungA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $FührungA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$FührungA[$counter] ~"; - # echo "$FührungA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten ist unzulässig or Exten $exten ist unzulässig\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Konferenz $conf_exten ist zu registriert worden $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_de/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc_de/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc_de/inbound_popup.php b/agc_2-X/trunk/LANG_agc/agc_de/inbound_popup.php deleted file mode 100644 index f4058509..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/inbound_popup.php +++ /dev/null @@ -1,348 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -INBOUND LEBHAFTANRUF"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    INBOUND LEBHAFTANRUF

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid ist unzulässig\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Führung: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Führung=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "GEWOHNHEIT - \n"; - - echo "
    Nummer Gewählt: $row[8]
    Anmerkungen: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "HÄNGEZUSTAND - \n"; - echo "SENDEN SIE ZU MEINEM VOICEMAIL\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_de/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_de/live_exten_check.php deleted file mode 100644 index 4c60b701..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Phasenverlängerung Überprüfung"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten ist unzulässig oder Protokoll $protocol ist unzulässig\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $FührungA[$loop_count] = "$row[0]"; - $FührungB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $FührungA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_de/manager_send.php b/agc_2-X/trunk/LANG_agc/agc_de/manager_send.php deleted file mode 100644 index 4564dadd..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Manager Senden: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "HILFE";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht eingesetzt\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate Befehl gesendet für Exten $exten Führung $channel auf $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nOriginateName Action nicht gesendet\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nOriginateNameVmail Action nicht gesendet\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht eingesetzt\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate Befehl gesendet für Exten $exten Führung $channel auf $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten ist unzulässig or ext_context $ext_context or queryCID $queryCID ist unzulässig, Hangup Befehl nicht eingesetzt\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Führung $channel ist unzulässig or queryCID $queryCID ist unzulässig, Hangup Befehl nicht eingesetzt\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel ist nicht Phasen auf $call_server_ip, Checking Live Führung...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Führung $channel ist nicht Phasen auf $call_server_ip, Hangup Befehl nicht eingesetzt $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup Befehl gesendet für Führung $channel auf $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "auto_dial_level $auto_dial_level muß eingestellt werden\n"; - echo "campaign $campaign muß eingestellt werden\n"; - echo "uniqueid $uniqueid muß eingestellt werden\n"; - echo "lead_id $lead_id muß eingestellt werden\n"; - echo "\nRedirectVD Action nicht gesendet\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "parkedby $parkedby muß eingestellt werden\n"; - echo "\nRedirectToPark Action nicht gesendet\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirectFromPark Action nicht gesendet\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirectName Action nicht gesendet\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirectNameVmail Action nicht gesendet\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "ExtraFührung $extrachannel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirect Action nicht gesendet\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Kann nicht leere Konferenz finden auf $server_ip, Redirect Befehl nicht eingesetzt\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Führung $channel ist nicht Phasen auf $call_server_ip, Redirect Befehl nicht eingesetzt\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Führung $channel ist nicht Phasen auf $server_ip, Redirect Befehl nicht eingesetzt\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra Befehl gesendet für Führung $channel and \nExtraFührung $extrachannel\n to $exten auf $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra Befehl gesendet für Führung $channel auf $call_server_ip and \nExtraFührung $extrachannel\n to $exten auf $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirect Action nicht gesendet\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Führung $channel ist nicht Phasen auf $server_ip, Redirect Befehl nicht eingesetzt\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect Befehl gesendet für Führung $channel auf $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Führung $channel ist unzulässig or queryCID $queryCID ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht eingesetzt\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Führung $channel ist nicht Phasen auf $server_ip, $ACTION Befehl nicht eingesetzt\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION Befehl gesendet für Führung $channel auf $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Führung $channel ist unzulässig or exten $exten ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht eingesetzt\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going auf in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION Befehl gesendet für Führung $channel auf $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n AUFNAHME DAUERT BIS 60 MINUTEN\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_de/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc_de/park_calls_display.php deleted file mode 100644 index 07057230..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Geparkte Anruf-Anzeige"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten ist unzulässig oder Protokoll $protocol ist unzulässig\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_de/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc_de/vdc_db_query.php deleted file mode 100644 index 9417bb0f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Datenbank-Frage Index"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Gruppe Wahl $closer_choice ist unzulässig\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Gruppe Wahl $closer_choice ist zum Benutzer registriert worden $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "ZUFUHRBEHÄLTER LEER\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context ist unzulässig\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC ZAHL\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INANRUF - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "ZUFUHRBEHÄLTER LEER\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context ist unzulässig\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INANRUF - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "ANRUF NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context ist unzulässig\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID ist unzulässig\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "MASCHINENBORDBUCH NICHT BETRETEN\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign ist unzulässig\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Eingesetzt: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "MASCHINENBORDBUCH NICHT BETRETEN\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "ANRUF_LOG Eingesetzt: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "MASCHINENBORDBUCH NICHT BETRETEN\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "MASCHINENBORDBUCH NICHT BETRETEN\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id ist unzulässig\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "MASCHINENBORDBUCH NICHT BETRETEN\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Kampagne $campaign ist unzulässig\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INANRUF in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INANRUF - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INANRUF - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INANRUF - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send auf to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If ANRUFBK, change vicidial_callback record to INACTIVE - if ($dispo == 'ANRUFBK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user auf $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten ist unzulässig\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation auf the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id ist unzulässig\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### ANRUFBACK ENTRY - if ( ($dispo_choice == 'CBHALT') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' ist zu geändert worden ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id ist unzulässig\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id Informationen sind aktualisiert worden\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage ist unzulässig\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' ist jetzt im Status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list ist unzulässig\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_de/vicidial.php b/agc_2-X/trunk/LANG_agc/agc_de/vicidial.php deleted file mode 100644 index 8c05a573..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "Sie haben jetzt heraus geloggt. Danke\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -#$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of Sekunden for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIVORWAHLKNOPF web client: Re-LOGON\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Deutsch
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Re-LOGON
     
    Telefon-LOGON:
    Telefon-Kennwort:
    Benutzer-LOGON:
    Benutzer-Kennwort:
    Kampagne: $camp_form_code

    VERSION: $version       BAU: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIVORWAHLKNOPF web client: Kampagne LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Deutsch
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    Benutzer-LOGON

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Kampagne LOGON
     
    Benutzer-LOGON:
    Benutzer-Kennwort:
    Kampagne: $camp_form_code

    VERSION: $version       BAU: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIVORWAHLKNOPF web client: LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Deutsch
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    LOGON
     
    Telefon-LOGON:
    Telefon-Kennwort:
    Benutzer-LOGON:
    Benutzer-Kennwort:
    Kampagne: $camp_form_code

    VERSION: $version       BAU: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIVORWAHLKNOPF web client: Telefon-LOGON\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Deutsch
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Telefon-LOGON
     
    Telefon-LOGON:
    Telefon-Kennwort:

    VERSION: $version       BAU: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_Sekunden=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Die aktive Kampagne nicht, versuchen bitte noch einmal
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Der falsche LOGON, versuchen bitte noch einmal
    "; - } - } - if ($VDloginDISPLAY) - { - echo "VICIVORWAHLKNOPF web client: Kampagne LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Deutsch
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Kampagne LOGON
     
    Benutzer-LOGON:
    Benutzer-Kennwort:
    Kampagne: $camp_form_code

    VERSION: $version       BAU: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIVORWAHLKNOPF web client: Telefon-LOGON Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Deutsch
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    LOGON Error
     
    Traurig, Ihr Telefon-LOGON und Kennwort seien Sie nicht in diesem:
     
    Telefon-LOGON:
    Telefon-Kennwort:

    VERSION: $version       BAU: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIVORWAHLKNOPF web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed auf this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login auf phone: $SIP_user zur Kampagne: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NEU record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIVORWAHLKNOPF web client: VICIVORWAHLKNOPF Kampagne LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Deutsch
    \n"; - echo "Traurig, gibt es keine Leitungen im Zufuhrbehälter für diese\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "LOGON: \n
    "; - echo "Kennwort:
    \n"; - echo "Kampagne: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIVORWAHLKNOPF web client: VICIVORWAHLKNOPF Kampagne LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Deutsch
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "LOGON: \n
    "; - echo "Kennwort:
    \n"; - echo "Kampagne: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -LOGOUT\n"; ?> -
    -
    - - - - - - - - -
    VICIVORWAHLKNOPFSCRIPT   LIVE     Lernabschnitt ID: Leben Anruf
    -
    - - - - -

    VICIVORWAHLKNOPF
    -
    - - -MANUELLER VORWAHLKNOPF
    -
    - - -X AKTIVE WIEDERHOLUNGSBESUCHE
    -
    - - -
    WIEDERHOLUNGSBESUCHE FÜR MITTEL :
    Klicken Sie an einen Wiederholungsbesuch unten, um die Kunde Rückseite jetzt zu benennen. Wenn Sie an eine Aufzeichnung unten klicken, um sie zu benennen, wird sie von der Liste entfernt. -
    -
    -
      - ErneuernSie -                 - Gehen Sie Zurück -
    -
    - - -
    NEUE MANUELLE VORWAHLKNOPF-LEITUNG FÜR :

    Tragen Sie Informationen unten für die neue Leitung ein, die Sie benennen möchten. -
    - \n"; - } - ?> - Anmerkung: alle neuen manuellen Vorwahlknopfleitungen steigen in Liste 999 ein

    - - - - - - - - - - - - - - - -
    Vorwahlknopf-Code:   (Dieses ist normalerweise 1 in den USA und im Kanada)
    Telefon Number:   (10 Stellen Maximum - nur Stellen)
    Suche existierende Anschlüsse:   (Wenn diese Option gesetzt ist wird versucht, die Telefonnummer im System zu finden, bevor sie als neuer Anschluss eingefügt wird)


    Wenn Sie eine Nummer wählen und sie NICHT als neue Leitung hinzufügen lassen möchten, kommen Sie im genauen Dialstring diesem Sie möchten in der Vorwahlknopf-Übersteuerung benennen auffangen unten herein. Zum Hängezustand dieser Anruf müssen Sie die ANRUFE IN DIESER LERNABSCHNITT-Verbindung am unteren Bildschirmrand öffnen und ihn oben hängen, indem Sie dort auf seiner Führung Verbindung klicken.
     
    Vorwahlknopf-Übersteuerung:   (Stellen gefallen nur)
    -
    - Vorwahlknopf Jetzt -                 - Gehen Sie Zurück -
    -
    - - - - -Ihr Status:
    Calls Dialing: -
    - - - - - -
    - - Übertragung - Konferenz
    - INTERNES GENAUERES - EINHEIMISCHER GENAUER - CODE - Hängezustand Xfer Linie - Hängezustand Beide Linien - -
    - - Zahl zum zu benennen   - Sekunden   - channel - - OVERRIDE   - D1 - D2 -
    - - Vorwahlknopf Mit Kunden - Park-Kunde Vorwahlknopf - ANRUF DES URLAUB-3-WAY - Vorwahlknopf-Vorhang-Übertragung - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Leitung Dispositioned Wie:

    - -
    -
    -
    - - - - - - - -
    Einteilung Heiße Schlüssel: - Wenn aktiv, betätigen Sie einfach die Taste für die gewünschte:
    - - - - - -
    -
    - - -
    Noone ist in Ihrem Lernabschnitt:
    - Gehen Sie Zurück -

    - Anruf-Mittel Wieder -
    -
    - - -
    Kunde hat oben gehangen:
    - Gehen Sie Zurück -

    - Ende und Einteilung Anruf - -
    -
    - - -
    Anruf Nachbereitung Verbleibende Sekunden der Nachbereitung

    - -

    - Beende Nachbereitung und mache weiter - -
    -
    - - -

    LOGOUT
    -
    - - -
    -
    - - -
     
    -
    - - -
    Alle mögliche Änderungen, die am Kunden vorgenommen wurden, den, Informationen unten diesmal nicht sind, comitted, Sie müssen Kunde Informationen vor Ihnen ändern Hängezustand der Anruf.
    -
    - - -
    EINTEILUNG ANRUF :       Hängezustand Wieder       setzen Sie herab
    - Ende-von-benennen Sie Einteilung Vorwähler -
    - STOPPEN SIE ZU BENENNEN
    - ZURÜCKSTELLEN | - SUBMITSie -

    - WEB FORM SUBMITSie -

      -
    -
    - - - -
    Wählen Sie ein Wiederholungsbesuch Datum vor :
    - - - Wählen Sie ein Datum unten vor   -     - Hour: -   - Minutes: -   - -  
    - NUR MEIN WIEDERHOLUNGSBESUCH
    ";} - ?> - COLUMBIUM Anmerkungen:

    - - SUBMITSie

    - -

      -
    -
    - - -
    GENAUERE INBOUND GRUPPENWAHL
    - Genauere Inbound Gruppenwahl -
    - GEMISCHTES BENENNEN(outbound aktiviert)
    - ZURÜCKSTELLEN | - SUBMITSie -



      -
    -
    - - - - Führung - Führung - NUR MEIN WIEDERHOLUNGSBESUCH
    ";} - ?> -
    - - - - - - - -
    PHASENANRUF-ÜBERTRAGUNG
    Gebracht zu werden Führung: Führung
    Verlängerungen:
    Verlängerungen Menü
    -
    - Senden Sie zu vorgewählter Verlängerung

    - Senden Sie zu vorgewähltem vmail Kasten

    - Senden Sie zu dieser Zahl:


    - ERNEUERNSie


    - Zurück zu Hauptfenster

    -
    Konferenzen:
    (klicken Sie an eine Zahl unten, um zu einer Konferenz zu senden)
    Senden Sie meine Führung auch
    Konferenz-Menü
    -
    - - - - -
    VICIVORWAHLKNOPF SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    STATUS:
    -
    -Vorwahlknopf-Folgende Zahl
    - LEITUNG VORBETRACHTUNG
    - WECH TELEFON
    - - -REGISTERAKTE:
    -
    -
    -SATZ IDENTIFIKATION:
    -
    - -Fangen Sie an Zu notieren
    -
    -Netz-Form
    -
    -Park-Anruf
    -Übertragung - Konferenz
    -
    -Hängezustand-Kunde
    -
    -Senden Sie DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    Sekunden:   Führung:   Cust Zeit:
    Kunde Informationen:
    Titel:   Zuerst:   MI:  Letztes:
    Adresse1:
    Adresse2:   Adresse3:
    Stadt:   Zustand:   PostCode:
    Provinz:   Verkäufer Identifikation:
    Telefon:   DialCode:   Wech Telefon:
    Erscheinen:   Email:
    Anmerkungen:
    - -
    -


      - -
    - - - - -
    VICIVORWAHLKNOPF Netz-Klient Version:     BAU:               Bediener:              
    -Zeigen Sie Konferenzanruf-Führung Informationen
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -HEISSE SCHLÜSSEL UNAKTIVIERT - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_de/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc_de/voicemail_check.php deleted file mode 100644 index b872f19a..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_de/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Voicemail Überprüfung"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "voicemail Kasten $vmail_box ist unzulässig\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_el/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc_el/active_list_refresh.php deleted file mode 100644 index befdb32b..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Κατάλογος Οθόνης: "; -if ($ADD==1) {echo "ΕνεÏγές τηλ. συνδέσεις";} -if ($ADD==2) {echo "Απασχολημένες τηλ. συνδέσεις";} -if ($ADD==3) {echo "ΕξωτεÏικές γÏαμμές";} -if ($ADD==4) {echo "Τοπικές τηλ. συνδέσεις";} -if ($ADD==5) {echo "Διασκέψεις";} -if ($ADD==99999) {echo "ΒΟΗΘΕΙΑ";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_el/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc_el/astguiclient.php deleted file mode 100644 index 1a77376a..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Έχετε αποσυνδεθεί. Σας ευχαÏιστοÏμε\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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 "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Ελληνικά
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    ΣÏνδεση
     
    ΣÏνδεση χÏήστη:
    Κωδικός Ï€Ïόσβασης χÏήστη:
    ΣÏνδεση Τηλεφώνου:
    Κωδικός Ï€Ïόσβασης Τηλεφώνου:

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIΚΛΗΣΗ|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIΚΛΗΣΗ|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: ΣÏνδεση Τηλεφώνου\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Ελληνικά
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ΣÏνδεση Τηλεφώνου
     
    ΣÏνδεση Τηλεφώνου:
    Κωδικός Ï€Ïόσβασης Τηλεφώνου:

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: ΣÏνδεση Τηλεφώνου\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Ελληνικά
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    ΣÏνδεση Τηλεφώνου
     
    Συγγνώμη, αλλά η τηλεφωνική σÏνδεση και ο κωδικός Ï€Ïόσβασής σας δεν είναι ενεÏγά σε αυτό το σÏστημα, παÏακαλώ Ï€Ïοσπαθήστε πάλι:
     
    ΣÏνδεση Τηλεφώνου:
    Κωδικός Ï€Ïόσβασης Τηλεφώνου:

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -ΑΠΟΣΥÎΔΕΣΗ
    \n"; ?> -
    ΚÏÏιος ΠίνακαςΠίνακας ΕνεÏγών ΓÏαμμώνΠίνακας διασκέψεωνΕλεγχος Î¦Ï‰Î½Î·Ï„Î¹ÎºÎ¿Ï Ï„Î±Ï‡Ï…Î´ÏομείουΕνεÏγή κλήση
    -
    - - -

    Logout
    -
    - - -
    TRUNK ΚΛΕΙΣΙΜΟ

    - Active Trunks Menu
    - Κλείσιμο Trunk   |   - Κλέψιμο Trunk   |   - ΑκοÏστε Trunk   |   - Ανανέωση   |   - ΕπιστÏοφή -
    -
    - - -
    ΤΟΠΙΚΟ ΚΛΕΙΣΙΜΟ ΤΗΛΕΦΩÎΟΥ

    - ΕνεÏγές Τοπικές Επιλογές
    - Κλείσιμο Ï„Î¿Ï€Î¹ÎºÎ¿Ï   |   - Κλέψιμο Ï„Î¿Ï€Î¹ÎºÎ¿Ï   |   - ΑκοÏστε τοπικό   |   - Ανανέωση   |   - ΕπιστÏοφή -
    -
    - - - - - - - -
    ΜΕΤΑΦΟΡΑ ΕÎΕΡΓΗΣ ΚΛΗΣΗΣ
    Κανάλι που μεταφέÏεται: Κανάλι
    Τηλ.συνδέσεις:
    Επιλογές τηλ. συνδέσεων
    -
    - Στείλε στην επιλεγμένη τηλ.σÏνδεση

    - Στείλε στο επιλεγμένο vmail

    - Στείλε σε αυτόν τον αÏιθμό:


    - Ανανέωση


    - ΕπιστÏοφή

    -
    Διασκέψεις:
    (επιλέξτε έναν αÏιθμό κατωτέÏω που θα σταλεί σε μια διάσκεψη)
    Στείλε το κανάλι μου επίσης
    Επιλογές διασκέψεων
    -
    - - - - - -
    ΤΟΠΙΚΕΣ τηλ. συνδέσεις Κλήσεως
    Τηλέφωνο που καλεί από: Κανάλι
    Τηλ.συνδέσεις:
    Επιλογές τηλ. συνδέσεων
    -
    - Επιλεγμένη κλήση τηλ. σÏνδεσης

    - Επιλεγμένη κλήση vmail

    - Ανανέωση


    - ΕπιστÏοφή

    -
    -
    - - -
    ΣΤΑΘΜ.ΚΛΗΣΕΙΣ:
    - ΕπιστÏοφή

    -
    -
    - - - - - - - - - - - - - - - -
      -
    ΦΩÎ.ΤΑΧ.     ÎΕΟ:     ΠΑΛΑΙΟ:             ΧΕΙΡ.ΚΛΗΣΗ       ΚΛΗΣΗ
    ΣΤΑΘΜ.ΚΛΗΣΕΙΣ: 0                Î¤Î—Λ.ΣΥÎΔ. ΤΟΠΙΚΗΣ ΚΛΗΣΗΣ
    ΕΞΕΡΧΟΜΕÎΕΣ ΚΛΗΣΕΙΣ:
    ΕΙΣΕΡΧΟΜΕÎΕΣ ΚΛΗΣΕΙΣ:
    ΈΚΔΟΣΗ astGUIclient: ΔΗΜΙΟΥΡΓΙΑ:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    ΑΓΑΠΗΜΕÎΑ       διοÏθώστε
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    ΑΓΑΠΗΜΕÎΑ

     
    ΥΠΟΒΑΛΤΕ τις ΑΛΛΑΓΕΣ ΣΥΜΠΑΘΕΙΩΠ- απαιτεί την αποσÏνδεση
    ΠΙΣΩ στο ΚΥΡΙΟ ΠΑΡΑΘΥΡΟ - αγνοήστε τις αλλαγές που γίνονται
    -
    - -
    - - - - - - - - - - - - - -
    -ΠΑΥΣΗ | ΕÎΑΡΞΗ     Ρυθμός ανανέωσης: 1000 ms ΓÏηγοÏότεÏα | Πιό αÏγά

    -
    ΑÏχή..
    -
    ΕνεÏγές τηλ. συνδέσεις
    -ΑÎΑÎΕΩΣΗ | -ΤΑΞΙΠ| -
    ΕξωτεÏικές γÏαμμές
    -ΑÎΑÎΕΩΣΗ | -ΤΑΞΙΠ| -
    Τοπικές τηλ. συνδέσεις
    -ΑÎΑÎΕΩΣΗ | -ΤΑΞΙΠ| -
    - Τα δεδομένα πηγαίνουν εδώ

    -
    - Τα δεδομένα πηγαίνουν εδώ

    Κίνηση Trunk -
    - Τα δεδομένα πηγαίνουν εδώ

    Τοπική Κίνηση -
    -
    - - - - -
    - - -Κατάλογος διασκέψεων - - - -
    -Επιλέξτε έναν αÏιθμό δωματίου συνδιάσκεψης στα αÏιστεÏά για τις πληÏοφοÏίες σε εκείνη την συνδιάσκεψη -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_el/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc_el/call_log_display.php deleted file mode 100644 index 2b8304b0..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Έμφάνιση ΚαταγÏαμμένων Κλήσεων"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten δεν ισχÏει ή Ï€Ïωτόκολλο $protocol δεν ισχÏει\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_el/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_el/conf_exten_check.php deleted file mode 100644 index 28b806da..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Ελεγχος τηλ.σÏνδεσης διάσκεψης"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten δεν ισχÏει\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Κατάσταση: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ΚανάλιA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ΚανάλιA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ΚανάλιA[$counter] ~"; - # echo "$ΚανάλιA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten δεν ισχÏει or Exten $exten δεν ισχÏει\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Διάσκεψη $conf_exten έχει καταχωÏηθεί $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_el/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc_el/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc_el/inbound_popup.php b/agc_2-X/trunk/LANG_agc/agc_el/inbound_popup.php deleted file mode 100644 index 564999e3..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/inbound_popup.php +++ /dev/null @@ -1,348 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -ΕÎΕΡΓΗ ΕΙΣΕΡΧΟΜΕÎΗ ΚΛΗΣΗ"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    ΕÎΕΡΓΗ ΕΙΣΕΡΧΟΜΕÎΗ ΚΛΗΣΗ

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid δεν ισχÏει\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Κανάλι: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Κανάλι=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "ΣΥÎΗΘΕΙΑ - \n"; - - echo "
    ΑÏιθμός που καλέσατε: $row[8]
    Σημειώσεις: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "ΚΛΕΙΣΙΜΟ - \n"; - echo "ΣΤΕΙΛΕ ΣΤΟ ΦΩÎΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ ΜΟΥ\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_el/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_el/live_exten_check.php deleted file mode 100644 index e07c3cad..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Ελεγχος ενεÏγής τηλ.σÏνδεσης"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten δεν ισχÏει ή Ï€Ïωτόκολλο $protocol δεν ισχÏει\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ΚανάλιA[$loop_count] = "$row[0]"; - $ΚανάλιB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $ΚανάλιA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_el/manager_send.php b/agc_2-X/trunk/LANG_agc/agc_el/manager_send.php deleted file mode 100644 index 5ccefdc6..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Ο διευθυντής στέλνει: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "ΒΟΗΘΕΙΑ";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten δεν ισχÏει or queryCID $queryCID δεν ισχÏει, Originate εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate εντολή που στέλνεται για Exten $exten Κανάλι $channel στο $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "extenName $extenName Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "\nOriginateName Action μην σταλμένος\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "extenName $extenName Ï€Ïέπει να τεθεί\n"; - echo "exten $exten Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "\nOriginateNameVmail Action μην σταλμένος\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten δεν ισχÏει or queryCID $queryCID δεν ισχÏει, Originate εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate εντολή που στέλνεται για Exten $exten Κανάλι $channel στο $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten δεν ισχÏει or ext_context $ext_context or queryCID $queryCID δεν ισχÏει, Hangup εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Κανάλι $channel δεν ισχÏει or queryCID $queryCID δεν ισχÏει, Hangup εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel δεν είναι ενεÏγό στο $call_server_ip, Checking Live Κανάλι...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Κανάλι $channel δεν είναι ενεÏγό στο $call_server_ip, Hangup εντολή που δεν έγινε εισαγωγή $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup εντολή που στέλνεται για Κανάλι $channel στο $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "exten $exten Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "auto_dial_level $auto_dial_level Ï€Ïέπει να τεθεί\n"; - echo "campaign $campaign Ï€Ïέπει να τεθεί\n"; - echo "uniqueid $uniqueid Ï€Ïέπει να τεθεί\n"; - echo "lead_id $lead_id Ï€Ïέπει να τεθεί\n"; - echo "\nRedirectVD Action μην σταλμένος\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "exten $exten Ï€Ïέπει να τεθεί\n"; - echo "extenName $extenName Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "parkedby $parkedby Ï€Ïέπει να τεθεί\n"; - echo "\nRedirectToPark Action μην σταλμένος\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "exten $exten Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "\nRedirectFromPark Action μην σταλμένος\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "extenName $extenName Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "\nRedirectName Action μην σταλμένος\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "extenName $extenName Ï€Ïέπει να τεθεί\n"; - echo "exten $exten Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "\nRedirectNameVmail Action μην σταλμένος\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "ExtraΚανάλι $extrachannel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "exten $exten Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "\nRedirect Action μην σταλμένος\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Δεν υπάÏχει κενή διάσκεψη στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Κανάλι $channel δεν είναι ενεÏγό στο $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Κανάλι $channel δεν είναι ενεÏγό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel and \nExtraΚανάλι $extrachannel\n to $exten στο $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel στο $call_server_ip and \nExtraΚανάλι $extrachannel\n to $exten στο $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 "Μία από αυτές τις μεταβλητές δεν ισχÏει:\n"; - echo "Κανάλι $channel Ï€Ïέπει να είναι μεγαλÏτεÏος από 2 χαÏακτήÏες\n"; - echo "queryCID $queryCID Ï€Ïέπει να είναι μεγαλÏτεÏος από 14 χαÏακτήÏες\n"; - echo "exten $exten Ï€Ïέπει να τεθεί\n"; - echo "ext_context $ext_context Ï€Ïέπει να τεθεί\n"; - echo "ext_priority $ext_priority Ï€Ïέπει να τεθεί\n"; - echo "\nRedirect Action μην σταλμένος\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Κανάλι $channel δεν είναι ενεÏγό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect εντολή που στέλνεται για Κανάλι $channel στο $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Κανάλι $channel δεν ισχÏει or queryCID $queryCID δεν ισχÏει or filename: $filename δεν ισχÏει, $ACTION εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Κανάλι $channel δεν είναι ενεÏγό στο $server_ip, $ACTION εντολή που δεν έγινε εισαγωγή\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION εντολή που στέλνεται για Κανάλι $channel στο $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Κανάλι $channel δεν ισχÏει or exten $exten δεν ισχÏει or filename: $filename δεν ισχÏει, $ACTION εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going στο in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION εντολή που στέλνεται για Κανάλι $channel στο $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n Η ΚΑΤΑΓΡΑΦΗ ΘΑ ΔΙΑΡΚΕΣΕΙ ΜΕΧΡΙ 60 ΛΕΠΤΑ\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_el/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc_el/park_calls_display.php deleted file mode 100644 index cfaee591..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Εμφάνιση Σταθμευμένων Κλήσεων"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten δεν ισχÏει ή Ï€Ïωτόκολλο $protocol δεν ισχÏει\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_el/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc_el/vdc_db_query.php deleted file mode 100644 index 0274d9e2..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Κώδικας εÏώτησης βάσεων δεδομένων"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Επιλογή ομάδας $closer_choice δεν ισχÏει\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Επιλογή ομάδας $closer_choice έχει καταχωÏηθεί στο χÏήστη $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "ΚΕÎΟΣ HOPPER\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context δεν ισχÏει\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC ΑΡΙΘΜΟΣ\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "ΚΕÎΟΣ HOPPER\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context δεν ισχÏει\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "ΚΛΗΣΗ NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context δεν ισχÏει\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID δεν ισχÏει\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "ΔΕΠΕΓΙÎΕ ΕΙΣΑΓΩΓΗ ΣΤΗΠΚΑΤΑΓΡΑΦΗ ΓΕΓΟÎΟΤΩÎ\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign δεν ισχÏει\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Εισαγωγή : $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "ΔΕΠΕΓΙÎΕ ΕΙΣΑΓΩΓΗ ΣΤΗΠΚΑΤΑΓΡΑΦΗ ΓΕΓΟÎΟΤΩÎ\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "ΚΛΗΣΗ_LOG Εισαγωγή : $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "ΔΕΠΕΓΙÎΕ ΕΙΣΑΓΩΓΗ ΣΤΗΠΚΑΤΑΓΡΑΦΗ ΓΕΓΟÎΟΤΩÎ\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "ΔΕΠΕΓΙÎΕ ΕΙΣΑΓΩΓΗ ΣΤΗΠΚΑΤΑΓΡΑΦΗ ΓΕΓΟÎΟΤΩÎ\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id δεν ισχÏει\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "ΔΕΠΕΓΙÎΕ ΕΙΣΑΓΩΓΗ ΣΤΗΠΚΑΤΑΓΡΑΦΗ ΓΕΓΟÎΟΤΩÎ\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "ΕκστÏατεία $campaign δεν ισχÏει\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INΚΛΗΣΗ in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send στο to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If ΚΛΗΣΗBK, change vicidial_callback record to INACTIVE - if ($dispo == 'ΚΛΗΣΗBK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user στο $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten δεν ισχÏει\n"; - exit; - } -else - { - ##### Insert a ΑΠΟΣΥÎΔΕΣΗ record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','ΑΠΟΣΥÎΔΕΣΗ','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation στο the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id δεν ισχÏει\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### ΚΛΗΣΗBACK ENTRY - if ( ($dispo_choice == 'CBHΠΑΛΑΙΟ') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' έχει αλλαχτεί ' . $dispo_choice . " Κατάσταση\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id δεν ισχÏει\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id οι πληÏοφοÏίες έχουν ενημεÏωθεί\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage δεν ισχÏει\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' είναι τώÏα στη κατάσταση ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list δεν ισχÏει\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_el/vicidial.php b/agc_2-X/trunk/LANG_agc/agc_el/vicidial.php deleted file mode 100644 index 126d3070..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "Έχετε αποσυνδεθεί. Σας ευχαÏιστοÏμε\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -#$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of δευτεÏόλεπτα for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIΚΛΗΣΗ web client: ΕπανασÏνδεση\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Ελληνικά
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ΕπανασÏνδεση
     
    ΣÏνδεση Τηλεφώνου:
    Κωδικός Ï€Ïόσβασης Τηλεφώνου:
    ΣÏνδεση χÏήστη:
    Κωδικός Ï€Ïόσβασης χÏήστη:
    ΕκστÏατεία: $camp_form_code

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIΚΛΗΣΗ web client: ΣÏνδεση εκστÏατείας\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Ελληνικά
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    ΣÏνδεση χÏήστη

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    ΣÏνδεση εκστÏατείας
     
    ΣÏνδεση χÏήστη:
    Κωδικός Ï€Ïόσβασης χÏήστη:
    ΕκστÏατεία: $camp_form_code

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIΚΛΗΣΗ web client: ΣÏνδεση\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Ελληνικά
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    ΣÏνδεση
     
    ΣÏνδεση Τηλεφώνου:
    Κωδικός Ï€Ïόσβασης Τηλεφώνου:
    ΣÏνδεση χÏήστη:
    Κωδικός Ï€Ïόσβασης χÏήστη:
    ΕκστÏατεία: $camp_form_code

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIΚΛΗΣΗ web client: ΣÏνδεση Τηλεφώνου\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Ελληνικά
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    ΣÏνδεση Τηλεφώνου
     
    ΣÏνδεση Τηλεφώνου:
    Κωδικός Ï€Ïόσβασης Τηλεφώνου:

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_δευτεÏόλεπτα=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Η εκστÏατεία είναι μη ενεÏγή, παÏακαλώ Ï€Ïοσπαθήστε πάλι
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Η σÏνδεση δεν είναι σωστή, παÏακαλώ Ï€Ïοσπαθήστε πάλι
    "; - } - } - if ($VDloginDISPLAY) - { - echo "VICIΚΛΗΣΗ web client: ΣÏνδεση εκστÏατείας\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Ελληνικά
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    ΣÏνδεση εκστÏατείας
     
    ΣÏνδεση χÏήστη:
    Κωδικός Ï€Ïόσβασης χÏήστη:
    ΕκστÏατεία: $camp_form_code

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIΚΛΗΣΗ web client: ΣÏνδεση Τηλεφώνου Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Ελληνικά
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    ΣÏνδεση Error
     
    Συγγνώμη, αλλά η τηλεφωνική σÏνδεση και ο κωδικός Ï€Ïόσβασής σας δεν είναι ενεÏγά σε αυτό το σÏστημα, παÏακαλώ Ï€Ïοσπαθήστε πάλι:
     
    ΣÏνδεση Τηλεφώνου:
    Κωδικός Ï€Ïόσβασης Τηλεφώνου:

    ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIΚΛΗΣΗ web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed στο this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login στο phone: $SIP_user στην εκστÏατεία: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a ÎΕΟ record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIΚΛΗΣΗ web client: VICIΚΛΗΣΗ ΣÏνδεση εκστÏατείας\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Ελληνικά
    \n"; - echo "Συγγνώμη, δεν υπάÏχουν οδηγοί στον hopper για αυτήν την εκστÏατεία\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "ΣÏνδεση: \n
    "; - echo "Κωδικός Ï€Ïόσβασης:
    \n"; - echo "ΕκστÏατεία: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIΚΛΗΣΗ web client: VICIΚΛΗΣΗ ΣÏνδεση εκστÏατείας\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Ελληνικά
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "ΣÏνδεση: \n
    "; - echo "Κωδικός Ï€Ïόσβασης:
    \n"; - echo "ΕκστÏατεία: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -ΑΠΟΣΥÎΔΕΣΗ\n"; ?> -
    -
    - - - - - - - - -
    VICIΚΛΗΣΗSCRIPT   LIVE     ID εÏγασίας: ΕνεÏγή κλήση
    -
    - - - - -

    VICIΚΛΗΣΗ
    -
    - - -ΧΕΙΡ.ΚΛΗΣΗ
    -
    - - -X ΕÎΕΡΓΕΣ ΕΠΑÎΑΚΛΗΣΕΙΣ
    -
    - - -
    ΕΠΑÎΑΚΛΗΣΕΙΣ ΓΙΑ ΤΟΠΧΕΙΡΙΣΤΗ :
    Επιλέξτε μία επανάκληση παÏακάτω για να καλέσετε τον πελάτη τώÏα. Εάν επιλέξετε μία εγγÏαφή παÏακάτω, θα διαγÏαφεί από την λίστα. -
    -
    -
      - Ανανέωση -                 - ΕπιστÏοφή -
    -
    - - -
    ÎΕΑ ΧΕΙΡΟΚΙÎΗΤΗ ΚΛΗΣΗ ΟΔΗΓΟΥ ΓΙΑ :

    ΚαταχωÏήστε τις πληÏοφοÏίες παÏακάτω για τον νέο οδηγό που επιθυμήτε να καλέσετε. -
    - \n"; - } - ?> - Σημείωση: όλες οι νέες χειÏοκίνητες κλήσεις θα πάνε στην λίστα 999

    - - - - - - - - - - - - - - - -
    Κωδικός Κλήσης:   (Αυτό είναι συνήθως ένα 1 στις ΗΠΑ)
    Τηλ Number:   (10 ψηφία μόνο)
    Αναζήτηση Οδηγών:   (Η επιλογή αυτή επιτÏέπει να βÏει τον αÏιθμό στο σÏστημα Ï€ÏÎ¿Ï„Î¿Ï Î³Î¯Î½ÎµÎ¹ εισαγωγή ως νέος οδηγός)


    Εάν θέλετε να καλέσετε έναν αÏιθμό και να μην Ï€Ïοστεθεί ως νέος οδηγός, καταχωÏήστε τον με την σωστή μοÏφή στο πεδίο Αγνόησε Κλήση παÏακάτω. Για να κλείσετε αυτή την κλήση θα Ï€Ïέπει να ανοίξετε το ΚΛΗΣΕΙΣ ΣΕ ΑΥΤΗ ΤΗΠΔΙΑΙΔΚΑΣΙΑ στο κάτω μέÏος της οθόνης και να την κλείσετε επιλέγοντας το κανάλι.
     
    Αγνόησε Κλήση:   (παÏακαλώ μόνο ψηφία)
    -
    - Κάλεσε ΤώÏα -                 - ΕπιστÏοφή -
    -
    - - - - -Your Κατάσταση:
    Calls Dialing: -
    - - - - - -
    - - ΜεταφοÏά - διάσκεψη
    - ΕΣΩΤΕΡΙΚΟΣ CLOSER - ΤΟΠΙΚΟΣ CLOSER - CODE - Κλείσιμο ΓÏαμμής Xfer - Κλείσιμο και τις δÏο γÏαμμές - -
    - - ΑÏιθμός για κλήση   - δευτεÏόλεπτα   - channel - - OVERRIDE   - D1 - D2 -
    - - Κλήση με τον πελάτη - Στάθμευση κλήσης πελάτη - ΑΠΟΧΩΡΗΣΗ 3WAY ΚΛΗΣΗΣ - Τυφλή μεταφοÏά κλήσης - Blind Transfer VMail Message -
    -
    -
    - - - - -
    ΤεÏματισμό Καθοδήγησης όπως:

    - -
    -
    -
    - - - - - - - -
    ΠλήκτÏα κλειδιά ΤεÏματισμοÏ: - Όταν είναι ενεÏγό, πιέστε απλά το πλήκτÏο κλειδί για τον επιθυμητό τεÏματισμό της κλήσης. Η κλήση θα Ï„Ïεματίσει αυτόματα:
    - - - - - -
    -
    - - -
    Κανένας δεν είναι στη σÏνοδό σας:
    - ΕπιστÏοφή -

    - Ξανακάλεσε τον ΧειÏιστή -
    -
    - - -
    Ο πελάτης έχει κλείσει το τηλέφωνο:
    - ΕπιστÏοφή -

    - Τελείωσε και ΤεÏμάτισε την Κλήση - -
    -
    - - -
    ΤÏλιγμα Κλήσης: απομÏνοντα δευτεÏόλεπτα σε Ï„Ïλιγμα

    - -

    - Τελείωμα Τυλίγματος και Ï€ÏοχωÏάει - -
    -
    - - -

    ΑΠΟΣΥÎΔΕΣΗ
    -
    - - -
    -
    - - -
     
    -
    - - -
    Οποιεσδήποτε αλλαγές που γίνονται στις πληÏοφοÏίες πελατών κατωτέÏω αυτή τη στιγμή δεν θα είναι, Ï€Ïέπει να αλλάξετε τις πληÏοφοÏίες πελατών ενώπιον σας Hangup η κλήση.
    -
    - - -
    ΤεÏματισμός Κλήσης :       Ξανακλήσε       ελαχιστοποιήστε
    - Επιλογή τεÏÎ¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Ï„Î·Ï‚ κλήσης -
    - ΤΕΡΜΑΤΙΣΜΟΣ ΚΛΗΣΗΣ
    - ΕΠΑÎΑΦΟΡΑ | - ΥΠΟΒΑΛΕΤΕ -

    - WEB FORM ΥΠΟΒΑΛΕΤΕ -

      -
    -
    - - - -
    Επιλέξτε μια ημεÏομηνία CallBack :
    - - - Επιλέξτε μια ημεÏομηνία κατωτέÏω   -     - Hour: -   - Minutes: -   - -  
    - ΜΟÎΟ ΤΗΠΕΠΑÎΑΚΛΗΣΗ ΜΟΥ
    ";} - ?> - Σχόλια CB:

    - - ΥΠΟΒΑΛΕΤΕ

    - -

      -
    -
    - - -
    CLOSER ΕΙΣΕΡΧΟΜΕÎΗ ΕΠΙΛΟΓΗ ΟΜΑΔΑΣ
    - Επιλογή Closer εισεÏχόμενης ομάδας -
    - ΣΥÎΔΥΑΣΜΕÎΗ ΚΛΗΣΗ(εξεÏχόμενες ενεÏγοποιημένες)
    - ΕΠΑÎΑΦΟΡΑ | - ΥΠΟΒΑΛΕΤΕ -



      -
    -
    - - - - Κανάλι - Κανάλι - ΜΟÎΟ ΤΗΠΕΠΑÎΑΚΛΗΣΗ ΜΟΥ
    ";} - ?> -
    - - - - - - - -
    ΜΕΤΑΦΟΡΑ ΕÎΕΡΓΗΣ ΚΛΗΣΗΣ
    Κανάλι που μεταφέÏεται: Κανάλι
    Τηλ.συνδέσεις:
    Επιλογές τηλ. συνδέσεων
    -
    - Στείλε στην επιλεγμένη τηλ.σÏνδεση

    - Στείλε στο επιλεγμένο vmail

    - Στείλε σε αυτόν τον αÏιθμό:


    - ΑÎΑÎΕΩΣΗ


    - ΕπιστÏοφή

    -
    Διασκέψεις:
    (επιλέξτε έναν αÏιθμό κατωτέÏω που θα σταλεί σε μια διάσκεψη)
    Στείλε το κανάλι μου επίσης
    Επιλογές διασκέψεων
    -
    - - - - -
    VICIΚΛΗΣΗ SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    ΚΑΤΑΣΤΑΣΗ:
    -
    -Κλήση επόμενου αÏιθμοÏ
    - ΠΡΟΒΟΛΗ ΟΔΗΓΟΥ
    - ΚΛΗΣΗ ENAΛ/ΚΟΥ ΤΗΛΕΦΩÎΟΥ
    - - -ΑΡΧΕΙΟ ΗΧΟΓΡ:
    -
    -
    -ΤΑΥΤΟΤΗΤΑ ΕΓΓΡΑΦΗΣ:
    -
    - -ΕναÏξη ηχογÏάφισης
    -
    -Σελίδα ΔιαδικτÏου
    -
    -Στάθμευση Κλήσης
    -ΜεταφοÏά - διάσκεψη
    -
    -΄Κλείσιμο Πελάτη
    -
    -Στείλε DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    δευτεÏόλεπτα:   Κανάλι:   ΧÏόνος Πελάτη:
    ΠληÏοφοÏίες Πελάτη:
    Τίτλος:   ΠÏώτο:   Μσ:  Επίθετο:
    ΔιεÏθυνση1:
    ΔιεÏθυνση2:   ΔιεÏθυνση3:
    Πόλη:   ΚÏάτος:   Ταχ.Κωδ.:
    ΕπαÏχία:   ID Ï€ÏομηθευτοÏ:
    Τηλ:   Κωδικός Κλήσης:   Εναλ/κό Τηλ:
    ΠαÏουσίαση:   ΗλεκτÏονικό ταχυδÏομείο:
    Σχόλια:
    - -
    -


      - -
    - - - - -
    Έκδοση VICIΚΛΗΣΗ:     ΔΗΜΙΟΥΡΓΙΑ:               ΚεντÏικός υπολογιστής:              
    -ΠαÏουσίαση πληÏοφοÏιών κλήσης ÎºÎ±Î½Î±Î»Î¹Î¿Ï Î´Î¹Î±ÏƒÎºÎ­ÏˆÎ·Ï‚
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -ΠΛΗΚΤΡΑ ΚΛΕΙΔΙΑ ΑÎΕÎΕΡΓΑ - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_el/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc_el/voicemail_check.php deleted file mode 100644 index fb48dfb4..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_el/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "ΑκυÏο Όνομα χÏήστη/Κωδικός Ï€Ïόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "ΑκυÏο server_ip: |$server_ip| or ΑκυÏο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "ΑκυÏο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Έλεγχος Ï†Ï‰Î½Î·Ï„Î¹ÎºÎ¿Ï Ï„Î±Ï‡Ï…Î´Ïομείου"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "Κουτί Ï†Ï‰Î½Î·Ï„Î¹ÎºÎ¿Ï Ï„Î±Ï‡Ï…Î´Ïομείου $vmail_box δεν ισχÏει\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_en/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc_en/active_list_refresh.php deleted file mode 100644 index dd977642..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "List Display: "; -if ($ADD==1) {echo "Live Extensions";} -if ($ADD==2) {echo "Busy Extensions";} -if ($ADD==3) {echo "Outside Lines";} -if ($ADD==4) {echo "Local Extensions";} -if ($ADD==5) {echo "Conferences";} -if ($ADD==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_en/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc_en/astguiclient.php deleted file mode 100644 index 7da5ee3e..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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: Login\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login
     
    User Login:
    User Password:
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Español
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone Login
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Phone Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Phone Login
     
    Sorry, your phone login and password are not active in this system, please try again:
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -LOGOUT
    \n"; ?> -
    Main PanelActive Lines PanelConferences PanelCheck VoicemailLive Call
    -
    - - -

    Logout
    -
    - - -
    TRUNK HANGUP

    - Active Trunks Menu
    - Hangup Trunk   |   - Hijack Trunk   |   - Listen Trunk   |   - Refresh   |   - Back to Main Window -
    -
    - - -
    LOCAL HANGUP

    - Active Local Menu
    - Hangup Local   |   - Hijack Local   |   - Listen Local   |   - Refresh   |   - Back to Main Window -
    -
    - - - - - - - -
    LIVE CALL TRANSFER
    Channel to be transferred: Channel
    Extensions:
    Extensions Menu
    -
    - Send to selected extension

    - Send to selected vmail box

    - Send to this number:


    - Refresh


    - Back to Main Window

    -
    Conferences:
    (click on a number below to send to a conference)
    Send my channel too
    Conferences Menu
    -
    - - - - - -
    LOCAL Extensions Dial
    Phone calling from: Channel
    Extensions:
    Extensions Menu
    -
    - Call selected extension

    - Call selected vmail box

    - Refresh


    - Back to Main Window

    -
    -
    - - -
    PARKED CALLS:
    - Back to Main Window

    -
    -
    - - - - - - - - - - - - - - - -
      -
    VOICEMAIL     NEW:     OLD:             MANUAL DIAL       DIAL
    PARKED CALLS: 0                LOCAL DIAL EXTENSIONS
    OUTBOUND CALLS:
    INBOUND CALLS:
    astGUIclient web-client VERSION: BUILD:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    FAVORITES       edit
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    FAVORITES

     
    SUBMIT FAVORITES CHANGES - requires logout
    BACK TO MAIN WINDOW - ignore changes made
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSE | START     Refresh rate: 1000 ms Faster | Slower

    -
    Initializing..
    -
    Active Extensions
    -REFRESH | -ORDER | -
    Outside Lines
    -REFRESH | -ORDER | -
    Local Extensions
    -REFRESH | -ORDER | -
    - Data Goes Here

    -
    - Data Goes Here

    Trunk Action -
    - Data Goes Here

    Local Action -
    -
    - - - - -
    - - -Conferences List - - - -
    -Click on a conference room number on the left for info on that conference -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_en/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc_en/call_log_display.php deleted file mode 100644 index 4abec74d..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Call Log Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_en/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_en/conf_exten_check.php deleted file mode 100644 index 1f93e8ec..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Conf Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ChannelA[$counter] ~"; - # echo "$ChannelA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid or Exten $exten is not valid\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conference $conf_exten has been registered to $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_en/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc_en/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc_en/inbound_popup.php b/agc_2-X/trunk/LANG_agc/agc_en/inbound_popup.php deleted file mode 100644 index e26c4496..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/inbound_popup.php +++ /dev/null @@ -1,348 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -LIVE INBOUND CALL"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    LIVE INBOUND CALL

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid is not valid\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Channel: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "CUSTOM - \n"; - - echo "
    Number Dialed: $row[8]
    Notes: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "HANGUP - \n"; - echo "SEND TO MY VOICEMAIL\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_en/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_en/live_exten_check.php deleted file mode 100644 index e0ca96c8..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Live Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ChannelA[$loop_count] = "$row[0]"; - $ChannelB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $ChannelA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_en/manager_send.php b/agc_2-X/trunk/LANG_agc/agc_en/manager_send.php deleted file mode 100644 index b934cbb8..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Manager Send: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten is not valid or ext_context $ext_context or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel is not live on $call_server_ip, Checking Live Channel...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup command sent for Channel $channel on $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "auto_dial_level $auto_dial_level must be set\n"; - echo "campaign $campaign must be set\n"; - echo "uniqueid $uniqueid must be set\n"; - echo "lead_id $lead_id must be set\n"; - echo "\nRedirectVD Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "parkedby $parkedby must be set\n"; - echo "\nRedirectToPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectFromPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "ExtraChannel $extrachannel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Cannot find empty conference on $server_ip, Redirect command not inserted\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel on $call_server_ip and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for Channel $channel on $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, $ACTION command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or exten $exten is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going on in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_en/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc_en/park_calls_display.php deleted file mode 100644 index 246591b1..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Parked Calls Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_en/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc_en/vdc_db_query.php deleted file mode 100644 index ef287987..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Invalid Username/Password: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Database Query Script"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Group Choice $closer_choice is not valid\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Group Choice $closer_choice has been registered to user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "HOPPER EMPTY\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC NUMBER\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "HOPPER EMPTY\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CALL NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID is not valid\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign is not valid\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inserted: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "LOG NOT ENTERED\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CALL_LOG Inserted: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "LOG NOT ENTERED\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id is not valid\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "LOG NOT ENTERED\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campaign $campaign is not valid\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCALL - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCALL - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send on to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If CALLBK, change vicidial_callback record to INACTIVE - if ($dispo == 'CALLBK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user on $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten is not valid\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation on the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CALLBACK ENTRY - if ( ($dispo_choice == 'CBHOLD') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id information has been updated\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage is not valid\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' is now in status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list is not valid\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_en/vicidial.php b/agc_2-X/trunk/LANG_agc/agc_en/vicidial.php deleted file mode 100644 index cfaf680d..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -#$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIDIAL web client: Re-Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Español
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Re-Login
     
    Phone Login:
    Phone Password:
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    User Login

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Campaign Login
     
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIDIAL web client: Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login
     
    Phone Login:
    Phone Password:
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIDIAL web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Español
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone Login
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_seconds=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Campaign not active, please try again
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Login incorrect, please try again
    "; - } - } - if ($VDloginDISPLAY) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Campaign Login
     
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIDIAL web client: Phone Login Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login Error
     
    Sorry, your phone login and password are not active in this system, please try again:
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIDIAL web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed on this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login on phone: $SIP_user to campaign: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "Sorry, there are no leads in the hopper for this campaign\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
    "; - echo "Password:
    \n"; - echo "Campaign: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
    "; - echo "Password:
    \n"; - echo "Campaign: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -LOGOUT\n"; ?> -
    -
    - - - - - - - - -
    VICIDIALSCRIPT   LIVE     session ID: Live Call
    -
    - - - - -

    VICIDIAL
    -
    - - -MANUAL DIAL
    -
    - - -X ACTIVE CALLBACKS
    -
    - - -
    CALLBACKS FOR AGENT :
    Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list. -
    -
    -
      - Refresh -                 - Go Back -
    -
    - - -
    NEW MANUAL DIAL LEAD FOR :

    Enter information below for the new lead you wish to call. -
    - \n"; - } - ?> - Note: all new manual dial leads will go into list 999

    - - - - - - - - - - - - - - - -
    Dial Code:   (This is usually a 1 in the USA-Canada)
    Phone Number:   (10 digits max - digits only)
    Search Existing Leads:   (This option if checked will attempt to find the phone number in the system before inserting it as a new lead)


    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 Dial Override field below. To hangup this call you will have to open the CALLS IN THIS SESSION link at the bottom of the screen and hang it up by clicking on its channel link there.
     
    Dial Override:   (digits only please)
    -
    - Dial Now -                 - Go Back -
    -
    - - - - -Your Status:
    Calls Dialing: -
    - - - - - -
    - - Transfer - Conference
    - INTERNAL CLOSER - LOCAL CLOSER - CODE - Hangup Xfer Line - Hangup Both Lines - -
    - - Number to call   - seconds   - channel - - OVERRIDE   - D1 - D2 -
    - - Dial With Customer - Park Customer Dial - LEAVE 3-WAY CALL - Dial Blind Transfer - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Lead Dispositioned As:

    - -
    -
    -
    - - - - - - - -
    Disposition Hot Keys: - When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically:
    - - - - - -
    -
    - - -
    Noone is in your session:
    - Go Back -

    - Call Agent Again -
    -
    - - -
    Customer has hung up:
    - Go Back -

    - Finish and Disposition Call - -
    -
    - - -
    Call Wrapup: seconds remaining in wrapup

    - -

    - Finish Wrapup and Move On - -
    -
    - - -

    LOGOUT
    -
    - - -
    -
    - - -
     
    -
    - - -
    Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call.
    -
    - - -
    DISPOSITION CALL :       Hangup Again       minimize
    - End-of-call Disposition Selection -
    - PAUSE AGENT DIALING
    - CLEAR FORM | - SUBMIT -

    - WEB FORM SUBMIT -

      -
    -
    - - - -
    Select a CallBack Date :
    - - - Select a Date Below   -     - Hour: -   - Minutes: -   - -  
    - MY CALLBACK ONLY
    ";} - ?> - CB Comments:

    - - SUBMIT

    - -

      -
    -
    - - -
    CLOSER INBOUND GROUP SELECTION
    - Closer Inbound Group Selection -
    - BLENDED CALLING(outbound activated)
    - RESET | - SUBMIT -



      -
    -
    - - - - Channel - Channel - MY CALLBACK ONLY
    ";} - ?> -
    - - - - - - - -
    LIVE CALL TRANSFER
    Channel to be transferred: Channel
    Extensions:
    Extensions Menu
    -
    - Send to selected extension

    - Send to selected vmail box

    - Send to this number:


    - REFRESH


    - Back to Main Window

    -
    Conferences:
    (click on a number below to send to a conference)
    Send my channel too
    Conferences Menu
    -
    - - - - -
    VICIDIAL SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    STATUS:
    -
    -Dial Next Number
    - LEAD PREVIEW
    - ALT PHONE DIAL
    - - -RECORDING FILE:
    -
    -
    -RECORD ID:
    -
    - -Start Recording
    -
    -Web Form
    -
    -Park Call
    -Transfer - Conference
    -
    -Hangup Customer
    -
    -Send DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    seconds:   Channel:   Cust Time:
    Customer Information:
    Title:   First:   MI:   Last:
    Address1:
    Address2:   Address3:
    City:   State:   PostCode:
    Province:   Vendor ID:
    Phone:   DialCode:   Alt. Phone:
    Show:   Email:
    Comments:
    - -
    -


      - -
    - - - - -
    VICIDIAL web-client version:     BUILD:               Server:              
    -Show conference call channel information
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -HOT KEYS INACTIVE - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_en/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc_en/voicemail_check.php deleted file mode 100644 index 9cc655c6..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_en/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Voicemail Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "voicemail box $vmail_box is not valid\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_es/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc_es/active_list_refresh.php deleted file mode 100644 index 6813fdd1..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Mostrar Listas: "; -if ($ADD==1) {echo "Extensiones Activas";} -if ($ADD==2) {echo "Extensiones Ocupadas";} -if ($ADD==3) {echo "Líneas de salida";} -if ($ADD==4) {echo "Extensiones Locales";} -if ($ADD==5) {echo "Conferencias";} -if ($ADD==99999) {echo "AYUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_es/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc_es/astguiclient.php deleted file mode 100644 index a0e69cf9..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Usted ahora ha registrado hacia fuera. Gracias\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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 "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Conexión
     
    Conexión Del Usuario:
    Contraseña Del Usuario:
    Conexión Del Teléfono:
    Contraseña Del Teléfono:

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client astGUIclient: Conexión Del Teléfono\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Español
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conexión Del Teléfono
     
    Conexión Del Teléfono:
    Contraseña Del Teléfono:

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client astGUIclient: Conexión Del Teléfono\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Conexión Del Teléfono
     
    Disculpe, la conexión del teléfono y contraseña no están activos en este sistema, intentelo otra vez por favor:
     
    Conexión Del Teléfono:
    Contraseña Del Teléfono:

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client astGUIclient\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -SALIR
    \n"; ?> -
    Pantalla PrincipalPantalla Lineas ActivasPantalla de ConferenciasComprobar buzón de vozLlamada Activa
    -
    - - -

    Logout
    -
    - - -
    TRUNK COLGAR

    - Active Trunks Menu
    - Colgar Trunk   |   - Capturar Trunk   |   - Escuchar Trunk   |   - Recarga   |   - Volver a la pantalla principal -
    -
    - - -
    Colgar Local

    - Menú Local Activa
    - Colgar Local   |   - Capturar Local   |   - Escuchar Local   |   - Recarga   |   - Volver a la pantalla principal -
    -
    - - - - - - - -
    TRANSFERIR LLAMADA ACTIVA
    Canal que va a ser transferido: Canal
    Extensiones:
    Menú Extensiones
    -
    - Envíe a la extensión seleccionada

    - Enviar al buzón de voz seleccionada

    - Envíe a este número:


    - Recarga


    - Volver a la pantalla principal

    -
    Conferencias:
    (Pinchar en un número de abajo para enviar a una conferencia)
    Enviar mi canal también
    Menú de Conferencias
    -
    - - - - - -
    Marcar a Extensiones LOCALES
    Teléfono llamando desde: Canal
    Extensiones:
    Menú Extensiones
    -
    - Llamar extensión seleccionada

    - Llamar buzón de voz seleccionado

    - Recarga


    - Volver a la pantalla principal

    -
    -
    - - -
    LLAMADAS APARCADAS:
    - Volver a la pantalla principal

    -
    -
    - - - - - - - - - - - - - - - -
      -
    BUZÓN DE VOZ     NUEVO:     VIEJO:             MARCADO MANUAL       DIAL
    LLAMADAS APARCADAS: 0                MARCAR EXTENSIONES LOCALES
    LLAMADAS SALIENTES:
    LLAMADAS ENTRANTES:
    versión astGUIclient del tela-cliente: CONSTRUCCION:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    FAVORITOS       corrija
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    FAVORITOS

     
    SOMETA LOS CAMBIOS de los FAVORITOS - requiere registro de estado de la máquina
    DE NUEVO A VENTANA PRINCIPAL - no haga caso de los cambios realizados
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSA | COMIENZO     Actualizar la tarifa: 1000 ms Más rápido | Más lento

    -
    Inizializando..
    -
    Extensiones Activas
    -ACTUALIZAR | -ORDEN | -
    Líneas de salida
    -ACTUALIZAR | -ORDEN | -
    Extensiones Locales
    -ACTUALIZAR | -ORDEN | -
    - Los Datos Van Aquí

    -
    - Los Datos Van Aquí

    Acciones en Trunk -
    - Los Datos Van Aquí

    Acción Local -
    -
    - - - - -
    - - -Lista De las Conferencias - - - -
    -Pinchar a la izquierda del número de una sala de conferencias para obtener información -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_es/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc_es/call_log_display.php deleted file mode 100644 index f6c36dff..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Motrar el registro de llamadas"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten No es válido o protocolo $protocol No es válido\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_es/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_es/conf_exten_check.php deleted file mode 100644 index 08a640e3..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Comprobar la Extensión de Conf"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten No es válido\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Estado: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanalA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanalA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$CanalA[$counter] ~"; - # echo "$CanalA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten No es válido or Exten $exten No es válido\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conferencia $conf_exten Ha sido registrado para $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_es/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc_es/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc_es/inbound_popup.php b/agc_2-X/trunk/LANG_agc/agc_es/inbound_popup.php deleted file mode 100644 index fe5e79b5..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/inbound_popup.php +++ /dev/null @@ -1,348 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -LLAMADA DE ENTRADA ACTIVA"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    LLAMADA DE ENTRADA ACTIVA

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid No es válido\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Canal: $row[1]
    LlamadorID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Canal=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "A MEDIDA - \n"; - - echo "
    Número Marcado: $row[8]
    Notas: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "COLGAR - \n"; - echo "ENVIAR A MI BUZÓN DE VOZ\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_es/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_es/live_exten_check.php deleted file mode 100644 index 912854ad..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Comprobar Extensión Activa"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten No es válido o protocolo $protocol No es válido\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $CanalA[$loop_count] = "$row[0]"; - $CanalB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $CanalA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_es/manager_send.php b/agc_2-X/trunk/LANG_agc/agc_es/manager_send.php deleted file mode 100644 index 930f11d9..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Enviar al Manager: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AYUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten No es válido or queryCID $queryCID No es válido, Originate comando no insertado\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando enviado a Exten $exten Canal $channel en $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nOriginateName Action no enviado\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nOriginateNameVmail Action no enviado\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten No es válido or queryCID $queryCID No es válido, Originate comando no insertado\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando enviado a Exten $exten Canal $channel en $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten No es válido or ext_context $ext_context or queryCID $queryCID No es válido, Hangup comando no insertado\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Canal $channel No es válido or queryCID $queryCID No es válido, Hangup comando no insertado\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel no está activo en $call_server_ip, Checking Live Canal...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Canal $channel no está activo en $call_server_ip, Hangup comando no insertado $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup comando enviado a Canal $channel en $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "auto_dial_level $auto_dial_level debe ser fijado\n"; - echo "campaign $campaign debe ser fijado\n"; - echo "uniqueid $uniqueid debe ser fijado\n"; - echo "lead_id $lead_id debe ser fijado\n"; - echo "\nRedirectVD Action no enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='TRANSFERENCIA' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='TRANSFERENCIA' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "parkedby $parkedby debe ser fijado\n"; - echo "\nRedirectToPark Action no enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirectFromPark Action no enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirectName Action no enviado\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirectNameVmail Action no enviado\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "ExtraCanal $extrachannel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirect Action no enviado\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "No puede encontrar conferencia vacía en $server_ip, Redirect comando no insertado\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Canal $channel no está activo en $call_server_ip, Redirect comando no insertado\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando enviado a Canal $channel and \nExtraCanal $extrachannel\n to $exten en $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando enviado a Canal $channel en $call_server_ip and \nExtraCanal $extrachannel\n to $exten en $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirect Action no enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect comando enviado a Canal $channel en $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canal $channel No es válido or queryCID $queryCID No es válido or filename: $filename No es válido, $ACTION comando no insertado\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canal $channel no está activo en $server_ip, $ACTION comando no insertado\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION comando enviado a Canal $channel en $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canal $channel No es válido or exten $exten No es válido or filename: $filename No es válido, $ACTION comando no insertado\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going en in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION comando enviado a Canal $channel en $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n LA GRABACIÓN DURARà HASTA 60 MINUTOS\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_es/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc_es/park_calls_display.php deleted file mode 100644 index 0f8c81ab..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Mostrar Llamadas Aparcadas"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten No es válido o protocolo $protocol No es válido\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_es/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc_es/vdc_db_query.php deleted file mode 100644 index feeb72be..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Database Query Script"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Opción Del Grupo $closer_choice No es válido\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Opción Del Grupo $closer_choice se ha registrado al usuario $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "TOLVA VACÃA\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context No es válido\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC NÚMERO\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INLLAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "TOLVA VACÃA\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context No es válido\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INLLAMADA - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LLAMADA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context No es válido\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID No es válido\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "REGISTRO NO ENTRADO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign No es válido\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Insertado: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "REGISTRO NO ENTRADO\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "LLAMADA_LOG Insertado: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "REGISTRO NO ENTRADO\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "REGISTRO NO ENTRADO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id No es válido\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "REGISTRO NO ENTRADO\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campaña $campaign No es válido\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INLLAMADA in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INLLAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INLLAMADA - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INLLAMADA - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send en to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If LLAMADABK, change vicidial_callback record to INACTIVE - if ($dispo == 'LLAMADABK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user en $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten No es válido\n"; - exit; - } -else - { - ##### Insert a SALIR record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','SALIR','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation en the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id No es válido\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### LLAMADABACK ENTRY - if ( ($dispo_choice == 'CBHVIEJO') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' se ha cambiado a ' . $dispo_choice . " Estado\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id No es válido\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id La información ha sido actualizada\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage No es válido\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' ahora está en estado ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list No es válido\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_es/vicidial.php b/agc_2-X/trunk/LANG_agc/agc_es/vicidial.php deleted file mode 100644 index d70ec0f4..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "Usted ahora ha registrado hacia fuera. Gracias\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -#$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of segundos for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "web client VICIDIAL: Conexión Otra Vez\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Español
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conexión Otra Vez
     
    Conexión Del Teléfono:
    Contraseña Del Teléfono:
    Conexión Del Usuario:
    Contraseña Del Usuario:
    Campaña: $camp_form_code

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "web client VICIDIAL: Conexión en la Campaña\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    Conexión Del Usuario

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Conexión en la Campaña
     
    Conexión Del Usuario:
    Contraseña Del Usuario:
    Campaña: $camp_form_code

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "web client VICIDIAL: Conexión\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Conexión
     
    Conexión Del Teléfono:
    Contraseña Del Teléfono:
    Conexión Del Usuario:
    Contraseña Del Usuario:
    Campaña: $camp_form_code

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client VICIDIAL: Conexión Del Teléfono\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Español
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conexión Del Teléfono
     
    Conexión Del Teléfono:
    Contraseña Del Teléfono:

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_segundos=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La campaña no está activa, intentelo otra vez, por favor
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La conexión incorrecta, intentelo otra vez, por favor
    "; - } - } - if ($VDloginDISPLAY) - { - echo "web client VICIDIAL: Conexión en la Campaña\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Conexión en la Campaña
     
    Conexión Del Usuario:
    Contraseña Del Usuario:
    Campaña: $camp_form_code

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client VICIDIAL: Conexión Del Teléfono Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Conexión Error
     
    Disculpe, la conexión del teléfono y contraseña no están activos en este sistema, intentelo otra vez por favor:
     
    Conexión Del Teléfono:
    Contraseña Del Teléfono:

    VERSIÓN: $version       CONSTRUCCION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client VICIDIAL\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $LlamadorID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed en this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login en phone: $SIP_user a la campaña: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NUEVO record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "web client VICIDIAL: VICIDIAL Conexión en la Campaña\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "Lo siento, no hay leads en el hopper de esta campaña\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Conexión: \n
    "; - echo "Contraseña:
    \n"; - echo "Campaña: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "web client VICIDIAL: VICIDIAL Conexión en la Campaña\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Español
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Conexión: \n
    "; - echo "Contraseña:
    \n"; - echo "Campaña: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -SALIR\n"; ?> -
    -
    - - - - - - - - -
    VICIDIALSCRIPT   LIVE     sesión ID: Llamada Activa
    -
    - - - - -

    VICIDIAL
    -
    - - -MARCADO MANUAL
    -
    - - -X SERVICIOS REPETIDOS ACTIVOS
    -
    - - -
    SERVICIOS REPETIDOS PARA EL AGENTE :
    Chasque encendido un servicio repetido abajo ahora para llamar la parte posteriora del cliente. Si usted chasca encendido un expediente abajo para llamarlo, será quitado de la lista. -
    -
    -
      - Recarga -                 - Vaya Detrás -
    -
    - - -
    NUEVO PLOMO MANUAL DEL DIAL PARA :

    Incorpore la información abajo para el nuevo plomo que usted desea llamar. -
    - \n"; - } - ?> - Nota: todos los nuevos plomos manuales del dial entrarán la lista 999

    - - - - - - - - - - - - - - - -
    Dial Código:   (Éste es generalmente un 1 en los U.S.A. y el Canadá)
    Teléfono Number:   (máximo de 10 dígitos - dígitos solamente)
    Plomos Existentes De la Búsqueda:   (Esta opción si está comprobada procurará encontrar el número de teléfono en el sistema antes de insertarlo como nuevo plomo)


    Si usted desea marcar un número y hacerlo no agregar como nuevo plomo, entre en dialstring exacto ese usted desean llamar en el campo de la invalidación del dial abajo. Al retraso esta llamada usted tendrá que abrir las LLAMADAS EN ESTE acoplamiento de la SESIÓN en el fondo de la pantalla y colgarlas para arriba chascando en su acoplamiento del canal allí.
     
    Inválidoación Del Dial:   (los dígitos satisfacen solamente)
    -
    - Dial Ahora -                 - Vaya Detrás -
    -
    - - - - -Su Estado:
    Calls Dialing: -
    - - - - - -
    - - Transferencia - Conferencia
    - CLOSER INTERNO - CLOSER LOCAL - CODE - Colgar Línea Xfer - Colgar Ambas Líneas - -
    - - Número a llamar   - segundos   - channel - - OVERRIDE   - D1 - D2 -
    - - Marcar Con El Cliente - Dial Del Cliente Del Parque - ABANDONAR LLAMADA 3-WAY - Marcar Blind Transfer - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Lead Dispositioned Como:

    - -
    -
    -
    - - - - - - - -
    Teclas de acceso rápido a la Disposición: - Cuando esté activo, presione simplemente la tecla para la disposición deseada para esta llamada. La llamada después será colgada y dispositioned automáticamente:
    - - - - - -
    -
    - - -
    Nadie está en su sesión:
    - Vaya Detrás -

    - Agente De la Llamada Otra vez -
    -
    - - -
    El cliente ha colgado:
    - Vaya Detrás -

    - Final y llamada de la disposición - -
    -
    - - -
    Llamada Wrapup: segundos restantes en wrapup

    - -

    - Final Wrapup y movimiento encendido - -
    -
    - - -

    SALIR
    -
    - - -
    -
    - - -
     
    -
    - - -
    Cualquier cambio realizado al cliente que no será la información abajo en este tiempo comitted, usted debe cambiar la información del cliente antes de usted retraso la llamada.
    -
    - - -
    DISPOSITION LLAMADA :       Retraso Otra vez       reduzca al mínimo
    - selección de la disposición del End-of-call -
    - PARAR LA LLAMADA
    - REINICIAR | - ENVIAR -

    - WEB FORM ENVIAR -

      -
    -
    - - - -
    Seleccione una fecha del servicio repetido :
    - - - Seleccione una fecha abajo   -     - Hour: -   - Minutes: -   - -  
    - MI SERVICIO REPETIDO SOLAMENTE
    ";} - ?> - Comentarios de los CBES:

    - - ENVIAR

    - -

      -
    -
    - - -
    SELECCIÓN DEL GRUPO DE ENTRANTES CLOSER
    - SELECCIÓN DEL GRUPO DE ENTRANTES CLOSER -
    - BLENDED LLAMADAING(Salientes activdas)
    - REINICIAR | - ENVIAR -



      -
    -
    - - - - Canal - Canal - MI SERVICIO REPETIDO SOLAMENTE
    ";} - ?> -
    - - - - - - - -
    TRANSFERIR LLAMADA ACTIVA
    Canal que va a ser transferido: Canal
    Extensiones:
    Menú Extensiones
    -
    - Envíe a la extensión seleccionada

    - Enviar al buzón de voz seleccionada

    - Envíe a este número:


    - ACTUALIZAR


    - Volver a la pantalla principal

    -
    Conferencias:
    (Pinchar en un número de abajo para enviar a una conferencia)
    Enviar mi canal también
    Menú de Conferencias
    -
    - - - - -
    VICIDIAL SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    ESTADO:
    -
    -Marcar el Siguiente Número
    - MOSTRAR LEAD
    - TELÉFONO DEL ALT
    - - -GRABANDO ARCHIVO:
    -
    -
    -GRABACIÓN ID:
    -
    - -Comenzar La Grabación
    -
    -Formulario Web
    -
    -Aparcar llamada
    -Transferencia - Conferencia
    -
    -Colgar al Cliente
    -
    -Enviar DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    segundos:   Canal:   Tiempo:
    Información Del Cliente:
    Título:   Primero:   IM:   Último:
    Dirección1:
    Dirección2:   Dirección3:
    Ciudad:   Estado:   Código Postal:
    Provincia:   Vendedor ID:
    Teléfono:   Código Del Dial:   Teléfono Alt:
    Demostración:   Email:
    Comentarios:
    - -
    -


      - -
    - - - - -
    versión web client VICIDIAL:     CONSTRUCCION:               Servidor:              
    -Mostrar la información del canal Conferencia
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -TECLAS ACCESO RÃPIDO INACTIVAS - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_es/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc_es/voicemail_check.php deleted file mode 100644 index 46db91bd..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_es/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Nombre del usuario/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Comprobar el buzón de voz"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "caja del buzón de voz $vmail_box No es válido\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc_fr/active_list_refresh.php deleted file mode 100644 index df742e06..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Affichage De Liste: "; -if ($ADD==1) {echo "Prolongements De phase";} -if ($ADD==2) {echo "Prolongements Occupés";} -if ($ADD==3) {echo "Lignes Extérieures";} -if ($ADD==4) {echo "Prolongements Locaux";} -if ($ADD==5) {echo "Conférences";} -if ($ADD==99999) {echo "AIDE";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc_fr/astguiclient.php deleted file mode 100644 index 41513012..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Vous vous êtes maintenant déconnecté. Merci\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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: Ouverture\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Français
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Ouverture
     
    Ouverture D'Utilisateur:
    Mot de passe D'Utilisateur:
    Ouverture De Téléphone:
    Mot de passe De Téléphone:

    VERSION: $version       CONSTRUCTION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICICADRAN|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICICADRAN|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client astGUIclient: Ouverture De Téléphone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Français
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Ouverture De Téléphone
     
    Ouverture De Téléphone:
    Mot de passe De Téléphone:

    VERSION: $version       CONSTRUCTION: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client astGUIclient: Ouverture De Téléphone\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Français
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Ouverture De Téléphone
     
    Désolé, votre ouverture de téléphone et mot de passe ne soyez pas:
     
    Ouverture De Téléphone:
    Mot de passe De Téléphone:

    VERSION: $version       CONSTRUCTION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client astGUIclient\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -DÉCONNEXION
    \n"; ?> -
    Panneau PrincipalLignes Actives PanneauPanneau De ConférencesVérifiez VoicemailVivent L'Appel
    -
    - - -

    Logout
    -
    - - -
    TRUNK DÉCROCHEMENT

    - Active Trunks Menu
    - Tronc De Décrochement   |   - Tronc De Détournement   |   - Écoutent Le Tronc   |   - Régénérez   |   - De nouveau à la fenêtre principale -
    -
    - - -
    DÉCROCHEMENT LOCAL

    - Menu Local Actif
    - Gens du pays De Décrochement   |   - Gens du pays De Détournement   |   - Écoutent Les Gens du pays   |   - Régénérez   |   - De nouveau à la fenêtre principale -
    -
    - - - - - - - -
    TRANSFERT DE PHASE D'APPEL
    La Manche à transférer: LaManche
    Prolongements:
    Menu De Prolongements
    -
    - Envoyez à la prolongation choisie

    - Envoyez dans la boîte choisie de vmail

    - Envoyez à ce nombre:


    - Régénérez


    - De nouveau à la fenêtre principale

    -
    Conférences:
    (cliquez sur un nombre ci-dessous pour envoyer à une)
    Envoyez mon canal aussi
    Menu De Conférences
    -
    - - - - - -
    Cadran LOCAL De Prolongements
    Téléphone appelant de: LaManche
    Prolongements:
    Menu De Prolongements
    -
    - Prolongation choisie par appel

    - Boîte de vmail choisie par appel

    - Régénérez


    - De nouveau à la fenêtre principale

    -
    -
    - - -
    APPELS GARÉS:
    - De nouveau à la fenêtre principale

    -
    -
    - - - - - - - - - - - - - - - -
      -
    VOICEMAIL     NOUVEAU:     VIEUX:             CADRAN MANUEL       CADRAN
    APPELS GARÉS: 0                PROLONGEMENTS LOCAUX DE CADRAN
    APPELS EN PARTANCE:
    APPELS D'ARRIVÉE:
    VERSION astGUIclient d'enchaînement-client: CONSTRUCTION:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    FAVORIS       éditez
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    FAVORIS

     
    SOUMETTEZ LES CHANGEMENTS de FAVORIS - exige la déconnexion
    DE NOUVEAU À LA FENÊTRE PRINCIPALE - ignorez les changements faits
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSE | DÉBUT     La vitesse de régénération: 1000 ms Plus rapidement | Plus lent

    -
    Initialisation..
    -
    Prolongements Actifs
    -RÉGÉNÉREZ | -ORDRE | -
    Lignes Extérieures
    -RÉGÉNÉREZ | -ORDRE | -
    Prolongements Locaux
    -RÉGÉNÉREZ | -ORDRE | -
    - Les Données Vont Ici

    -
    - Les Données Vont Ici

    Action De Tronc -
    - Les Données Vont Ici

    Action Locale -
    -
    - - - - -
    - - -Liste De Conférences - - - -
    -Cliquez sur un nombre de salle de conférence du côté gauche -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc_fr/call_log_display.php deleted file mode 100644 index 2d6379db..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Affichage De Notation D'Appel"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten est inadmissible ou protocole $protocol est inadmissible\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_fr/conf_exten_check.php deleted file mode 100644 index ca269d5f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Contrôle De Prolongation De Conf"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten est inadmissible\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Statut: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $LaMancheA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $LaMancheA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$LaMancheA[$counter] ~"; - # echo "$LaMancheA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten est inadmissible or Exten $exten est inadmissible\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conférence $conf_exten a été enregistré à $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc_fr/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/inbound_popup.php b/agc_2-X/trunk/LANG_agc/agc_fr/inbound_popup.php deleted file mode 100644 index 558eb7f5..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/inbound_popup.php +++ /dev/null @@ -1,348 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -APPEL D'ARRIVÉE DE PHASE"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    APPEL D'ARRIVÉE DE PHASE

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid est inadmissible\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    LaManche: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_LaManche=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "COUTUME - \n"; - - echo "
    Numéro Composé: $row[8]
    Notes: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "DÉCROCHEMENT - \n"; - echo "ENVOYEZ À MON VOICEMAIL\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_fr/live_exten_check.php deleted file mode 100644 index 499b228d..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Contrôle De phase De Prolongation"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten est inadmissible ou protocole $protocol est inadmissible\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $LaMancheA[$loop_count] = "$row[0]"; - $LaMancheB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $LaMancheA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/manager_send.php b/agc_2-X/trunk/LANG_agc/agc_fr/manager_send.php deleted file mode 100644 index 85887f16..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Le Directeur Envoient: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AIDE";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten est inadmissible or queryCID $queryCID est inadmissible, Originate commande non insérée\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate commande envoyée pour Exten $exten LaManche $channel sur $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "extenName $extenName doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nOriginateName Action non envoyé\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "extenName $extenName doit être placé\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nOriginateNameVmail Action non envoyé\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten est inadmissible or queryCID $queryCID est inadmissible, Originate commande non insérée\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate commande envoyée pour Exten $exten LaManche $channel sur $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten est inadmissible or ext_context $ext_context or queryCID $queryCID est inadmissible, Hangup commande non insérée\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "LaManche $channel est inadmissible or queryCID $queryCID est inadmissible, Hangup commande non insérée\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel n'est pas de phase sur $call_server_ip, Checking Live LaManche...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "LaManche $channel n'est pas de phase sur $call_server_ip, Hangup commande non insérée $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup commande envoyée pour LaManche $channel sur $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "auto_dial_level $auto_dial_level doit être placé\n"; - echo "campaign $campaign doit être placé\n"; - echo "uniqueid $uniqueid doit être placé\n"; - echo "lead_id $lead_id doit être placé\n"; - echo "\nRedirectVD Action non envoyé\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "extenName $extenName doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "parkedby $parkedby doit être placé\n"; - echo "\nRedirectToPark Action non envoyé\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirectFromPark Action non envoyé\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "extenName $extenName doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirectName Action non envoyé\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "extenName $extenName doit être placé\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirectNameVmail Action non envoyé\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "ExtraLaManche $extrachannel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirect Action non envoyé\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Ne peut pas trouver la conférence vide sur $server_ip, Redirect commande non insérée\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "LaManche $channel n'est pas de phase sur $call_server_ip, Redirect commande non insérée\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "LaManche $channel n'est pas de phase sur $server_ip, Redirect commande non insérée\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra commande envoyée pour LaManche $channel and \nExtraLaManche $extrachannel\n to $exten sur $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra commande envoyée pour LaManche $channel sur $call_server_ip and \nExtraLaManche $extrachannel\n to $exten sur $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirect Action non envoyé\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "LaManche $channel n'est pas de phase sur $server_ip, Redirect commande non insérée\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect commande envoyée pour LaManche $channel sur $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "LaManche $channel est inadmissible or queryCID $queryCID est inadmissible or filename: $filename est inadmissible, $ACTION commande non insérée\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "LaManche $channel n'est pas de phase sur $server_ip, $ACTION commande non insérée\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION commande envoyée pour LaManche $channel sur $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "LaManche $channel est inadmissible or exten $exten est inadmissible or filename: $filename est inadmissible, $ACTION commande non insérée\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going sur in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION commande envoyée pour LaManche $channel sur $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n L'ENREGISTREMENT DURERA JUSQU'À 60 MINUTES\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc_fr/park_calls_display.php deleted file mode 100644 index 23d5e3b5..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Affichage Garé D'Appels"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten est inadmissible ou protocole $protocol est inadmissible\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc_fr/vdc_db_query.php deleted file mode 100644 index e2584b87..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Manuscrit De Question De Base de données"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Choix De Groupe $closer_choice est inadmissible\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Choix De Groupe $closer_choice a été enregistré à l'utilisateur $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "DISTRIBUTEUR VIDE\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context est inadmissible\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC NOMBRE\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INAPPEL - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "DISTRIBUTEUR VIDE\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context est inadmissible\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INAPPEL - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "APPEL NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context est inadmissible\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID est inadmissible\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "NOTATION NON ENTRÉE\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign est inadmissible\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inséré: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "NOTATION NON ENTRÉE\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "APPEL_LOG Inséré: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "NOTATION NON ENTRÉE\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "NOTATION NON ENTRÉE\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id est inadmissible\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "NOTATION NON ENTRÉE\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campagne $campaign est inadmissible\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INAPPEL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INAPPEL - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INAPPEL - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INAPPEL - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send sur to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If APPELBK, change vicidial_callback record to INACTIVE - if ($dispo == 'APPELBK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user sur $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten est inadmissible\n"; - exit; - } -else - { - ##### Insert a DÉCONNEXION record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','DÉCONNEXION','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation sur the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id est inadmissible\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### APPELBACK ENTRY - if ( ($dispo_choice == 'CBHVIEUX') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' a été changé en ' . $dispo_choice . " Statut\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id est inadmissible\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id l'information a été mise à jour\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage est inadmissible\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' est maintenant dans le statut ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list est inadmissible\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/vicidial.php b/agc_2-X/trunk/LANG_agc/agc_fr/vicidial.php deleted file mode 100644 index 1ea3b1e2..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "Vous vous êtes maintenant déconnecté. Merci\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -#$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of secondes for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "Web client de VICICADRAN: Re-Ouverture\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Français
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Re-Ouverture
     
    Ouverture De Téléphone:
    Mot de passe De Téléphone:
    Ouverture D'Utilisateur:
    Mot de passe D'Utilisateur:
    Campagne: $camp_form_code

    VERSION: $version       CONSTRUCTION: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "Web client de VICICADRAN: Ouverture De Campagne\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Français
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    Ouverture D'Utilisateur

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Ouverture De Campagne
     
    Ouverture D'Utilisateur:
    Mot de passe D'Utilisateur:
    Campagne: $camp_form_code

    VERSION: $version       CONSTRUCTION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "Web client de VICICADRAN: Ouverture\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Français
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Ouverture
     
    Ouverture De Téléphone:
    Mot de passe De Téléphone:
    Ouverture D'Utilisateur:
    Mot de passe D'Utilisateur:
    Campagne: $camp_form_code

    VERSION: $version       CONSTRUCTION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "Web client de VICICADRAN: Ouverture De Téléphone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Français
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Ouverture De Téléphone
     
    Ouverture De Téléphone:
    Mot de passe De Téléphone:

    VERSION: $version       CONSTRUCTION: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_secondes=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La campagne non active, essayent svp encore
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "L'ouverture incorrecte, essayent svp encore
    "; - } - } - if ($VDloginDISPLAY) - { - echo "Web client de VICICADRAN: Ouverture De Campagne\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Français
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Ouverture De Campagne
     
    Ouverture D'Utilisateur:
    Mot de passe D'Utilisateur:
    Campagne: $camp_form_code

    VERSION: $version       CONSTRUCTION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "Web client de VICICADRAN: Ouverture De Téléphone Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Français
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Ouverture Error
     
    Désolé, votre ouverture de téléphone et mot de passe ne soyez pas:
     
    Ouverture De Téléphone:
    Mot de passe De Téléphone:

    VERSION: $version       CONSTRUCTION: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "Web client de VICICADRAN\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed sur this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login sur phone: $SIP_user à la campagne: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NOUVEAU record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "Web client de VICICADRAN: VICICADRAN Ouverture De Campagne\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Français
    \n"; - echo "Désolé, il n'y a aucun fil dans le distributeur pour cette campagne\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Ouverture: \n
    "; - echo "Mot de passe:
    \n"; - echo "Campagne: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "Web client de VICICADRAN: VICICADRAN Ouverture De Campagne\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Français
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Ouverture: \n
    "; - echo "Mot de passe:
    \n"; - echo "Campagne: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -DÉCONNEXION\n"; ?> -
    -
    - - - - - - - - -
    VICICADRANSCRIPT   LIVE     ID de session: Vivent L'Appel
    -
    - - - - -

    VICICADRAN
    -
    - - -CADRAN MANUEL
    -
    - - -X RAPPELS DE SERVICE ACTIFS
    -
    - - -
    RAPPELS DE SERVICE POUR L'AGENT :
    Cliquez sur un rappel de service ci-dessous pour appeler le dos de client maintenant. Si vous cliquez sur un disque ci-dessous pour l'appeler, il sera enlevé de la liste. -
    -
    -
      - Régénérez -                 - Retournez -
    -
    - - -
    NOUVEAU FIL MANUEL DE CADRAN POUR :

    Écrivez l'information ci-dessous pour le nouveau fil que vous souhaitez appeler. -
    - \n"; - } - ?> - Note : tous les nouveaux fils manuels de cadran entreront dans la liste 999

    - - - - - - - - - - - - - - - -
    Cadran Code:   (C'est habituellement un 1 aux Etats-Unis et au Canada)
    Téléphone Number:   (maximum de 10 chiffres - chiffres seulement)
    Fils Existants De Recherche:   (Cette option si vérifié essayera de trouver le numéro de téléphone dans le système avant de l'insérer comme nouvelle avance)


    Si vous voulez composer un numéro et le faire ne pas ajouter comme nouvelle avance, entrez dans dialstring exact ce vous veulent appeler dans le domaine de priorité de cadran ci-dessous. Au décrochement cet appel vous devrez ouvrir les APPELS DANS CE lien de SESSION au fond de l'écran et les accrocher vers le haut en cliquant sur son lien de canal là.
     
    Dépassement De Cadran:   (les chiffres satisfont seulement)
    -
    - Cadran Maintenant -                 - Retournez -
    -
    - - - - -Votre Statut:
    Calls Dialing: -
    - - - - - -
    - - Transfert - Conférence
    - PLUS ÉTROIT INTERNE - GENS DU PAYS PLUS ÉTROITS - CODE - Ligne De Xfer De Décrochement - Décrochement Les deux Lignes - -
    - - Nombre à appeler   - secondes   - channel - - OVERRIDE   - D1 - D2 -
    - - Cadran Avec Le Client - Cadran De Client De Parc - APPEL DU CONGÉ 3-WAY - Transfert D'Aveugle De Cadran - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Fil Dispositioned As:

    - -
    -
    -
    - - - - - - - -
    Touches Directes De Disposition: - Si actif, appuyez sur simplement la touche de clavier pour la:
    - - - - - -
    -
    - - -
    Aucun n'est en votre session:
    - Retournez -

    - Agent D'Appel Encore -
    -
    - - -
    Le client a raccroché:
    - Retournez -

    - Finition et appel de disposition - -
    -
    - - -
    Appel Wrapup : secondes restantes dans le wrapup

    - -

    - Finition Wrapup et passer - -
    -
    - - -

    DÉCONNEXION
    -
    - - -
    -
    - - -
     
    -
    - - -
    Tous les changements faits au client que l'information ci-dessous actuellement ne sera pas comitted, vous doivent changer l'information de client avant vous décrochement l'appel.
    -
    - - -
    APPEL DE DISPOSITION :       Décrochement Encore       réduisez au minimum
    - Extrémité-de-appelez Le Choix De Disposition -
    - CESSEZ D'APPELER
    - REMISE | - SOUMETTEZ -

    - WEB FORM SOUMETTEZ -

      -
    -
    - - - -
    Choisissez une date de rappel de service :
    - - - Choisissez une date ci-dessous   -     - Hour: -   - Minutes: -   - -  
    - MON RAPPEL DE SERVICE SEULEMENT
    ";} - ?> - Commentaires de CB:

    - - SOUMETTEZ

    - -

      -
    -
    - - -
    UN CHOIX DE GROUPE D'ARRIVÉE PLUS ÉTROIT
    - Un Choix De Groupe D'arrivée Plus étroit -
    - APPELER MÉLANGÉ(en partance activé)
    - REMISE | - SOUMETTEZ -



      -
    -
    - - - - LaManche - LaManche - MON RAPPEL DE SERVICE SEULEMENT
    ";} - ?> -
    - - - - - - - -
    TRANSFERT DE PHASE D'APPEL
    La Manche à transférer: LaManche
    Prolongements:
    Menu De Prolongements
    -
    - Envoyez à la prolongation choisie

    - Envoyez dans la boîte choisie de vmail

    - Envoyez à ce nombre:


    - RÉGÉNÉREZ


    - De nouveau à la fenêtre principale

    -
    Conférences:
    (cliquez sur un nombre ci-dessous pour envoyer à une)
    Envoyez mon canal aussi
    Menu De Conférences
    -
    - - - - -
    VICICADRAN SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    STATUT:
    -
    -Prochain Nombre De Cadran
    - PRÉVISION DE FIL
    - TÉLÉPHONE D'ALT
    - - -DOSSIER D'ENREGISTREMENT:
    -
    -
    -IDENTIFICATION DISQUE:
    -
    - -Commencez À enregistrer
    -
    -Forme de Web
    -
    -Appel De Parc
    -Transfert - Conférence
    -
    -Client De Décrochement
    -
    -Envoyez DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    secondes:   LaManche:   Temps De Cust:
    L'Information De Client:
    Titre:   D'abord:   MI :  Bout:
    Adresse1:
    Adresse2:   Adresse3:
    Ville:   État:   Code postal:
    Province:   Identification De Fournisseur:
    Téléphone:   DialCode:   Alt. Téléphone:
    Exposition:   Email:
    Commentaires:
    - -
    -


      - -
    - - - - -
    Version d'enchaînement-client de VICICADRAN:     CONSTRUCTION:               Serveur:              
    -Montrez l'information de canal de conférence téléphonique
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -TOUCHES DIRECTES INACTIVES - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_fr/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc_fr/voicemail_check.php deleted file mode 100644 index 0fbb86d2..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_fr/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Contrôle De Voicemail"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "boîte de voicemail $vmail_box est inadmissible\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_it/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc_it/active_list_refresh.php deleted file mode 100644 index ca2e42d8..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Esposizione Della Lista: "; -if ($ADD==1) {echo "Estensioni In tensione";} -if ($ADD==2) {echo "Estensioni Occupate";} -if ($ADD==3) {echo "Linee Esterne";} -if ($ADD==4) {echo "Estensioni Locali";} -if ($ADD==5) {echo "Congressi";} -if ($ADD==99999) {echo "AIUTO";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_it/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc_it/astguiclient.php deleted file mode 100644 index 76229631..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Ora avete annotato fuori. Grazie\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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: Inizio attività\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Italiano
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Inizio attività
     
    Inizio attività Dell'Utente:
    Parola d'accesso Dell'Utente:
    Inizio attività Del Telefono:
    Parola d'accesso Del Telefono:

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIMANOPOLA|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIMANOPOLA|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client astGUIclient: Inizio attività Del Telefono\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Italiano
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Inizio attività Del Telefono
     
    Inizio attività Del Telefono:
    Parola d'accesso Del Telefono:

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client astGUIclient: Inizio attività Del Telefono\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Italiano
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Inizio attività Del Telefono
     
    Spiacente, il vostri inizio attività del telefono e parola d'accesso:
     
    Inizio attività Del Telefono:
    Parola d'accesso Del Telefono:

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client astGUIclient\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -TERMINE
    \n"; ?> -
    Pannello PrincipaleLinee Attive PannelloPannello Di CongressiControlli VoicemailVive La Chiamata
    -
    - - -

    Logout
    -
    - - -
    TRUNK HANGUP

    - Active Trunks Menu
    - Tronco Di Hangup   |   - Tronco Di Dirottamento   |   - Ascolta Il Tronco   |   - Rinfreschi   |   - Di nuovo alla finestra principale -
    -
    - - -
    HANGUP LOCALE

    - Menu Locale Attivo
    - Local Di Hangup   |   - Local Di Dirottamento   |   - Ascolta Il Local   |   - Rinfreschi   |   - Di nuovo alla finestra principale -
    -
    - - - - - - - -
    TRASFERIMENTO IN TENSIONE DI CHIAMATA
    Manica da trasferire: Manica
    Estensioni:
    Menu Di Estensioni
    -
    - Trasmetta all'estensione selezionata

    - Trasmetta alla scatola selezionata del vmail

    - _ trasmett questo numero:


    - Rinfreschi


    - Di nuovo alla finestra principale

    -
    Congressi:
    (scatti sopra un numero qui sotto per trasmettere ad un congresso)
    Trasmetta la mia scanalatura anche
    Menu Di Congressi
    -
    - - - - - -
    Manopola LOCALE Di Estensioni
    Telefono che denomina da: Manica
    Estensioni:
    Menu Di Estensioni
    -
    - Estensione selezionata chiamata

    - Scatola del vmail selezionata chiamata

    - Rinfreschi


    - Di nuovo alla finestra principale

    -
    -
    - - -
    CHIAMATE PARCHEGGIATE:
    - Di nuovo alla finestra principale

    -
    -
    - - - - - - - - - - - - - - - -
      -
    VOICEMAIL     NUOVO:     VECCHIO:             MANOPOLA MANUALE       MANOPOLA
    CHIAMATE PARCHEGGIATE: 0                ESTENSIONI LOCALI DELLA MANOPOLA
    CHIAMATE OUTBOUND:
    CHIAMATE INBOUND:
    VERSIONEE astGUIclient del fotoricettore-cliente: CONFIGURAZIONE:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    FAVORITI       pubblichi
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    FAVORITI

     
    PRESENTI I CAMBIAMENTI dei FAVORITI - richiede il termine attività
    DI NUOVO ALLA FINESTRA PRINCIPALE - ignori i cambiamenti fatti
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSA | INIZIO     La velocità di rinfrescamento: 1000 ms Più velocemente | Più lento

    -
    Inizializzazione..
    -
    Estensioni Attive
    -RINFRESCHI | -ORDINE | -
    Linee Esterne
    -RINFRESCHI | -ORDINE | -
    Estensioni Locali
    -RINFRESCHI | -ORDINE | -
    - I Dati Vanno Qui

    -
    - I Dati Vanno Qui

    Azione Del Tronco -
    - I Dati Vanno Qui

    Azione Locale -
    -
    - - - - -
    - - -Lista Di Congressi - - - -
    -Scatti sopra un numero di stanza di congresso a sinistra per l'Info su -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_it/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc_it/call_log_display.php deleted file mode 100644 index cc1556c0..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Esposizione Del Ceppo Di Chiamata"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten è non valido o protocollo $protocol è non valido\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_it/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_it/conf_exten_check.php deleted file mode 100644 index ceecdb82..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Controllo Di Estensione Di Conf"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten è non valido\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Condizione: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ManicaA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ManicaA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ManicaA[$counter] ~"; - # echo "$ManicaA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten è non valido or Exten $exten è non valido\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Congresso $conf_exten è stato registrato a $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_it/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc_it/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc_it/inbound_popup.php b/agc_2-X/trunk/LANG_agc/agc_it/inbound_popup.php deleted file mode 100644 index dc270cdd..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/inbound_popup.php +++ /dev/null @@ -1,348 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -CHIAMATA INBOUND IN TENSIONE"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    CHIAMATA INBOUND IN TENSIONE

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid è non valido\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Manica: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Manica=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "ABITUDINE - \n"; - - echo "
    Il Numero Ha composto: $row[8]
    Note: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "HANGUP - \n"; - echo "TRASMETTA AL MIO VOICEMAIL\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_it/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_it/live_exten_check.php deleted file mode 100644 index 857a5afa..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Controllo In tensione Di Estensione"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten è non valido o protocollo $protocol è non valido\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ManicaA[$loop_count] = "$row[0]"; - $ManicaB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $ManicaA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_it/manager_send.php b/agc_2-X/trunk/LANG_agc/agc_it/manager_send.php deleted file mode 100644 index 4f552da2..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Il Responsabile Trasmette: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AIUTO";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten è non valido or queryCID $queryCID è non valido, Originate ordine non inserito\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate ordine trasmesso per Exten $exten Manica $channel su $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nOriginateName Action non trasmesso\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nOriginateNameVmail Action non trasmesso\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten è non valido or queryCID $queryCID è non valido, Originate ordine non inserito\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate ordine trasmesso per Exten $exten Manica $channel su $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten è non valido or ext_context $ext_context or queryCID $queryCID è non valido, Hangup ordine non inserito\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Manica $channel è non valido or queryCID $queryCID è non valido, Hangup ordine non inserito\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel non è in tensione su $call_server_ip, Checking Live Manica...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Manica $channel non è in tensione su $call_server_ip, Hangup ordine non inserito $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup ordine trasmesso per Manica $channel su $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "auto_dial_level $auto_dial_level deve essere regolato\n"; - echo "campaign $campaign deve essere regolato\n"; - echo "uniqueid $uniqueid deve essere regolato\n"; - echo "lead_id $lead_id deve essere regolato\n"; - echo "\nRedirectVD Action non trasmesso\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "parkedby $parkedby deve essere regolato\n"; - echo "\nRedirectToPark Action non trasmesso\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirectFromPark Action non trasmesso\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirectName Action non trasmesso\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirectNameVmail Action non trasmesso\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "ExtraManica $extrachannel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirect Action non trasmesso\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Non può trovare il congresso vuoto su $server_ip, Redirect ordine non inserito\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Manica $channel non è in tensione su $call_server_ip, Redirect ordine non inserito\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Manica $channel non è in tensione su $server_ip, Redirect ordine non inserito\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra ordine trasmesso per Manica $channel and \nExtraManica $extrachannel\n to $exten su $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra ordine trasmesso per Manica $channel su $call_server_ip and \nExtraManica $extrachannel\n to $exten su $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirect Action non trasmesso\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Manica $channel non è in tensione su $server_ip, Redirect ordine non inserito\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect ordine trasmesso per Manica $channel su $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Manica $channel è non valido or queryCID $queryCID è non valido or filename: $filename è non valido, $ACTION ordine non inserito\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Manica $channel non è in tensione su $server_ip, $ACTION ordine non inserito\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION ordine trasmesso per Manica $channel su $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Manica $channel è non valido or exten $exten è non valido or filename: $filename è non valido, $ACTION ordine non inserito\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going su in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION ordine trasmesso per Manica $channel su $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n LA REGISTRAZIONE DURERÀ FINO A 60 MINUTI\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_it/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc_it/park_calls_display.php deleted file mode 100644 index 75c0a25f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Esposizione Parcheggiata Di Chiamate"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten è non valido o protocollo $protocol è non valido\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_it/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc_it/vdc_db_query.php deleted file mode 100644 index ea28cf72..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Scritto Di Domanda Della Base di dati"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Scelta Del Gruppo $closer_choice è non valido\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Scelta Del Gruppo $closer_choice è stato registrato all'utente $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "TRAMOGGIA VUOTA\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context è non valido\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC NUMERO\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCHIAMATA - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "TRAMOGGIA VUOTA\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context è non valido\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCHIAMATA - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CHIAMATA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context è non valido\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID è non valido\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "CEPPO 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 valido\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inserito: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "CEPPO NON INSERITO\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CHIAMATA_LOG Inserito: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "CEPPO NON INSERITO\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "CEPPO NON INSERITO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id è non valido\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "CEPPO NON INSERITO\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campagna $campaign è non valido\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCHIAMATA in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCHIAMATA - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCHIAMATA - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCHIAMATA - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send su to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If CHIAMATABK, change vicidial_callback record to INACTIVE - if ($dispo == 'CHIAMATABK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user su $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten è non valido\n"; - exit; - } -else - { - ##### Insert a TERMINE record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','TERMINE','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation su the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id è non valido\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CHIAMATABACK ENTRY - if ( ($dispo_choice == 'CBHVECCHIO') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' è stato cambiato a ' . $dispo_choice . " Condizione\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id è non valido\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id le informazioni sono state aggiornate\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage è non valido\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' è ora nella condizione ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list è non valido\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_it/vicidial.php b/agc_2-X/trunk/LANG_agc/agc_it/vicidial.php deleted file mode 100644 index a6b51ad1..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "Ora avete annotato fuori. Grazie\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -#$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of secondi for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "Web client di VICIMANOPOLA: Re-Inizio attività\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Italiano
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Re-Inizio attività
     
    Inizio attività Del Telefono:
    Parola d'accesso Del Telefono:
    Inizio attività Dell'Utente:
    Parola d'accesso Dell'Utente:
    Campagna: $camp_form_code

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "Web client di VICIMANOPOLA: Inizio attività Di Campagna\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Italiano
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    Inizio attività Dell'Utente

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Inizio attività Di Campagna
     
    Inizio attività Dell'Utente:
    Parola d'accesso Dell'Utente:
    Campagna: $camp_form_code

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "Web client di VICIMANOPOLA: Inizio attività\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Italiano
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Inizio attività
     
    Inizio attività Del Telefono:
    Parola d'accesso Del Telefono:
    Inizio attività Dell'Utente:
    Parola d'accesso Dell'Utente:
    Campagna: $camp_form_code

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "Web client di VICIMANOPOLA: Inizio attività Del Telefono\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Italiano
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Inizio attività Del Telefono
     
    Inizio attività Del Telefono:
    Parola d'accesso Del Telefono:

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_secondi=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La campagna non attiva, prova prego ancora
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "L'inizio attività errato, prova prego ancora
    "; - } - } - if ($VDloginDISPLAY) - { - echo "Web client di VICIMANOPOLA: Inizio attività Di Campagna\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Italiano
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Inizio attività Di Campagna
     
    Inizio attività Dell'Utente:
    Parola d'accesso Dell'Utente:
    Campagna: $camp_form_code

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "Web client di VICIMANOPOLA: Inizio attività Del Telefono Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Italiano
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Inizio attività Error
     
    Spiacente, il vostri inizio attività del telefono e parola d'accesso:
     
    Inizio attività Del Telefono:
    Parola d'accesso Del Telefono:

    VERSIONE: $version       CONFIGURAZIONE: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "Web client di VICIMANOPOLA\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed su this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login su phone: $SIP_user alla campagna: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NUOVO record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "Web client di VICIMANOPOLA: VICIMANOPOLA Inizio attività Di Campagna\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Italiano
    \n"; - echo "Spiacenti, non ci sono cavi nella tramoggia per questa campagna\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Inizio attività: \n
    "; - echo "Parola d'accesso:
    \n"; - echo "Campagna: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "Web client di VICIMANOPOLA: VICIMANOPOLA Inizio attività Di Campagna\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Italiano
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Inizio attività: \n
    "; - echo "Parola d'accesso:
    \n"; - echo "Campagna: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -TERMINE\n"; ?> -
    -
    - - - - - - - - -
    VICIMANOPOLASCRIPT   LIVE     ID di sessione: Vive La Chiamata
    -
    - - - - -

    VICIMANOPOLA
    -
    - - -MANOPOLA MANUALE
    -
    - - -X CHIAMATE RIPETUTE ATTIVE
    -
    - - -
    CHIAMATE RIPETUTE PER L'AGENTE :
    Scatti sopra una chiamata ripetuta qui sotto ora per denominare la parte posteriore del cliente. Se scattate sopra un'annotazione qui sotto per denominarli, sarà rimossa dalla lista. -
    -
    -
      - Rinfreschi -                 - Vada Indietro -
    -
    - - -
    NUOVO CAVO MANUALE DELLA MANOPOLA PER :

    Fornisca le informazioni qui sotto per il nuovo cavo che desiderate denominare. -
    - \n"; - } - ?> - Nota: tutti i nuovi cavi manuali della manopola entreranno nella lista 999

    - - - - - - - - - - - - - - - -
    Codice Della Manopola:   (Ciò è solitamente un 1 negli S.U.A. e nel Canada)
    Telefono Number:   (un massimo delle 10 cifre - cifre soltanto)
    Cavi Esistenti Di Ricerca:   (Questa opzione se controllato tenterà di trovare il numero di telefono nel sistema prima dell'inserimento esso come cavo nuovo)


    Se desiderate comporre un numero e farli non aggiungere come nuovo cavo, entri nel dialstring esatto quel voi desiderano denominare nel giacimento della sovrapposizione di un comando manuale della manopola qui sotto. Al hangup questa chiamata dovrete aprire le CHIAMATE in QUESTO collegamento di SESSIONE alla parte inferiore dello schermo ed appenderli in su scattandosi sul relativo collegamento della scanalatura là.
     
    Sovrapposizione di un comando manuale Della Manopola:   (le cifre soddisfano soltanto)
    -
    - Manopola Ora -                 - Vada Indietro -
    -
    - - - - -La Vostra Condizione:
    Calls Dialing: -
    - - - - - -
    - - Trasferimento - Congresso
    - PIÙ VICINO INTERNO - LOCAL PIÙ VICINO - CODE - Linea Di Xfer Di Hangup - Hangup Entrambe le Linee - -
    - - Numero da denominare   - secondi   - channel - - OVERRIDE   - D1 - D2 -
    - - Manopola Con Il Cliente - Manopola Del Cliente Del Parco - CHIAMATA DI PERMESSO 3-WAY - Trasferimento Dei Ciechi Della Manopola - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Cavo Dispositioned As:

    - -
    -
    -
    - - - - - - - -
    Chiavi Calde Di Disposizione: - Una volta attivo, premi semplicemente la chiave di tastiera per la:
    - - - - - -
    -
    - - -
    Nessuno è nella vostra sessione:
    - Vada Indietro -

    - Agente Di Chiamata Ancora -
    -
    - - -
    Il cliente ha appeso in su:
    - Vada Indietro -

    - Rivestimento e chiamata di disposizione - -
    -
    - - -
    Chiamata Wrapup: secondi restanti nel wrapup

    - -

    - Rivestimento Wrapup e pass - -
    -
    - - -

    TERMINE
    -
    - - -
    -
    - - -
     
    -
    - - -
    Tutti i cambiamenti fatti al cliente che le informazioni qui sotto attualmente non saranno comitted, voi devono cambiare le informazioni del cliente prima di voi hangup la chiamata.
    -
    - - -
    CHIAMATA DI DISPOSIZIONE :       Hangup Ancora       minimizzi
    - Estremità-de-denomini La Selezione Di Disposizione -
    - SMETTA DI DENOMINARE
    - RISISTEMAZIONE | - PRESENTI -

    - WEB FORM PRESENTI -

      -
    -
    - - - -
    Selezioni una data di chiamata ripetuta :
    - - - Selezioni una data qui sotto   -     - Hour: -   - Minutes: -   - -  
    - LA MIA CHIAMATA RIPETUTA SOLTANTO
    ";} - ?> - Osservazioni dei CB:

    - - PRESENTI

    - -

      -
    -
    - - -
    SELEZIONE DI GRUPPO INBOUND PIÙ VICINA
    - Selezione Di Gruppo Inbound Più vicina -
    - CHIAMATA MESCOLATA(outbound attivato)
    - RISISTEMAZIONE | - PRESENTI -



      -
    -
    - - - - Manica - Manica - LA MIA CHIAMATA RIPETUTA SOLTANTO
    ";} - ?> -
    - - - - - - - -
    TRASFERIMENTO IN TENSIONE DI CHIAMATA
    Manica da trasferire: Manica
    Estensioni:
    Menu Di Estensioni
    -
    - Trasmetta all'estensione selezionata

    - Trasmetta alla scatola selezionata del vmail

    - _ trasmett questo numero:


    - RINFRESCHI


    - Di nuovo alla finestra principale

    -
    Congressi:
    (scatti sopra un numero qui sotto per trasmettere ad un congresso)
    Trasmetta la mia scanalatura anche
    Menu Di Congressi
    -
    - - - - -
    VICIMANOPOLA SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    CONDIZIONE:
    -
    -Numero Seguente Della Manopola
    - PREVISIONE DEL CAVO
    - ALT DEL TELEFONO
    - - -LIMA DI REGISTRAZIONE:
    -
    -
    -IDENTIFICAZIONE ANNOTAZIONE:
    -
    - -Inizi A registrare
    -
    -Forma Di Fotoricettore
    -
    -Chiamata Del Parco
    -Trasferimento - Congresso
    -
    -Cliente Di Hangup
    -
    -Trasmetta DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    secondi:   Manica:   Tempo Di Cust:
    Le Informazioni Del Cliente:
    Titolo:   In primo luogo:   Mi:  Ultimo:
    Indirizzo1:
    Indirizzo2:   Indirizzo3:
    Città:   Dichiari:   PostCode:
    Provincia:   Identificazione Del Fornitore:
    Telefono:   DialCode:   Alt. Telefono:
    Esposizione:   Email:
    Osservazioni:
    - -
    -


      - -
    - - - - -
    Versione del fotoricettore-cliente di VICIMANOPOLA:     CONFIGURAZIONE:               Assistente:              
    -Mostri le informazioni della scanalatura di chiamata di congresso
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -CHIAVI CALDE INATTIVE - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_it/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc_it/voicemail_check.php deleted file mode 100644 index 4910d435..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_it/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Controllo Di Voicemail"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "scatola del voicemail $vmail_box è non valido\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/active_list_refresh.php b/agc_2-X/trunk/LANG_agc/agc_pt/active_list_refresh.php deleted file mode 100644 index 11e2d444..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/active_list_refresh.php +++ /dev/null @@ -1,463 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.7'; -$build = '60421-1155'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Exposição Da Lista: "; -if ($ADD==1) {echo "Extensões Vivas";} -if ($ADD==2) {echo "Extensões Ocupadas";} -if ($ADD==3) {echo "Linhas Exteriores";} -if ($ADD==4) {echo "Extensões Locais";} -if ($ADD==5) {echo "Conferências";} -if ($ADD==99999) {echo "AJUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/astguiclient.php b/agc_2-X/trunk/LANG_agc/agc_pt/astguiclient.php deleted file mode 100644 index d222bbd0..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/astguiclient.php +++ /dev/null @@ -1,2890 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.11'; -$build = '60421-1043'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Você tem registrado agora para fora. Obrigado\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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 "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Português
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Início de uma sessão
     
    Início de uma sessão Do Usuário:
    Senha Do Usuário:
    Início de uma sessão Do Telefone:
    Senha Do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICISELETOR|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICISELETOR|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client astGUIclient: Início de uma sessão Do Telefone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Português
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Início de uma sessão Do Telefone
     
    Início de uma sessão Do Telefone:
    Senha Do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client astGUIclient: Início de uma sessão Do Telefone\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Português
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Início de uma sessão Do Telefone
     
    Pesaroso, seus início de uma sessão do telefone e senha não seja:
     
    Início de uma sessão Do Telefone:
    Senha Do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client astGUIclient\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -LOGOUT
    \n"; ?> -
    Painel PrincipalLinhas Ativas PainelPainel Das ConferênciasVerifique VoicemailVive A Chamada
    -
    - - -

    Logout
    -
    - - -
    TRUNK HANGUP

    - Active Trunks Menu
    - Tronco Do Hangup   |   - Tronco Do Hijack   |   - Escuta O Tronco   |   - Refresque   |   - Para trás à janela principal -
    -
    - - -
    HANGUP LOCAL

    - Menu Local Ativo
    - Local Do Hangup   |   - Local Do Hijack   |   - Escuta O Local   |   - Refresque   |   - Para trás à janela principal -
    -
    - - - - - - - -
    TRANSFERÊNCIA VIVA DA CHAMADA
    Canaleta a ser transferida: Canaleta
    Extensões:
    Menu Das Extensões
    -
    - Emita à extensão selecionada

    - Emita à caixa selecionada do vmail

    - Emita a este número:


    - Refresque


    - Para trás à janela principal

    -
    Conferências:
    (estale sobre um número abaixo para emitir a uma conferência)
    Emita minha canaleta demasiado
    Menu Das Conferências
    -
    - - - - - -
    Seletor LOCAL Das Extensões
    Telefone que chama-se de: Canaleta
    Extensões:
    Menu Das Extensões
    -
    - Extensão selecionada chamada

    - Caixa selecionada chamada do vmail

    - Refresque


    - Para trás à janela principal

    -
    -
    - - -
    CHAMADAS ESTACIONADAS:
    - Para trás à janela principal

    -
    -
    - - - - - - - - - - - - - - - -
      -
    VOICEMAIL     NOVO:     VELHO:             SELETOR MANUAL       SELETOR
    CHAMADAS ESTACIONADAS: 0                EXTENSÕES LOCAIS DO SELETOR
    CHAMADAS OUTBOUND :
    CHAMADAS INBOUND:
    VERSÃO astGUIclient do correia-cliente: CONFIGURAÇÃO:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    FAVORITOS       edite
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    FAVORITOS

     
    SUBMETA MUDANÇAS dos FAVORITOS - requer o logout
    PARA TRÃS À JANELA PRINCIPAL - ignore as mudanças feitas
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSA | COMEÇO     Refresque a taxa: 1000 ms Mais rapidamente | Mais lento

    -
    Inicializar..
    -
    Extensões Ativas
    -REFRESQUE | -ORDEM | -
    Linhas Exteriores
    -REFRESQUE | -ORDEM | -
    Extensões Locais
    -REFRESQUE | -ORDEM | -
    - Os Dados Vão Aqui

    -
    - Os Dados Vão Aqui

    Ação Do Tronco -
    - Os Dados Vão Aqui

    Ação Local -
    -
    - - - - -
    - - -Lista Das Conferências - - - -
    -Estale sobre um número de quarto da conferência na esquerda para o -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/call_log_display.php b/agc_2-X/trunk/LANG_agc/agc_pt/call_log_display.php deleted file mode 100644 index 5da9fe51..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/call_log_display.php +++ /dev/null @@ -1,192 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.7'; -$build = '60421-1401'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Exposição Do Registro Da Chamada"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten é inválido ou protocolo $protocol é inválido\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/conf_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_pt/conf_exten_check.php deleted file mode 100644 index 51b67358..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/conf_exten_check.php +++ /dev/null @@ -1,258 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.8'; -$build = '60421-1405'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificação Da Extensão De Conf"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten é inválido\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanaletaA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanaletaA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$CanaletaA[$counter] ~"; - # echo "$CanaletaA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten é inválido or Exten $exten é inválido\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conferência $conf_exten foi registado a $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/dbconnect.php b/agc_2-X/trunk/LANG_agc/agc_pt/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/inbound_popup.php b/agc_2-X/trunk/LANG_agc/agc_pt/inbound_popup.php deleted file mode 100644 index 16abb2a8..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/inbound_popup.php +++ /dev/null @@ -1,348 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60421-1043'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -CHAMADA INBOUND VIVA"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    CHAMADA INBOUND VIVA

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid é inválido\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Canaleta: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Canaleta=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "COSTUME - \n"; - - echo "
    O Número Marcou: $row[8]
    Notas: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "HANGUP - \n"; - echo "EMITA A MEU VOICEMAIL\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/live_exten_check.php b/agc_2-X/trunk/LANG_agc/agc_pt/live_exten_check.php deleted file mode 100644 index ef528784..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/live_exten_check.php +++ /dev/null @@ -1,273 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.11'; -$build = '60421-1359'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificação Viva Da Extensão"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten é inválido ou protocolo $protocol é inválido\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $CanaletaA[$loop_count] = "$row[0]"; - $CanaletaB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $CanaletaA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/manager_send.php b/agc_2-X/trunk/LANG_agc/agc_pt/manager_send.php deleted file mode 100644 index a1309814..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/manager_send.php +++ /dev/null @@ -1,903 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.23'; -$build = '60421-1413'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "O Gerente Emite: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AJUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten é inválido or queryCID $queryCID é inválido, Originate comando não introduzido\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando emitido para Exten $exten Canaleta $channel em $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nOriginateName Action não emitido\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nOriginateNameVmail Action não emitido\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten é inválido or queryCID $queryCID é inválido, Originate comando não introduzido\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando emitido para Exten $exten Canaleta $channel em $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten é inválido or ext_context $ext_context or queryCID $queryCID é inválido, Hangup comando não introduzido\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Canaleta $channel é inválido or queryCID $queryCID é inválido, Hangup comando não introduzido\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel não está vivo em $call_server_ip, Checking Live Canaleta...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Canaleta $channel não está vivo em $call_server_ip, Hangup comando não introduzido $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup comando emitido para Canaleta $channel em $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "auto_dial_level $auto_dial_level deve ser ajustado\n"; - echo "campaign $campaign deve ser ajustado\n"; - echo "uniqueid $uniqueid deve ser ajustado\n"; - echo "lead_id $lead_id deve ser ajustado\n"; - echo "\nRedirectVD Action não emitido\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "parkedby $parkedby deve ser ajustado\n"; - echo "\nRedirectToPark Action não emitido\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirectFromPark Action não emitido\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirectName Action não emitido\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirectNameVmail Action não emitido\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "ExtraCanaleta $extrachannel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirect Action não emitido\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Não pode encontrar a conferência vazia em $server_ip, Redirect comando não introduzido\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Canaleta $channel não está vivo em $call_server_ip, Redirect comando não introduzido\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Canaleta $channel não está vivo em $server_ip, Redirect comando não introduzido\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando emitido para Canaleta $channel and \nExtraCanaleta $extrachannel\n to $exten em $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando emitido para Canaleta $channel em $call_server_ip and \nExtraCanaleta $extrachannel\n to $exten em $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirect Action não emitido\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canaleta $channel não está vivo em $server_ip, Redirect comando não introduzido\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect comando emitido para Canaleta $channel em $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canaleta $channel é inválido or queryCID $queryCID é inválido or filename: $filename é inválido, $ACTION comando não introduzido\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canaleta $channel não está vivo em $server_ip, $ACTION comando não introduzido\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION comando emitido para Canaleta $channel em $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canaleta $channel é inválido or exten $exten é inválido or filename: $filename é inválido, $ACTION comando não introduzido\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going em in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION comando emitido para Canaleta $channel em $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n A GRAVAÇÃO DURARà ATÉ 60 MINUTOS\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/park_calls_display.php b/agc_2-X/trunk/LANG_agc/agc_pt/park_calls_display.php deleted file mode 100644 index 620cff28..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/park_calls_display.php +++ /dev/null @@ -1,142 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.3'; -$build = '60421-1111'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Exposição Estacionada Das Chamadas"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten é inválido ou protocolo $protocol é inválido\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/vdc_db_query.php b/agc_2-X/trunk/LANG_agc/agc_pt/vdc_db_query.php deleted file mode 100644 index db511ca0..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Certificado Da Pergunta Da Base de dados"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Escolha Do Grupo $closer_choice é inválido\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Escolha Do Grupo $closer_choice foi registado ao usuário $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "FUNIL VAZIO\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context é inválido\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC NÚMERO\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "FUNIL VAZIO\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context é inválido\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CHAMADA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context é inválido\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID é inválido\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "REGISTRO NÃO ENTRADO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign é inválido\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Introduzido: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "REGISTRO NÃO ENTRADO\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CHAMADA_LOG Introduzido: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "REGISTRO NÃO ENTRADO\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "REGISTRO NÃO ENTRADO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id é inválido\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "REGISTRO NÃO ENTRADO\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campanha $campaign é inválido\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCHAMADA in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCHAMADA - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCHAMADA - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send em to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If CHAMADABK, change vicidial_callback record to INACTIVE - if ($dispo == 'CHAMADABK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user em $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten é inválido\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation em the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id é inválido\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CHAMADABACK ENTRY - if ( ($dispo_choice == 'CBHVELHO') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' foi mudado a ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id é inválido\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id a informação foi atualizada\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage é inválido\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' está agora no status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list é inválido\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/vicidial.php b/agc_2-X/trunk/LANG_agc/agc_pt/vicidial.php deleted file mode 100644 index 5f6c2a90..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "Você tem registrado agora para fora. Obrigado\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -#$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of segundos for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "Web client de VICISELETOR: Re-Início de uma sessão\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Português
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Re-Início de uma sessão
     
    Início de uma sessão Do Telefone:
    Senha Do Telefone:
    Início de uma sessão Do Usuário:
    Senha Do Usuário:
    Campanha: $camp_form_code

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "Web client de VICISELETOR: Início de uma sessão Da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Português
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    Início de uma sessão Do Usuário

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Início de uma sessão Da Campanha
     
    Início de uma sessão Do Usuário:
    Senha Do Usuário:
    Campanha: $camp_form_code

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "Web client de VICISELETOR: Início de uma sessão\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Português
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Início de uma sessão
     
    Início de uma sessão Do Telefone:
    Senha Do Telefone:
    Início de uma sessão Do Usuário:
    Senha Do Usuário:
    Campanha: $camp_form_code

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "Web client de VICISELETOR: Início de uma sessão Do Telefone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "
    English Português
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Início de uma sessão Do Telefone
     
    Início de uma sessão Do Telefone:
    Senha Do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_segundos=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "A campanha nao ativa, tenta por favor outra vez
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "O início de uma sessão incorreto, tenta por favor outra vez
    "; - } - } - if ($VDloginDISPLAY) - { - echo "Web client de VICISELETOR: Início de uma sessão Da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Português
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Início de uma sessão Da Campanha
     
    Início de uma sessão Do Usuário:
    Senha Do Usuário:
    Campanha: $camp_form_code

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "Web client de VICISELETOR: Início de uma sessão Do Telefone Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Português
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Início de uma sessão Error
     
    Pesaroso, seus início de uma sessão do telefone e senha não seja:
     
    Início de uma sessão Do Telefone:
    Senha Do Telefone:

    VERSÃO: $version       CONFIGURAÇÃO: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "Web client de VICISELETOR\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed em this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login em phone: $SIP_user à campanha: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NOVO record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "Web client de VICISELETOR: VICISELETOR Início de uma sessão Da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Português
    \n"; - echo "Pesaroso, não há nenhuma ligação no funil para esta campanha\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Início de uma sessão: \n
    "; - echo "Senha:
    \n"; - echo "Campanha: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "Web client de VICISELETOR: VICISELETOR Início de uma sessão Da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n"; echo "
    English Português
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Início de uma sessão: \n
    "; - echo "Senha:
    \n"; - echo "Campanha: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -LOGOUT\n"; ?> -
    -
    - - - - - - - - -
    VICISELETORSCRIPT   LIVE     sessão ID: Vive A Chamada
    -
    - - - - -

    VICISELETOR
    -
    - - -SELETOR MANUAL
    -
    - - -X RECHAMADAS ATIVAS
    -
    - - -
    RECHAMADAS PARA O AGENTE :
    Estale sobre uma rechamada abaixo para chamar agora a parte traseira do cliente. Se você estalar sobre um registro abaixo para o chamar, estará removido da lista. -
    -
    -
      - Refresque -                 - Vá Para trás -
    -
    - - -
    LIGAÇÃO MANUAL NOVA DO SELETOR PARA :

    Incorpore a informação abaixo para a ligação que nova você deseja se chamar. -
    - \n"; - } - ?> - Nota: todas as ligações manuais novas do seletor entrarão na lista 999

    - - - - - - - - - - - - - - - -
    Código Do Seletor:   (Este é geralmente um 1 nos EUA e no Canadá)
    Telefone Number:   (máximo de 10 dígitos - dígitos somente)
    Ligações Existentes Da Busca:   (Esta opção se verificado tentará encontrar o número de telefone no sistema antes de introduzi-lo como uma ligação nova)


    Se você quiser marcar um número e o ter não adicionado como uma ligação nova, entre no dialstring exato esse você querem chamar-se abaixo no campo da ultrapassagem do seletor. Ao hangup esta chamada você terá que abrir as CHAMADAS ncEsta ligação da SESSÃO no fundo da tela e pendurá-las acima estalando em sua ligação da canaleta lá.
     
    Ultrapassagem Do Seletor:   (os dígitos satisfazem somente)
    -
    - Seletor Agora -                 - Vá Para trás -
    -
    - - - - -Seu Status:
    Calls Dialing: -
    - - - - - -
    - - Transferência - Conferência
    - MAIS PRÓXIMO INTERNO - LOCAL MAIS PRÓXIMO - CODE - Linha De Xfer Do Hangup - Hangup Ambas as Linhas - -
    - - Número a chamar-se   - segundos   - channel - - OVERRIDE   - D1 - D2 -
    - - Seletor Com Cliente - Seletor Do Cliente Do Parque - CHAMADA DA LICENÇA 3-WAY - Transferência Da Cortina Do Seletor - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Ligação Dispositioned Como:

    - -
    -
    -
    - - - - - - - -
    Chaves Quentes Da Disposição: - Quando ativo, pressione simplesmente a chave de teclado para a:
    - - - - - -
    -
    - - -
    Noone está em sua sessão:
    - Vá Para trás -

    - Agente Da Chamada Outra vez -
    -
    - - -
    O cliente pendurou acima:
    - Vá Para trás -

    - Revestimento e chamada da disposição - -
    -
    - - -
    Chamada Wrapup: segundos restantes no wrapup

    - -

    - Revestimento Wrapup e movimento sobre - -
    -
    - - -

    LOGOUT
    -
    - - -
    -
    - - -
     
    -
    - - -
    Todas as mudanças feitas ao cliente que a informação abaixo neste tempo não será comitted, você devem mudar a informação do cliente antes de você hangup a chamada.
    -
    - - -
    CHAMADA DA DISPOSIÇÃO :       Hangup Outra vez       minimize
    - Extremidade-$$$-CHAME A Seleção Da Disposição -
    - PARE DE CHAMAR-SE
    - RESTAURAÇÃO | - SUBMETA -

    - WEB FORM SUBMETA -

      -
    -
    - - - -
    Selecione uma data da rechamada :
    - - - Selecione uma data abaixo   -     - Hour: -   - Minutes: -   - -  
    - MINHA RECHAMADA SOMENTE
    ";} - ?> - Comentários dos CB:

    - - SUBMETA

    - -

      -
    -
    - - -
    SELEÇÃO DE GRUPO INBOUND MAIS PRÓXIMA
    - Seleção De Grupo Inbound Mais próxima -
    - CHAMADA MISTURADA(outbound ativado)
    - RESTAURAÇÃO | - SUBMETA -



      -
    -
    - - - - Canaleta - Canaleta - MINHA RECHAMADA SOMENTE
    ";} - ?> -
    - - - - - - - -
    TRANSFERÊNCIA VIVA DA CHAMADA
    Canaleta a ser transferida: Canaleta
    Extensões:
    Menu Das Extensões
    -
    - Emita à extensão selecionada

    - Emita à caixa selecionada do vmail

    - Emita a este número:


    - REFRESQUE


    - Para trás à janela principal

    -
    Conferências:
    (estale sobre um número abaixo para emitir a uma conferência)
    Emita minha canaleta demasiado
    Menu Das Conferências
    -
    - - - - -
    VICISELETOR SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    STATUS:
    -
    -Número Seguinte Do Seletor
    - INSPECÇÃO PRÉVIA DA LIGAÇÃO
    - ALT DO TELEFONE
    - - -LIMA DE GRAVAÇÃO:
    -
    -
    -ID REGISTRO:
    -
    - -Comece Gravar
    -
    -Formulário Da Correia fotorreceptora
    -
    -Chamada Do Parque
    -Transferência - Conferência
    -
    -Cliente Do Hangup
    -
    -Emita DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    segundos:   Canaleta:   Tempo De Cust:
    Informação Do Cliente:
    Título:   Primeiramente:   Mi:  Último:
    Endereço1:
    Endereço2:   Endereço3:
    Cidade:   Estado:   PostCode:
    Província:   Vendedor Id:
    Telefone:   DialCode:   Alt. Telefone:
    Mostra:   Email:
    Comentários:
    - -
    -


      - -
    - - - - -
    Versão do correia-cliente de VICISELETOR:     CONFIGURAÇÃO:               Usuário:              
    -Mostre a informação da canaleta da chamada de conferência
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -CHAVES QUENTES INATIVAS - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/LANG_agc/agc_pt/voicemail_check.php b/agc_2-X/trunk/LANG_agc/agc_pt/voicemail_check.php deleted file mode 100644 index b12b1a83..00000000 --- a/agc_2-X/trunk/LANG_agc/agc_pt/voicemail_check.php +++ /dev/null @@ -1,136 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.4'; -$build = '60421-1147'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificação De Voicemail"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "caixa do voicemail $vmail_box é inválido\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/DBI-scripts/AST_VDhopper.pl b/agc_2-X/trunk/Net-MySQL_scripts/AST_VDhopper.pl similarity index 60% rename from agc_2-X/trunk/DBI-scripts/AST_VDhopper.pl rename to agc_2-X/trunk/Net-MySQL_scripts/AST_VDhopper.pl index 414bdded..ab55395c 100644 --- a/agc_2-X/trunk/DBI-scripts/AST_VDhopper.pl +++ b/agc_2-X/trunk/Net-MySQL_scripts/AST_VDhopper.pl @@ -1,10 +1,9 @@ #!/usr/bin/perl # -# AST_VDhopper.pl version 0.10 -# *** DBI version *** +# AST_VDhopper.pl version 0.9 # # DESCRIPTION: -# uses DBD::MySQL to update the VICIDIAL leads hopper for the streamlined +# uses Net::MySQL to update the VICIDIAL leads hopper for the new streamlined # approach of allocating leads to client machines. # # SUMMARY: @@ -75,7 +74,7 @@ if (length($ARGV[0])>1) if ($args =~ /--help/i) { - print "allowed run time options(must stay in this order):\n [--debug] = debug\n [--debugX] = super debug\n [--dbgmt] = show GMT offset of records as they are inserted into hopper\n [-t] = test\n [--level=XXX] = force a hopper_level of XXX\n [--campaign=XXX] = run for campaign XXX only\n\n"; + print "allowed run time options(must stay in this order):\n [--debug] = debug\n [--debugX] = super debug\n [--dbgmt] = show GMT offset of records as they are inserted into hopper\n [-t] = test\n [--level=XXX] = force a hopper_level of XXX\n [--campaign=XXX] = run for campaign XXX only\n\n"; } else { @@ -133,20 +132,28 @@ require("/home/cron/AST_SERVER_conf.pl"); # local configuration file if (!$DB_port) {$DB_port='3306';} -use DBI; +sleep(1); ### sleep for 5 seconds to stagger cron script load -$dbhA = DBI->connect("DBI:mysql:$DB_database:$DB_server:$DB_port", "$DB_user", "$DB_pass") - or die "Couldn't connect to database: " . DBI->errstr; +#use lib './lib', '../lib'; +use Net::MySQL; + + my $dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") + or die "Couldn't connect to database: $DB_server - $DB_database\n"; ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; -$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; -$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; -@aryA = $sthA->fetchrow_array; -$DBSERVER_GMT = $aryA[0]; -if (length($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} -$sthA->finish(); +$dbhA->query("$stmtA"); +if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $DBSERVER_GMT = "$record->[0]"; + if (length($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} + } + } + $secX = time(); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secX); @@ -154,6 +161,7 @@ $secX = time(); $LOCAL_GMT_OFF_STD = $SERVER_GMT; if ($isdst) {$LOCAL_GMT_OFF++;} + $GMT_now = ($secX - ($LOCAL_GMT_OFF * 3600)); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($GMT_now); $mon++; @@ -164,93 +172,105 @@ $GMT_now = ($secX - ($LOCAL_GMT_OFF * 3600)); if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} + if ($DB) {print "TIME DEBUG: $LOCAL_GMT_OFF_STD|$LOCAL_GMT_OFF|$isdst| GMT: $hour:$min\n";} if ($wipe_hopper_clean) { $stmtA = "DELETE from $vicidial_hopper;"; - $affected_rows = $dbhA->do($stmtA); + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; if ($DB) {print "Hopper Wiped Clean: $affected_rows\n";} $event_string = "|HOPPER WIPE CLEAN|"; &event_logger; exit; } + ### Delete leads from inactive lists if there are any $stmtA = "SELECT * FROM vicidial_lists where active='N';"; if ($DB) {print $stmtA;} $inactive_lists=''; $inactive_lists_count=0; -$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; -$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; -$sthArows=$sthA->rows; -while ($sthArows > $inactive_lists_count) - { - @aryA = $sthA->fetchrow_array; - $inactive_list = $aryA[0]; - $inactive_lists .= "'$inactive_list',"; - $inactive_lists_count++; - } -$sthA->finish(); +$dbhA->query("$stmtA"); +if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $inactive_list = $record->[0]; + $inactive_lists .= "'$inactive_list',"; + $inactive_lists_count++; + } + } if ($DB) {print "Inactive Lists: $inactive_lists_count\n";} if ($inactive_lists_count > 0) { chop($inactive_lists); $stmtA = "DELETE from $vicidial_hopper where list_id IN($inactive_lists);"; - $affected_rows = $dbhA->do($stmtA); + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; if ($DB) {print "Inactive List Leads Deleted: $affected_rows |$stmtA|\n";} $event_string = "|INACTIVE LIST DEL|$affected_rows|"; &event_logger; } + ### BEGIN Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed $stmtA = "SELECT count(*) FROM vicidial_callbacks where callback_time <= '$now_date' and status='ACTIVE';"; -$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; -$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; -@aryA = $sthA->fetchrow_array; -$CBHOLD_count = $aryA[0]; +$dbhA->query("$stmtA"); +if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $CBHOLD_count = "$record->[0]"; + } + } + if ($DB) {print "CALLBACK HOLD: $CBHOLD_count|$stmtA|\n";} -$sthA->finish(); if ($CBHOLD_count > 0) { $update_leads=''; - $cbc=0; - $cba=0; $stmtA = "SELECT vicidial_callbacks.lead_id,recipient,campaign_id,vicidial_callbacks.list_id,gmt_offset_now FROM vicidial_callbacks,vicidial_list where callback_time <= '$now_date' and vicidial_callbacks.status='ACTIVE' and vicidial_callbacks.lead_id=vicidial_list.lead_id;"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - while ($sthArows > $cbc) + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $lead_ids[$cbc] = $aryA[0]; - $recipient = $aryA[1]; - $update_leads .= "'$lead_ids[$cbc]',"; - if ($recipient == 'ANYONE') + $iter=$dbhA->create_record_iterator; + $cbc=0; + $cba=0; + while ( $record = $iter->each) { - $CA_lead_id[$cba] = $aryA[0]; - $CA_campaign_id[$cba] = $aryA[2]; - $CA_list_id[$cba] = $aryA[3]; - $CA_gmt_offset_now[$cba] = $aryA[4]; - $cba++; + $lead_ids[$cbc] = $record->[0]; + $recipient = $record->[1]; + $update_leads .= "'$lead_ids[$cbc]',"; + if ($recipient == 'ANYONE') + { + $CA_lead_id[$cba] = $record->[0]; + $CA_campaign_id[$cba] = $record->[2]; + $CA_list_id[$cba] = $record->[3]; + $CA_gmt_offset_now[$cba] = $record->[4]; + $cba++; + } + $cbc++; } - $cbc++; } - $sthA->finish(); if ($cbc > 0) { chop($update_leads); $stmtA = "UPDATE vicidial_list set status='CALLBK', called_since_last_reset='N' where lead_id IN($update_leads);"; - $affected_rows = $dbhA->do($stmtA); + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; if ($DB) {print "Scheduled Callbacks Activated: $affected_rows\n";} $event_string = "|CALLBACKS LISTACT|$affected_rows|"; &event_logger; $stmtA = "UPDATE vicidial_callbacks set status='LIVE' where lead_id IN($update_leads);"; - $affected_rows = $dbhA->do($stmtA); + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; if ($DB) {print "Scheduled Callbacks Activated: $affected_rows\n";} $event_string = "|CALLBACKS CB ACT |$affected_rows|"; &event_logger; @@ -259,15 +279,14 @@ if ($CBHOLD_count > 0) ### INSERT ANYONE CALLBACKS INTO HOPPER DIRECTLY ### if ( ($cba > 0) && ($insert_auto_CB_to_hopper) ) { - if ($DB) {print "ANYONE Scheduled Callbacks to Insert into hopper: $cba\n";} + if ($DB) {print "ANYONE Scheduled Callbacks Inserted into hopper: $cba\n";} $event_string = "|ANYONE CB HOPPER |$cba|"; &event_logger; $CAu=0; foreach(@CA_lead_id) { $stmtA = "INSERT INTO $vicidial_hopper SET lead_id='$CA_lead_id[$CAu]',campaign_id='$CA_campaign_id[$CAu]',list_id='$CA_list_id[$CAu]',gmt_offset_now='$CA_gmt_offset_now[$CAu]';"; - $affected_rows = $dbhA->do($stmtA); - if ($DB) {print "ANYONE Scheduled Callback Inserted into hopper: $affected_rows|$CA_lead_id[$CAu]\n";} + $dbhA->query("$stmtA"); $CAu++; } } @@ -275,6 +294,7 @@ if ($CBHOLD_count > 0) ### END Change CBHOLD status leads to CALLBK if their vicidial_callbacks time has passed + @campaign_id=@MT; if ($CLIcampaign) @@ -285,37 +305,48 @@ else { $stmtA = "SELECT * from vicidial_campaigns where active='Y'"; } -$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; -$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; -$sthArows=$sthA->rows; -$rec_count=0; -while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $campaign_id[$rec_count] = "$aryA[0]"; - $dial_status_a[$rec_count] = "$aryA[3]"; - $dial_status_b[$rec_count] = "$aryA[4]"; - $dial_status_c[$rec_count] = "$aryA[5]"; - $dial_status_d[$rec_count] = "$aryA[6]"; - $dial_status_e[$rec_count] = "$aryA[7]"; - $lead_order[$rec_count] = "$aryA[8]"; - if (!$CLIlevel) - {$hopper_level[$rec_count] = "$aryA[13]";} - else - {$hopper_level[$rec_count] = "$CLIlevel";} - $local_call_time[$rec_count] = "$aryA[16]"; - $lead_filter_id[$rec_count] = "$aryA[35]"; - $use_internal_dnc[$rec_count] = "$aryA[43]"; - $rec_count++; - } -$sthA->finish(); -if ($DB) {print "CAMPAIGNS TO PROCESSES HOPPER FOR: $rec_count|$#campaign_id\n";} +$dbhA->query("$stmtA"); +if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $rec_count=0; + while ( $record = $iter->each) + { + $campaign_id[$rec_count] = "$record->[0]"; + $dial_status_a[$rec_count] = "$record->[3]"; + $dial_status_b[$rec_count] = "$record->[4]"; + $dial_status_c[$rec_count] = "$record->[5]"; + $dial_status_d[$rec_count] = "$record->[6]"; + $dial_status_e[$rec_count] = "$record->[7]"; + $lead_order[$rec_count] = "$record->[8]"; + if (!$CLIlevel) + {$hopper_level[$rec_count] = "$record->[13]";} + else + {$hopper_level[$rec_count] = "$CLIlevel";} + $local_call_time[$rec_count] = "$record->[16]"; + $lead_filter_id[$rec_count] = "$record->[35]"; + $use_internal_dnc[$rec_count] = "$record->[43]"; + $rec_count++; + } + } -##### LOOP THROUGH EACH CAMPAIGN AND PROCESS THE HOPPER ##### $i=0; foreach(@campaign_id) { + ### close out MySQL connection and re-connect to start new connection ### +# $dbhA->close(); +# my $dbhA = ''; + + ### Make sure this file is in a libs path or put the absolute path to it +# require("/home/cron/AST_SERVER_conf.pl"); # local configuration file +# if (!$DB_port) {$DB_port='3306';} +# use Net::MySQL; + +# my $dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") +# or die "Couldn't connect to database: $DB_server - $DB_database\n"; + + $VCSdialable_leads=0; $VCScalls_today=0; $VCSdrops_today=0; @@ -323,56 +354,49 @@ foreach(@campaign_id) $vicidial_log = 'vicidial_log'; $stmtA = "SELECT dialable_leads from vicidial_campaign_stats where campaign_id='$campaign_id[$i]';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $VCSdialable_leads = "$aryA[0]"; - $rec_count++; - } - $sthA->finish(); - + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $rec_count=0; + while ( $record = $iter->each) + { + $VCSdialable_leads = "$record->[0]"; + } + } $stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_date';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $VCScalls_today = "$aryA[0]"; - $rec_count++; - } - $sthA->finish(); + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $rec_count=0; + while ( $record = $iter->each) + { + $VCScalls_today = "$record->[0]"; + } + } if ($VCScalls_today > 0) { $stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_date' and status IN('DROP','XDROP');"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $VCSdrops_today = "$aryA[0]"; - if ($VCSdrops_today > 0) + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $rec_count=0; + while ( $record = $iter->each) { - $VCSdrops_today_pct = ( ($VCSdrops_today / $VCScalls_today) * 100 ); - $VCSdrops_today_pct = sprintf("%.2f", $VCSdrops_today_pct); + $VCSdrops_today = "$record->[0]"; + if ($VCSdrops_today > 0) + { + $VCSdrops_today_pct = ( ($VCSdrops_today / $VCScalls_today) * 100 ); + $VCSdrops_today_pct = sprintf("%.2f", $VCSdrops_today_pct); + } } - $rec_count++; - } - $sthA->finish(); + } } - - $stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today',drops_today='$VCSdrops_today',drops_today_pct='$VCSdrops_today_pct' where campaign_id='$campaign_id[$i]';"; - $affected_rows = $dbhA->do($stmtA); - if ($DBX) {print "campaign stats updated: $affected_rows|$VCScalls_today|$VCSdrops_today|$VCSdrops_today_pct|$campaign_id[$i]|\n";} + $dbhA->query("$stmtA"); ##### BEGIN calculate what gmt_offset_now values are within the allowed local_call_time setting ### $g=0; @@ -398,33 +422,31 @@ foreach(@campaign_id) $stmtA = "SELECT * FROM vicidial_call_times where call_time_id='$local_call_time[$i]';"; if ($DBX) {print " |$stmtA|\n";} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $Gct_default_start = "$aryA[3]"; - $Gct_default_stop = "$aryA[4]"; - $Gct_sunday_start = "$aryA[5]"; - $Gct_sunday_stop = "$aryA[6]"; - $Gct_monday_start = "$aryA[7]"; - $Gct_monday_stop = "$aryA[8]"; - $Gct_tuesday_start = "$aryA[9]"; - $Gct_tuesday_stop = "$aryA[10]"; - $Gct_wednesday_start = "$aryA[11]"; - $Gct_wednesday_stop = "$aryA[12]"; - $Gct_thursday_start = "$aryA[13]"; - $Gct_thursday_stop = "$aryA[14]"; - $Gct_friday_start = "$aryA[15]"; - $Gct_friday_stop = "$aryA[16]"; - $Gct_saturday_start = "$aryA[17]"; - $Gct_saturday_stop = "$aryA[18]"; - $Gct_state_call_times = "$aryA[19]"; - $rec_count++; + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $Gct_default_start = "$record->[3]"; + $Gct_default_stop = "$record->[4]"; + $Gct_sunday_start = "$record->[5]"; + $Gct_sunday_stop = "$record->[6]"; + $Gct_monday_start = "$record->[7]"; + $Gct_monday_stop = "$record->[8]"; + $Gct_tuesday_start = "$record->[9]"; + $Gct_tuesday_stop = "$record->[10]"; + $Gct_wednesday_start = "$record->[11]"; + $Gct_wednesday_stop = "$record->[12]"; + $Gct_thursday_start = "$record->[13]"; + $Gct_thursday_stop = "$record->[14]"; + $Gct_friday_start = "$record->[15]"; + $Gct_friday_stop = "$record->[16]"; + $Gct_saturday_start = "$record->[17]"; + $Gct_saturday_stop = "$record->[18]"; + $Gct_state_call_times = "$record->[19]"; + } } - $sthA->finish(); $ct_states = ''; $ct_state_gmt_SQL = ''; @@ -442,35 +464,33 @@ foreach(@campaign_id) { $stmtA = "SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; if ($DBX) {print " |$stmtA|\n";} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $Gstate_call_time_id = "$aryA[0]"; - $Gstate_call_time_state = "$aryA[1]"; - $Gsct_default_start = "$aryA[4]"; - $Gsct_default_stop = "$aryA[5]"; - $Gsct_sunday_start = "$aryA[6]"; - $Gsct_sunday_stop = "$aryA[7]"; - $Gsct_monday_start = "$aryA[8]"; - $Gsct_monday_stop = "$aryA[9]"; - $Gsct_tuesday_start = "$aryA[10]"; - $Gsct_tuesday_stop = "$aryA[11]"; - $Gsct_wednesday_start = "$aryA[12]"; - $Gsct_wednesday_stop = "$aryA[13]"; - $Gsct_thursday_start = "$aryA[14]"; - $Gsct_thursday_stop = "$aryA[15]"; - $Gsct_friday_start = "$aryA[16]"; - $Gsct_friday_stop = "$aryA[17]"; - $Gsct_saturday_start = "$aryA[18]"; - $Gsct_saturday_stop = "$aryA[19]"; - $ct_states .="'$Gstate_call_time_state',"; - $rec_count++; + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $Gstate_call_time_id = "$record->[0]"; + $Gstate_call_time_state = "$record->[1]"; + $Gsct_default_start = "$record->[4]"; + $Gsct_default_stop = "$record->[5]"; + $Gsct_sunday_start = "$record->[6]"; + $Gsct_sunday_stop = "$record->[7]"; + $Gsct_monday_start = "$record->[8]"; + $Gsct_monday_stop = "$record->[9]"; + $Gsct_tuesday_start = "$record->[10]"; + $Gsct_tuesday_stop = "$record->[11]"; + $Gsct_wednesday_start = "$record->[12]"; + $Gsct_wednesday_stop = "$record->[13]"; + $Gsct_thursday_start = "$record->[14]"; + $Gsct_thursday_stop = "$record->[15]"; + $Gsct_friday_start = "$record->[16]"; + $Gsct_friday_stop = "$record->[17]"; + $Gsct_saturday_start = "$record->[18]"; + $Gsct_saturday_stop = "$record->[19]"; + $ct_states .="'$Gstate_call_time_state',"; + } } - $sthA->finish(); $r=0; $state_gmt=''; @@ -753,23 +773,23 @@ foreach(@campaign_id) ##### BEGIN lead recycling parsing and prep ### $stmtA = "SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id[$i]' and active='Y';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - @recycle_status=@MT; - @recycle_delay=@MT; - @recycle_maximum=@MT; - @RSQLdate=@MT; + $dbhA->query("$stmtA"); $rec_ct=0; - while ($sthArows > $rec_ct) + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $recycle_status[$rec_ct] = "$aryA[2]"; - $recycle_delay[$rec_ct] = "$aryA[3]"; - $recycle_maximum[$rec_ct] = "$aryA[4]"; - $rec_ct++; + @recycle_status=@MT; + @recycle_delay=@MT; + @recycle_maximum=@MT; + @RSQLdate=@MT; + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $recycle_status[$rec_ct] = $record->[2]; + $recycle_delay[$rec_ct] = $record->[3]; + $recycle_maximum[$rec_ct] = $record->[4]; + $rec_ct++; + } } - $sthA->finish(); if ($rec_ct > 0) { @@ -814,34 +834,36 @@ foreach(@campaign_id) ### Delete the DONE leads if there are any $stmtA = "DELETE from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('DONE');"; - $affected_rows = $dbhA->do($stmtA); + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; if ($DB) {print " hopper DONE cleared: $affected_rows\n";} if ($DBX) {print " |$stmtA|\n";} ### Delete the leads that are out of GMT time range if there are any $stmtA = "DELETE from $vicidial_hopper where campaign_id='$campaign_id[$i]' and ($del_gmtSQL);"; - $affected_rows = $dbhA->do($stmtA); + $dbhA->query("$stmtA"); + my $affected_rows = $dbhA->get_affected_rows_length; if ($DB) {print " hopper GMT BAD cleared: $affected_rows\n";} if ($DBX) {print " |$stmtA|\n";} ### Find out how many leads are in the hopper from a specific campaign $hopper_ready_count=0; $stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status='READY';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $hopper_ready_count = $aryA[0]; - if ($DB) {print " hopper READY count: $hopper_ready_count\n";} - if ($DBX) {print " |$stmtA|\n";} - $rec_count++; + $iter=$dbhA->create_record_iterator; + $rec_countA=0; + while ( $record = $iter->each) + { + $hopper_ready_count = $record->[0]; + if ($DB) {print " hopper READY count: $hopper_ready_count\n";} + if ($DBX) {print " |$stmtA|\n";} + $rec_countA++; + } } - $sthA->finish(); - $event_string = "|$campaign_id[$i]|$hopper_level[$i]|$hopper_ready_count|$local_call_time[$i]||"; - &event_logger; + $event_string = "|$campaign_id[$i]|$hopper_level[$i]|$hopper_ready_count|$local_call_time[$i]||"; + &event_logger; ##### IF hopper level is below set minimum, then try to add more leads ##### if ($hopper_ready_count < $hopper_level[$i]) @@ -850,21 +872,19 @@ foreach(@campaign_id) ### Get list of the lists in the campaign ### $stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$campaign_id[$i]' and active='Y';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_countLISTS=0; - $camp_lists = ''; - while ($sthArows > $rec_countLISTS) + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $camp_lists .= "'$aryA[0]',"; - $rec_countLISTS++; + $iter=$dbhA->create_record_iterator; + $rec_countLISTS=0; + $camp_lists = ''; + while ( $record = $iter->each) + { + $camp_lists .= "'$record->[0]',"; + $rec_countLISTS++; + } + chop($camp_lists); } - $sthA->finish(); - if (length($camp_lists)<3) {$camp_lists="''";} - else {chop($camp_lists);} - if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";} if ($DBX) {print " |$stmtA|\n";} @@ -872,17 +892,15 @@ foreach(@campaign_id) { ### Get SQL of lead filter for the campaign ### $stmtA = "SELECT lead_filter_sql FROM vicidial_lead_filters where lead_filter_id='$lead_filter_id[$i]';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $lead_filter_sql[$i] = "$aryA[0]"; - $rec_count++; + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $lead_filter_sql[$i] = "$record->[0]"; + } } - $sthA->finish(); $lead_filter_sql[$i] =~ s/^and|and$|^or|or$|^ and|and $|^ or|or $//gi; $lead_filter_sql[$i] = "and $lead_filter_sql[$i]"; if ($DB) {print " campaign lists count: $rec_countLISTS | $camp_lists\n";} @@ -898,36 +916,33 @@ foreach(@campaign_id) $stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and ($all_gmtSQL) $lead_filter_sql[$i];"; if ($DBX) {print " |$stmtA|\n";} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) + $dbhA->query("$stmtA"); + $campaign_leads_to_call=0; + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $campaign_leads_to_call = "$aryA[0]"; - if ($DB) {print " leads to call count: $campaign_leads_to_call\n";} - if ($DBX) {print " |$stmtA|\n";} - $rec_count++; + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $campaign_leads_to_call = "$record->[0]"; + if ($DB) {print " leads to call count: $campaign_leads_to_call\n";} + if ($DBX) {print " |$stmtA|\n";} + } } - $sthA->finish(); - if ($lead_order[$i] =~ /DOWN COUNT 2nd NEW|DOWN COUNT 3rd NEW|DOWN COUNT 4th NEW/) { $stmtA = "SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and ($all_gmtSQL) $lead_filter_sql[$i];"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) + $dbhA->query("$stmtA"); + $NEW_campaign_leads_to_call=0; + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $NEW_campaign_leads_to_call = "$aryA[0]"; - if ($DB) {print " NEW leads to call count: $NEW_campaign_leads_to_call\n";} - if ($DBX) {print " |$stmtA|\n";} - $rec_count++; + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $NEW_campaign_leads_to_call = "$record->[0]"; + if ($DB) {print " NEW leads to call count: $NEW_campaign_leads_to_call\n";} + if ($DBX) {print " |$stmtA|\n";} + } } - $sthA->finish(); } ##### IF no NEW leads to be called, error out of this campaign ##### @@ -944,8 +959,7 @@ foreach(@campaign_id) if ($VCSdialable_leads > 0) { $stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0' where campaign_id='$campaign_id[$i]';"; - $affected_rows = $dbhA->do($stmtA); - if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";} + $dbhA->query("$stmtA"); } } else @@ -953,170 +967,162 @@ foreach(@campaign_id) if ($VCSdialable_leads != $campaign_leads_to_call) { $stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='$campaign_leads_to_call' where campaign_id='$campaign_id[$i]';"; - $affected_rows = $dbhA->do($stmtA); - if ($DBX) {print "CAMPAIGN STATS: $affected_rows|$stmtA|\n";} + $dbhA->query("$stmtA"); } if ($DB) {print " Getting Leads to add to hopper\n";} ### grab leads already in hopper so we don't duplicate $stmtA = "SELECT lead_id FROM $vicidial_hopper where campaign_id='$campaign_id[$i]';"; if ($DBX) {print " |$stmtA|\n";} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; + $dbhA->query("$stmtA"); + $rec_countLISTS=0; $lead_id_lists = ''; - $rec_countLISTS=0; - while ($sthArows > $rec_countLISTS) + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - $lead_id_lists .= "'$aryA[0]',"; - $rec_countLISTS++; - } - $sthA->finish(); - $lead_id_lists .= "'0'"; - $order_stmt=''; - $NEW_count = 0; - $NEW_level = 0; - $OTHER_level = $hopper_level[$i]; - if ($lead_order[$i] eq "DOWN") {$order_stmt = 'order by lead_id asc';} - if ($lead_order[$i] eq "UP") {$order_stmt = 'order by lead_id desc';} - if ($lead_order[$i] eq "UP LAST NAME") {$order_stmt = 'order by last_name desc, lead_id asc';} - if ($lead_order[$i] eq "DOWN LAST NAME") {$order_stmt = 'order by last_name, lead_id asc';} - if ($lead_order[$i] eq "UP PHONE") {$order_stmt = 'order by phone_number desc, lead_id asc';} - if ($lead_order[$i] eq "DOWN PHONE") {$order_stmt = 'order by phone_number, lead_id asc';} - if ($lead_order[$i] eq "UP COUNT") {$order_stmt = 'order by called_count desc, lead_id asc';} - if ($lead_order[$i] eq "DOWN COUNT") {$order_stmt = 'order by called_count, lead_id asc';} - if ($lead_order[$i] eq "DOWN COUNT 2nd NEW") {$NEW_count = 2;} - if ($lead_order[$i] eq "DOWN COUNT 3rd NEW") {$NEW_count = 3;} - if ($lead_order[$i] eq "DOWN COUNT 4th NEW") {$NEW_count = 4;} - - ### BEGIN recycle grab leads ### - if ($rec_ct > 0) - { - if ($DB) {print " looking for RECYCLE leads, maximum of 100\n";} - - $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where $recycle_SQL and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] limit 100;"; - if ($DBX) {print " |$stmtA|\n";} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - if ($DB) {print " RECYCLE leads to call count: $sthArows\n";} - if ($DBX) {print " |$stmtA|\n";} - $REC_rec_countLEADS=0; - @REC_leads_to_hopper=@MT; - @REC_lists_to_hopper=@MT; - @REC_phone_to_hopper=@MT; - while ($sthArows > $REC_rec_countLEADS) + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) { - @aryA = $sthA->fetchrow_array; - $REC_leads_to_hopper[$REC_rec_countLEADS] = "$aryA[0]"; - $REC_lists_to_hopper[$REC_rec_countLEADS] = "$aryA[1]"; - $REC_gmt_to_hopper[$REC_rec_countLEADS] = "$aryA[2]"; - $REC_phone_to_hopper[$REC_rec_countLEADS] = "$aryA[3]"; - $REC_state_to_hopper[$REC_rec_countLEADS] = "$aryA[4]"; - if ($DB_show_offset) {print "LEAD_ADD: $aryA[2] $aryA[3] $aryA[4]\n";} - $REC_rec_countLEADS++; - } - $sthA->finish(); + $lead_id_lists .= "'$record->[0]',"; + $rec_countLISTS++; + } + $lead_id_lists .= "'0'"; } - ### END recycle grab leads ### + + $order_stmt=''; + $NEW_count = 0; + $NEW_level = 0; + $OTHER_level = $hopper_level[$i]; + if ($lead_order[$i] eq "DOWN") {$order_stmt = 'order by lead_id asc';} + if ($lead_order[$i] eq "UP") {$order_stmt = 'order by lead_id desc';} + if ($lead_order[$i] eq "UP LAST NAME") {$order_stmt = 'order by last_name desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN LAST NAME") {$order_stmt = 'order by last_name, lead_id asc';} + if ($lead_order[$i] eq "UP PHONE") {$order_stmt = 'order by phone_number desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN PHONE") {$order_stmt = 'order by phone_number, lead_id asc';} + if ($lead_order[$i] eq "UP COUNT") {$order_stmt = 'order by called_count desc, lead_id asc';} + if ($lead_order[$i] eq "DOWN COUNT") {$order_stmt = 'order by called_count, lead_id asc';} + if ($lead_order[$i] eq "DOWN COUNT 2nd NEW") {$NEW_count = 2;} + if ($lead_order[$i] eq "DOWN COUNT 3rd NEW") {$NEW_count = 3;} + if ($lead_order[$i] eq "DOWN COUNT 4th NEW") {$NEW_count = 4;} - - - - - - - - if ($NEW_count > 0) - { - $NEW_level = int($hopper_level[$i] / $NEW_count); - $OTHER_level = ($hopper_level[$i] - $NEW_level); - $order_stmt = 'order by called_count, lead_id asc'; - if ($DB) {print " looking for $NEW_level NEW leads mixed in with $OTHER_level other leads\n";} - - $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] $order_stmt limit $NEW_level;"; - if ($DBX) {print " |$stmtA|\n";} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $NEW_rec_countLEADS=0; - @NEW_leads_to_hopper=@MT; - @NEW_lists_to_hopper=@MT; - @NEW_phone_to_hopper=@MT; - while ($sthArows > $NEW_rec_countLEADS) + ### BEGIN recycle grab leads ### + if ($rec_ct > 0) { - @aryA = $sthA->fetchrow_array; - $NEW_leads_to_hopper[$NEW_rec_countLEADS] = "$aryA[0]"; - $NEW_lists_to_hopper[$NEW_rec_countLEADS] = "$aryA[1]"; - $NEW_gmt_to_hopper[$NEW_rec_countLEADS] = "$aryA[2]"; - $NEW_phone_to_hopper[$NEW_rec_countLEADS] = "$aryA[3]"; - $NEW_state_to_hopper[$NEW_rec_countLEADS] = "$aryA[4]"; - if ($DB_show_offset) {print "LEAD_ADD: $aryA[2] $aryA[3] $aryA[4]\n";} - $NEW_rec_countLEADS++; + if ($DB) {print " looking for RECYCLE leads, maximum of 100\n";} + + $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where $recycle_SQL and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] limit 100;"; + if ($DBX) {print " |$stmtA|\n";} + $REC_rec_countLEADS=0; + @REC_leads_to_hopper=@MT; + @REC_lists_to_hopper=@MT; + @REC_phone_to_hopper=@MT; + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + while ( $record = $iter->each) + { + $REC_leads_to_hopper[$REC_rec_countLEADS] = "$record->[0]"; + $REC_lists_to_hopper[$REC_rec_countLEADS] = "$record->[1]"; + $REC_gmt_to_hopper[$REC_rec_countLEADS] = "$record->[2]"; + $REC_phone_to_hopper[$REC_rec_countLEADS] = "$record->[3]"; + $REC_state_to_hopper[$REC_rec_countLEADS] = "$record->[4]"; + if ($DB_show_offset) {print "LEAD_ADD: $record->[2] $record->[3] $record->[4]\n";} + $REC_rec_countLEADS++; + } + } + if ($DB) {print " RECYCLE leads to call count: $REC_rec_countLEADS\n";} + if ($DBX) {print " |$stmtA|\n";} + } + ### END recycle grab leads ### + + if ($NEW_count > 0) + { + $NEW_level = int($hopper_level[$i] / $NEW_count); + $OTHER_level = ($hopper_level[$i] - $NEW_level); + $order_stmt = 'order by called_count, lead_id asc'; + if ($DB) {print " looking for $NEW_level NEW leads mixed in with $OTHER_level other leads\n";} + + $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('NEW') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] $order_stmt limit $NEW_level;"; + if ($DBX) {print " |$stmtA|\n";} + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $NEW_rec_countLEADS=0; + @NEW_leads_to_hopper=@MT; + @NEW_lists_to_hopper=@MT; + @NEW_phone_to_hopper=@MT; + while ( $record = $iter->each) + { + $NEW_leads_to_hopper[$NEW_rec_countLEADS] = "$record->[0]"; + $NEW_lists_to_hopper[$NEW_rec_countLEADS] = "$record->[1]"; + $NEW_gmt_to_hopper[$NEW_rec_countLEADS] = "$record->[2]"; + $NEW_phone_to_hopper[$NEW_rec_countLEADS] = "$record->[3]"; + $NEW_state_to_hopper[$NEW_rec_countLEADS] = "$record->[4]"; + if ($DB_show_offset) {print "LEAD_ADD: $record->[2] $record->[3] $record->[4]\n";} + $NEW_rec_countLEADS++; + } + } + } - $sthA->finish(); - } if ($DB) {print " lead call order: $order_stmt\n";} $stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a[$i]','$dial_status_b[$i]','$dial_status_c[$i]','$dial_status_d[$i]','$dial_status_e[$i]') and list_id IN($camp_lists) and lead_id NOT IN($lead_id_lists) and ($all_gmtSQL) $lead_filter_sql[$i] $order_stmt limit $OTHER_level;"; if ($DBX) {print " |$stmtA|\n";} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_countLEADS=0; $NEW_dec=99; $NEW_in=0; - @leads_to_hopper=@MT; - @lists_to_hopper=@MT; - @gmt_to_hopper=@MT; - @state_to_hopper=@MT; - @phone_to_hopper=@MT; - $rec_count=0; - $REC_insert_count=0; - while ($sthArows > $rec_count) + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) { - @aryA = $sthA->fetchrow_array; - if ( ($NEW_count > 0) && ($NEW_rec_countLEADS > $NEW_in) ) + $iter=$dbhA->create_record_iterator; + $rec_countLEADS=0; $NEW_dec=99; $NEW_in=0; + @leads_to_hopper=@MT; + @lists_to_hopper=@MT; + @gmt_to_hopper=@MT; + @state_to_hopper=@MT; + @phone_to_hopper=@MT; + while ( $record = $iter->each) { - if ($DB_show_offset) {print "NEW_COUNT: $NEW_count|$NEW_dec|$NEW_in|$NEW_rec_countLEADS\n";} - if ($NEW_count > $NEW_dec) + if ( ($NEW_count > 0) && ($NEW_rec_countLEADS > $NEW_in) ) { - $NEW_dec++; + if ($DB_show_offset) {print "NEW_COUNT: $NEW_count|$NEW_dec|$NEW_in|$NEW_rec_countLEADS\n";} + if ($NEW_count > $NEW_dec) + { + $NEW_dec++; + } + else + { + $leads_to_hopper[$rec_countLEADS] = "$NEW_leads_to_hopper[$NEW_in]"; + $lists_to_hopper[$rec_countLEADS] = "$NEW_lists_to_hopper[$NEW_in]"; + $gmt_to_hopper[$rec_countLEADS] = "$NEW_gmt_to_hopper[$NEW_in]"; + $state_to_hopper[$rec_countLEADS] = "$NEW_state_to_hopper[$NEW_in]"; + $phone_to_hopper[$rec_countLEADS] = "$NEW_phone_to_hopper[$NEW_in]"; + if ($DB_show_offset) {print "LEAD_ADD: $NEW_leads_to_hopper[$NEW_in] $NEW_phone_to_hopper[$NEW_in]\n";} + $rec_countLEADS++; + $NEW_in++; + $NEW_dec=2; + } } - else + if ($REC_rec_countLEADS > $REC_insert_count) { - $leads_to_hopper[$rec_countLEADS] = "$NEW_leads_to_hopper[$NEW_in]"; - $lists_to_hopper[$rec_countLEADS] = "$NEW_lists_to_hopper[$NEW_in]"; - $gmt_to_hopper[$rec_countLEADS] = "$NEW_gmt_to_hopper[$NEW_in]"; - $state_to_hopper[$rec_countLEADS] = "$NEW_state_to_hopper[$NEW_in]"; - $phone_to_hopper[$rec_countLEADS] = "$NEW_phone_to_hopper[$NEW_in]"; - if ($DB_show_offset) {print "LEAD_ADD: $NEW_leads_to_hopper[$NEW_in] $NEW_phone_to_hopper[$NEW_in]\n";} + $leads_to_hopper[$rec_countLEADS] = "$REC_leads_to_hopper[$REC_insert_count]"; + $lists_to_hopper[$rec_countLEADS] = "$REC_lists_to_hopper[$REC_insert_count]"; + $gmt_to_hopper[$rec_countLEADS] = "$REC_gmt_to_hopper[$REC_insert_count]"; + $state_to_hopper[$rec_countLEADS] = "$REC_state_to_hopper[$REC_insert_count]"; + $phone_to_hopper[$rec_countLEADS] = "$REC_phone_to_hopper[$REC_insert_count]"; $rec_countLEADS++; - $NEW_in++; - $NEW_dec=2; + $REC_insert_count++; } - } - if ($REC_rec_countLEADS > $REC_insert_count) - { - $leads_to_hopper[$rec_countLEADS] = "$REC_leads_to_hopper[$REC_insert_count]"; - $lists_to_hopper[$rec_countLEADS] = "$REC_lists_to_hopper[$REC_insert_count]"; - $gmt_to_hopper[$rec_countLEADS] = "$REC_gmt_to_hopper[$REC_insert_count]"; - $state_to_hopper[$rec_countLEADS] = "$REC_state_to_hopper[$REC_insert_count]"; - $phone_to_hopper[$rec_countLEADS] = "$REC_phone_to_hopper[$REC_insert_count]"; + $leads_to_hopper[$rec_countLEADS] = "$record->[0]"; + $lists_to_hopper[$rec_countLEADS] = "$record->[1]"; + $gmt_to_hopper[$rec_countLEADS] = "$record->[2]"; + $state_to_hopper[$rec_countLEADS] = "$record->[4]"; + $phone_to_hopper[$rec_countLEADS] = "$record->[3]"; + if ($DB_show_offset) {print "LEAD_ADD: $record->[2] $record->[3] $record->[4]\n";} $rec_countLEADS++; - $REC_insert_count++; - } - $leads_to_hopper[$rec_countLEADS] = "$aryA[0]"; - $lists_to_hopper[$rec_countLEADS] = "$aryA[1]"; - $gmt_to_hopper[$rec_countLEADS] = "$aryA[2]"; - $state_to_hopper[$rec_countLEADS] = "$aryA[4]"; - $phone_to_hopper[$rec_countLEADS] = "$aryA[3]"; - if ($DB_show_offset) {print "LEAD_ADD: $aryA[2] $aryA[3] $aryA[4]\n";} - $rec_countLEADS++; - $rec_count++; + } } - $sthA->finish(); - if ($DB) {print " Adding to hopper: $rec_countLEADS\n";} - $event_string = "|$campaign_id[$i]|Added to hopper $rec_countLEADS|"; - &event_logger; + + if ($DB) {print " Adding to hopper: $rec_countLEADS\n";} + $event_string = "|$campaign_id[$i]|Added to hopper $rec_countLEADS|"; + &event_logger; $h=0; foreach(@leads_to_hopper) @@ -1126,31 +1132,29 @@ foreach(@campaign_id) $DNClead=0; if ($use_internal_dnc[$i] =~ /Y/) { - if ($DB) {print " Doinbg DNC Check: $phone_to_hopper[$h] - $use_internal_dnc[$i]\n";} + if ($DB) {print " Doinbg DNC Check: $phone_to_hopper[$h]\n";} $stmtA = "SELECT count(*) from vicidial_dnc where phone_number='$phone_to_hopper[$h]';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $DNClead = "$aryA[0]"; - $rec_count++; - } - $sthA->finish(); + $dbhA->query("$stmtA"); + if ($dbhA->has_selected_record) + { + $iter=$dbhA->create_record_iterator; + $rec_count=0; + while ( $record = $iter->each) + { + $DNClead = "$record->[0]"; + } + } if ($DNClead != '0') { $stmtA = "UPDATE vicidial_list SET status='DNCL' where lead_id='$leads_to_hopper[$h]';"; - $affected_rows = $dbhA->do($stmtA); - if ($DBX) {print "Flagging DNC lead: $affected_rows $phone_to_hopper[$h]\n";} + $dbhA->query("$stmtA"); + if ($DB) {print "Flagging DNC lead: $leads_to_hopper[$h] $phone_to_hopper[$h]\n";} } } if ($DNClead == '0') { $stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state) values('$leads_to_hopper[$h]','$campaign_id[$i]','READY','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]','$state_to_hopper[$h]');"; - $affected_rows = $dbhA->do($stmtA); - if ($DBX) {print "LEAD INSERTED: $affected_rows|$leads_to_hopper[$h]|\n";} + $dbhA->query("$stmtA"); } } $h++; @@ -1165,7 +1169,7 @@ foreach(@campaign_id) } -$dbhA->disconnect(); +$dbhA->close; if($DB){print "DONE... Exiting... Goodbye... See you later... Really, I mean it :)\n";} diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_CLOSERstats.php b/agc_2-X/trunk/VICIDIAL_web/AST_CLOSERstats.php deleted file mode 100644 index b7a7bb8c..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_CLOSERstats.php +++ /dev/null @@ -1,396 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1714 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select group_id from vicidial_inbound_groups;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Closer Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "
    \n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Closer Stats                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls placed from this Campaign:        $TOTALcalls\n";
    -echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total DROP Calls:                             $DROPcalls  $DROPpercent%\n";
    -echo "Average Length for DROP Calls in seconds:     $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USER                     | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='$group';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_VDADstats.php b/agc_2-X/trunk/VICIDIAL_web/AST_VDADstats.php deleted file mode 100644 index 9ac17006..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_VDADstats.php +++ /dev/null @@ -1,417 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1718 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: VDAD Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "
    \n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Auto-dial Stats                             $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls placed from this Campaign:        $TOTALcalls\n";
    -echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total DROP Calls:                             $DROPcalls  $DROPpercent%\n";
    -echo "Average Length for DROP Calls in seconds:     $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- AUTO-DIAL NO ANSWERS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$NAcalls =	sprintf("%10s", $row[0]);
    -$NApercent = (($NAcalls / $TOTALcalls) * 100);
    -$NApercent = round($NApercent, 0);
    -
    -$average_na_seconds = ($row[1] / $row[0]);
    -$average_na_seconds = round($average_na_seconds, 0);
    -$average_na_seconds =	sprintf("%10s", $average_na_seconds);
    -
    -echo "Total NA calls -Busy,Disconnect,BTvoicemail:  $NAcalls  $NApercent%\n";
    -echo "Average Call Length for NA Calls in seconds:  $average_na_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USER                     | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/VICIDIAL_web/AST_VICIDIAL_hopperlist.php deleted file mode 100644 index 1824a939..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_VICIDIAL_hopperlist.php +++ /dev/null @@ -1,161 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1654 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.10.15';} - -$stmt="select campaign_id,campaign_name from vicidial_campaigns order by campaign_id;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $campaign_id[$i] =$row[0]; - $campaign_name[$i] =$row[1]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Hopper List\n"; -echo "
    \n"; -#echo "\n"; -#echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY \n"; -echo "
    \n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A CAMPAIGN ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Live Current Hopper List                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -
    -echo "Total leads in hopper right now:       $TOTALcalls\n";
    -
    -
    -##############################
    -#########  LEAD STATS
    -
    -echo "\n";
    -echo "---------- LEADS IN HOPPER\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$FMT_i =		sprintf("%-4s", $i);
    -	$lead_id =		sprintf("%-9s", $row[0]);
    -	$phone_number =	sprintf("%-10s", $row[1]);
    -	$state =		sprintf("%-5s", $row[2]);
    -	$status =		sprintf("%-6s", $row[3]);
    -	$count =		sprintf("%-5s", $row[4]);
    -	$gmt =			sprintf("%-6s", $row[5]);
    -
    -	echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+------+-----------+------------+-------+--------+-------+--------+\n";
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_admin_log_display.php b/agc_2-X/trunk/VICIDIAL_web/AST_admin_log_display.php deleted file mode 100644 index b5286873..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_admin_log_display.php +++ /dev/null @@ -1,118 +0,0 @@ - LICENSE: GPLv2 -### - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$query_date = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$query_date); - -# AST GUI database administration -# AST_admin_log_display.php -# -# CHANGES -# 50325-0932 - First build -# 51123-1443 - removed globals=on requirement -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1044 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '0.0.4'; -$build = '60620-1044'; - -$STARTtime = date("U"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN LOG DISPLAY"; -echo "\n"; - -# Fri, 25 Mar 2005 - -$DAY_DATE = date("j"); -if ($DAY_DATE < 10) -# {$GREP_DATE = date("D, j M Y");} - {$GREP_DATE = date("D, 0j M Y");} -else - {$GREP_DATE = date("D, j M Y");} - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!$query_date) {$query_date = $GREP_DATE;} - -$Gquery_date = eregi_replace(" ",'\ ',$query_date); -echo "\n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n\n"; - -echo "
    \n\n";
    -
    -
    -echo "VICIDIAL ADMIN CHANGE LOG                             $NOW_TIME\n";
    -
    -#passthru("grep $Gquery_date /home/www/htdocs/vicidial/admin_changes_log.txt");
    -passthru("grep $Gquery_date $WeBServeRRooT/vicidial/admin_changes_log.txt");
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_agent_performance.php b/agc_2-X/trunk/VICIDIAL_web/AST_agent_performance.php deleted file mode 100644 index a489bc7d..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_agent_performance.php +++ /dev/null @@ -1,232 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1711 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["shift"])) {$shift=$_GET["shift"];} - elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($group)) {$group = '';} -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select campaign_id from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$campaigns_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $campaigns_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Agent Performance\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "
    \n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:33:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:33:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:33:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:33:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TALK   | TALKAVG| A    | B    | DC   | DNC  | N    | NI   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='" . mysql_real_escape_string($group) . "' group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
    -echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_agent_performance_detail.php b/agc_2-X/trunk/VICIDIAL_web/AST_agent_performance_detail.php
    deleted file mode 100644
    index 2dd3dc5e..00000000
    --- a/agc_2-X/trunk/VICIDIAL_web/AST_agent_performance_detail.php
    +++ /dev/null
    @@ -1,406 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1712 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["shift"]))				{$shift=$_GET["shift"];}
    -	elseif (isset($_POST["shift"]))		{$shift=$_POST["shift"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($group)) {$group = '';}
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -$stmt="select campaign_id from vicidial_campaigns;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$campaigns_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $campaigns_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Performance\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "
    \n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 03:45:00";   
    -	$query_date_END = "$query_date 15:15:00";
    -	$time_BEGIN = "03:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:15:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Agent Performance Detail                        $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENTS Details -------------\n\n";
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "| USER NAME       | ID     | CALLS  | TIME   | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG| A    | B    | DC   | DNC  | N    | NI   | CB   | SALE |\n";
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by full_name order by calls desc limit 1000;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$TOTcalls=($TOTcalls + $row[0]);
    -	$TOTtime=($TOTtime + $row[1] + $row[5] + $row[7] + $row[9]);
    -	$TOTtotTALK=($TOTtotTALK + $row[1]);
    -	$TOTtotWAIT=($TOTtotWAIT + $row[7]);
    -	$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
    -	$TOTtotDISPO=($TOTtotDISPO + $row[9]);
    -	$calls[$i] =	sprintf("%-6s", $row[0]);
    -	$full_name[$i]=	sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
    -	$user[$i] =		sprintf("%-6s", $row[3]);
    -	$USERtime =	($row[1] + $row[5] + $row[7] + $row[9]);
    -	$USERtotTALK =	$row[1];
    -	$USERavgTALK =	$row[4];
    -	$USERtotPAUSE =	$row[5];
    -	$USERavgPAUSE =	$row[6];
    -	$USERtotWAIT =	$row[7];
    -	$USERavgWAIT =	$row[8];
    -	$USERtotDISPO =	$row[9];
    -	$USERavgDISPO =	$row[10];
    -
    -	$USERtime_M = ($USERtime / 60);
    -	$USERtime_M = round($USERtime_M, 2);
    -	$USERtime_M_int = intval("$USERtime_M");
    -	$USERtime_S = ($USERtime_M - $USERtime_M_int);
    -	$USERtime_S = ($USERtime_S * 60);
    -	$USERtime_S = round($USERtime_S, 0);
    -	if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
    -	$USERtime_MS = "$USERtime_M_int:$USERtime_S";
    -	$pfUSERtime_MS[$i] =		sprintf("%7s", $USERtime_MS);
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	$USERtotPAUSE_M = ($USERtotPAUSE / 60);
    -	$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
    -	$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
    -	$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
    -	$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
    -	$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
    -	if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
    -	$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
    -	$pfUSERtotPAUSE_MS[$i] =		sprintf("%6s", $USERtotPAUSE_MS);
    -
    -	$USERavgPAUSE_M = ($USERavgPAUSE / 60);
    -	$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
    -	$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
    -	$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
    -	$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
    -	$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
    -	if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
    -	$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
    -	$pfUSERavgPAUSE_MS[$i] =		sprintf("%6s", $USERavgPAUSE_MS);
    -
    -	$USERtotWAIT_M = ($USERtotWAIT / 60);
    -	$USERtotWAIT_M = round($USERtotWAIT_M, 2);
    -	$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
    -	$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
    -	$USERtotWAIT_S = ($USERtotWAIT_S * 60);
    -	$USERtotWAIT_S = round($USERtotWAIT_S, 0);
    -	if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
    -	$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
    -	$pfUSERtotWAIT_MS[$i] =		sprintf("%6s", $USERtotWAIT_MS);
    -
    -	$USERavgWAIT_M = ($USERavgWAIT / 60);
    -	$USERavgWAIT_M = round($USERavgWAIT_M, 2);
    -	$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
    -	$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
    -	$USERavgWAIT_S = ($USERavgWAIT_S * 60);
    -	$USERavgWAIT_S = round($USERavgWAIT_S, 0);
    -	if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
    -	$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
    -	$pfUSERavgWAIT_MS[$i] =		sprintf("%6s", $USERavgWAIT_MS);
    -	
    -	$USERtotDISPO_M = ($USERtotDISPO / 60);
    -	$USERtotDISPO_M = round($USERtotDISPO_M, 2);
    -	$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
    -	$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
    -	$USERtotDISPO_S = ($USERtotDISPO_S * 60);
    -	$USERtotDISPO_S = round($USERtotDISPO_S, 0);
    -	if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
    -	$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
    -	$pfUSERtotDISPO_MS[$i] =		sprintf("%6s", $USERtotDISPO_MS);
    -
    -	$USERavgDISPO_M = ($USERavgDISPO / 60);
    -	$USERavgDISPO_M = round($USERavgDISPO_M, 2);
    -	$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
    -	$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
    -	$USERavgDISPO_S = ($USERavgDISPO_S * 60);
    -	$USERavgDISPO_S = round($USERavgDISPO_S, 0);
    -	if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
    -	$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
    -	$pfUSERavgDISPO_MS[$i] =		sprintf("%6s", $USERavgDISPO_MS);
    -
    -	$i++;
    -	}
    -
    -$k=0;
    -while($k < $i)
    -	{
    -	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; $ctCB[$k]="0   "; 
    -	$stmt="select count(*),status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$rows_to_print = mysql_num_rows($rslt);
    -	$m=0;
    -	while ($m < $rows_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]);		$TOT_A = ($TOT_A + $row[0]);}
    -		if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]);		$TOT_B = ($TOT_B + $row[0]);}
    -		if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]);	$TOT_DC = ($TOT_DC + $row[0]);}
    -		if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]);	$TOT_DNC = ($TOT_DNC + $row[0]);}
    -		if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]);		$TOT_N = ($TOT_N + $row[0]);}
    -		if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]);	$TOT_NI = ($TOT_NI + $row[0]);}
    -		if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
    -		if (($row[1] == 'CALLBK') || ($row[1] == 'CBHOLD') ) {$ctCB[$k]=sprintf("%-4s", $row[0]);	$TOT_CB = ($TOT_CB + $row[0]);}
    -		$m++;
    -		}
    -	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtime_MS[$k]| $pfUSERtotPAUSE_MS[$k] | $pfUSERavgPAUSE_MS[$k] | $pfUSERtotWAIT_MS[$k] | $pfUSERavgWAIT_MS[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $pfUSERtotDISPO_MS[$k] | $pfUSERavgDISPO_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctCB[$k] | $ctSALE[$k] |\n";
    -
    -
    -
    -	$k++;
    -	}
    -
    -	$TOTcalls =	sprintf("%-7s", $TOTcalls);
    -
    -	$TOTtime_M = ($TOTtime / 60);
    -	$TOTtime_M = round($TOTtime_M, 2);
    -	$TOTtime_M_int = intval("$TOTtime_M");
    -	$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
    -	$TOTtime_S = ($TOTtime_S * 60);
    -	$TOTtime_S = round($TOTtime_S, 0);
    -	if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
    -	$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
    -	$TOTtime_MS =		sprintf("%7s", $TOTtime_MS);
    -		while(strlen($TOTtime_MS)>7) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
    -
    -	$TOTtotTALK_M = ($TOTtotTALK / 60);
    -	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
    -	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
    -	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
    -	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
    -	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
    -	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
    -	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
    -	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
    -		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
    -
    -	$TOTtotDISPO_M = ($TOTtotDISPO / 60);
    -	$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
    -	$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
    -	$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
    -	$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
    -	$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
    -	if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
    -	$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
    -	$TOTtotDISPO_MS =		sprintf("%7s", $TOTtotDISPO_MS);
    -		while(strlen($TOTtotDISPO_MS)>7) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
    -
    -	$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
    -	$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
    -	$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
    -	$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
    -	$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
    -	if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
    -	$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
    -	$TOTtotPAUSE_MS =		sprintf("%7s", $TOTtotPAUSE_MS);
    -		while(strlen($TOTtotPAUSE_MS)>7) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
    -
    -	$TOTtotWAIT_M = ($TOTtotWAIT / 60);
    -	$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
    -	$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
    -	$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
    -	$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
    -	$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
    -	if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
    -	$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
    -	$TOTtotWAIT_MS =		sprintf("%7s", $TOTtotWAIT_MS);
    -		while(strlen($TOTtotWAIT_MS)>7) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
    -
    -
    -	$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
    -	$TOTavgTALK_M = round($TOTavgTALK_M, 2);
    -	$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
    -	$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
    -	$TOTavgTALK_S = ($TOTavgTALK_S * 60);
    -	$TOTavgTALK_S = round($TOTavgTALK_S, 0);
    -	if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
    -	$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
    -	$TOTavgTALK_MS =		sprintf("%6s", $TOTavgTALK_MS);
    -		while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
    -
    -	$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
    -	$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
    -	$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
    -	$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
    -	$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
    -	$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
    -	if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
    -	$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
    -	$TOTavgDISPO_MS =		sprintf("%6s", $TOTavgDISPO_MS);
    -		while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
    -
    -	$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
    -	$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
    -	$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
    -	$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
    -	$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
    -	if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
    -	$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
    -	$TOTavgPAUSE_MS =		sprintf("%6s", $TOTavgPAUSE_MS);
    -		while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
    -
    -	$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
    -	$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
    -	$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
    -	$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
    -	$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
    -	$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
    -	if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
    -	$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
    -	$TOTavgWAIT_MS =		sprintf("%6s", $TOTavgWAIT_MS);
    -		while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
    -
    -	
    -	$TOT_A = sprintf("%-5s", $TOT_A);
    -	$TOT_B = sprintf("%-5s", $TOT_B);
    -	$TOT_DC = sprintf("%-5s", $TOT_DC);
    -	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
    -	$TOT_N = sprintf("%-5s", $TOT_N);
    -	$TOT_NI = sprintf("%-5s", $TOT_NI);
    -	$TOT_CB = sprintf("%-5s", $TOT_CB);
    -	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
    -
    -echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -echo "|  TOTALS                  | $TOTcalls| $TOTtime_MS| $TOTtotPAUSE_MS| $TOTavgPAUSE_MS | $TOTtotWAIT_MS| $TOTavgWAIT_MS | $TOTtotTALK_MS| $TOTavgTALK_MS | $TOTtotDISPO_MS| $TOTavgDISPO_MS | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_CB| $TOT_SALE|\n";
    -echo "+--------------------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
    -
    -echo "\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_agent_time_sheet.php b/agc_2-X/trunk/VICIDIAL_web/AST_agent_time_sheet.php
    deleted file mode 100644
    index 46659eb6..00000000
    --- a/agc_2-X/trunk/VICIDIAL_web/AST_agent_time_sheet.php
    +++ /dev/null
    @@ -1,281 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1729 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
    -	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
    -	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Time Sheet\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n\n"; - -echo "
    \n";
    -
    -
    -if (!$agent)
    -{
    -echo "\n";
    -echo "PLEASE SELECT AN AGENT ID AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from available agent log data\n";
    -}
    -
    -else
    -{
    -$query_date_BEGIN = "$query_date 00:00:00";   
    -$query_date_END = "$query_date 23:59:59";
    -$time_BEGIN = "00:00:00";   
    -$time_END = "23:59:59";
    -
    -$stmt="select full_name from vicidial_users where user='$agent';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$full_name = $row[0];
    -
    -echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENT TIME SHEET: $agent - $full_name -------------\n\n";
    -
    -if ($calls_summary)
    -	{
    -	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -
    -	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
    -
    -		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
    -		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
    -		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
    -		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
    -		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
    -		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
    -		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
    -		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
    -		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
    -		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
    -		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
    -		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
    -		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
    -		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
    -
    -		$TALK_TIME_H = ($row[1] / 3600);
    -		$TALK_TIME_H = round($TALK_TIME_H, 2);
    -		$TALK_TIME_H_int = intval("$TALK_TIME_H");
    -		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
    -		$TALK_TIME_M = ($TALK_TIME_M * 60);
    -		$TALK_TIME_M = round($TALK_TIME_M, 2);
    -		$TALK_TIME_M_int = intval("$TALK_TIME_M");
    -		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
    -		$TALK_TIME_S = ($TALK_TIME_S * 60);
    -		$TALK_TIME_S = round($TALK_TIME_S, 0);
    -		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
    -		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
    -		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
    -		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
    -
    -		$PAUSE_TIME_H = ($row[3] / 3600);
    -		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
    -		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
    -		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
    -		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
    -		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
    -		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
    -		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
    -		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
    -		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
    -		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
    -		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
    -		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
    -		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
    -
    -		$WAIT_TIME_H = ($row[5] / 3600);
    -		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
    -		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
    -		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
    -		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
    -		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
    -		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
    -		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
    -		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
    -		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
    -		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
    -		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
    -		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
    -		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
    -
    -		$WRAPUP_TIME_H = ($row[7] / 3600);
    -		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
    -		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
    -		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
    -		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
    -		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
    -		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
    -		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
    -		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
    -		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
    -
    -		$TALK_AVG_M = ($row[2] / 60);
    -		$TALK_AVG_M = round($TALK_AVG_M, 2);
    -		$TALK_AVG_M_int = intval("$TALK_AVG_M");
    -		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
    -		$TALK_AVG_S = ($TALK_AVG_S * 60);
    -		$TALK_AVG_S = round($TALK_AVG_S, 0);
    -		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
    -		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
    -		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
    -
    -		$PAUSE_AVG_M = ($row[4] / 60);
    -		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
    -		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
    -		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
    -		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
    -		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
    -		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
    -		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
    -		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
    -
    -		$WAIT_AVG_M = ($row[6] / 60);
    -		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
    -		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
    -		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
    -		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
    -		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
    -		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
    -		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
    -		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
    -
    -		$WRAPUP_AVG_M = ($row[8] / 60);
    -		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
    -		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
    -		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
    -		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
    -		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
    -		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
    -
    -	echo "TOTAL CALLS TAKEN: $row[0]\n";
    -	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
    -	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
    -	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
    -	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
    -	echo "----------------------------------------------------------------\n";
    -	echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
    -
    -	echo "\n";
    -	}
    -else
    -	{
    -	echo "Call Activity Summary\n\n";
    -
    -	}
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "FIRST LOGIN:          $row[0]\n";
    -$start = $row[1];
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "LAST LOG ACTIVITY:    $row[0]\n";
    -$end = $row[1];
    -
    -$login_time = ($end - $start);
    -	$LOGIN_TIME_H = ($login_time / 3600);
    -	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
    -	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
    -	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
    -	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
    -	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
    -	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
    -	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
    -	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
    -	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
    -	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
    -	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
    -	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
    -	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
    -
    -echo "-----------------------------------------\n";
    -echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_agent_time_sheet_archive.php b/agc_2-X/trunk/VICIDIAL_web/AST_agent_time_sheet_archive.php
    deleted file mode 100644
    index f14eca16..00000000
    --- a/agc_2-X/trunk/VICIDIAL_web/AST_agent_time_sheet_archive.php
    +++ /dev/null
    @@ -1,281 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1721 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
    -	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
    -	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Agent Time Sheet\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n\n"; - -echo "
    \n";
    -
    -
    -if (!$agent)
    -{
    -echo "\n";
    -echo "PLEASE SELECT AN AGENT ID AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from available agent log data\n";
    -}
    -
    -else
    -{
    -$query_date_BEGIN = "$query_date 00:00:00";   
    -$query_date_END = "$query_date 23:59:59";
    -$time_BEGIN = "00:00:00";   
    -$time_END = "23:59:59";
    -
    -$stmt="select full_name from vicidial_users where user='$agent';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$full_name = $row[0];
    -
    -echo "VICIDIAL: Agent Time Sheet                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- AGENT TIME SHEET: $agent - $full_name -------------\n\n";
    -
    -if ($calls_summary)
    -	{
    -	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log_archive where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -
    -	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
    -
    -		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
    -		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
    -		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
    -		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
    -		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
    -		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
    -		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
    -		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
    -		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
    -		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
    -		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
    -		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
    -		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
    -		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
    -
    -		$TALK_TIME_H = ($row[1] / 3600);
    -		$TALK_TIME_H = round($TALK_TIME_H, 2);
    -		$TALK_TIME_H_int = intval("$TALK_TIME_H");
    -		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
    -		$TALK_TIME_M = ($TALK_TIME_M * 60);
    -		$TALK_TIME_M = round($TALK_TIME_M, 2);
    -		$TALK_TIME_M_int = intval("$TALK_TIME_M");
    -		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
    -		$TALK_TIME_S = ($TALK_TIME_S * 60);
    -		$TALK_TIME_S = round($TALK_TIME_S, 0);
    -		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
    -		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
    -		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
    -		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
    -
    -		$PAUSE_TIME_H = ($row[3] / 3600);
    -		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
    -		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
    -		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
    -		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
    -		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
    -		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
    -		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
    -		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
    -		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
    -		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
    -		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
    -		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
    -		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
    -
    -		$WAIT_TIME_H = ($row[5] / 3600);
    -		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
    -		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
    -		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
    -		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
    -		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
    -		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
    -		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
    -		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
    -		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
    -		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
    -		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
    -		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
    -		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
    -
    -		$WRAPUP_TIME_H = ($row[7] / 3600);
    -		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
    -		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
    -		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
    -		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
    -		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
    -		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
    -		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
    -		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
    -		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
    -		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
    -		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
    -
    -		$TALK_AVG_M = ($row[2] / 60);
    -		$TALK_AVG_M = round($TALK_AVG_M, 2);
    -		$TALK_AVG_M_int = intval("$TALK_AVG_M");
    -		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
    -		$TALK_AVG_S = ($TALK_AVG_S * 60);
    -		$TALK_AVG_S = round($TALK_AVG_S, 0);
    -		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
    -		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
    -		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
    -
    -		$PAUSE_AVG_M = ($row[4] / 60);
    -		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
    -		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
    -		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
    -		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
    -		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
    -		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
    -		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
    -		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
    -
    -		$WAIT_AVG_M = ($row[6] / 60);
    -		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
    -		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
    -		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
    -		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
    -		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
    -		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
    -		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
    -		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
    -
    -		$WRAPUP_AVG_M = ($row[8] / 60);
    -		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
    -		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
    -		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
    -		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
    -		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
    -		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
    -		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
    -
    -	echo "TOTAL CALLS TAKEN: $row[0]\n";
    -	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
    -	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
    -	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
    -	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
    -	echo "----------------------------------------------------------------\n";
    -	echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
    -
    -	echo "\n";
    -	}
    -else
    -	{
    -	echo "Call Activity Summary\n\n";
    -
    -	}
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log_archive where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "FIRST LOGIN:          $row[0]\n";
    -$start = $row[1];
    -
    -$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log_archive where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -echo "LAST LOG ACTIVITY:    $row[0]\n";
    -$end = $row[1];
    -
    -$login_time = ($end - $start);
    -	$LOGIN_TIME_H = ($login_time / 3600);
    -	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
    -	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
    -	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
    -	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
    -	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
    -	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
    -	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
    -	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
    -	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
    -	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
    -	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
    -	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
    -	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
    -
    -echo "-----------------------------------------\n";
    -echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
    -
    -}
    -
    -
    -
    -?>
    -
    -
    \ No newline at end of file
    diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_parkstats.php b/agc_2-X/trunk/VICIDIAL_web/AST_parkstats.php
    deleted file mode 100644
    index eef768ca..00000000
    --- a/agc_2-X/trunk/VICIDIAL_web/AST_parkstats.php
    +++ /dev/null
    @@ -1,396 +0,0 @@
    -    LICENSE: GPLv2
    -###
    -# CHANGES
    -#
    -# 60619-1717 - Added variable filtering to eliminate SQL injection attack threat
    -#            - Added required user/pass to gain access to this page
    -#
    -
    -require("dbconnect.php");
    -
    -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
    -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
    -$PHP_SELF=$_SERVER['PHP_SELF'];
    -if (isset($_GET["group"]))				{$group=$_GET["group"];}
    -	elseif (isset($_POST["group"]))		{$group=$_POST["group"];}
    -if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
    -	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
    -if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
    -	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
    -if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
    -	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
    -
    -$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 > 6;";
    -	if ($DB) {echo "|$stmt|\n";}
    -	$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))
    -	{
    -    Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
    -    Header("HTTP/1.0 401 Unauthorized");
    -    echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
    -    exit;
    -	}
    -
    -$NOW_DATE = date("Y-m-d");
    -$NOW_TIME = date("Y-m-d H:i:s");
    -$STARTtime = date("U");
    -if (!isset($group)) {$group = '';}
    -if (!isset($query_date)) {$query_date = $NOW_DATE;}
    -
    -$stmt="select distinct channel_group from park_log;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$groups_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $groups_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$groups[$i] =$row[0];
    -	$i++;
    -	}
    -?>
    -
    -
    -
    -
    -
    -\n";
    -echo "VICIDIAL: Park Stats\n";
    -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "           MODIFY | REPORTS \n"; -echo "
    \n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A GROUP AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "VICIDIAL: Park Stats                             $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$stmt="select count(*),sum(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls taken in this Group:              $TOTALcalls\n";
    -echo "Average Hold Time(seconds) for all Calls:     $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Dropped Calls:                          $DROPcalls  $DROPpercent%\n";
    -echo "Average Hold Time(seconds) for Dropped Calls: $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  USER STATS
    -
    -echo "\n";
    -echo "---------- USER STATS\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -echo "| USER                     | CALLS      | TIME M | AVRG M |\n";
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -$stmt="select park_log.user,full_name,count(*),sum(talked_sec),avg(talked_sec) from park_log,vicidial_users where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and park_log.user is not null and talked_sec is not null and talked_sec > 4 and park_log.user=vicidial_users.user group by park_log.user;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$user =			sprintf("%-6s", $row[0]);
    -	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$USERcalls =	sprintf("%10s", $row[2]);
    -	$USERtotTALK =	$row[3];
    -	$USERavgTALK =	$row[4];
    -
    -	$USERtotTALK_M = ($USERtotTALK / 60);
    -	$USERtotTALK_M = round($USERtotTALK_M, 2);
    -	$USERtotTALK_M_int = intval("$USERtotTALK_M");
    -	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
    -	$USERtotTALK_S = ($USERtotTALK_S * 60);
    -	$USERtotTALK_S = round($USERtotTALK_S, 0);
    -	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
    -	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
    -	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+--------------------------+------------+--------+--------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -echo "\n";
    -echo "---------- TIME STATS\n";
    -
    -echo "\n";
    -
    -$hi_hour_count=0;
    -$last_full_record=0;
    -$i=0;
    -$h=0;
    -while ($i <= 96)
    -	{
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:00:00' and parked_time <= '$query_date $h:14:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:00:00' and parked_time <= '$query_date $h:14:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:15:00' and parked_time <= '$query_date $h:29:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:15:00' and parked_time <= '$query_date $h:29:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:30:00' and parked_time <= '$query_date $h:44:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:30:00' and parked_time <= '$query_date $h:44:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:45:00' and parked_time <= '$query_date $h:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$hour_count[$i] = $row[0];
    -	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -	if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -	$stmt="select count(*) from park_log where parked_time >= '$query_date $h:45:00' and parked_time <= '$query_date $h:59:59' and status ='HUNGUP' and channel_group='" . mysql_real_escape_string($group) . "' and (talked_sec < 5 or talked_sec is null);";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$row=mysql_fetch_row($rslt);
    -	$drop_count[$i] = $row[0];
    -	$i++;
    -	$h++;
    -	}
    -
    -$hour_multiplier = (100 / $hi_hour_count);
    -#$hour_multiplier = round($hour_multiplier, 0);
    -
    -echo "\n";
    -echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP\n";
    -
    -$k=1;
    -$Mk=0;
    -$call_scale = '0';
    -while ($k <= 102) 
    -	{
    -	if ($Mk >= 5) 
    -		{
    -		$Mk=0;
    -		$scale_num=($k / $hour_multiplier);
    -		$scale_num = round($scale_num, 0);
    -		$LENscale_num = (strlen($scale_num));
    -		$k = ($k + $LENscale_num);
    -		$call_scale .= "$scale_num";
    -		}
    -	else
    -		{
    -		$call_scale .= " ";
    -		$k++;   $Mk++;
    -		}
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -$ZZ = '00';
    -$i=0;
    -$h=4;
    -$hour= -1;
    -$no_lines_yet=1;
    -
    -while ($i <= 96)
    -	{
    -	$char_counter=0;
    -	$time = '      ';
    -	if ($h >= 4) 
    -		{
    -		$hour++;
    -		$h=0;
    -		if ($hour < 10) {$hour = "0$hour";}
    -		$time = "+$hour$ZZ+";
    -		}
    -	if ($h == 1) {$time = "   15 ";}
    -	if ($h == 2) {$time = "   30 ";}
    -	if ($h == 3) {$time = "   45 ";}
    -	$Ghour_count = $hour_count[$i];
    -	if ($Ghour_count < 1) 
    -		{
    -		if ( ($no_lines_yet) or ($i > $last_full_record) )
    -			{
    -			$do_nothing=1;
    -			}
    -		else
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			echo "|$time|";
    -			$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -			echo "| $hour_count[$i] |\n";
    -			}
    -		}
    -	else
    -		{
    -		$no_lines_yet=0;
    -		$Xhour_count = ($Ghour_count * $hour_multiplier);
    -		$Yhour_count = (99 - $Xhour_count);
    -
    -		$Gdrop_count = $drop_count[$i];
    -		if ($Gdrop_count < 1) 
    -			{
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "*X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -			echo "| 0     | $hour_count[$i] |\n";
    -
    -			}
    -		else
    -			{
    -			$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -		#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -			$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -			$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -			$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -			echo "|$time|";
    -			$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -			echo "D";   $char_counter++;
    -			$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -			echo "X";   $char_counter++;
    -			$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -				while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -			echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -			}
    -		}
    -	
    -	
    -	$i++;
    -	$h++;
    -	}
    -
    -
    -echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_server_performance.php b/agc_2-X/trunk/VICIDIAL_web/AST_server_performance.php deleted file mode 100644 index fdedb9d9..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_server_performance.php +++ /dev/null @@ -1,310 +0,0 @@ - LICENSE: GPLv2 -# -# CHANGES -# -# 60619-1732 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["shift"])) {$shift=$_GET["shift"];} - elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -# path from root to where ploticus files will be stored -$DOCroot = "$WeBServeRRooT/vicidial/ploticus/"; - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($group)) {$group = '';} - -$stmt="select server_ip from servers;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$servers_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $servers_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } -?> - - - - - -\n"; -echo "VICIDIAL: Server Performance\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "             REPORTS \n"; -echo "
    \n\n"; - -echo "
    \n";
    -
    -
    -if (!$group)
    -{
    -echo "\n";
    -echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
    -echo " NOTE: stats taken from 6 hour shift specified\n";
    -}
    -
    -else
    -{
    -if ($shift == 'AM') 
    -	{
    -	$query_date_BEGIN = "$query_date 08:45:00";   
    -	$query_date_END = "$query_date 15:32:00";
    -	$time_BEGIN = "08:45:00";   
    -	$time_END = "15:15:00";
    -	}
    -if ($shift == 'PM') 
    -	{
    -	$query_date_BEGIN = "$query_date 15:32:00";   
    -	$query_date_END = "$query_date 23:15:00";
    -	$time_BEGIN = "15:15:00";   
    -	$time_END = "23:15:00";
    -	}
    -
    -echo "VICIDIAL: Server Performance                             $NOW_TIME\n";
    -
    -echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
    -echo "---------- TOTALS, PEAKS and AVERAGES\n";
    -
    -$stmt="select sysload from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by sysload desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$HIGHload =	sprintf("%10s", $row[0]);
    -$HIGHmulti = intval($HIGHload / 100);
    -#$HIGHmulti = ($HIGHload / 100);
    -
    -$stmt="select AVG(sysload),AVG(channels_total) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGload =	sprintf("%10s", $row[0]);
    -$AVGchannels =	sprintf("%10s", $row[1]);
    -
    -$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$AVGcpuUSER =	sprintf("%10s", $row[0]);
    -$AVGcpuSYSTEM =	sprintf("%10s", $row[1]);
    -$AVGcpuIDLE =	sprintf("%10s", $row[2]);
    -
    -$stmt="select usedram from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "' order by usedram desc limit 1;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$USEDram =	sprintf("%10s", $row[0]);
    -
    -$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365','8366','8367') and  start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$OFFHOOKtime =	sprintf("%10s", $row[1]);
    -
    -
    -echo "Total Calls in/out on this server:        $TOTALcalls\n";
    -echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
    -echo "Average channels in use for server:       $AVGchannels\n";
    -echo "Average load for server:                  $AVGload\n";
    -echo "Peak load for server:                     $HIGHload\n";
    -#echo "Peak used memory for server (in MB):      $USEDram\n";
    -echo "Average USER process cpu percentage:      $AVGcpuUSER %\n";
    -echo "Average SYSTEM process cpu percentage:    $AVGcpuSYSTEM %\n";
    -echo "Average IDLE process cpu percentage:      $AVGcpuIDLE %\n";
    -
    -echo "\n";
    -echo "---------- LINE GRAPH:\n";
    -
    -
    -
    -##############################
    -#########  Graph stats
    -
    -$DAT = '.dat';
    -$HTM = '.htm';
    -$PNG = '.png';
    -$filedate = date("Y-m-d_His");
    -$DATfile = "$group$query_date$shift$filedate$DAT";
    -$HTMfile = "$group$query_date$shift$filedate$HTM";
    -$PNGfile = "$group$query_date$shift$filedate$PNG";
    -
    -$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
    -$DATfp = fopen ("$DOCroot/$DATfile", "a");
    -
    -$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='" . mysql_real_escape_string($group) . "' and start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' order by timex;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$rows_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $rows_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -	$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
    -	$row[6] = intval($row[6] * $HIGHmulti);
    -	fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
    -	$i++;
    -	}
    -fclose($DATfp);
    -
    -$rows_to_max = ($rows_to_print + 100);
    -
    -
    -
    -$HTMcontent  = '';
    -$HTMcontent .= "#proc page\n";
    -$HTMcontent .= "#if @DEVICE in png,gif\n";
    -$HTMcontent .= "   scale: 0.6\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#endif\n";
    -$HTMcontent .= "#proc getdata\n";
    -$HTMcontent .= "file: $DOCroot/$DATfile\n";
    -$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc areadef\n";
    -$HTMcontent .= "title: Server $group   $query_date_BEGIN to $query_date_END\n";
    -$HTMcontent .= "titledetails: size=14  align=C\n";
    -$HTMcontent .= "rectangle: 1 1 14 7\n";
    -$HTMcontent .= "xscaletype: time hh:mm:ss\n";
    -$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
    -$HTMcontent .= "yrange: 0 $HIGHload\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc xaxis\n";
    -$HTMcontent .= "stubs: inc 30 minutes\n";
    -$HTMcontent .= "minorticinc: 5 minutes\n";
    -$HTMcontent .= "stubformat: hh:mm:ssa\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc yaxis\n";
    -$HTMcontent .= "stubs: inc 50\n";
    -$HTMcontent .= "grid: color=yellow\n";
    -$HTMcontent .= "gridskip: min\n";
    -$HTMcontent .= "ticincrement: 100 1000\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: userproc\n";
    -$HTMcontent .= "linedetails: color=purple width=.5\n";
    -$HTMcontent .= "fill: lavender\n";
    -$HTMcontent .= "legendlabel: user proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc lineplot\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: sysproc\n";
    -$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
    -$HTMcontent .= "fill: dullyellow\n";
    -$HTMcontent .= "legendlabel: system proc%\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: load\n";
    -$HTMcontent .= "linedetails: color=blue width=.5\n";
    -$HTMcontent .= "legendlabel: load\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: processes\n";
    -$HTMcontent .= "linedetails: color=red width=.5\n";
    -$HTMcontent .= "legendlabel: processes\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc curvefit\n";
    -$HTMcontent .= "xfield: time\n";
    -$HTMcontent .= "yfield: channels\n";
    -$HTMcontent .= "linedetails: color=green width=.5\n";
    -$HTMcontent .= "legendlabel: channels\n";
    -$HTMcontent .= "maxinpoints: $rows_to_max\n";
    -$HTMcontent .= "\n";
    -$HTMcontent .= "#proc legend\n";
    -$HTMcontent .= "location: max-2 max\n";
    -$HTMcontent .= "seglen: 0.2\n";
    -$HTMcontent .= "\n";
    -
    -fwrite ($HTMfp, "$HTMcontent");
    -fclose($HTMfp);
    -
    -
    -passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
    -
    -sleep(1);
    -
    -echo "
    \n"; -echo "\n"; -echo "\n"; - - -echo ""; - -} - - - -?> - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD.php b/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD.php deleted file mode 100644 index 52efd9cc..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD.php +++ /dev/null @@ -1,255 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 60620-1040 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Agents Time On Calls                         $NOW_TIME    REPORTS\n\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL    | STATUS | START TIME          | MINUTES |\n";
    -echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	$agentcount=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]=' - WAITING - ';
    -			$row[6]=$row[7];
    -			}
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$sessionid =		sprintf("%-9s", $row[2]);
    -		$channel =			sprintf("%-10s", $row[3]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[4]);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 5) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 10) {$G=''; $EG='';}
    -		if (eregi("PAUSED",$row[4])) 
    -			{
    -			if ($call_time_M_int >= 1) 
    -				{$i++; continue;} 
    -			else
    -				{$G=''; $EG='';}
    -			}
    -
    -		$agentcount++;
    -		echo "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
    -		echo "  $agentcount agents logged in on server $server_ip\n\n";
    -
    -		echo "             - Paused agents\n";
    -		echo "             - 5 minutes or more on call\n";
    -		echo "             - Over 10 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -echo "| CHANNEL    | STATUS | CAMPAIGN | PHONE NUMBER       | START TIME          | MINUTES |\n";
    -echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 10) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 10) {$cc=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-8s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$start_time =		sprintf("%-19s", $row[5]);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
    -		echo "  $i calls being placed on server $server_ip\n\n";
    -
    -		echo "             - LIVE CALL WAITING\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "******************************* NO LIVE CALLS WAITING *********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD_closer.php b/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD_closer.php deleted file mode 100644 index eb7d3c39..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDAD_closer.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer -# -# CHANGES -# -# 60620-1037 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; -# $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; -# $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - } - } - -?> - - - -\n"; -echo " - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; -echo "
    ";
    -
    -###################################################################################
    -###### TIME ON SYSTEM
    -###################################################################################
    -
    -echo "VICIDIAL: Agents Time On Calls                         $NOW_TIME    REPORTS\n\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -echo "| STATION    | USER   | SESSIONID | CHANNEL             | STATUS | CALLTIME | MINUTES | CAMPAIGN     | FRONT  |\n";
    -echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -
    -
    -$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -			if (eregi("READY|PAUSED|CLOSER",$row[4]))
    -			{
    -			$row[3]='';
    -			$row[5]='- WAIT -';
    -			$row[6]=$row[7];
    -			}
    -		$extension[$i] =		sprintf("%-10s", $row[0]);
    -		$user[$i] =				sprintf("%-6s", $row[1]);
    -		$sessionid[$i] =		sprintf("%-9s", $row[2]);
    -		$channel[$i] =			sprintf("%-19s", $row[3]);
    -			$cc[$i]=0;
    -		while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
    -			{
    -			$channel[$i] = eregi_replace(".$","",$channel[$i]);   
    -			$cc[$i]++;
    -			if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
    -			}
    -		$status[$i] =			sprintf("%-6s", $row[4]);
    -		$start_time[$i] =		sprintf("%-8s", $row[5]);
    -			$cd[$i]=0;
    -		while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
    -			{
    -			$start_time[$i] = eregi_replace("^.","",$start_time[$i]);   
    -			$cd[$i]++;
    -			if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
    -			}
    -		$uniqueid[$i] =			$row[8];
    -		$lead_id[$i] =			$row[9];
    -		$closer[$i] =			$row[1];
    -		$call_time_S[$i] = ($STARTtime - $row[6]);
    -
    -		$call_time_M[$i] = ($call_time_S[$i] / 60);
    -		$call_time_M[$i] = round($call_time_M[$i], 2);
    -		$call_time_M_int[$i] = intval("$call_time_M[$i]");
    -		$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
    -		$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
    -		$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
    -		if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
    -		$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
    -		$call_time_MS[$i] =		sprintf("%7s", $call_time_MS[$i]);
    -		$i++;
    -		}
    -		$ext_count = $i;
    -		$i=0;
    -	while ($i < $ext_count)
    -		{
    -
    -		$stmt="select campaign_id from vicidial_auto_calls where uniqueid='$uniqueid[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "';";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$camp_to_print = mysql_num_rows($rslt);
    -		if ($camp_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$campaign = sprintf("%-12s", $row[0]);
    -			$camp_color = $row[0];
    -			}
    -		else
    -			{$campaign = 'DEAD        ';   	$camp_color = 'DEAD';}
    -		if (eregi("READY|PAUSED|CLOSER",$status[$i]))
    -			{$campaign = '            ';   	$camp_color = '';}
    -
    -		$stmt="select user from vicidial_xfer_log where lead_id='$lead_id[$i]' and closer='$closer[$i]' order by call_date desc limit 1;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$xfer_to_print = mysql_num_rows($rslt);
    -		if ($xfer_to_print > 0)
    -			{
    -			$row=mysql_fetch_row($rslt);
    -			$fronter = sprintf("%-6s", $row[0]);
    -			}
    -		else
    -			{$fronter = '      ';}
    -
    -		$G = '';		$EG = '';
    -		$G=""; $EG='';
    -	#	if ($call_time_M_int[$i] >= 5) {$G=''; $EG='';}
    -	#	if ($call_time_M_int[$i] >= 10) {$G=''; $EG='';}
    -
    -		echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
    -		echo "  $i agents logged in on server $server_ip\n\n";
    -
    -	#	echo "             - 5 minutes or more on call\n";
    -	#	echo "             - Over 10 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -###################################################################################
    -###### OUTBOUND CALLS
    -###################################################################################
    -#echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Time On VDAD                                              $NOW_TIME\n\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -echo "| CHANNEL             | STATUS | CAMPAIGN     | PHONE NUMBER       | CALLTIME | MINUTES |\n";
    -echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id desc;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-19s", $row[0]);
    -			$cc=0;
    -		while ( (strlen($channel) > 19) and ($cc < 100) )
    -			{
    -			$channel = eregi_replace(".$","",$channel);   
    -			$cc++;
    -			if (strlen($channel) <= 19) {$cc=101;}
    -			}
    -		$start_time =		sprintf("%-8s", $row[5]);
    -			$cd=0;
    -		while ( (strlen($start_time) > 8) and ($cd < 100) )
    -			{
    -			$start_time = eregi_replace("^.","",$start_time);   
    -			$cd++;
    -			if (strlen($start_time) <= 8) {$cd=101;}
    -			}
    -		$status =			sprintf("%-6s", $row[1]);
    -		$campaign =			sprintf("%-12s", $row[2]);
    -			$all_phone = "$row[3]$row[4]";
    -		$number_dialed =	sprintf("%-18s", $all_phone);
    -		$call_time_S = ($STARTtime - $row[6]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if (eregi("LIVE",$status)) {$G=''; $EG='';}
    -	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
    -		echo "  $i calls being placed on server $server_ip\n\n";
    -
    -		echo "             - LIVE CALL WAITING\n";
    -	#	echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "******************************* NO LIVE CALLS WAITING *********************************\n";
    -	echo "***************************************************************************************\n";
    -	echo "***************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDADall.php b/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDADall.php deleted file mode 100644 index aaf07c56..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDADall.php +++ /dev/null @@ -1,391 +0,0 @@ - LICENSE: GPLv2 -# -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60511-1343 - Added leads and drop info at the top of the screen -# 60608-1539 - Fixed CLOSER tallies for active calls -# 60619-1658 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# 60626-1453 - Added display of system load to bottom (Angelito Manansala) -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["RR"])) {$RR=$_GET["RR"];} - elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($group)) {$group='';} - -function get_server_load($windows = false) { -$os = strtolower(PHP_OS); -if(strpos($os, "win") === false) { -if(file_exists("/proc/loadavg")) { -$load = file_get_contents("/proc/loadavg"); -$load = explode(' ', $load); -return $load[0]; -} -elseif(function_exists("shell_exec")) { -$load = explode(' ', `uptime`); -return $load[count($load)-1]; -} -else { -return false; -} -} -elseif($windows) { -if(class_exists("COM")) { -$wmi = new COM("WinMgmts:\\\\."); -$cpus = $wmi->InstancesOf("Win32_Processor"); - -$cpuload = 0; -$i = 0; -while ($cpu = $cpus->Next()) { -$cpuload += $cpu->LoadPercentage; -$i++; -} - -$cpuload = round($cpuload / $i, 2); -return "$cpuload%"; -} -else { -return false; -} -} -} - -$load_ave = get_server_load(true); - - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$NOW_DAY = date("Y-m-d"); -$NOW_HOUR = date("H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns where active='Y';"; -$rslt=mysql_query($stmt, $link); -if (!isset($DB)) {$DB=0;} -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!isset($RR)) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if (!isset($reset_counter)) {$reset_counter=0;} -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD Campaign: $group\n"; -echo "
    \n"; -echo "VICIDIAL: Realtime Campaign: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         MODIFY | REPORTS \n"; -echo "\n\n"; - - -if (!$group) {echo "

    please select a campaign from the pulldown above
    \n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$HOPlev = $row[8]; - -echo "
    "; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; - -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$VDhop = $row[0]; - -$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$DAleads = $row[0]; -$callsTODAY = $row[1]; -$dropsTODAY = $row[2]; -$drpctTODAY = $row[3]; - -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "
    DIAL LEVEL:  $row[0]    STATUSES:  $row[1], $row[2], $row[3], $row[4], $row[5]     ORDER:  $row[6]     FILTER:  $row[7]    
    HOPPER LEVEL:  $HOPlev     LEADS IN HOPPER:  $VDhop     DIALABLE LEADS:  $DAleads       TIME:
    CALLS TODAY:  $callsTODAY     CALLS DROPPED:  $dropsTODAY     DROPPED PERCENT:  $drpctTODAY%       $NOW_TIME
    "; - - -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - { - $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );"; - } -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo " NO LIVE CALLS WAITING \n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVER IP | CALL SERVER IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - - $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n"; - $Aecho .= " System Load Average: $load_ave\n\n"; - - $Aecho .= " - Paused agents\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n"; - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo " NO AGENTS ON CALLS \n";
    -	}
    -
    -?>
    -
    - - diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDADall_SIPmonitor.php b/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDADall_SIPmonitor.php deleted file mode 100644 index 8d740be1..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_timeonVDADall_SIPmonitor.php +++ /dev/null @@ -1,395 +0,0 @@ - LICENSE: GPLv2 -### -# live real-time stats for the VICIDIAL Auto-Dialer all servers -# -# changes: -# 50406-0920 - Added Paused agents < 1 min (Chris Doyle) -# 51130-1218 - Modified layout and info to show all servers in a vicidial system -# 60504-2023 - Modified click-to-listen for SIP phones by Angelito Manansala -# 60619-1708 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# 60626-1455 - Added display of system load to bottom (Angelito Manansala) -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["RR"])) {$RR=$_GET["RR"];} - elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($group)) {$group='';} - -function get_server_load($windows = false) { -$os = strtolower(PHP_OS); -if(strpos($os, "win") === false) { -if(file_exists("/proc/loadavg")) { -$load = file_get_contents("/proc/loadavg"); -$load = explode(' ', $load); -return $load[0]; -} -elseif(function_exists("shell_exec")) { -$load = explode(' ', `uptime`); -return $load[count($load)-1]; -} -else { -return false; -} -} -elseif($windows) { -if(class_exists("COM")) { -$wmi = new COM("WinMgmts:\\\\."); -$cpus = $wmi->InstancesOf("Win32_Processor"); - -$cpuload = 0; -$i = 0; -while ($cpu = $cpus->Next()) { -$cpuload += $cpu->LoadPercentage; -$i++; -} - -$cpuload = round($cpuload / $i, 2); -return "$cpuload%"; -} -else { -return false; -} -} -} - -$load_ave = get_server_load(true); - - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$NOW_DAY = date("Y-m-d"); -$NOW_HOUR = date("H:i:s"); -$STARTtime = date("U"); -$epochSIXhoursAGO = ($STARTtime - 21600); -$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); - -$stmt="select campaign_id from vicidial_campaigns where active='Y';"; -$rslt=mysql_query($stmt, $link); -if (!isset($DB)) {$DB=0;} -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - -if (!isset($RR)) {$RR=40;} - -$NFB = ''; -$NFE = ''; -$F=''; $FG=''; $B=''; $BG=''; -$reset_counter++; - -if (!isset($reset_counter)) {$reset_counter=0;} -if ($reset_counter > 7) - { - $reset_counter=0; - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On VDAD Campaign: $group\n"; -echo "
    \n"; -echo "VICIDIAL: Realtime Campaign: \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "         \n"; -echo "STOP | GO"; -echo "         MODIFY | REPORTS \n"; -echo "\n\n"; - - -if (!$group) {echo "

    please select a campaign from the pulldown above
    \n"; exit;} -else -{ -$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$HOPlev = $row[8]; - -echo "
    "; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; - -$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$VDhop = $row[0]; - -$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$DAleads = $row[0]; -$callsTODAY = $row[1]; -$dropsTODAY = $row[2]; -$drpctTODAY = $row[3]; - -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "
    DIAL LEVEL:  $row[0]    STATUSES:  $row[1], $row[2], $row[3], $row[4], $row[5]     ORDER:  $row[6]     FILTER:  $row[7]    
    HOPPER LEVEL:  $HOPlev     LEADS IN HOPPER:  $VDhop     DIALABLE LEADS:  $DAleads       TIME:
    CALLS TODAY:  $callsTODAY     CALLS DROPPED:  $dropsTODAY     DROPPED PERCENT:  $drpctTODAY%       $NOW_TIME
    "; - - -echo "\n\n"; -} -################################################################################### -###### OUTBOUND CALLS -################################################################################### -if (eregi("CLOSER",$group)) - { - $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );"; - } -else - {$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";} -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$parked_to_print = mysql_num_rows($rslt); - if ($parked_to_print > 0) - { - $i=0; - $out_total=0; - $out_ring=0; - $out_live=0; - while ($i < $parked_to_print) - { - $row=mysql_fetch_row($rslt); - - if (eregi("LIVE",$row[0])) - {$out_live++;} - else - { - if (eregi("CLOSER",$row[0])) - {$nothing=1;} - else - {$out_ring++;} - } - $out_total++; - $i++; - } - - if ($out_live > 0) {$F=''; $FG='';} - if ($out_live > 4) {$F=''; $FG='';} - if ($out_live > 9) {$F=''; $FG='';} - if ($out_live > 14) {$F=''; $FG='';} - - if (eregi("CLOSER",$group)) - {echo "$NFB$out_total$NFE current active calls      \n";} - else - {echo "$NFB$out_total$NFE calls being placed       \n";} - - echo "$NFB$out_ring$NFE calls ringing         \n"; - echo "$NFB$F  $out_live $FG$NFE calls waiting for agents       \n"; - } - else - { - echo " NO LIVE CALLS WAITING \n"; - } - - -################################################################################### -###### TIME ON SYSTEM -################################################################################### - -$agent_incall=0; -$agent_ready=0; -$agent_paused=0; -$agent_total=0; - -$Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; -$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVER IP | CALL SERVER IP | MM:SS | CAMPAIGN |\n"; -$Aecho .= "+------------|--------+------------------+--------+-----------------+-----------------+---------+------------+\n"; - - -$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - $agentcount=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[5]=$row[6]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $sessionid = sprintf("%-9s", $row[2]); - $status = sprintf("%-6s", $row[3]); - $server_ip = sprintf("%-15s", $row[4]); - $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); - $call_time_S = ($STARTtime - $row[5]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} -# if ($call_time_M_int >= 10) {$G=''; $EG='';} - if (eregi("PAUSED",$row[3])) - { - if ($call_time_M_int >= 1) - {$i++; continue;} - else - {$G=''; $EG=''; $agent_paused++; $agent_total++;} - } -# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") ) -# {$G=''; $EG='';} - - if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} - if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$G=''; $EG='';} - - $agentcount++; - #$Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - $sessionid=trim($sessionid); - $Aecho .= "| $G$extension$EG | $G$user$EG | $G$sessionid$EG LISTEN | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n"; - - $i++; - } - - $Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n"; - $Aecho .= " $agentcount agents logged in on all servers\n"; - $Aecho .= " System Load Average: $load_ave\n\n"; - - $Aecho .= " - Paused agents\n"; - # $Aecho .= " - Balanced call\n"; - $Aecho .= " - Agent waiting for call\n"; - $Aecho .= " - Over 5 minutes on call\n\n"; - $Aecho .= " NOTE: Click LISTEN to monitor agent call, you must have softphone installed on you machine.\n\n"; - - - if ($agent_ready > 0) {$B=''; $BG='';} - if ($agent_ready > 4) {$B=''; $BG='';} - if ($agent_ready > 9) {$B=''; $BG='';} - if ($agent_ready > 14) {$B=''; $BG='';} - - - echo "\n
    \n"; - - echo "$NFB$agent_total$NFE agents logged in         \n"; - echo "$NFB$agent_incall$NFE agents in calls       \n"; - echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; - echo "$NFB$agent_paused$NFE paused agents       \n"; - - echo "
    ";
    -		echo "";
    -		echo "$Aecho";
    -	}
    -	else
    -	{
    -	echo " NO AGENTS ON CALLS \n";
    -	}
    -
    -?>
    -
    - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_timeoncall.php b/agc_2-X/trunk/VICIDIAL_web/AST_timeoncall.php deleted file mode 100644 index 074160c3..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_timeoncall.php +++ /dev/null @@ -1,202 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1043 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Call\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Call                        $NOW_TIME    REPORTS\n\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -echo "| STATION    | SESSIONID | CHANNEL   | NUMBER DIALED    | START TIME          | MINUTES |\n";
    -echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -
    -$stmt="SELECT count(*) from live_sip_channels where server_ip='" . mysql_real_escape_string($server_ip) . "';";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="select extension from live_channels where server_ip='" . mysql_real_escape_string($server_ip) . "';";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$ext_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_zap_counter=0;
    -	$sessions = '';
    -	while ($i < $ext_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if (preg_match("/^8600/i",$row[0]))
    -			{
    -			$sessions .= "$row[0]|";
    -			}
    -		$i++;
    -		}
    -	$sessions = preg_replace("/\|$/",'',$sessions);
    -
    -	if ($DB) {echo "SESSIONS: -$sessions-\n";}
    -
    -	$stmt="select * from live_sip_channels where server_ip='" . mysql_real_escape_string($server_ip) . "' order by channel;";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	$live_calls_counter=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		if ( (preg_match("/Zap\/|internal|ring/i",$row[3])) or (preg_match("/Local\//i",$row[0])) )
    -			{
    -			if ($DB) {echo "NOT STATION |$row[0]|$row[3]|\n";}
    -			$session_id = '';
    -			}
    -		else 
    -			{
    -			if (preg_match("/$row[3]/i",$sessions))
    -				{
    -				if ($DB) {echo "LIVE STATION|$row[0]|$row[3]|\n";}
    -				$session_id = $row[3];
    -				$station = preg_replace("/SIP\//",'',$row[0]);
    -				$station = preg_replace("/-.*/",'',$station);
    -			
    -				$LIVE_sessions[$live_calls_counter] =			"$session_id";
    -				$LIVE_sessions_FORMAT[$live_calls_counter] =	sprintf("%-9s", $session_id);
    -				$LIVE_stations[$live_calls_counter] =			"$station";
    -				$LIVE_stations_FORMAT[$live_calls_counter] =	sprintf("%-10s", $station);
    -
    -		#		echo "| $station | $session_id | \n";
    -
    -				$live_calls_counter++;
    -				}
    -			else
    -				{
    -				if ($DB) {echo "NOT STATIONZ|$row[0]|$row[3]|\n";}
    -				$session_id = '';
    -				}
    -			}
    -
    -		$i++;
    -		}
    -
    -		if ($live_calls_counter > 0)
    -		{
    -		$i=0;
    -		$LC_counter = $live_calls_counter;
    -
    -		while ($i < $live_calls_counter)
    -			{
    -			$stmt="select channel,extension,number_dialed,start_time,start_epoch from call_log where extension='$LIVE_stations[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "' order by uniqueid desc LIMIT 1;";
    -			$rslt=mysql_query($stmt, $link);
    -			if ($DB) {echo "$stmt\n";}
    -			$parked_to_print = mysql_num_rows($rslt);
    -			$row=mysql_fetch_row($rslt);
    -
    -			$channel =			sprintf("%-9s", $row[0]);
    -			$number_dialed =	sprintf("%-16s", $row[2]);
    -			$start_time =		sprintf("%-19s", $row[3]);
    -			$call_time_S = ($STARTtime - $row[4]);
    -
    -			$call_time_M = ($call_time_S / 60);
    -			$call_time_M = round($call_time_M, 2);
    -			$call_time_M_int = intval("$call_time_M");
    -			$call_time_SEC = ($call_time_M - $call_time_M_int);
    -			$call_time_SEC = ($call_time_SEC * 60);
    -			$call_time_SEC = round($call_time_SEC, 0);
    -			if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -			$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -			$call_time_MS =		sprintf("%7s", $call_time_MS);
    -			$G = '';		$EG = '';
    -			if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -			if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -			echo "| $G$LIVE_stations_FORMAT[$i]$EG | $G$LIVE_sessions_FORMAT[$i]$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -			$i++;
    -			}
    -
    -		echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
    -		echo "  $i stations on live calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on live call\n";
    -		echo "             - Over 30 minutes on live call\n";
    -
    -		}
    -		else
    -		{
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*************************************** NO LIVE STATIONS ********************************\n";
    -		echo "*****************************************************************************************\n";
    -		echo "*****************************************************************************************\n";
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*************************************** NO LIVE STATIONS ********************************\n";
    -	echo "*****************************************************************************************\n";
    -	echo "*****************************************************************************************\n";
    -	}
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/AST_timeonpark.php b/agc_2-X/trunk/VICIDIAL_web/AST_timeonpark.php deleted file mode 100644 index 3cedd09f..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/AST_timeonpark.php +++ /dev/null @@ -1,219 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1042 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -$timeONEhoursAGO = ($STARTtime - 3600); -$epochHALFhoursAGO = ($STARTtime - 1860); -$timeONEhoursAGO = date("Y-m-d H:i:s",$timeONEhoursAGO); -$timeHALFhoursAGO = date("Y-m-d H:i:s",$epochHALFhoursAGO); - -$reset_counter++; - -if ($reset_counter > 7) - { - $reset_counter=0; - - $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - - if ($DB) - { - $stmt="delete from park_log where status='TALKING' and grab_time < '$timeONEhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - $stmt="delete from park_log where status='PARKED' and parked_time < '$timeHALFhoursAGO' and (hangup_time is null or hangup_time='');"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - - } - } - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Park\n"; -echo "
    \n\n";
    -
    -echo "VICIDIAL: Time On Park         $NOW_TIME    REPORTS\n\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------+-----------------+---------------------+---------+\n";
    -
    -#$link=mysql_connect("localhost", "cron", "1234");
    -# $linkX=mysql_connect("localhost", "cron", "1234");
    -#mysql_select_db("asterisk");
    -
    -$stmt="select extension,user,channel,channel_group,parked_time,UNIX_TIMESTAMP(parked_time) from park_log where status ='PARKED' and server_ip='" . mysql_real_escape_string($server_ip) . "' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$parked_to_print = mysql_num_rows($rslt);
    -	if ($parked_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 1) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 6) {$G=''; $EG='';}
    -
    -		echo "| $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i callers waiting on server $server_ip\n\n";
    -
    -		echo "             - 1 minute or more on hold\n";
    -		echo "             - Over 5 minutes on hold\n";
    -
    -		}
    -	else
    -	{
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	echo "******************** NO LIVE CALLS WAITING *********************\n";
    -	echo "****************************************************************\n";
    -	echo "****************************************************************\n";
    -	}
    -
    -###################################################################################
    -###### TIME ON INBOUND CALLS
    -###################################################################################
    -echo "\n\n";
    -echo "----------------------------------------------------------------------------------------";
    -echo "\n\n";
    -echo "VICIDIAL: Agents Time On Inbound Calls                             $NOW_TIME\n\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
    -echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -
    -
    -$stmt="select extension,user,channel,channel_group,grab_time,UNIX_TIMESTAMP(grab_time) from park_log where status ='TALKING' and server_ip='" . mysql_real_escape_string($server_ip) . "' order by uniqueid;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$talking_to_print = mysql_num_rows($rslt);
    -	if ($talking_to_print > 0)
    -	{
    -	$i=0;
    -	while ($i < $talking_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -
    -		$extension =		sprintf("%-10s", $row[0]);
    -		$user =				sprintf("%-6s", $row[1]);
    -		$channel =			sprintf("%-10s", $row[2]);
    -		$number_dialed =	sprintf("%-15s", $row[3]);
    -		$start_time =		sprintf("%-19s", $row[4]);
    -		$call_time_S = ($STARTtime - $row[5]);
    -
    -		$call_time_M = ($call_time_S / 60);
    -		$call_time_M = round($call_time_M, 2);
    -		$call_time_M_int = intval("$call_time_M");
    -		$call_time_SEC = ($call_time_M - $call_time_M_int);
    -		$call_time_SEC = ($call_time_SEC * 60);
    -		$call_time_SEC = round($call_time_SEC, 0);
    -		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
    -		$call_time_MS = "$call_time_M_int:$call_time_SEC";
    -		$call_time_MS =		sprintf("%7s", $call_time_MS);
    -		$G = '';		$EG = '';
    -		if ($call_time_M_int >= 12) {$G=''; $EG='';}
    -		if ($call_time_M_int >= 31) {$G=''; $EG='';}
    -
    -		echo "| $G$extension$EG | $G$user$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
    -
    -		$i++;
    -		}
    -
    -		echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
    -		echo "  $i agents on calls on server $server_ip\n\n";
    -
    -		echo "             - 12 minutes or more on call\n";
    -		echo "             - Over 30 minutes on call\n";
    -
    -	}
    -	else
    -	{
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "********************************* NO AGENTS ON CALLS *********************************\n";
    -	echo "**************************************************************************************\n";
    -	echo "**************************************************************************************\n";
    -	}
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/admin.php b/agc_2-X/trunk/VICIDIAL_web/admin.php deleted file mode 100644 index 816dd7d1..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/admin.php +++ /dev/null @@ -1,6514 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} - elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} -if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} - elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];} - elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];} - elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];} -if (isset($_GET["park_file_name"])) {$park_file_name=$_GET["park_file_name"];} - elseif (isset($_POST["park_file_name"])) {$park_file_name=$_POST["park_file_name"];} -if (isset($_GET["web_form_address"])) {$web_form_address=$_GET["web_form_address"];} - elseif (isset($_POST["web_form_address"])) {$web_form_address=$_POST["web_form_address"];} -if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} - elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} -if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} - elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["next_agent_call"])) {$next_agent_call=$_GET["next_agent_call"];} - elseif (isset($_POST["next_agent_call"])) {$next_agent_call=$_POST["next_agent_call"];} -if (isset($_GET["local_call_time"])) {$local_call_time=$_GET["local_call_time"];} - elseif (isset($_POST["local_call_time"])) {$local_call_time=$_POST["local_call_time"];} -if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} - elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];} - elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];} -if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} - elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];} - elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} -if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} - elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} - elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} -if (isset($_GET["dial_status_a"])) {$dial_status_a=$_GET["dial_status_a"];} - elseif (isset($_POST["dial_status_a"])) {$dial_status_a=$_POST["dial_status_a"];} -if (isset($_GET["dial_status_b"])) {$dial_status_b=$_GET["dial_status_b"];} - elseif (isset($_POST["dial_status_b"])) {$dial_status_b=$_POST["dial_status_b"];} -if (isset($_GET["dial_status_c"])) {$dial_status_c=$_GET["dial_status_c"];} - elseif (isset($_POST["dial_status_c"])) {$dial_status_c=$_POST["dial_status_c"];} -if (isset($_GET["dial_status_d"])) {$dial_status_d=$_GET["dial_status_d"];} - elseif (isset($_POST["dial_status_d"])) {$dial_status_d=$_POST["dial_status_d"];} -if (isset($_GET["dial_status_e"])) {$dial_status_e=$_GET["dial_status_e"];} - elseif (isset($_POST["dial_status_e"])) {$dial_status_e=$_POST["dial_status_e"];} -if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} - elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["campaign_vdad_exten"])) {$campaign_vdad_exten=$_GET["campaign_vdad_exten"];} - elseif (isset($_POST["campaign_vdad_exten"])) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];} -if (isset($_GET["campaign_rec_exten"])) {$campaign_rec_exten=$_GET["campaign_rec_exten"];} - elseif (isset($_POST["campaign_rec_exten"])) {$campaign_rec_exten=$_POST["campaign_rec_exten"];} -if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} - elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} -if (isset($_GET["campaign_rec_filename"])) {$campaign_rec_filename=$_GET["campaign_rec_filename"];} - elseif (isset($_POST["campaign_rec_filename"])) {$campaign_rec_filename=$_POST["campaign_rec_filename"];} -if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} - elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} -if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} - elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} -if (isset($_GET["old_campaign_id"])) {$old_campaign_id=$_GET["old_campaign_id"];} - elseif (isset($_POST["old_campaign_id"])) {$old_campaign_id=$_POST["old_campaign_id"];} -if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} - elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} -if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} - elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];} -if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} - elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} -if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} - elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];} - elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} -if (isset($_GET["delete_user_groups"])) {$delete_user_groups=$_GET["delete_user_groups"];} - elseif (isset($_POST["delete_user_groups"])) {$delete_user_groups=$_POST["delete_user_groups"];} -if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} - elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} -if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} - elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} -if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} - elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} -if (isset($_GET["delete_remote_agents"])) {$delete_remote_agents=$_GET["delete_remote_agents"];} - elseif (isset($_POST["delete_remote_agents"])) {$delete_remote_agents=$_POST["delete_remote_agents"];} -if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];} - elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} -if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} - elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} -if (isset($_GET["ast_admin_access"])) {$ast_admin_access=$_GET["ast_admin_access"];} - elseif (isset($_POST["ast_admin_access"])) {$ast_admin_access=$_POST["ast_admin_access"];} -if (isset($_GET["ast_delete_phones"])) {$ast_delete_phones=$_GET["ast_delete_phones"];} - elseif (isset($_POST["ast_delete_phones"])) {$ast_delete_phones=$_POST["ast_delete_phones"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} -if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} - elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} -if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];} - elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];} -if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];} - elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];} -if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} - elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} -if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];} - elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} -if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} - elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} -if (isset($_GET["get_call_launch"])) {$get_call_launch=$_GET["get_call_launch"];} - elseif (isset($_POST["get_call_launch"])) {$get_call_launch=$_POST["get_call_launch"];} -if (isset($_GET["am_message_exten"])) {$am_message_exten=$_GET["am_message_exten"];} - elseif (isset($_POST["am_message_exten"])) {$am_message_exten=$_POST["am_message_exten"];} -if (isset($_GET["amd_send_to_vmx"])) {$amd_send_to_vmx=$_GET["amd_send_to_vmx"];} - elseif (isset($_POST["amd_send_to_vmx"])) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];} -if (isset($_GET["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"];} - elseif (isset($_POST["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];} -if (isset($_GET["xferconf_a_number"])) {$xferconf_a_number=$_GET["xferconf_a_number"];} - elseif (isset($_POST["xferconf_a_number"])) {$xferconf_a_number=$_POST["xferconf_a_number"];} -if (isset($_GET["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"];} - elseif (isset($_POST["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];} -if (isset($_GET["xferconf_b_number"])) {$xferconf_b_number=$_GET["xferconf_b_number"];} - elseif (isset($_POST["xferconf_b_number"])) {$xferconf_b_number=$_POST["xferconf_b_number"];} -if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} - elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} -if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} - elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} -if (isset($_GET["change_agent_campaign"])) {$change_agent_campaign=$_GET["change_agent_campaign"];} - elseif (isset($_POST["change_agent_campaign"])) {$change_agent_campaign=$_POST["change_agent_campaign"];} -if (isset($_GET["agent_choose_ingroups"])) {$agent_choose_ingroups=$_GET["agent_choose_ingroups"];} - elseif (isset($_POST["agent_choose_ingroups"])) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];} -if (isset($_GET["alt_number_dialing"])) {$alt_number_dialing=$_GET["alt_number_dialing"];} - elseif (isset($_POST["alt_number_dialing"])) {$alt_number_dialing=$_POST["alt_number_dialing"];} -if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} - elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} -if (isset($_GET["lead_filter_id"])) {$lead_filter_id=$_GET["lead_filter_id"];} - elseif (isset($_POST["lead_filter_id"])) {$lead_filter_id=$_POST["lead_filter_id"];} -if (isset($_GET["lead_filter_name"])) {$lead_filter_name=$_GET["lead_filter_name"];} - elseif (isset($_POST["lead_filter_name"])) {$lead_filter_name=$_POST["lead_filter_name"];} -if (isset($_GET["lead_filter_comments"])) {$lead_filter_comments=$_GET["lead_filter_comments"];} - elseif (isset($_POST["lead_filter_comments"])) {$lead_filter_comments=$_POST["lead_filter_comments"];} -if (isset($_GET["lead_filter_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} - elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} -if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} - elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} -if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} - elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} -if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];} - elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];} -if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];} - elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];} -if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} - elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} -if (isset($_GET["alter_agent_interface_options"])) {$alter_agent_interface_options=$_GET["alter_agent_interface_options"];} - elseif (isset($_POST["alter_agent_interface_options"])) {$alter_agent_interface_options=$_POST["alter_agent_interface_options"];} -if (isset($_GET["closer_default_blended"])) {$closer_default_blended=$_GET["closer_default_blended"];} - elseif (isset($_POST["closer_default_blended"])) {$closer_default_blended=$_POST["closer_default_blended"];} -if (isset($_GET["drop_call_seconds"])) {$drop_call_seconds=$_GET["drop_call_seconds"];} - elseif (isset($_POST["drop_call_seconds"])) {$drop_call_seconds=$_POST["drop_call_seconds"];} -if (isset($_GET["safe_harbor_message"])) {$safe_harbor_message=$_GET["safe_harbor_message"];} - elseif (isset($_POST["safe_harbor_message"])) {$safe_harbor_message=$_POST["safe_harbor_message"];} -if (isset($_GET["safe_harbor_exten"])) {$safe_harbor_exten=$_GET["safe_harbor_exten"];} - elseif (isset($_POST["safe_harbor_exten"])) {$safe_harbor_exten=$_POST["safe_harbor_exten"];} -if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} - elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} -if (isset($_GET["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} - elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} -if (isset($_GET["call_time_id"])) {$call_time_id=$_GET["call_time_id"];} - elseif (isset($_POST["call_time_id"])) {$call_time_id=$_POST["call_time_id"];} -if (isset($_GET["call_time_name"])) {$call_time_name=$_GET["call_time_name"];} - elseif (isset($_POST["call_time_name"])) {$call_time_name=$_POST["call_time_name"];} -if (isset($_GET["call_time_comments"])) {$call_time_comments=$_GET["call_time_comments"];} - elseif (isset($_POST["call_time_comments"])) {$call_time_comments=$_POST["call_time_comments"];} -if (isset($_GET["ct_default_start"])) {$ct_default_start=$_GET["ct_default_start"];} - elseif (isset($_POST["ct_default_start"])) {$ct_default_start=$_POST["ct_default_start"];} -if (isset($_GET["ct_default_stop"])) {$ct_default_stop=$_GET["ct_default_stop"];} - elseif (isset($_POST["ct_default_stop"])) {$ct_default_stop=$_POST["ct_default_stop"];} -if (isset($_GET["ct_sunday_start"])) {$ct_sunday_start=$_GET["ct_sunday_start"];} - elseif (isset($_POST["ct_sunday_start"])) {$ct_sunday_start=$_POST["ct_sunday_start"];} -if (isset($_GET["ct_sunday_stop"])) {$ct_sunday_stop=$_GET["ct_sunday_stop"];} - elseif (isset($_POST["ct_sunday_stop"])) {$ct_sunday_stop=$_POST["ct_sunday_stop"];} -if (isset($_GET["ct_monday_start"])) {$ct_monday_start=$_GET["ct_monday_start"];} - elseif (isset($_POST["ct_monday_start"])) {$ct_monday_start=$_POST["ct_monday_start"];} -if (isset($_GET["ct_monday_stop"])) {$ct_monday_stop=$_GET["ct_monday_stop"];} - elseif (isset($_POST["ct_monday_stop"])) {$ct_monday_stop=$_POST["ct_monday_stop"];} -if (isset($_GET["ct_tuesday_start"])) {$ct_tuesday_start=$_GET["ct_tuesday_start"];} - elseif (isset($_POST["ct_tuesday_start"])) {$ct_tuesday_start=$_POST["ct_tuesday_start"];} -if (isset($_GET["ct_tuesday_stop"])) {$ct_tuesday_stop=$_GET["ct_tuesday_stop"];} - elseif (isset($_POST["ct_tuesday_stop"])) {$ct_tuesday_stop=$_POST["ct_tuesday_stop"];} -if (isset($_GET["ct_wednesday_start"])) {$ct_wednesday_start=$_GET["ct_wednesday_start"];} - elseif (isset($_POST["ct_wednesday_start"])) {$ct_wednesday_start=$_POST["ct_wednesday_start"];} -if (isset($_GET["ct_wednesday_stop"])) {$ct_wednesday_stop=$_GET["ct_wednesday_stop"];} - elseif (isset($_POST["ct_wednesday_stop"])) {$ct_wednesday_stop=$_POST["ct_wednesday_stop"];} -if (isset($_GET["ct_thursday_start"])) {$ct_thursday_start=$_GET["ct_thursday_start"];} - elseif (isset($_POST["ct_thursday_start"])) {$ct_thursday_start=$_POST["ct_thursday_start"];} -if (isset($_GET["ct_thursday_stop"])) {$ct_thursday_stop=$_GET["ct_thursday_stop"];} - elseif (isset($_POST["ct_thursday_stop"])) {$ct_thursday_stop=$_POST["ct_thursday_stop"];} -if (isset($_GET["ct_friday_start"])) {$ct_friday_start=$_GET["ct_friday_start"];} - elseif (isset($_POST["ct_friday_start"])) {$ct_friday_start=$_POST["ct_friday_start"];} -if (isset($_GET["ct_friday_stop"])) {$ct_friday_stop=$_GET["ct_friday_stop"];} - elseif (isset($_POST["ct_friday_stop"])) {$ct_friday_stop=$_POST["ct_friday_stop"];} -if (isset($_GET["ct_saturday_start"])) {$ct_saturday_start=$_GET["ct_saturday_start"];} - elseif (isset($_POST["ct_saturday_start"])) {$ct_saturday_start=$_POST["ct_saturday_start"];} -if (isset($_GET["ct_saturday_stop"])) {$ct_saturday_stop=$_GET["ct_saturday_stop"];} - elseif (isset($_POST["ct_saturday_stop"])) {$ct_saturday_stop=$_POST["ct_saturday_stop"];} -if (isset($_GET["state_call_time_state"])) {$state_call_time_state=$_GET["state_call_time_state"];} - elseif (isset($_POST["state_call_time_state"])) {$state_call_time_state=$_POST["state_call_time_state"];} -if (isset($_GET["state_rule"])) {$state_rule=$_GET["state_rule"];} - elseif (isset($_POST["state_rule"])) {$state_rule=$_POST["state_rule"];} -if (isset($_GET["delete_call_times"])) {$delete_call_times=$_GET["delete_call_times"];} - elseif (isset($_POST["delete_call_times"])) {$delete_call_times=$_POST["delete_call_times"];} -if (isset($_GET["modify_call_times"])) {$modify_call_times=$_GET["modify_call_times"];} - elseif (isset($_POST["modify_call_times"])) {$modify_call_times=$_POST["modify_call_times"];} -if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} - elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} -if (isset($_GET["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} - elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} -if (isset($_GET["attempt_delay"])) {$attempt_delay=$_GET["attempt_delay"];} - elseif (isset($_POST["attempt_delay"])) {$attempt_delay=$_POST["attempt_delay"];} -if (isset($_GET["attempt_maximum"])) {$attempt_maximum=$_GET["attempt_maximum"];} - elseif (isset($_POST["attempt_maximum"])) {$attempt_maximum=$_POST["attempt_maximum"];} - - if (isset($script_id)) {$script_id= strtoupper($script_id);} - if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS ONLY ### -$user_level = ereg_replace("[^0-9]","",$user_level); -$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); -$xferconf_a_number = ereg_replace("[^0-9]","",$xferconf_a_number); -$xferconf_b_number = ereg_replace("[^0-9]","",$xferconf_b_number); -$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); -$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); -$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); -$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); -$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); -$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); -$drop_exten = ereg_replace("[^0-9]","",$drop_exten); -$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); -$park_ext = ereg_replace("[^0-9]","",$park_ext); -$hopper_level = ereg_replace("[^0-9]","",$hopper_level); -$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); -$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); -$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); -$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); -$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); -$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); -$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); -$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); -$delete_users = ereg_replace("[^0-9]","",$delete_users); -$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); -$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); -$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); -$delete_lists = ereg_replace("[^0-9]","",$delete_lists); -$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); -$delete_filters = ereg_replace("[^0-9]","",$delete_filters); -$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); -$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); -$load_leads = ereg_replace("[^0-9]","",$delete_call_times); -$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); -$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); -$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); -$modify_leads = ereg_replace("[^0-9]","",$modify_leads); -$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); -$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); -$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); -$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); -$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); -$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); -$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); -$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); -$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); -$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); -$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); -$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); -$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); -$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); -$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); -$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); -$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); -$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); -$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); -$user_start = ereg_replace("[^0-9]","",$user_start); -$phone_number = ereg_replace("[^0-9]","",$phone_number); -$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); -$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); -$hotkey = ereg_replace("[^0-9]","",$hotkey); -$list_id = ereg_replace("[^0-9]","",$list_id); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); -$allow_closers = ereg_replace("[^NY]","",$allow_closers); -$reset_hopper = ereg_replace("[^NY]","",$reset_hopper); -$amd_send_to_vmx = ereg_replace("[^NY]","",$amd_send_to_vmx); -$alt_number_dialing = ereg_replace("[^NY]","",$alt_number_dialing); -$safe_harbor_message = ereg_replace("[^NY]","",$safe_harbor_message); -$selectable = ereg_replace("[^NY]","",$selectable); -$reset_list = ereg_replace("[^NY]","",$reset_list); -$fronter_display = ereg_replace("[^NY]","",$fronter_display); -$drop_message = ereg_replace("[^NY]","",$drop_message); -$use_internal_dnc = ereg_replace("[^NY]","",$use_internal_dnc); - -### ALPHA-NUMERIC ONLY ### -$user = ereg_replace("[^0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^0-9a-zA-Z]","",$pass); -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$script_id = ereg_replace("[^0-9a-zA-Z]","",$script_id); -$submit = ereg_replace("[^0-9a-zA-Z]","",$submit); -$CoNfIrM = ereg_replace("[^0-9a-zA-Z]","",$CoNfIrM); -$campaign_cid = ereg_replace("[^0-9a-zA-Z]","",$campaign_cid); -$get_call_launch = ereg_replace("[^0-9a-zA-Z]","",$get_call_launch); -$campaign_recording = ereg_replace("[^0-9a-zA-Z]","",$campaign_recording); -$ADD = ereg_replace("[^0-9a-zA-Z]","",$ADD); -$dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$dial_prefix); -$state_call_time_state = ereg_replace("[^0-9a-zA-Z]","",$state_call_time_state); -$scheduled_callbacks = ereg_replace("[^0-9a-zA-Z]","",$scheduled_callbacks); - -### DIGITS and Dots -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); - -### DIGITS and spaces and hash and star and comma -$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_a_dtmf); -$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9]","",$xferconf_b_dtmf); - -### ALPHA-NUMERIC and underscore and dash -$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); -$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); -$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); -$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); -$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); -$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); -$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); -$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); -$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); -$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); -$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); -$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); -$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); -$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); -$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); -$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); -$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); -$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); -$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); - -### ALPHA-NUMERIC and spaces -$lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); -### ALPHA-NUMERIC and hash -$group_color = ereg_replace("[^\#0-9a-zA-Z]","",$group_color); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); -$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); -$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); -$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); -$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); -$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); -$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); -$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); -$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); -$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); -$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); -$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); -$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); - -### remove semi-colons ### -$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); - -### VARIABLES TO BE mysql_real_escape_string ### -# $web_form_address -# $script_text - -##### END VARIABLE FILTERING FOR SECURITY ##### - - -# AST GUI database administration -# admin.php -# -# CHANGES -# 50315-1110 - Added Custom Campaign Statuses -# 50317-1438 - Added Fronter Display var to inbound groups -# 50322-1355 - Added custom callerID per campaign -# 50517-1356 - Added user_groups sections and user_group to vicidial_users -# 50517-1440 - Added ability to logout (must click OK with empty user/pass) -# 50602-1622 - Added lead loader pages to load new files into vicidial_list -# 50620-1351 - Added custom vdad transfer AGI extension per campaign -# 50810-1414 - modified in groups to kick out spaces and dashes -# 50908-2136 - Added Custom Campaign HotKeys -# 50914-0950 - Fixed user search by user_group -# 50926-1358 - Modified to allow for language translation -# 50926-1615 - Added WeBRooTWritablE write controls -# 51020-1008 - Added editable web address and park ext - NEW dial campaigns -# 51020-1056 - Added fields and help for campaign recording control -# 51123-1335 - Altered code to function in php globals=off -# 51208-1038 - Added user_level changes, function controls and default user phones -# 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents -# 51213-1706 - Added add/delete/modify vicidial scripts -# 51214-1737 - Added preview of vicidial script in popup window -# 51219-1225 - Added campaign and ingroups script selector and get_call_launch field -# 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button -# 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug -# 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen -# 60204-0659 - Fixed hopper reset bug -# 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets -# 60213-1100 - Added several vicidial_users permissions fields -# 60215-1319 - Added On-hold CallBacks display and links -# 60227-1226 - Fixed vicidial_inbound_groups insert bug -# 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables -# - Added status name in selected dial statuses in campaign screen -# 60417-1416 - Added vicidial_lead_filters sections -# - Changed the header links to color-coded sectional with sublinks below -# - Added filter name and script name to campaign and in-group modify sections -# - Added callback and alt dial options to campaigns section -# - Added callback, alt dial and other options to users section -# 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered -# 60421-1441 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60425-2355 - Added agent options to vicidial_users, reformatted user page -# 60502-1627 - Added drop_call_seconds and safe_harbor_ fields to campaign screen -# 60503-1228 - Added drop_call_seconds and drop_ fields to inbound groups screen -# 60505-1117 - Added initial framework for new local_call_times tables and definitions -# 60506-1033 - More revisions to the local_call_time section -# 60508-1354 - Finished call_times and state_call_times sections -# - Added modify/delete options for call_times -# 60509-1311 - Functionalize campaign dialable leads calculation -# - Change state_call_times selection from call_times to only allow one per state -# - Added dialable leads count popup to campaign screen if auto-calc is disabled -# - Added test dialable leads count popup to filter screen -# 60510-1050 - Added Wrapup seconds and Wrapup message to campaigns screen -# 60608-1401 - Added allowable inbound_groups checkboxes to CLOSER campaign detail screen -# 60609-1051 - Added add-to-dnc in LISTS section -# 60613-1415 - Added lead recycling options to campaign detail screen -# 60619-1523 - Added variable filtering to eliminate SQL injection attack threat -# 60622-1216 - Fixed HotKey addition form issues and variable filtering -# 60623-1159 - Fixed Scheduled Callbacks over-filtering bug and filter_sql bug -# - -# 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 - -$version = '1.1.12-3'; -$build = '60623-1159'; - -$STARTtime = date("U"); - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGuser_level =$row[4]; - $LOGdelete_users =$row[8]; - $LOGdelete_user_groups =$row[9]; - $LOGdelete_lists =$row[10]; - $LOGdelete_campaigns =$row[11]; - $LOGdelete_ingroups =$row[12]; - $LOGdelete_remote_agents =$row[13]; - $LOGload_leads =$row[14]; - $LOGcampaign_detail =$row[15]; - $LOGdelete_scripts =$row[18]; - $LOGdelete_filters =$row[29]; - $LOGalter_agent_interface =$row[30]; - $LOGdelete_call_times =$row[32]; - $LOGmodify_call_times =$row[33]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDIAL ADMIN: "; - -if (!isset($ADD)) {$ADD=0;} - -if ($ADD==1) {$hh='users'; echo "Add New User";} -if ($ADD==11) {$hh='campaigns'; echo "Add New Campaign";} -if ($ADD==111) {$hh='lists'; echo "Add New List";} -if ($ADD==121) {$hh='lists'; echo "Add New DNC";} -if ($ADD==1111) {$hh='ingroups'; echo "Add New In-Group";} -if ($ADD==11111) {$hh='remoteagent'; echo "Add New Remote Agents";} -if ($ADD==111111) {$hh='usergroups'; echo "Add New Users Group";} -if ($ADD==1111111) {$hh='scripts'; echo "Add New Script";} -if ($ADD==11111111) {$hh='filters'; echo "Add New Filter";} -if ($ADD==111111111) {$hh='times'; echo "Add New Call Time";} -if ($ADD==1111111111) {$hh='times'; echo "Add New State Call Time";} -if ($ADD==2) {$hh='users'; echo "New User Addition";} -if ($ADD==21) {$hh='campaigns'; echo "New Campaign Addition";} -if ($ADD==22) {$hh='campaigns'; echo "New Campaign Status Addition";} -if ($ADD==23) {$hh='campaigns'; echo "New Campaign HotKey Addition";} -if ($ADD==25) {$hh='campaigns'; echo "New Campaign Lead Recycle Addition";} -if ($ADD==211) {$hh='lists'; echo "New List Addition";} -if ($ADD==2111) {$hh='ingroups'; echo "New In-Group Addition";} -if ($ADD==21111) {$hh='remoteagent'; echo "New Remote Agents Addition";} -if ($ADD==211111) {$hh='usergroups'; echo "New Users Group Addition";} -if ($ADD==2111111) {$hh='scripts'; echo "New Script Addition";} -if ($ADD==21111111) {$hh='filters'; echo "New Filter Addition";} -if ($ADD==211111111) {$hh='times'; echo "New Call Time Addition";} -if ($ADD==2111111111) {$hh='times'; echo "New State Call Time Addition";} -if ($ADD==3) {$hh='users'; echo "Modify User";} -if ($ADD==31) {$hh='campaigns'; echo "Modify Campaign";} -if ($ADD==34) {$hh='campaigns'; echo "Modify Campaign - Basic View";} -if ($ADD==311) {$hh='lists'; echo "Modify List";} -if ($ADD==3111) {$hh='ingroups'; echo "Modify In-Group";} -if ($ADD==31111) {$hh='remoteagent'; echo "Modify Remote Agents";} -if ($ADD==311111) {$hh='usergroups'; echo "Modify Users Groups";} -if ($ADD==3111111) {$hh='scripts'; echo "Modify Script";} -if ($ADD==31111111) {$hh='filters'; echo "Modify Filter";} -if ($ADD==311111111) {$hh='times'; echo "Modify Call Time";} -if ($ADD==321111111) {$hh='times'; echo "Modify Call Time State Definitions List";} -if ($ADD==3111111111) {$hh='times'; echo "Modify State Call Time";} -if ($ADD=="4A") {$hh='users'; echo "Modify User - Admin";} -if ($ADD=="4B") {$hh='users'; echo "Modify User - Admin";} -if ($ADD==4) {$hh='users'; echo "Modify User";} -if ($ADD==41) {$hh='campaigns'; echo "Modify Campaign";} -if ($ADD==42) {$hh='campaigns'; echo "Modify Campaign Status";} -if ($ADD==43) {$hh='campaigns'; echo "Modify Campaign HotKey";} -if ($ADD==44) {$hh='campaigns'; echo "Modify Campaign - Basic View";} -if ($ADD==45) {$hh='campaigns'; echo "Modify Campaign Lead Recycle";} -if ($ADD==411) {$hh='lists'; echo "Modify List";} -if ($ADD==4111) {$hh='ingroups'; echo "Modify In-Group";} -if ($ADD==41111) {$hh='remoteagent'; echo "Modify Remote Agents";} -if ($ADD==411111) {$hh='usergroups'; echo "Modify Users Groups";} -if ($ADD==4111111) {$hh='scripts'; echo "Modify Script";} -if ($ADD==41111111) {$hh='filters'; echo "Modify Filter";} -if ($ADD==411111111) {$hh='times'; echo "Modify Call Time";} -if ($ADD==4111111111) {$hh='times'; echo "Modify State Call Time";} -if ($ADD==5) {$hh='users'; echo "Delete User";} -if ($ADD==51) {$hh='campaigns'; echo "Delete Campaign";} -if ($ADD==52) {$hh='campaigns'; echo "Logout Agents";} -if ($ADD==511) {$hh='lists'; echo "Delete List";} -if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==51111) {$hh='remoteagent'; echo "Delete Remote Agents";} -if ($ADD==511111) {$hh='usergroups'; echo "Delete Users Group";} -if ($ADD==5111111) {$hh='scripts'; echo "Delete Script";} -if ($ADD==51111111) {$hh='filters'; echo "Delete Filter";} -if ($ADD==511111111) {$hh='times'; echo "Delete Call Time";} -if ($ADD==5111111111) {$hh='times'; echo "Delete State Call Time";} -if ($ADD==6) {$hh='users'; echo "Delete User";} -if ($ADD==61) {$hh='campaigns'; echo "Delete Campaign";} -if ($ADD==62) {$hh='campaigns'; echo "Logout Agents";} -if ($ADD==65) {$hh='campaigns'; echo "Delete Lead Recycle";} -if ($ADD==611) {$hh='lists'; echo "Delete List";} -if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";} -if ($ADD==61111) {$hh='remoteagent'; echo "Delete Remote Agents";} -if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";} -if ($ADD==6111111) {$hh='scripts'; echo "Delete Script";} -if ($ADD==61111111) {$hh='filters'; echo "Delete Filter";} -if ($ADD==611111111) {$hh='times'; echo "Delete Call Time";} -if ($ADD==6111111111) {$hh='times'; echo "Delete State Call Time";} -if ($ADD==73) {$hh='campaigns'; echo "Dialable Lead Count";} -if ($ADD==7111111) {$hh='scripts'; echo "Preview Script";} -if ($ADD==0) {$hh='users'; echo "Users List";} -if ($ADD==8) {$hh='users'; echo "CallBacks Within Agent";} -if ($ADD==81) {$hh='campaigns'; echo "CallBacks Within Campaign";} -if ($ADD==811) {$hh='campaigns'; echo "CallBacks Within List";} -if ($ADD==10) {$hh='campaigns'; echo "Campaigns";} -if ($ADD==100) {$hh='lists'; echo "Lists";} -if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";} -if ($ADD==10000) {$hh='remoteagent'; echo "Remote Agents";} -if ($ADD==100000) {$hh='usergroups'; echo "User Groups";} -if ($ADD==1000000) {$hh='scripts'; echo "Scripts";} -if ($ADD==10000000) {$hh='filters'; echo "Filters";} -if ($ADD==100000000) {$hh='times'; echo "Call Times";} -if ($ADD==1000000000) {$hh='times'; echo "State Call Times";} -if ($ADD==55) {$hh='users'; echo "Search Form";} -if ($ADD==66) {$hh='users'; echo "Search Results";} -if ($ADD==99999) {$hh='users'; echo "HELP";} - -if ( ($ADD>9) && ($ADD < 99998) ) - { - ##### get scripts listing for dynamic pulldown - $stmt="SELECT script_id,script_name from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $scripts_to_print = mysql_num_rows($rslt); - $scripts_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($scripts_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $scripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $scriptname_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - ##### get filters listing for dynamic pulldown - $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_sql from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - $filters_list="<option value=\"\">NONE</option>\n"; - - $o=0; - while ($filters_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $filters_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $filtername_list["$rowx[0]"] = "$rowx[1]"; - $filtersql_list["$rowx[0]"] = "$rowx[2]"; - $o++; - } - - ##### get call_times listing for dynamic pulldown - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $times_to_print = mysql_num_rows($rslt); - - $o=0; - while ($times_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $call_times_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $call_timename_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - } - -if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or ($ADD==21) or ($ADD==31) or ($ADD==41) or ($ADD=="4A") or ($ADD=="4B") ) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ($ADD==31) - { - $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - if ($ADD==3) - { - $stmt="SELECT closer_campaigns from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_value\""; - $p=0; - while ($p<100) - { - if ($group_id_value == $groups[$p]) - { - $groups_list .= " CHECKED"; - $groups_value .= " $group_id_value"; - } - $p++; - } - $groups_list .= "> $group_id_value - $group_name_value<BR>\n"; - $o++; - } - if (strlen($groups_value)>2) {$groups_value .= " -";} - } - - - - - -$NWB = "   <a href=\"javascript:openNewWindow('$PHP_SELF?ADD=99999"; -$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>"; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    VICIDIAL ADMIN: HELP


    \n"; - -?> -VICIDIAL_USERS TABLE

    - -
    -User ID - This field is where you put the VICIDIAL users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. - -
    -
    -
    -Password - This field is where you put the VICIDIAL users password. Must be at least 2 characters in length. - -
    -
    -
    -Full Name - This field is where you put the VICIDIAL users full name. Must be at least 2 characters in length. - -
    -
    -
    -User Level - This menu is where you select the VICIDIAL users user level. Must be a level of 1 to log into VICIDIAL, Must be level greater than 2 to log in as a closer, Must be user level 8 or greater to get into admin web section. - -
    -
    -
    -User Group - This menu is where you select the VICIDIAL users group that this user will belong to. This does not have any restrictions at this time, this is just to subdivide users and allow for future features based upon it. - -
    -
    -
    -Phone Login - Here is where you can set a default phone login value for when the user logs into vicidial.php. This value will populate the phone_login automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. - -
    -
    -
    -Phone Pass - Here is where you can set a default phone pass value for when the user logs into vicidial.php. This value will populate the phone_pass automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. - -
    -
    -
    -HotKeys Active - This option if set to 1 allows the user to use the HotKeys quick-dispositioning function in vicidial.php. - -
    -
    -
    -Agent Choose Ingroups - This option if set to 1 allows the user to choose the ingroups that they will receive calls from when they login to a CLOSER or INBOUND campaign. Otherwise the Manager will need to set this in their user detail screen of the admin page. - -
    -
    -
    -Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - -
    -
    -
    -Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. - -
    -
    -
    -Agent-Only Callbacks - This option allows an agent to set a callback so that they are the only Agent that can call the customer back. This also allows the agent to see their callback listings and call them back any time they want to. - -
    -
    -
    -Agent Call Manual - This option allows an agent to manually enter a new lead into the system and call them. This also allows the calling of any phone number from their vicidial screen and puts that call into their session. Use this option with caution. - -
    -
    -
    -Vicidial Recording - This option can prevent an agent from doing any recordings after they log in to vicidial. This option must be on for vicidial to follow the campaign recording session. - -
    -
    -
    -Vicidial Transfers - This option can prevent an agent from opening the transfer - conference session of vicidial. If this is disabled, the agent cannot third party call or blind transfer any calls. - -
    -
    -
    -Closer Default Blended - This option simply defaults the Blended checkbox on a CLOSER login screen. - -
    -
    -
    -Alter Agent Interface Options - This option if set to 1 allows the administrative user to modify the Agents interface options in admin.php. - -
    -
    -
    -Delete Users - This option if set to 1 allows the user to delete other users of equal or lesser user level from the system. - -
    -
    -
    -Delete User Groups - This option if set to 1 allows the user to delete user groups from the system. - -
    -
    -
    -Delete Lists - This option if set to 1 allows the user to delete vicidial lists from the system. - -
    -
    -
    -Delete Campaigns - This option if set to 1 allows the user to delete vicidial campaigns from the system. - -
    -
    -
    -Delete In-Groups - This option if set to 1 allows the user to delete vicidial In-Groups from the system. - -
    -
    -
    -Delete Remote Agents - This option if set to 1 allows the user to delete vicidial remote agents from the system. - -
    -
    -
    -Load Leads - This option if set to 1 allows the user to load vicidial leads into the vicidial_list table by way of the web based lead loader. - -
    -
    -
    -Campaign Detail - This option if set to 1 allows the user to view and modify the campaign detail screen elements. - -
    -
    -
    -AGC Admin Access - This option if set to 1 allows the user to login to the astGUIclient admin pages. - -
    -
    -
    -AGC Delete Phones - This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages. - -
    -
    -
    -Delete Scripts - This option if set to 1 allows the user to delete Campaign scripts in the script modification screen. - -
    -
    -
    -Modify Leads - This option if set to 1 allows the user to modify leads in the admin section lead search results page. - -
    -
    -
    -Change Agent Campaign - This option if set to 1 allows the user to alter the campaign that an agent is logged into while they are logged into it. - -
    -
    -
    -Delete Filters - This option allows the user to be able to delete vicidial lead filters from the system. - -
    -
    -
    -Delete Call Times - This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system. - -
    -
    -
    -Modify Call Times - This option allows the user to view and modify the call times and state call times records. A user doesn't need this option enabled if they only need to change the call times option on the campaigns screen. - - - - -



    - -VICIDIAL_CAMPAIGNS TABLE

    -
    -
    -Campaign ID - This is the short name of the campaign, it is not editable after initial submission, cannot contain spaces and must be between 2 and 8 characters in length. - -
    -
    -
    -Campaign Name - This is the description of the campaign, it must be between 6 and 40 characters in length. - -
    -
    -
    -Active - This is where you set the campaign to Active or Inactive. If Inactive, noone can log into it. - -
    -
    -
    -Park Extension - This is where you can customize the on-hold music for VICIDIAL. Make sure the extension is in place in the extensions.conf and that it points to the filename below. - -
    -
    -
    -Park File Name - This is where you can customize the on-hold music for VICIDIAL. Make sure the filename is 10 characters in length or less and that the file is in place in the /var/lib/asterisk/sounds directory. - -
    -
    -
    -Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. - -
    -
    -
    -Allow Closers - This is where you can set whether the users of this campaign will have the option to send the call to a closer. - -
    -
    -
    -Dial Status - This is where you set the statuses that you are wanting to dial on within the lists that are active for the campaign below - -
    -
    -
    -List Order - This menu is where you select how the leads that match the statuses selected above will be put in the lead hopper: -
      - DOWN: select the first leads loaded into the vicidial_list table -
      - UP: select the last leads loaded into the vicidial_list table -
      - UP PHONE: select the highest phone number and works its way down -
      - DOWN PHONE: select the lowest phone number and works its way up -
      - UP LAST NAME: starts with last names starting with Z and works its way down -
      - DOWN LAST NAME: starts with last names starting with A and works its way up -
      - UP COUNT: starts with most called leads and works its way down -
      - DOWN COUNT: starts with least called leads and works its way up -
      - DOWN COUNT 2nd NEW: starts with least called leads and works its way up inserting a NEW lead in every other lead - Must NOT have NEW selected in the dial statuses -
      - DOWN COUNT 3nd NEW: starts with least called leads and works its way up inserting a NEW lead in every third lead - Must NOT have NEW selected in the dial statuses -
      - DOWN COUNT 4th NEW: starts with least called leads and works its way up inserting a NEW lead in every forth lead - Must NOT have NEW selected in the dial statuses - -
    -
    -
    -Hopper Level - This is how many leads the VDhopper script tries to keep in the vicidial_hopper table for this campaign. If running VDhopper script every minute, make this slightly greater than the number of leads you go through in a minute. - -
    -
    -
    -Lead Filter - This is a method of filtering your leads using a fragment of a SQL query. Use this feature with caution, it is easy to stop dialing accidentally with the slightest alteration to the SQL statement. Default is NONE. - -
    -
    -
    -Force Reset of Hopper - This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs. - -
    -
    -
    -Auto Dial Level - This is where you set how many lines VICIDIAL should use per active agent. zero 0 means auto dialing is off and the agents will click to dial each number. Otherwise VICIDIAL will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. - -
    -
    -
    -Next Agent Call - This determines which agent receives the next call that is available: -
      - random: orders by the random update value in the vicidial_live_agents table -
      - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
      - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. -
      - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. - -
    -
    -
    -Local Call Time - This is where you set during which hours you would like to dial, as determined by the local time in the are in which you are calling. This is controlled by area code and is adjusted for Daylight Savings time if applicable. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm. - -
    -
    -
    -Dial Timeout - If defined, calls that would normally hangup after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve. - -
    -
    -
    -Dial Prefix - This field allows for more easily changing a path of dialing to go out through a different method without doing a reload in Asterisk. Default is 9 based upon a 91NXXNXXXXXX in the dialplan - extensions.conf. - -
    -
    -
    -Campaign CallerID - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service(RBS) circuits. This will also work through most VOIP(SIP or IAX trunks) providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. - -
    -
    -
    -Campaign VDAD extension - This field allows for a custom VDAD transfer extension. This allows you to use different VDADtransfer...agi scripts depending upon your campaign. The default transfer AGI - exten 8365 agi-VDADtransfer.agi - just immediately sends the calls on to agents as soon as they are picked up. An additional sample political survey AGI is also now included - 8366 agi-VDADtransferSURVEY.agi - that plays a message to the called person and allows them to make a choice by pressing buttons - effectively pre-screening the lead - . Please note that except for surveys, political calls and charities this form of calling is illegal in the United States. - -
    -
    -
    -Campaign Rec extension - This field allows for a custom recording extension to be used with VICIDIAL. This allows you to use different extensions depending upon how long you want to allow a maximum recording and what type of codec you want to record in. The default exten is 8309 which if you follow the SCRATCH_INSTALL examples will record in the WAV format for upto one hour. Another option included in the examples is 8310 which will record in GSM format for upto one hour. - -
    -
    -
    -Campaign Recording - This menu allows you to choose what level of recording is allowed on this campaign. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. - -
    -
    -
    -Campaign Rec Filename - This field allows you to customize the name of the recording when Campaign recording is ONDEMAND or ALLCALLS. The allowed variables are CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. 50 char max. - -
    -
    -
    -Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. - -
    -
    -
    -Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. - -
    -
    -
    -Answering Machine Message - This field is for entering in an extension to blind transfer calls to when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this exten up in the dialplan - extensions.conf - and make sure it plays an audio file then hangs up. - -
    -
    -
    -AMD send to vm exten - This menu allows you to define whether a message is left on an answering machine when it is detected. the call will be immediately forwarded to the Answering-Machine-Message extension if AMD is active and it is determined that the call is an answering machine. - -
    -
    -
    -Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. - -
    -
    -
    -Agent Alt Num Dialing - This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called. - -
    -
    -
    -Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. - -
    -
    -
    -Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls. - -
    -
    -
    -Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. - -
    -
    -
    -Safe Harbor Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y. - -
    -
    -
    -Safe Harbor Exten - This is the dialplan extension that the desired Safe Harbor audio file is located at on your server. - -
    -
    -
    -Wrapup Seconds - The number of seconds to force an agent to wait before allowing them to receive or dial another call. The timer begins as soon as an agent hangs up on their customer - or in the case of alternate number dialing when the agent finishes the lead - Default is 0 seconds. If the timer runs out before the agent has dispositioned the call, the agent still will NOT move on to the next call until they select a disposition. - -
    -
    -
    -Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set. - -
    -
    -
    -Wrapup Message - This is a campaign-specific message to be displayed on the wrapup screen if wrapup seconds is set. - -
    -
    -
    -Use Internal DNC List - This defines whether this campaign is to filter leads against the Internal DNC list. If it is set to Y, the hopper will look for each phone number in the DNC list before placing it in the hopper. If it is in the DNC list then it will change that lead status to DNCL so it cannot be dialed. Default is N. - -
    -
    -
    -Allowed Inbound Groups - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound/outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. - - - -



    - -VICIDIAL_LISTS TABLE

    -
    -
    -List ID - This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. - -
    -
    -
    -List Name - This is the description of the list, it must be between 2 and 20 characters in length. - -
    -
    -
    -Campaign - This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time. - -
    -
    -
    -Active - This defines whether the list is to be dialed on or not. - -
    -
    -
    -Reset Lead-Called-Status for this list - This resets all leads in this list to N for "not called since last reset" and means that any lead can now be called if it is the right status as defined in the campaign screen. - -
    -
    -
    -VICIDIAL DNC List - This Do Not Call list contains every lead that has been set to a status of DNC in the system. Through the LISTS - ADD NUMBER TO DNC page you are able to manually add a number to this list so that it will not be called by campaigns that use the internal DNC list. - - - -



    - -VICIDIAL_INBOUND_GROUPS TABLE

    -
    -
    -Group ID - This is the short name of the inbound group, it is not editable after initial submission, must not contain any spaces and must be between 2 and 20 characters in length. - -
    -
    -
    -Group Name - This is the description of the group, it must be between 2 and 30 characters in length. Cannot include dashes, plusses or spaces . - -
    -
    -
    -Group Color - This is the color that displays in the VICIDIAL client app when a call comes in on this group. It must be between 2 and 7 characters long. If this is a hex color definition you must remember to put a # at the beginning of the string or VICIDIAL will not work properly. - -
    -
    -
    -Active - This determines whether this group show up in the selection box when a VICIDIAL agent logs in. - -
    -
    -
    -Web Form - This is the custom address that clicking on the WEB FORM button in VICIDIAL will take you to for calls that come in on this group. - -
    -
    -
    -Next Agent Call - This determines which agent receives the next call that is available: -
      - random: orders by the random update value in the vicidial_live_agents table -
      - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
      - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. -
      - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. - -
    -
    -
    -Fronter Display - This field determines whether the inbound VICIDIAL agent would have the fronter name - if there is one - displayed in the Status field when the call comes to the agent. - -
    -
    -
    -Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. - -
    -
    -
    -Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. - -
    -
    -
    -Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. - -
    -
    -
    -Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls. - -
    -
    -
    -Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. - -
    -
    -
    -Drop Message - If set to Y will play a message to customer after the Drop Call Seconds timeout is reached without being transferred to an agent. This setting will override sending to a voicemail box if this is set to Y. - -
    -
    -
    -Drop Exten - This is the dialplan extension that the desired Dropped call audio file is located at on your server. - - - -



    - -VICIDIAL_REMOTE_AGENTS TABLE

    -
    -
    -User ID Start - This is the starting User ID that is used when the remote agent entries are inserted into the system. If the Number of Lines is set higher than 1, this number is incremented by one until each line has an entry. Make sure you create a new VICIDIAL user account with a user level of 4 or great if you want them to be able to use the vdremote.php page for remote web access of this account. - -
    -
    -
    -Number of Lines - This defines how many remote agent entries the system creates, and determines how many lines it thinks it can safely send to the number below. - -
    -
    -
    -Server IP - A remote agent entry is only good for one specific server, here is where you select which server you want. - -
    -
    -
    -External Extension - This is the number that you want the calls forwarded to. Make sure that it is a full dialplan number and that if you need a 9 at the beginning you put it in here. Test by dialing this number from a phone on the system. - -
    -
    -
    -Status - Here is where you turn the remote agent on and off. As soon as the agent is Active the system assumes that it can send calls to it. It may take up to 30 seconds once you change the status to Inactive to stop receiving calls. - -
    -
    -
    -Campaign - Here is where you select the campaign that these remote agents will be logged into. Inbound needs to use the CLOSER campaign and select the inbound campaigns below that you want to receive calls from. - -
    -
    -
    -Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - - -



    - -VICIDIAL_CAMPAIGN_LISTS

    -
    -
    -The lists within this campaign are listed here, whether they are active is denoted by the Y or N and you can go to the list screen by clicking on the list ID in the first column. - - -



    - -VICIDIAL_CAMPAIGN_STATUSES TABLE

    -
    -
    -Through the use of custom campaign statuses, you can have statuses that only exist for a specific campaign. The Status must be 1-8 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as a disposition. - - - -



    - -VICIDIAL_CAMPAIGN_HOTKEYS TABLE

    -
    -
    -Through the use of custom campaign hotkeys, agents that use the vicidial web-client can hangup and disposition calls just by pressing a single key on their keyboard. - - - - -



    - -VICIDIAL_LEAD_RECYCLE TABLE

    -
    -
    -Through the use of lead recycling, you can call specific statuses of leads again at a specified interval without resetting the entire list. Lead recycling is campaign-specific and does not have to be a selected dialable status in your campaign. The attempt delay field is the number of seconds until the lead can be placed back in the hopper, this number must be at least 120 seconds. The attempt maximum field is the maximum number of times that a lead of this status can be attempted before the list needs to be reset, this number can be from 1 to 10. You can activate and deactivate a lead recycle entry with the provided links. This feature only works in auto-dial mode, where dial level is greater than 0. - - - - - -



    - -VICIDIAL_USER_GROUPS TABLE

    -
    -
    -User Group - This is the short name of a Vicidial User group, try not to use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. - -
    -
    -
    -Group Name - This is the description of the vicidial user group max of 40 characters. - - - - - -



    - -VICIDIAL_SCRIPTS TABLE

    -
    -
    -Script ID - This is the short name of a Vicidial Script. This needs to be a unique identifier. Try not to use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Script Name - This is the title of a Vicidial Script. This is a short summary of the script. max 50 characters, minimum of 2 characters. There should be no spaces or punctuation of any kind in theis field. - -
    -
    -Script Comments - This is where you can place comments for a Vicidial Script such as -changed to free upgrade on Sept 23-. max 255 characters, minimum of 2 characters. - -
    -
    -Script Text - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments. For example, this sentence would print the persons name in it----

    Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

    This would read----

    Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today? - -
    -
    -
    -Active - This determines whether this script can be selected to be used by a campaign. - - - - - -



    - -VICIDIAL_LEAD_FILTERS TABLE

    -
    -
    -Filter ID - This is the short name of a Vicidial Lead Filter. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Filter Name - This is a more descriptive name of the Filter. This is a short summary of the filter. max 30 characters, minimum of 2 characters. - -
    -
    -Filter Comments - This is where you can place comments for a Vicidial Filter such as -calls all California leads-. max 255 characters, minimum of 2 characters. - -
    -
    -Filter SQL - This is where you place the SQL query fragment that you want to filter by. do not begin or end with an AND, that will be added by the hopper cron script automatically. an example SQL query that would work here is- called_count > 4 and called_count < 8 -. - - - - - -



    - -VICIDIAL_CALL TIMES TABLE

    -
    -
    -Call Time ID - This is the short name of a Vicidial Call Time Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
    -
    -Call Time Name - This is a more descriptive name of the Call Time Definition. This is a short summary of the Call Time definition. max 30 characters, minimum of 2 characters. - -
    -
    -Call Time Comments - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters. - -
    -
    -Default Start and Stop Times - This is the default time that calling will be allowed to be started or stopped within this call time definition if the day-of-the-week start time is not defined. 0 is midnight. To prevent calling completely set this field to 2400 and set the Default Stop time to 2400. To allow calling 24 hours a day set the start time to 0 and the stop time to 2400. - -
    -
    -Weekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times. - -
    -
    -State Call Time Definitions - This is the list of State specific call time definitions that are followed in this Call Time Definition. - -
    -
    -State Call Time State - This is the two letter code for the state that this calling time definition is for. For this to be in effect the local call time that is set in the campaign must have this state call time record in it as well as all of the leads having two letter state codes in them. - - - - -



    - -VICIDIAL LIST LOADER FUNCTIONALITY

    -
    -
    -The VICIDIAL basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. There is also a new beta version super lead loader that allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation or check for duplicates in itself or other lists, so that is something you need to do before you load the leads. Also, make sure that you have created the list that these leads are to be under so that you can use them. There is also the matter of time-zone-coding these leads. You may want to increase the frequency that the ADMIN_adjust_GMTnow_on_leads.pl is being run in the cron on your Asterisk server so that any loaded leads can be coded faster. Here is a list of the fields in their proper order for the lead files: -
      -
    1. Vendor Lead Code - shows up in the Vendor ID field of the GUI -
    2. Source Code - internal use only for admins and DBAs -
    3. List ID - the list number that these leads will show up under -
    4. Phone Code - the prefix for the phone number - 1 for US, 01144 for UK, 01161 for AUS, etc -
    5. Phone Number - must be at least 8 digits long -
    6. Title - title of the customer - Mr. Ms. Mrs, etc... -
    7. First Name -
    8. Middle Initial -
    9. Last Name -
    10. Address Line 1 -
    11. Address Line 2 -
    12. Address Line 3 -
    13. City -
    14. State - limited to 2 characters -
    15. Province -
    16. Postal Code -
    17. Country -
    18. Gender -
    19. Date of Birth -
    20. Alternate Phone Number -
    21. Email Address -
    22. Security Phrase -
    23. Comments -
    - -
    NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /home/cron/AST_SERVER_conf.pl file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. - -







    -







    -THE END -
    -\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$dial_status_a = $row[3]; -$dial_status_b = $row[4]; -$dial_status_c = $row[5]; -$dial_status_d = $row[6]; -$dial_status_e = $row[7]; -$local_call_time = $row[16]; -if ($lead_filter_id=='') - { - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') - { - $lead_filter_id='NONE'; - } - } - -$stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; -$rslt=mysql_query($stmt, $link); -$lists_to_print = mysql_num_rows($rslt); -$camp_lists=''; -$o=0; -while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; -if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";} -} -$camp_lists = eregi_replace(".$","",$camp_lists); - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - -echo "

    \n"; -echo "Show Dialable Leads Count -

    \n"; -echo "CAMPAIGN: $campaign_id
    \n"; -echo "LISTS: $camp_lists
    \n"; -echo "STATUSES: $dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e
    \n"; -echo "FILTER: $lead_filter_id
    \n"; -echo "CALL TIME: $local_call_time

    \n"; - -### call function to calculate and print dialable leads -dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - -echo "

    \n"; -echo "\n"; - -exit; -} - - -###################### -# ADD=7111111 view sample script with test variables -###################### - -if ($ADD==7111111) -{ - ##### TEST VARIABLES ##### - $vendor_lead_code = 'VENDORLEADCODE'; - $list_id = 'LISTID'; - $gmt_offset_now = 'GMTOFFSET'; - $phone_code = '1'; - $phone_number = '7275551212'; - $title = 'Mr.'; - $first_name = 'JOHN'; - $middle_initial = 'Q'; - $last_name = 'PUBLIC'; - $address1 = '1234 Main St.'; - $address2 = 'Apt. 3'; - $address3 = 'ADDRESS3'; - $city = 'CHICAGO'; - $state = 'IL'; - $province = 'PROVINCE'; - $postal_code = '33760'; - $country_code = 'USA'; - $gender = 'M'; - $date_of_birth = '1970-01-01'; - $alt_phone = '3125551212'; - $email = 'test@test.com'; - $security_phrase = 'SECUTIRY'; - $comments = 'COMMENTS FIELD'; - $RGfullname = 'JOE AGENT'; - $RGuser = '6666'; - -echo "\n"; -echo "\n"; -echo "\n"; -echo ""; - -$stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$script_name = $row[1]; -$script_text = $row[3]; - -$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); -$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text); -$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text); -$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text); -$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text); -$script_text = eregi_replace('--A--title--B--',"$title",$script_text); -$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text); -$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text); -$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text); -$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text); -$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text); -$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text); -$script_text = eregi_replace('--A--city--B--',"$city",$script_text); -$script_text = eregi_replace('--A--state--B--',"$state",$script_text); -$script_text = eregi_replace('--A--province--B--',"$province",$script_text); -$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text); -$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text); -$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text); -$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text); -$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text); -$script_text = eregi_replace('--A--email--B--',"$email",$script_text); -$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text); -$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text); -$script_text = eregi_replace('--A--fullname--B--',"$RGfullname",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace("\n","
    ",$script_text); - - -echo ""; - -echo "Preview Script: $script_id
    \n"; -echo "
    \n"; -echo "
    $script_name
    \n"; -echo "$script_text\n"; -echo "
    \n"; - -echo "\n"; - -exit; -} - - - - -######################### HTML HEADER BEGIN ####################################### -if ($hh=='users') {$users_hh='bgcolor ="#FFFF99"'; $users_fc='BLACK';} # yellow - else {$users_hh=''; $users_fc='WHITE';} -if ($hh=='campaigns') {$campaigns_hh='bgcolor ="#FFCC99"'; $campaigns_fc='BLACK';} # orange - else {$campaigns_hh=''; $campaigns_fc='WHITE';} -if ($hh=='lists') {$lists_hh='bgcolor ="#FFCCCC"'; $lists_fc='BLACK';} # red - else {$lists_hh=''; $lists_fc='WHITE';} -if ($hh=='ingroups') {$ingroups_hh='bgcolor ="#CC99FF"'; $ingroups_fc='BLACK';} # purple - else {$ingroups_hh=''; $ingroups_fc='WHITE';} -if ($hh=='remoteagent') {$remoteagent_hh='bgcolor ="#CCFFCC"'; $remoteagent_fc='BLACK';} # green - else {$remoteagent_hh=''; $remoteagent_fc='WHITE';} -if ($hh=='usergroups') {$usergroups_hh='bgcolor ="#CCFFFF"'; $usergroups_fc='BLACK';} # cyan - else {$usergroups_hh=''; $usergroups_fc='WHITE';} -if ($hh=='scripts') {$scripts_hh='bgcolor ="#99FFCC"'; $scripts_fc='BLACK';} # light teal - else {$scripts_hh=''; $scripts_fc='WHITE';} -if ($hh=='filters') {$filters_hh='bgcolor ="#CCCCCC"'; $filters_fc='BLACK';} # grey - else {$filters_hh=''; $filters_fc='WHITE';} -if ($hh=='times') {$times_hh='bgcolor ="#99FF33"'; $times_fc='BLACK';} # hard teal - else {$times_hh=''; $times_fc='WHITE';} - -?> - - - - -\n"; -?> -
    - - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - - - - -
      VICIDIAL ADMIN - Logout  
    > SIZE=1> USERS > SIZE=1> CAMPAIGNS > SIZE=1> LISTS > SIZE=1> SCRIPTS > SIZE=1> FILTERS > SIZE=1> IN-GROUPS > SIZE=1> CALL TIMES > SIZE=1> USER GROUPS > SIZE=1> REMOTE AGENTS > REPORTS
      LIST USERS     |     ADD A NEW USER     |     SEARCH FOR A USER
      ADD CAMPAIGN     |     LIST CAMPAIGNS
      SHOW LISTS     |     ADD NEW LIST     |     SEARCH FOR A LEAD |     ADD NUMBER TO DNC           |     LOAD NEW LEADS
      ADD SCRIPT     |     VIEW SCRIPTS
      ADD FILTER     |     VIEW FILTERS
      SHOW IN-GROUPS     |     ADD NEW IN-GROUP
      SHOW CALL TIMES     |     ADD NEW CALL TIME     |     SHOW STATE CALL TIMES     |     ADD NEW STATE CALL TIME  
      ADD USER GROUP     |     LIST USER GROUPS     |     GROUP HOURLY
      SHOW REMOTE AGENTS     |     ADD NEW REMOTE AGENTS
     
    -
    \n"; -echo ""; - -echo "
    ADD A NEW USER
    \n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "$NWB#vicidial_users-user_group$NWE\n"; -echo "\n"; -echo "
    User Number: $NWB#vicidial_users-user$NWE
    Password: $NWB#vicidial_users-pass$NWE
    Full Name: $NWB#vicidial_users-full_name$NWE
    User Level: $NWB#vicidial_users-user_level$NWE
    User Group:
    Phone Login: $NWB#vicidial_users-phone_login$NWE
    Phone Pass: $NWB#vicidial_users-phone_pass$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN -###################### - -if ($ADD==11) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW CAMPAIGN\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Campaign ID: $NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: $NWB#vicidial_campaigns-park_ext$NWE
    Park Filename: $NWB#vicidial_campaigns-park_file_name$NWE
    Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Next Agent Call: $NWB#vicidial_campaigns-next_agent_call$NWE
    Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW LIST FORM SCREEN -###################### - -if ($ADD==111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    List ID: (digits only)$NWB#vicidial_lists-list_id$NWE
    List Name: $NWB#vicidial_lists-list_name$NWE
    Campaign: $NWB#vicidial_lists-campaign_id$NWE
    Active: $NWB#vicidial_lists-active$NWE
    \n"; - -} - - -###################### -# ADD=121 display the ADD NUMBER TO DNC FORM SCREEN and add a new number -###################### - -if ($ADD==121) -{ -echo "
    \n"; -echo ""; - -if (strlen($phone_number) > 2) - { - $stmt="SELECT count(*) from vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    DNC NOT ADDED - This phone number is already in the Do Not Call List: $phone_number

    \n";} - else - { - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$phone_number');"; - $rslt=mysql_query($stmt, $link); - - echo "
    DNC ADDED: $phone_number

    \n"; - - ### LOG INSERTION TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW DNC NUMBER|$PHP_AUTH_USER|$ip|'$phone_number'|\n"); - fclose($fp); - } - } - } - -echo "
    ADD A NUMBER TO THE DNC LIST\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    Phone Number: (digits only)$NWB#vicidial_list-dnc$NWE
    \n"; - -} - - -###################### -# ADD=1111 display the ADD NEW INBOUND GROUP SCREEN -###################### - -if ($ADD==1111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD A NEW INBOUND GROUP\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group ID: (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE
    Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
    Active: $NWB#vicidial_inbound_groups-active$NWE
    Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    \n"; - -} - - -###################### -# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN -###################### - -if ($ADD==11111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW REMOTE AGENTS\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
    External Extension: (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status: $NWB#vicidial_remote_agents-status$NWE
    Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Groups: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - -###################### -# ADD=111111 display the ADD NEW USERS GROUP SCREEN -###################### - -if ($ADD==111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW USERS GROUP\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
    Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -} - - -###################### -# ADD=1111111 display the ADD NEW SCRIPT SCREEN -###################### - -if ($ADD==1111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW SCRIPT\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Script ID: (no spaces or punctuation)$NWB#vicidial_scripts-script_id$NWE
    Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
    Script Comments: $NWB#vicidial_scripts-script_comments$NWE
    Active: $NWB#vicidial_scripts-active$NWE
    Script Text: $NWB#vicidial_scripts-script_text$NWE
    \n"; - -} - - -###################### -# ADD=11111111 display the ADD NEW FILTER SCREEN -###################### - -if ($ADD==11111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW FILTER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Filter ID: (no spaces or punctuation)$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; -} - - -###################### -# ADD=111111111 display the ADD NEW CALL TIME SCREEN -###################### - -if ($ADD==111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW CALL TIME\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    Call Time ID: (no spaces or punctuation)$NWB#vicidial_call_times-call_time_id$NWE
    Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Day and time options will appear once you have created the Call Time Definition
    \n"; -} - - -###################### -# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN -###################### - -if ($ADD==1111111111) -{ -echo "
    \n"; -echo ""; - -echo "
    ADD NEW STATE CALL TIME\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "
    State Call Time ID: (no spaces or punctuation)$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: (no spaces or punctuation)$NWB#vicidial_call_times-state_call_time_state$NWE
    State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    State Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Day and time options will appear once you have created the Call Time Definition
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 2 series, validates form data and inserts the new record into the database -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=2 adds the new user to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USER NOT ADDED - there is already a user in the system with this user number\n";} - else - { - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) - { - echo "
    USER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    user id must be between 2 and 8 characters long\n"; - echo "
    full name and password must be at least 2 characters long\n"; - } - else - { - echo "
    USER ADDED: $user\n"; - - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass) values('$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A USER |$PHP_AUTH_USER|$ip|'$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass'|\n"); - fclose($fp); - } - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new campaign to the system -###################### - -if ($ADD==21) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) - { - echo "
    CAMPAIGN NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    campaign ID must be between 2 and 8 characters in length\n"; - echo "
    campaign name must be between 6 and 40 characters in length\n"; - } - else - { - echo "
    CAMPAIGN ADDED: $campaign_id\n"; - - $stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,active,dial_status_a,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,campaign_script,get_call_launch) values('$campaign_id','$campaign_name','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - echo ""; - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - - } - } -$ADD=31; -} - -###################### -# ADD=22 adds the new campaign status to the system -###################### - -if ($ADD==22) -{ - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN STATUS NOT ADDED - there is already a campaign-status in the system with this name\n";} - else - { - $stmt="SELECT count(*) from vicidial_statuses where status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) - { - echo "
    CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 8 characters in length\n"; - echo "
    status name must be between 2 and 30 characters in length\n"; - } - else - { - echo "
    CAMPAIGN STATUS ADDED: $campaign_id - $status\n"; - - $stmt="INSERT INTO vicidial_campaign_statuses values('$status','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN STATUS |$PHP_AUTH_USER|$ip|'$status','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } - } -$ADD=31; -} - - -###################### -# ADD=23 adds the new campaign hotkey to the system -###################### - -if ($ADD==23) -{ - $HKstatus_data = explode('-----',$HKstatus); - $status = $HKstatus_data[0]; - $status_name = $HKstatus_data[1]; - - echo ""; - $stmt="SELECT count(*) from vicidial_campaign_hotkeys where campaign_id='$campaign_id' and hotkey='$hotkey' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN HOTKEY NOT ADDED - there is already a campaign-hotkey in the system with this hotkey\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    CAMPAIGN HOTKEY NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    hotkey must be a single character between 1 and 9 \n"; - echo "
    status must be between 1 and 8 characters in length\n"; - } - else - { - echo "
    CAMPAIGN HOTKEY ADDED: $campaign_id - $status - $hotkey\n"; - - $stmt="INSERT INTO vicidial_campaign_hotkeys values('$status','$hotkey','$status_name','$selectable','$campaign_id');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CAMPAIGN HOTKEY |$PHP_AUTH_USER|$ip|'$status','$hotkey','$status_name','$selectable','$campaign_id'|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=25 adds the new campaign lead recycle entry to the system -###################### - -if ($ADD==25) -{ - $status = eregi_replace("-----.*",'',$status); - echo ""; - $stmt="SELECT count(*) from vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CAMPAIGN LEAD RECYCLE NOT ADDED - there is already a lead-recycle for this campaign with this status\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD RECYCLE ADDED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="INSERT INTO vicidial_lead_recycle(campaign_id,status,attempt_delay,attempt_maximum,active) values('$campaign_id','$status','$attempt_delay','$attempt_maximum','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new list to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    LIST NOT ADDED - there is already a list in the system with this ID\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or (strlen($list_id) < 2) or (strlen($list_id) > 8) ) - { - echo "
    LIST NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    List ID must be between 2 and 8 characters in length\n"; - echo "
    List name must be at least 2 characters in length\n"; - } - else - { - echo "
    LIST ADDED: $list_id\n"; - - $stmt="INSERT INTO vicidial_lists values('$list_id','$list_name','$campaign_id','$active');"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW LIST |$PHP_AUTH_USER|$ip|'$list_id','$list_name','$campaign_id','$active'|\n"); - fclose($fp); - } - } - } -$ADD=311; -} - - - -###################### -# ADD=2111 adds the new inbound group to the system -###################### - -if ($ADD==2111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    GROUP NOT ADDED - there is already a group in the system with this ID\n";} - else - { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) - { - echo "
    GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Group ID must be between 2 and 20 characters in length and contain no ' -+'.\n"; - echo "
    Group name and group color must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch');"; - $rslt=mysql_query($stmt, $link); - - echo "
    GROUP ADDED: $group_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW GROUP |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000; -} - - -###################### -# ADD=21111 adds new remote agents to the system -###################### - -if ($ADD==21111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    REMOTE AGENTS NOT ADDED - there is already a remote agents entry starting with this userID\n";} - else - { - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    User ID start and external extension must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTE AGENTS ADDED: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|'$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value'|\n"); - fclose($fp); - } - } - } -$ADD=10000; -} - -###################### -# ADD=211111 adds new user group to the system -###################### - -if ($ADD==211111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    USER GROUP NOT ADDED - there is already a user group entry with this name\n";} - else - { - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    USER GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Group name and description must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_user_groups values('$user_group','$group_name');"; - $rslt=mysql_query($stmt, $link); - - echo "
    USER GROUP ADDED: $user_start\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW USER GROUP ENTRY |$PHP_AUTH_USER|$ip|'$user_group','$group_name'|\n"); - fclose($fp); - } - } - } -$ADD=100000; -} - -###################### -# ADD=2111111 adds new script to the system -###################### - -if ($ADD==2111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    SCRIPT NOT ADDED - there is already a script entry with this name\n";} - else - { - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    SCRIPT NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Script name, description and text must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_scripts values('$script_id','$script_name','$script_comments','" . mysql_real_escape_string($script_text) . "','$active');"; - $rslt=mysql_query($stmt, $link); - - echo "
    SCRIPT ADDED: $script_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=1000000; -} - - -###################### -# ADD=21111111 adds new filter to the system -###################### - -if ($ADD==21111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    FILTER NOT ADDED - there is already a filter entry with this ID\n";} - else - { - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Filter ID, name and SQL must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTER ADDED: $lead_filter_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=10000000; -} - - -###################### -# ADD=211111111 adds new call time definition to the system -###################### - -if ($ADD==211111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID and name must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_call_times SET call_time_id='$call_time_id',call_time_name='$call_time_name',call_time_comments='$call_time_comments';"; - $rslt=mysql_query($stmt, $link); - - echo "
    CALL TIME ADDED: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111; -} - - -###################### -# ADD=2111111111 adds new state call time definition to the system -###################### - -if ($ADD==2111111111) -{ - echo ""; - $stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    STATE CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID\n";} - else - { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    STATE CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
    State Call Time ID, name and state must be at least 2 characters in length\n"; - } - else - { - $stmt="INSERT INTO vicidial_state_call_times SET state_call_time_id='$call_time_id',state_call_time_name='$call_time_name',state_call_time_comments='$call_time_comments',state_call_time_state='$state_call_time_state';"; - $rslt=mysql_query($stmt, $link); - - echo "
    STATE CALL TIME ADDED: $call_time_id\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ADD A NEW STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=3111111111; -} - - - - -###################################################################################################### -###################################################################################################### -####### 4 series, record modifications submitted and DB is modified, then on to 3 series forms below -###################################################################################################### -###################################################################################################### - - - -###################### -# ADD=4A submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4A") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - -###################### -# ADD=4B submit user modifications to the system - ADMIN -###################### - -if ($ADD=="4B") -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - - - -###################### -# ADD=4 submit user modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) - { - echo "
    USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
    USER MODIFIED: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER INFO |$PHP_AUTH_USER|$ip|pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass' where user='$user'|\n"); - fclose($fp); - } - } - -$ADD=3; # go to user modification below -} - -###################### -# ADD=41 submit campaign modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign name needs to be at least 6 characters in length\n"; - } - else - { - echo "
    CAMPAIGN MODIFIED: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level', next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',safe_harbor_message='$safe_harbor_message',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    RESETTING CAMPAIGN LEAD HOPPER\n"; - echo "
    - Wait 1 minute before dialing next number\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=42 delete campaign status in the system -###################### - -if ($ADD==42) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign id needs to be at least 2 characters in length\n"; - echo "
    the campaign status needs to be at least 1 characters in length\n"; - } - else - { - echo "
    CUSTOM CAMPAIGN STATUS DELETED: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=43 delete campaign hotkey in the system -###################### - -if ($ADD==43) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) - { - echo "
    CAMPAIGN HOTKEY NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign id needs to be at least 2 characters in length\n"; - echo "
    the campaign status needs to be at least 1 characters in length\n"; - echo "
    the campaign hotkey needs to be at least 1 characters in length\n"; - } - else - { - echo "
    CUSTOM CAMPAIGN HOTKEY DELETED: $campaign_id - $status - $hotkey\n"; - - $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey'|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=44 submit campaign modifications to the system - Basic View -###################### - -if ($ADD==44) -{ - echo ""; - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) - { - echo "
    CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    the campaign name needs to be at least 6 characters in length\n"; - } - else - { - echo "
    CAMPAIGN MODIFIED: $campaign_id\n"; - - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', auto_dial_level='$auto_dial_level',lead_filter_id='$lead_filter_id' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmtA, $link); - - if ($reset_hopper == 'Y') - { - echo "
    RESETTING CAMPAIGN LEAD HOPPER\n"; - echo "
    - Wait 1 minute before dialing next number\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status='READY';"; - $rslt=mysql_query($stmt, $link); - - ### LOG HOPPER RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|CAMPAIGN HOPPERRESET|$PHP_AUTH_USER|$ip|campaign_name='$campaign_name'|\n"); - fclose($fp); - } - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CAMPAIGN INFO|$PHP_AUTH_USER|$ip|$stmtA|$reset_hopper|\n"); - fclose($fp); - } - } - -$ADD=34; # go to campaign modification form below -} - -###################### -# ADD=45 modify campaign lead recycle in the system -###################### - -if ($ADD==45) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD MODIFIED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=411 submit list modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) - { - echo "
    LIST NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    list name must be at least 2 characters in length\n"; - } - else - { - echo "
    LIST MODIFIED: $list_id\n"; - - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - if ($reset_list == 'Y') - { - echo "
    RESETTING LIST-CALLED-STATUS\n"; - $stmt="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - ### LOG RESET TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|RESET LIST CALLED |$PHP_AUTH_USER|$ip|list_name='$list_name'|\n"); - fclose($fp); - } - } - if ($campaign_id != "$old_campaign_id") - { - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($old_campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY LIST INFO |$PHP_AUTH_USER|$ip|list_name='$list_name',campaign_id='$campaign_id',active='$active' where list_id='$list_id'|\n"); - fclose($fp); - } - } - -$ADD=311; # go to list modification form below -} - - -###################### -# ADD=4111 modify in-group info in the system -###################### - -if ($ADD==4111) -{ - echo ""; - - if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) - { - echo "
    GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    group name and group color must be at least 2 characters in length\n"; - } - else - { - echo "
    GROUP MODIFIED: $group_id\n"; - - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_message='$drop_message',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten' where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY GROUP INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111; # go to in-group modification form below -} - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) - { - echo "
    REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    User ID Start and External Extension must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOTE AGENTS MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - } - -$ADD=31111; # go to remote agents modification form below -} - - - -###################### -# ADD=411111 modify user group info in the system -###################### - -if ($ADD==411111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) - { - echo "
    USER GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Group name and description must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group';"; - $rslt=mysql_query($stmt, $link); - - echo "
    USER GROUP MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY USER GROUP ENTRY |$PHP_AUTH_USER|$ip|UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name' where user_group='$OLDuser_group'|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) - { - echo "
    SCRIPT NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Script name, description and text must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    SCRIPT MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY SCRIPT ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111; # go to script modification form below -} - - -###################### -# ADD=41111111 modify filter in the system -###################### - -if ($ADD==41111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) - { - echo "
    FILTER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Filter ID, name and SQL must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    FILTER MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY FILTER ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31111111; # go to filter modification form below -} - - -###################### -# ADD=411111111 modify call time in the system -###################### - -if ($ADD==411111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) - { - echo "
    CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID and name must be at least 2 characters in length\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    CALL TIME MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY CALL TIME ENTRY |$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111; # go to call time modification form below -} - - -###################### -# ADD=4111111111 modify state call time in the system -###################### - -if ($ADD==4111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) - { - echo "
    STATE CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
    State Call Time ID, name and state must be at least 2 characters in length\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    STATE CALL TIME MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY STATE CALL TIME ENTRY|$stmt|\n"); - fclose($fp); - } - } - -$ADD=3111111111; # go to state call time modification form below -} - - - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of user -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) - { - echo "
    USER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - echo "
    USER DELETION CONFIRMATION: $user\n"; - echo "

    Click here to delete user $user


    \n"; - } - -$ADD='3'; # go to user modification below -} - -###################### -# ADD=51 confirmation before deletion of campaign -###################### - -if ($ADD==51) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) - { - echo "
    CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - echo "
    CAMPAIGN DELETION CONFIRMATION: $campaign_id\n"; - echo "

    Click here to delete campaign $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=52 confirmation before logging all agents out of campaign of campaign -###################### - -if ($ADD==52) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - echo "
    AGENT LOGOUT CONFIRMATION: $campaign_id\n"; - echo "

    Click here to log all agents out of $campaign_id


    \n"; - } - -$ADD='31'; # go to campaign modification below -} - -###################### -# ADD=511 confirmation before deletion of list -###################### - -if ($ADD==511) -{ - echo ""; - - if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) - { - echo "
    LIST NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - echo "
    LIST DELETION CONFIRMATION: $list_id\n"; - echo "

    Click here to delete list and all of its leads $list_id


    \n"; - } - -$ADD='311'; # go to campaign modification below -} - -###################### -# ADD=5111 confirmation before deletion of in-group -###################### - -if ($ADD==5111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) - { - echo "
    IN-GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - echo "
    IN-GROUP DELETION CONFIRMATION: $group_id\n"; - echo "

    Click here to delete in-group $group_id


    \n"; - } - -$ADD='3111'; # go to in-group modification below -} - -###################### -# ADD=51111 confirmation before deletion of remote agent record -###################### - -if ($ADD==51111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) - { - echo "
    REMOTE AGENT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - echo "
    REMOTE AGENT DELETION CONFIRMATION: $remote_agent_id\n"; - echo "

    Click here to delete remote agent $remote_agent_id


    \n"; - } - -$ADD='31111'; # go to remote agent modification below -} - -###################### -# ADD=511111 confirmation before deletion of user group record -###################### - -if ($ADD==511111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) - { - echo "
    USER GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - echo "
    USER GROUP DELETION CONFIRMATION: $user_group\n"; - echo "

    Click here to delete user group $user_group


    \n"; - } - -$ADD='311111'; # go to user group modification below -} - -###################### -# ADD=5111111 confirmation before deletion of script record -###################### - -if ($ADD==5111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) - { - echo "
    SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Script_id must be at least 2 characters in length\n"; - } - else - { - echo "
    SCRIPT DELETION CONFIRMATION: $script_id\n"; - echo "

    Click here to delete script $script_id


    \n"; - } - -$ADD='3111111'; # go to script modification below -} - -###################### -# ADD=51111111 confirmation before deletion of filter record -###################### - -if ($ADD==51111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) - { - echo "
    FILTER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Filter ID must be at least 2 characters in length\n"; - } - else - { - echo "
    FILTER DELETION CONFIRMATION: $lead_filter_id\n"; - echo "

    Click here to delete filter $lead_filter_id


    \n"; - } - -$ADD='31111111'; # go to filter modification below -} - -###################### -# ADD=511111111 confirmation before deletion of call time record -###################### - -if ($ADD==511111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - echo "
    CALL TIME DELETION CONFIRMATION: $call_time_id\n"; - echo "

    Click here to delete call time $call_time_id


    \n"; - } - -$ADD='311111111'; # go to call time modification below -} - -###################### -# ADD=5111111111 confirmation before deletion of call time record -###################### - -if ($ADD==5111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    STATE CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - echo "
    STATE CALL TIME DELETION CONFIRMATION: $call_time_id\n"; - echo "

    Click here to delete state call time $call_time_id


    \n"; - } - -$ADD='3111111111'; # go to state call time modification below -} - - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete user record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) ) - { - echo "
    USER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_users where user='$user' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|user='$user'|\n"); - fclose($fp); - } - echo "
    USER DELETION COMPLETED: $user\n"; - echo "

    \n"; - } - -$ADD='0'; # go to user list -} - -###################### -# ADD=61 delete campaign record -###################### - -if ($ADD==61) -{ - echo ""; - - if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) ) - { - echo "
    CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_campaigns where campaign_id='$campaign_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($campaign_id)\n"; - $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!DELETING CAMPAIGN!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    CAMPAIGN DELETION COMPLETED: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='10'; # go to campaigns list -} - -###################### -# ADD=62 Logout all agents fro a campaign -###################### - -if ($ADD==62) -{ - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
    AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered\n"; - echo "
    Campaign_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_live_agents where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!AGENT LOGOUT!!!!!!|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
    AGENT LOGOUT COMPLETED: $campaign_id\n"; - echo "

    \n"; - } - -$ADD='31'; # go to campaign modification below -} - - -###################### -# ADD=65 delete campaign lead recycle in the system -###################### - -if ($ADD==65) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
    CAMPAIGN LEAD RECYCLE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    status must be between 1 and 6 characters in length\n"; - echo "
    attempt delay must be at least 120 seconds\n"; - echo "
    maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
    CAMPAIGN LEAD RECYCLE DELETED: $campaign_id - $status - $attempt_delay\n"; - - $stmt="DELETE FROM vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE LEAD RECYCLE |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=31; # go to campaign modification form below -} - -###################### -# ADD=611 delete list record and all leads within it -###################### - -if ($ADD==611) -{ - echo ""; - - if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) ) - { - echo "
    LIST NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    List_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lists where list_id='$list_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($list_id)\n"; - $stmt="DELETE from vicidial_hopper where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - echo "
    REMOVING LIST LEADS FROM VICIDIAL_LIST TABLE\n"; - $stmt="DELETE from vicidial_list where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING LIST!!!!|$PHP_AUTH_USER|$ip|list_id='$list_id'|\n"); - fclose($fp); - } - echo "
    LIST DELETION COMPLETED: $list_id\n"; - echo "

    \n"; - } - -$ADD='100'; # go to lists list -} - -###################### -# ADD=6111 delete in-group record -###################### - -if ($ADD==6111) -{ - echo ""; - - if ( (strlen($group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_ingroups < 1) ) - { - echo "
    IN-GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Group_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_inbound_groups where group_id='$group_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING IN-GROUP!!|$PHP_AUTH_USER|$ip|group_id='$group_id'|\n"); - fclose($fp); - } - echo "
    IN-GROUP DELETION COMPLETED: $group_id\n"; - echo "

    \n"; - } - -$ADD='1000'; # go to in-group list -} - -###################### -# ADD=61111 delete remote agent record -###################### - -if ($ADD==61111) -{ - echo ""; - - if ( (strlen($remote_agent_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) ) - { - echo "
    REMOTE AGENT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Remote_agent_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_remote_agents where remote_agent_id='$remote_agent_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING RMTAGENT!!|$PHP_AUTH_USER|$ip|remote_agent_id='$remote_agent_id'|\n"); - fclose($fp); - } - echo "
    REMOTE AGENT DELETION COMPLETED: $remote_agent_id\n"; - echo "

    \n"; - } - -$ADD='10000'; # go to remote agents list -} - -###################### -# ADD=611111 delete user group record -###################### - -if ($ADD==611111) -{ - echo ""; - - if ( (strlen($user_group) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_user_groups < 1) ) - { - echo "
    USER GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    User_group be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_user_groups where user_group='$user_group' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING USRGROUP!!|$PHP_AUTH_USER|$ip|user_group='$user_group'|\n"); - fclose($fp); - } - echo "
    USER GROUP DELETION COMPLETED: $user_group\n"; - echo "

    \n"; - } - -$ADD='100000'; # go to user group list -} - -###################### -# ADD=6111111 delete script record -###################### - -if ($ADD==6111111) -{ - echo ""; - - if ( (strlen($script_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_scripts < 1) ) - { - echo "
    SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Script_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_scripts where script_id='$script_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING SCRIPT!!!!|$PHP_AUTH_USER|$ip|script_id='$script_id'|\n"); - fclose($fp); - } - echo "
    SCRIPT DELETION COMPLETED: $script_id\n"; - echo "

    \n"; - } - -$ADD='1000000'; # go to script list -} - - -###################### -# ADD=61111111 delete filter record -###################### - -if ($ADD==61111111) -{ - echo ""; - - if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) ) - { - echo "
    FILTER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Filter ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING FILTER!!!!|$PHP_AUTH_USER|$ip|lead_filter_id='$lead_filter_id'|\n"); - fclose($fp); - } - echo "
    FILTER DELETION COMPLETED: $lead_filter_id\n"; - echo "

    \n"; - } - -$ADD='10000000'; # go to filter list -} - - -###################### -# ADD=611111111 delete call times record -###################### - -if ($ADD==611111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_call_times where call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    CALL TIME DELETION COMPLETED: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='100000000'; # go to call times list -} - - -###################### -# ADD=6111111111 delete call times record -###################### - -if ($ADD==6111111111) -{ - echo ""; - - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) - { - echo "
    STATE CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Call Time ID must be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_state_call_times where state_call_time_id='$call_time_id' limit 1;"; - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT call_time_id,ct_state_call_times from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\" order by call_time_id;"; - $rslt=mysql_query($stmt, $link); - $sct_to_print = mysql_num_rows($rslt); - $sct_list=''; - - $o=0; - while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_ids[$o] = "$rowx[0]"; - $sct_states[$o] = "$rowx[1]"; - $o++; - } - $o=0; - - while ($sct_to_print > $o) { - $sct_states[$o] = eregi_replace("\|$call_time_id\|",'|',$sct_states[$o]); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$sct_states[$o]' where call_time_id='$sct_ids[$o]';"; - $rslt=mysql_query($stmt, $link); - echo "$stmt\n"; - echo "State Rule Removed: $sct_ids[$o]
    \n"; - $o++; - } - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!DELETING CALL TIME!|$PHP_AUTH_USER|$ip|state_call_time_id='$call_time_id'|\n"); - fclose($fp); - } - echo "
    STATE CALL TIME DELETION COMPLETED: $call_time_id\n"; - echo "

    \n"; - } - -$ADD='1000000000'; # go to call times list -} - - - - - - -###################################################################################################### -###################################################################################################### -####### 3 series, record modification forms -###################################################################################################### -###################################################################################################### - - - - -###################### -# ADD=3 modify user info in the system -###################### - -if ($ADD==3) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_level = $row[4]; - $user_group = $row[5]; - $phone_login = $row[6]; - $phone_pass = $row[7]; - $delete_users = $row[8]; - $delete_user_groups = $row[9]; - $delete_lists = $row[10]; - $delete_campaigns = $row[11]; - $delete_ingroups = $row[12]; - $delete_remote_agents = $row[13]; - $load_leads = $row[14]; - $campaign_detail = $row[15]; - $ast_admin_access = $row[16]; - $ast_delete_phones = $row[17]; - $delete_scripts = $row[18]; - $modify_leads = $row[19]; - $hotkeys_active = $row[20]; - $change_agent_campaign =$row[21]; - $agent_choose_ingroups =$row[22]; - $scheduled_callbacks = $row[24]; - $agentonly_callbacks = $row[25]; - $agentcall_manual = $row[26]; - $vicidial_recording = $row[27]; - $vicidial_transfers = $row[28]; - $delete_filters = $row[29]; - $alter_agent_interface_options =$row[30]; - $closer_default_blended = $row[31]; - $delete_call_times = $row[32]; - $modify_call_times = $row[33]; - -if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) - { - echo "
    You do not have permissions to modify this user: $row[1]\n"; - } -else - { - echo "
    MODIFY A USERS RECORD: $row[1]\n"; - if ($LOGuser_level > 8) - {echo "\n";} - else - { - if ($LOGalter_agent_interface == "1") - {echo "\n";} - else - {echo "\n";} - } - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") ) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($LOGuser_level > 8) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "\n"; - echo "
    User Number: $row[1]$NWB#vicidial_users-user$NWE
    Password: $NWB#vicidial_users-pass$NWE
    Full Name: $NWB#vicidial_users-full_name$NWE
    User Level: $NWB#vicidial_users-user_level$NWE
    User Group: $NWB#vicidial_users-user_group$NWE
    Phone Login: $NWB#vicidial_users-phone_login$NWE
    Phone Pass: $NWB#vicidial_users-phone_pass$NWE
    AGENT INTERFACE OPTIONS:
    Agent Choose Ingroups: $NWB#vicidial_users-agent_choose_ingroups$NWE
    HotKeys Active: $NWB#vicidial_users-hotkeys_active$NWE
    Scheduled Callbacks: $NWB#vicidial_users-scheduled_callbacks$NWE
    Agent-Only Callbacks: $NWB#vicidial_users-agentonly_callbacks$NWE
    Agent Call Manual: $NWB#vicidial_users-agentcall_manual$NWE
    Vicidial Recording: $NWB#vicidial_users-vicidial_recording$NWE
    Vicidial Transfers: $NWB#vicidial_users-vicidial_transfers$NWE
    Closer Default Blended: $NWB#vicidial_users-closer_default_blended$NWE
    Inbound Groups: \n"; - echo "$groups_list"; - echo "$NWB#vicidial_users-closer_campaigns$NWE
    ADMIN INTERFACE OPTIONS:
    Alter Agent Interface Options: $NWB#vicidial_users-alter_agent_interface_options$NWE
    Delete Users: $NWB#vicidial_users-delete_users$NWE
    Delete User Groups: $NWB#vicidial_users-delete_user_groups$NWE
    Delete Lists: $NWB#vicidial_users-delete_lists$NWE
    Delete Campaigns: $NWB#vicidial_users-delete_campaigns$NWE
    Delete In-Groups: $NWB#vicidial_users-delete_ingroups$NWE
    Delete Remote Agents: $NWB#vicidial_users-delete_remote_agents$NWE
    Delete Scripts: $NWB#vicidial_users-delete_scripts$NWE
    Load Leads: $NWB#vicidial_users-load_leads$NWE
    Campaign Detail: $NWB#vicidial_users-campaign_detail$NWE
    AGC Admin Access: $NWB#vicidial_users-ast_admin_access$NWE
    AGC Delete Phones: $NWB#vicidial_users-ast_delete_phones$NWE
    Modify Leads: $NWB#vicidial_users-modify_leads$NWE
    Change Agent Campaign: $NWB#vicidial_users-change_agent_campaign$NWE
    Delete Filters: $NWB#vicidial_users-delete_filters$NWE
    Delete Call Times: $NWB#vicidial_users-delete_call_times$NWE
    Modify Call Times: $NWB#vicidial_users-modify_call_times$NWE
    \n"; - - if ($LOGdelete_users > 0) - { - echo "

    DELETE THIS USER\n"; - } - echo "

    Click here for user time sheet\n"; - echo "

    Click here for user status\n"; - echo "

    Click here for user stats\n"; - echo "

    Click here for user CallBack Holds\n"; - } - -} - - -###################### -# ADD=31 modify campaign info in the system - Detail view -###################### - -if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Basic if not allowed - -if ($ADD==31) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $campaign_rec_exten = $row[22]; - $campaign_recording = $row[23]; - $campaign_rec_filename = $row[24]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $am_message_exten = $row[27]; - $amd_send_to_vmx = $row[28]; - $xferconf_a_dtmf = $row[29]; - $xferconf_a_number = $row[30]; - $xferconf_b_dtmf = $row[31]; - $xferconf_b_number = $row[32]; - $alt_number_dialing = $row[33]; - $scheduled_callbacks = $row[34]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $drop_call_seconds = $row[36]; - $safe_harbor_message = $row[37]; - $safe_harbor_exten = $row[38]; - $display_dialable_count = $row[39]; - $wrapup_seconds = $row[40]; - $wrapup_message = $row[41]; -# $closer_campaigns = $row[42]; - $use_internal_dnc = $row[43]; - -echo "
    MODIFY A CAMPAIGNS RECORD: $row[0] - Basic View"; -echo " | Detail View | "; -echo "Realtime Screen\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -if (eregi("CLOSER", $campaign_id)) - { - echo "\n"; - } - - - -echo "\n"; -echo "
    Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
    Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
    Dial status 1: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 2: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 3: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 4: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 5: $NWB#vicidial_campaigns-dial_status$NWE
    List Order: $NWB#vicidial_campaigns-lead_order$NWE
    Lead Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Next Agent Call: $NWB#vicidial_campaigns-next_agent_call$NWE
    Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
    Dial Timeout: in seconds$NWB#vicidial_campaigns-dial_timeout$NWE
    Dial Prefix: for 91NXXNXXXXXX value would be 9, for no dial prefix use X$NWB#vicidial_campaigns-dial_prefix$NWE
    Campaign CallerID: $NWB#vicidial_campaigns-campaign_cid$NWE
    Campaign VDAD exten: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE
    Campaign Rec exten: $NWB#vicidial_campaigns-campaign_rec_exten$NWE
    Campaign Recording: $NWB#vicidial_campaigns-campaign_recording$NWE
    Campaign Rec Filename: $NWB#vicidial_campaigns-campaign_rec_filename$NWE
    Script: $NWB#vicidial_campaigns-campaign_script$NWE
    Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE
    Answering Machine Message: $NWB#vicidial_campaigns-am_message_exten$NWE
    AMD Send to VM exten: $NWB#vicidial_campaigns-amd_send_to_vmx$NWE
    Transfer-Conf DTMF 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf Number 1: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf DTMF 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Transfer-Conf Number 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
    Alt Number Dialing: $NWB#vicidial_campaigns-alt_number_dialing$NWE
    Scheduled Callbacks: $NWB#vicidial_campaigns-scheduled_callbacks$NWE
    Drop Call Seconds: $NWB#vicidial_campaigns-drop_call_seconds$NWE
    Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
    Use Safe Harbor Message: $NWB#vicidial_campaigns-safe_harbor_message$NWE
    Safe Harbor Exten: $NWB#vicidial_campaigns-safe_harbor_exten$NWE
    Wrapup Seconds: $NWB#vicidial_campaigns-wrapup_seconds$NWE
    Wrapup Message: $NWB#vicidial_campaigns-wrapup_message$NWE
    Use Internal DNC List: $NWB#vicidial_campaigns-use_internal_dnc$NWE
    Allowed Inbound Groups:
    "; - echo " $NWB#vicidial_campaigns-closer_campaigns$NWE
    \n"; - echo "$groups_list"; - echo "
    \n"; - -echo "
    \n"; -echo "
    LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LIST IDLIST NAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

    \n"; - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - HIDE

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - SHOW

    "; - } - - - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "This campaign has $hopper_leads leads in the dial hopper

    \n"; -echo "Click here to see what leads are in the hopper right now

    \n"; -echo "Click here to see all CallBack Holds in this campaign

    \n"; -echo "
    \n"; - - - - -echo "
    \n"; -echo "
    CUSTOM STATUSES WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_statuses$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    STATUSDESCRIPTIONSELECTABLEDELETE
    $rowx[0]$rowx[1]$rowx[2]DELETE
    \n"; - -echo "
    ADD NEW CUSTOM CAMPAIGN STATUS
    \n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Description:   \n"; -echo "Selectable:   \n"; -echo "
    \n"; - -echo "

    \n"; - - - -echo "
    CUSTOM HOTKEYS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_hotkeys$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    HOTKEYSTATUSDESCRIPTIONDELETE
    $rowx[1]$rowx[0]$rowx[2]DELETE
    \n"; - -echo "
    ADD NEW CUSTOM CAMPAIGN HOTKEY
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Hotkey:   \n"; -echo "Status:   \n"; -echo "
    \n"; -echo "

    \n"; - - - -echo "

    LEAD RECYCLING WITHIN THIS CAMPAIGN:   $NWB#vicidial_lead_recycle$NWE
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $recycle_to_print = mysql_num_rows($rslt); - $o=0; - while ($recycle_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - -echo "
    STATUSATTEMPT DELAYATTEMPT MAXIMUMACTIVE DELETE
    $rowx[2]
    \n"; - echo "\n"; - echo "\n"; - echo "
    DELETE
    \n"; - -echo "
    ADD NEW CAMPAIGN LEAD RECYCLE
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Status:   \n"; -echo "Attempt Delay: \n"; -echo "Attempt Maximum: \n"; -echo "
    \n"; - -echo "

    \n"; - -echo "LOG ALL AGENTS OUT OF THIS CAMPAIGN

    \n"; - -if ($LOGdelete_campaigns > 0) - { - echo "

    DELETE THIS CAMPAIGN\n"; - } - -} - - -###################### -# ADD=34 modify campaign info in the system - Basic View -###################### - -if ($ADD==34) -{ - if ($stage=='show_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } - if ($stage=='hide_dialable') - { - $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - } -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_status_a = $row[3]; - $dial_status_b = $row[4]; - $dial_status_c = $row[5]; - $dial_status_d = $row[6]; - $dial_status_e = $row[7]; - $lead_order = $row[8]; - $hopper_level = $row[13]; - $auto_dial_level = $row[14]; - $next_agent_call = $row[15]; - $local_call_time = $row[16]; - $voicemail_ext = $row[17]; - $dial_timeout = $row[18]; - $dial_prefix = $row[19]; - $campaign_cid = $row[20]; - $campaign_vdad_exten = $row[21]; - $script_id = $row[25]; - $get_call_launch = $row[26]; - $lead_filter_id = $row[35]; - if ($lead_filter_id=='') {$lead_filter_id='NONE';} - $display_dialable_count = $row[39]; - -echo "
    MODIFY A CAMPAIGN'S RECORD: $row[0] - Basic View | "; -echo "Detail View | "; -echo "Realtime Screen\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; -echo "
    Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
    Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
    Active: $NWB#vicidial_campaigns-active$NWE
    Park Extension: $row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE
    Web Form: $row[11]$NWB#vicidial_campaigns-web_form_address$NWE
    Allow Closers: $row[12] $NWB#vicidial_campaigns-allow_closers$NWE
    Dial status 1: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 2: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 3: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 4: $NWB#vicidial_campaigns-dial_status$NWE
    Dial status 5: $NWB#vicidial_campaigns-dial_status$NWE
    List Order: $NWB#vicidial_campaigns-lead_order$NWE
    Lead Filter: $NWB#vicidial_campaigns-lead_filter_id$NWE
    Hopper Level: $NWB#vicidial_campaigns-hopper_level$NWE
    Force Reset of Hopper: $NWB#vicidial_campaigns-force_reset_hopper$NWE
    Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
    Script: $script_id
    Get Call Launch: $get_call_launch
    \n"; - -echo "
    \n"; -echo "
    LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    LIST IDLIST NAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - -$filterSQL = $filtersql_list[$lead_filter_id]; -$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); -if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} -else - {$fSQL = '';} - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

    \n"; - - -if ($display_dialable_count == 'Y') - { - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_status_a,$dial_status_b,$dial_status_c,$dial_status_d,$dial_status_e,$camp_lists,$fSQL); - echo " - HIDE

    "; - } -else - { - echo "Popup Dialable Leads Count"; - echo " - SHOW

    "; - } - - - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - -echo "This campaign has $hopper_leads leads in the dial hopper

    \n"; -echo "Click here to see what leads are in the hopper right now

    \n"; -echo "Click here to see all CallBack Holds in this campaign

    \n"; -echo "
    \n"; - -echo "
    \n"; - -echo "LOG ALL AGENTS OUT OF THIS CAMPAIGN

    \n"; - - -if ($LOGdelete_campaigns > 0) - { - echo "

    DELETE THIS CAMPAIGN\n"; - } - - -} - - -###################### -# ADD=311 modify list info in the system -###################### - -if ($ADD==311) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $campaign_id = $row[2]; - $active = $row[3]; - - # grab names of global statuses and statuses in the selected campaign - $stmt="SELECT * from vicidial_statuses order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; - $rslt=mysql_query($stmt, $link); - $Cstatuses_to_print = mysql_num_rows($rslt); - - $o=0; - while ($Cstatuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $statuses_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - # end grab status names - - -echo "
    MODIFY A LISTS RECORD: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    List ID: $row[0]$NWB#vicidial_lists-list_id$NWE
    List Name: $NWB#vicidial_lists-list_name$NWE
    Campaign: $NWB#vicidial_lists-campaign_id$NWE
    Active: $NWB#vicidial_lists-active$NWE
    Reset Lead-Called-Status for this list: $NWB#vicidial_lists-reset_list$NWE
    \n"; - -echo "
    \n"; -echo "
    STATUSES WITHIN THIS LIST:
    \n"; -echo "\n"; -echo "\n"; - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by status,called_since_last_reset order by status,called_since_last_reset"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - $o=0; - if ($lead_list['count'] > 0) - { - while (list($dispo,) = each($lead_list[$since_reset])) - { - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($dispo == 'CBHOLD') - { - $CLB=""; - $CLE=""; - } - else - { - $CLB=''; - $CLE=''; - } - - echo "\n"; - $o++; - } - } - -echo "\n"; -echo "\n"; - -echo "
    STATUSSTATUS NAMECALLEDNOT CALLED
    $CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
    SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; -unset($lead_list); - - - - - -echo "
    \n"; -echo "
    TIME ZONES WITHIN THIS LIST:
    \n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT gmt_offset_now,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by gmt_offset_now,called_since_last_reset order by gmt_offset_now,called_since_last_reset"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - - $o=0; - $plus='+'; - $lead_list['count'] = 0; - $lead_list['Y_count'] = 0; - $lead_list['N_count'] = 0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - - $lead_list['count'] = ($lead_list['count'] + $rowx[2]); - if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } - else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } - $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); - $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); - #If opposite side is not set, it may not in the future so give it a value of zero - if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } - $o++; - } - - if ($lead_list['count'] > 0) - { - while (list($tzone,) = each($lead_list[$since_reset])) - { - $LOCALzone=3600 * $tzone; - $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); - - if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} - else {$DISPtzone = "$tzone";} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - } - -echo "\n"; -echo "\n"; - -echo "
    GMT OFFSET NOW (local time)CALLEDNOT CALLED
    ".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
    SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
    TOTAL$lead_list[count]

    \n"; -unset($lead_list); - - - - - - - - $leads_in_list = 0; - $leads_in_list_N = 0; - $leads_in_list_Y = 0; - $stmt="SELECT status,called_count,count(*) from vicidial_list where list_id='$list_id' group by status,called_count order by status,called_count"; - $rslt=mysql_query($stmt, $link); - $status_called_to_print = mysql_num_rows($rslt); - - $o=0; - $sts=0; - $first_row=1; - $all_called_first=1000; - $all_called_last=0; - while ($status_called_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $leads_in_list = ($leads_in_list + $rowx[2]); - $count_statuses[$o] = "$rowx[0]"; - $count_called[$o] = "$rowx[1]"; - $count_count[$o] = "$rowx[2]"; - $all_called_count[$rowx[1]] = ($all_called_count[$rowx[1]] + $rowx[2]); - - if ( (strlen($status[$sts]) < 1) or ($status[$sts] != "$rowx[0]") ) - { - if ($first_row) {$first_row=0;} - else {$sts++;} - $status[$sts] = "$rowx[0]"; - $status_called_first[$sts] = "$rowx[1]"; - if ($status_called_first[$sts] < $all_called_first) {$all_called_first = $status_called_first[$sts];} - } - $leads_in_sts[$sts] = ($leads_in_sts[$sts] + $rowx[2]); - $status_called_last[$sts] = "$rowx[1]"; - if ($status_called_last[$sts] > $all_called_last) {$all_called_last = $status_called_last[$sts];} - - $o++; - } - - - - -echo "
    \n"; -echo "
    CALLED COUNTS WITHIN THIS LIST:
    \n"; -echo "\n"; -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - - $sts=0; - $statuses_called_to_print = count($status); - while ($statuses_called_to_print > $sts) - { - $Pstatus = $status[$sts]; - if (eregi("1$|3$|5$|7$|9$", $sts)) - {$bgcolor='bgcolor="#B9CBFD"'; $AB='bgcolor="#9BB9FB"';} - else - {$bgcolor='bgcolor="#9BB9FB"'; $AB='bgcolor="#B9CBFD"';} -# echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n"; -# echo "$status[$sts]|"; - echo ""; - - $first = $all_called_first; - while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $sts)) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - else - { - if (eregi("0$|2$|4$|6$|8$", $first)) {$AB='bgcolor="#9BB9FB"';} - else{$AB='bgcolor="#B9CBFD"';} - } - - $called_printed=0; - $o=0; - while ($status_called_to_print > $o) - { - if ( ($count_statuses[$o] == "$Pstatus") and ($count_called[$o] == "$first") ) - { - $called_printed++; - echo ""; - } - - - $o++; - } - if (!$called_printed) - {echo "";} - $first++; - } - echo "\n\n"; - - $sts++; - } - -echo ""; -$first = $all_called_first; -while ($first <= $all_called_last) - { - if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';} - else{$AB='bgcolor="#E0FFFF"';} - echo ""; - $first++; - } -echo "\n"; - -echo "
    STATUSSTATUS NAME$firstSUBTOTAL
    $Pstatus$statuses_list[$Pstatus] $count_count[$o]  $leads_in_sts[$sts]
    TOTAL$all_called_count[$first]$leads_in_list

    \n"; - - - - - -echo "
    \n"; - -if ($LOGdelete_lists > 0) - { - echo "

    DELETE THIS LIST\n"; - } - -} - - - -###################### -# ADD=3111 modify in-group info in the system -###################### - -if ($ADD==3111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = $row[4]; - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - $script_id = $row[8]; - $get_call_launch = $row[9]; - $xferconf_a_dtmf = $row[10]; - $xferconf_a_number = $row[11]; - $xferconf_b_dtmf = $row[12]; - $xferconf_b_number = $row[13]; - $drop_call_seconds = $row[14]; - $drop_message = $row[15]; - $drop_exten = $row[16]; - -echo "
    MODIFY A GROUPS RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - -echo "\n"; - - -echo "\n"; -echo "
    Group ID: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
    Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
    Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
    Active: $NWB#vicidial_inbound_groups-active$NWE
    Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
    Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
    Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
    Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
    Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    Transfer-Conf DTMF 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf Number 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf DTMF 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf Number 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Drop Call Seconds: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
    Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
    Use Drop Message: $NWB#vicidial_inbound_groups-drop_message$NWE
    Drop Exten: $NWB#vicidial_inbound_groups-drop_exten$NWE
    \n"; - -echo "

    \n"; - -echo "
    \n"; - -if ($LOGdelete_ingroups > 0) - { - echo "

    DELETE THIS IN-GROUP\n"; - } - -} - - - -###################### -# ADD=31111 modify remote agents info in the system -###################### - -if ($ADD==31111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
    Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
    Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
    External Extension: (dialplan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
    Status: $NWB#vicidial_remote_agents-status$NWE
    Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
    Inbound Groups: \n"; -echo "$groups_list"; -echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - - -if ($LOGdelete_remote_agents > 0) - { - echo "

    DELETE THIS REMOTE AGENT\n"; - } - -} - - -###################### -# ADD=311111 modify user group info in the system -###################### - -if ($ADD==311111) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[0]; - $group_name = $row[1]; -echo ""; - -echo "
    MODIFY A USERS GROUP ENTRY\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
    Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
    \n"; - -if ($LOGdelete_user_groups > 0) - { - echo "

    DELETE THIS USER GROUP\n"; - } - -} - - -###################### -# ADD=3111111 modify script info in the system -###################### - -if ($ADD==3111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $script_name = $row[1]; - $script_comments = $row[2]; - $script_text = $row[3]; - $active = $row[4]; -echo ""; - -echo "
    MODIFY A SCRIPT\n"; -echo "\n"; -echo "\n"; -echo "
    Script ID: $script_id$NWB#vicidial_scripts-script_name$NWE
    Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
    Script Comments: $NWB#vicidial_scripts-script_comments$NWE
    Active: $NWB#vicidial_scripts-active$NWE
    Script Text:

    Preview Script
    $NWB#vicidial_scripts-script_text$NWE
    \n"; - -if ($LOGdelete_scripts > 0) - { - echo "

    DELETE THIS SCRIPT\n"; - } - -} - - -###################### -# ADD=31111111 modify filter info in the system -###################### - -if ($ADD==31111111) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $lead_filter_name = $row[1]; - $lead_filter_comments = $row[2]; - $lead_filter_sql = $row[3]; -echo ""; - -echo "
    MODIFY A FILTER\n"; -echo "\n"; -echo "\n"; -echo "
    Filter ID: $lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
    Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
    Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
    Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
    \n"; - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - -echo "

    "; -echo "
    TEST ON CAMPAIGN:
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -if ($LOGdelete_filters > 0) - { - echo "

    DELETE THIS FILTER\n"; - } - -} - - -###################### -# ADD=321111111 modify call time definition info in the system -###################### - -if ($ADD==321111111) -{ -if ($LOGmodify_call_times==1) -{ - -if ( ($stage=="ADD") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - if (eregi("\|$",$ct_state_call_times)) - {$ct_state_call_times = "$ct_state_call_times$state_rule\|";} - else - {$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";} - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "State Rule Added: $state_rule
    \n"; - } -if ( ($stage=="REMOVE") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - $ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "State Rule Removed: $state_rule
    \n"; - } - -$ADD=311111111; -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - -###################### -# ADD=311111111 modify call time definition info in the system -###################### - -if ($ADD==311111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -$ct_srs=1; -$b=0; -$srs_SQL =''; -if (strlen($ct_state_call_times)>2) - { - $state_rules = explode('|',$ct_state_call_times); - $ct_srs = ((count($state_rules)) - 1); - } -echo "\n"; -echo "\n"; -while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>0) - { - $stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - echo "\n"; - $srs_SQL .= "'$state_rules[$b]',"; - $srs_state_SQL .= "'$row[0]',"; - } - $b++; - } -if (strlen($srs_SQL)>2) - { - $srs_SQL = "$srs_SQL''"; - $srs_state_SQL = "$srs_state_SQL''"; - $srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)"; - } -else - {$srs_SQL='';} -$stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;"; -$rslt=mysql_query($stmt, $link); -$sct_to_print = mysql_num_rows($rslt); -$sct_list=''; - -$o=0; -while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_list .= "\n"; - $o++; -} -echo "\n"; -echo "\n"; - -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $call_time_name = $row[1]; - $call_time_comments = $row[2]; - $ct_default_start = $row[3]; - $ct_default_stop = $row[4]; - $ct_sunday_start = $row[5]; - $ct_sunday_stop = $row[6]; - $ct_monday_start = $row[7]; - $ct_monday_stop = $row[8]; - $ct_tuesday_start = $row[9]; - $ct_tuesday_stop = $row[10]; - $ct_wednesday_start = $row[11]; - $ct_wednesday_stop = $row[12]; - $ct_thursday_start = $row[13]; - $ct_thursday_stop = $row[14]; - $ct_friday_start = $row[15]; - $ct_friday_stop = $row[16]; - $ct_saturday_start = $row[17]; - $ct_saturday_stop = $row[18]; - $ct_state_call_times = $row[19]; - -echo ""; - -echo "
    MODIFY A CALL TIME\n"; -echo "\n"; -echo "\n"; -echo "
    Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
    Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Active State Call Time Definitions for this Record:  
    $state_rules[$b] - REMOVE $row[0] - $row[1]
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Add state call time rule:


    \n"; -echo "CAMPAIGNS USING THIS CALL TIME:
    \n"; -echo "\n"; - - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - $CT_camp_id = $row[1]; - $CT_camp_name = $row[2]; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    DELETE THIS CALL TIME DEFINITION\n"; - } -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - -###################### -# ADD=3111111111 modify state call time definition info in the system -###################### - -if ($ADD==3111111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $state_call_time_state =$row[1]; - $call_time_name = $row[2]; - $call_time_comments = $row[3]; - $ct_default_start = $row[4]; - $ct_default_stop = $row[5]; - $ct_sunday_start = $row[6]; - $ct_sunday_stop = $row[7]; - $ct_monday_start = $row[8]; - $ct_monday_stop = $row[9]; - $ct_tuesday_start = $row[10]; - $ct_tuesday_stop = $row[11]; - $ct_wednesday_start = $row[12]; - $ct_wednesday_stop = $row[13]; - $ct_thursday_start = $row[14]; - $ct_thursday_stop = $row[15]; - $ct_friday_start = $row[16]; - $ct_friday_stop = $row[17]; - $ct_saturday_start = $row[18]; - $ct_saturday_stop = $row[19]; - -echo ""; - -echo "
    MODIFY A STATE CALL TIME
    \n"; -echo "\n"; -echo "\n"; -echo "
    Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
    State Call Time State: $NWB#vicidial_call_times-state_call_time_state$NWE
    State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
    State Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
    Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
    Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
    Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE


    \n"; -echo "CALL TIMES USING THIS STATE CALL TIME:
    \n"; -echo "\n"; - - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]
    \n"; -echo "

    \n"; - -if ($LOGdelete_call_times > 0) - { - echo "

    DELETE THIS STATE CALL TIME DEFINITION\n"; - } - -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo "
    \n"; -echo ""; - -echo "
    SEARCH FOR A USER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
    User Number:
    Full Name:
    User Level:
    User Group:
    \n"; - -} - -###################### -# ADD=66 user search results -###################### - -if ($ADD==66) -{ -echo "
    \n"; - echo ""; - - $SQL = ''; - if ($user) {$SQL .= " user LIKE \"%$user%\" and";} - if ($full_name) {$SQL .= " full_name LIKE \"%$full_name%\" and";} - if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";} - if ($user_group) {$SQL .= " user_group = '$user_group' and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from vicidial_users $SQL order by full_name desc;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    SEARCH RESULTS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
    \n"; - -} - - -###################################################################################################### -###################################################################################################### -####### 8 series, Callback lists -###################################################################################################### -###################################################################################################### - -###################### -# ADD=8 find all callbacks on hold by a User -###################### -if ($ADD==8) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    USER CALLBACK HOLD LISTINGS: $user\n"; -$ADD='82'; -} - -###################### -# ADD=81 find all callbacks on hold within a Campaign -###################### -if ($ADD==81) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; -$ADD='82'; -} - -###################### -# ADD=811 find all callbacks on hold within a List -###################### -if ($ADD==811) -{ - echo ""; - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time"; - $rslt=mysql_query($stmt, $link); - $cb_to_print = mysql_num_rows($rslt); - -echo "
    LIST CALLBACK HOLD LISTINGS: $list_id\n"; -$ADD='82'; -} - -###################### -# ADD=82 display all callbacks on hold -###################### -if ($ADD==82) -{ -echo "
    \n"; -echo "
    \n"; -echo "\n"; - - $o=0; - while ($cb_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    LEADLISTCAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUS
    $row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]
    \n"; -} - - - -###################################################################################################### -###################################################################################################### -####### 0 series, displays and searches -###################################################################################################### -###################################################################################################### - -###################### -# ADD=0 display all active users -###################### -if ($ADD==0) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_users order by full_name"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
    \n"; -} - -###################### -# ADD=10 display all campaigns -###################### -if ($ADD==10) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    CAMPAIGN LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3]$row[4]$row[5] $row[6]$row[7]  MODIFY
    \n"; -} - - -###################### -# ADD=100 display all lists -###################### -if ($ADD==100) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_lists order by list_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    LIST LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]$row[5] $row[3]$row[7]  MODIFY
    \n"; -} - - - -###################### -# ADD=1000 display all inbound groups -###################### -if ($ADD==1000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    INBOUND GROUP LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[5]  MODIFY
    \n"; -} - - -###################### -# ADD=10000 display all remote agents -###################### -if ($ADD==10000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    REMOTE AGENTS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
    \n"; -} - - -###################### -# ADD=100000 display all user groups -###################### -if ($ADD==100000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_user_groups order by user_group"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    USER GROUPS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=1000000 display all scripts -###################### -if ($ADD==1000000) -{ -echo "
    \n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
    SCRIPTS LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($people_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=10000000 display all filters -###################### -if ($ADD==10000000) -{ -echo "\r\n"; - } -} - diff --git a/agc_2-X/trunk/VICIDIAL_web/listloader_super.pl b/agc_2-X/trunk/VICIDIAL_web/listloader_super.pl deleted file mode 100644 index a36765d0..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/listloader_super.pl +++ /dev/null @@ -1,691 +0,0 @@ -#!/usr/bin/perl - -### listloader_super.pl -### -### Copyright (C) 2006 Matt Florell,Joe Johnson LICENSE: GPLv2 -### -# -# -# CHANGES -# 60616-1548 - Added listID override feature to force all leads into same list -# - Added gmt_offset_now lookup for each lead -# - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help|-h/i) - { - print "allowed run time options:\n [-forcelistid=1234] = overrides the listID given in the file with the 1234\n [-h] = this help screen\n\n"; - } - else - { - if ($args =~ /--forcelistid=/i) - { - @data_in = split(/--forcelistid=/,$args); - $forcelistid = $data_in[1]; - print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n"; - } - else - {$forcelistid = '';} - } -} -### end parsing run-time options ### - -use Spreadsheet::ParseExcel; -use Time::Local; -use Net::MySQL; - -### Make sure this file is in a libs path or put the absolute path to it -require("/home/cron/AST_SERVER_conf.pl"); # local configuration file - -if (!$DB_port) {$DB_port='3306';} - -$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") - or die "Couldn't connect to database: $DB_server - $DB_database\n"; - - -$vars=$ARGV[0]; -@xls_fields=split(/\,/, $vars); - -$|=0; -$secX = time(); - -($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); -$year = ($year + 1900); -$mon++; -if ($hour < 10) {$hour = "0$hour";} -if ($min < 10) {$min = "0$min";} -if ($sec < 10) {$sec = "0$sec";} -if ($mon < 10) {$mon = "0$mon";} -if ($mday < 10) {$mday = "0$mday";} -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$pulldate="$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $DBSERVER_GMT = "$record->[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - } - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -if ($isdst) {$LOCAL_GMT_OFF++;} -if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - - -$total=0; $good=0; $bad=0; -open(STMT_FILE, "> listloader_stmts.txt"); - -$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls"); -my($iR, $iC, $oWkS, $oWkC); - -foreach $oWkS (@{$oBook->{Worksheet}}) { - for($iR = 0 ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) { - - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[0]]; - if ($oWkC) {$vendor_lead_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[1]]; - if ($oWkC) {$source_code=$oWkC->Value; } - $source_id=$source_code; - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[2]]; - if ($oWkC) {$list_id=$oWkC->Value; } - $gmt_offset = '0'; - $called_since_last_reset='N'; - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[3]]; - if ($oWkC) {$phone_code=$oWkC->Value; } - $phone_code=~s/[^0-9]//g; - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[4]]; - if ($oWkC) {$phone_number=$oWkC->Value; } - $phone_number=~s/[^0-9]//g; - $USarea = substr($phone_number, 0, 3); - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[5]]; - if ($oWkC) {$title=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[6]]; - if ($oWkC) {$first_name=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[7]]; - if ($oWkC) {$middle_initial=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[8]]; - if ($oWkC) {$last_name=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[9]]; - if ($oWkC) {$address1=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[10]]; - if ($oWkC) {$address2=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[11]]; - if ($oWkC) {$address3=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[12]]; - if ($oWkC) {$city=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[13]]; - if ($oWkC) {$state=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[14]]; - if ($oWkC) {$province=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[15]]; - if ($oWkC) {$postal_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[16]]; - if ($oWkC) {$country_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[17]]; - if ($oWkC) {$gender=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[18]]; - if ($oWkC) {$date_of_birth=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[19]]; - if ($oWkC) {$alt_phone=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[20]]; - if ($oWkC) {$email=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[21]]; - if ($oWkC) {$security_phrase=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][$xls_fields[22]]; - if ($oWkC) {$comments=$oWkC->Value; } - $comments=~s/^\s*(.*?)\s*$/$1/; - - if (length($phone_number)>8) { - if (length($forcelistid) > 0) - { - $list_id = $forcelistid; # set list_id to override value - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =~ /^1$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### MEXICO ### - if ($phone_code =~ /^52$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### AUSTRALIA ### - if ($phone_code =~ /^61$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = ($secX + (3600 * $AC_GMT_diff)); - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($AC_localtime); - $year = ($year + 1900); - $mon++; - if ($mon < 10) {$mon = "0$mon";} - if ($mday < 10) {$mday = "0$mday";} - if ($hour < 10) {$hour = "0$hour";} - if ($min < 10) {$min = "0$min";} - if ($sec < 10) {$sec = "0$sec";} - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) && ($dst_range =~ /FSA-LSO/) ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - &USA_dstcalc; - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /LSM-LSO/) ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - &GBR_dstcalc; - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /LSO-LSM/) ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - &AUS_dstcalc; - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /FSO-LSM/) ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - &AUST_dstcalc; - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - &NZL_dstcalc; - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $dbhA->query("$stmtZ"); - print STMT_FILE $stmtZ."\r\n"; - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - sleep(1); -# flush(); - } - } -} - -if ($multi_insert_counter > 0) { - $stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";"; - $dbhA->query("$stmtZ"); - print STMT_FILE $stmtZ."\r\n"; -} - -print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total"; - -exit; - - - - - - -sub USA_dstcalc { -#********************************************************************** -# FSA-LSO -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on first Sunday in April and last Sunday in October at 2 am. -# INPUTS: -# mm INTEGER Month. -# dd INTEGER Day of the month. -# ns INTEGER Seconds into the day. -# dow INTEGER Day of week (0=Sunday, to 6=Saturday) -# OPTIONAL INPUT: -# timezone INTEGER hour difference UTC - local standard time -# (DEFAULT is blank) -# make calculations based on UTC time, -# which means shift at 10:00 UTC in April -# and 9:00 UTC in October -# OUTPUT: -# INTEGER 1 = DST, 0 = not DST -#********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; return 0; - } elsif ($mm >= 5 && $mm <= 9) { - $USA_DST=1; return 1; - } elsif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $USA_DST=0; return 0; - } else { - $USA_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 7200) { - $USA_DST=0; return 0; - } else { - $USA_DST=1; return 1; - } - } - } else { - $USA_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $USA_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; return 1; - } else { - $USA_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; return 1; - } else { - $USA_DST=0; return 0; - } - } - } else { - $USA_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - -sub GBR_dstcalc { -#********************************************************************** -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on last Sunday in March and last Sunday in October at 1 am. -#********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; return 0; - } elsif ($mm >= 4 && $mm <= 9) { - $GBR_DST=1; return 1; - } elsif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; return 0; - } elsif ($dd < ($dow+25)) { - $GBR_DST=0; return 0; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; return 0; - } else { - $GBR_DST=1; return 1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; return 0; - } else { - $GBR_DST=1; return 1; - } - } - } else { - $GBR_DST=1; return 1; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $GBR_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; return 1; - } else { - $GBR_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; return 1; - } else { - $GBR_DST=0; return 0; - } - } - } else { - $GBR_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - -sub AUS_dstcalc { -#********************************************************************** -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on last Sunday in October and last Sunday in March at 1 am. -#********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $AUS_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $AUS_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; return 1; - } else { - $AUS_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; return 1; - } else { - $AUS_DST=0; return 0; - } - } - } else { - $AUS_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; return 0; - } elsif ($dd < ($dow+25)) { - $AUS_DST=0; return 0; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; return 0; - } else { - $AUS_DST=1; return 1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; return 0; - } else { - $AUS_DST=1; return 1; - } - } - } else { - $AUS_DST=1; return 1; - } - } # end of month checks -} # end of subroutine dstcalc - - - - - -sub AUST_dstcalc { -#********************************************************************** -# TASMANIA ONLY -# 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 last Sunday in March at 1 am. -#********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $AUST_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $AUST_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; return 1; - } else { - $AUST_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; return 1; - } else { - $AUST_DST=0; return 0; - } - } - } else { - $AUST_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $AUST_DST=0; return 0; - } else { - $AUST_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 3600) { - $AUST_DST=0; return 0; - } else { - $AUST_DST=1; return 1; - } - } - } else { - $AUST_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - - -sub NZL_dstcalc { -#********************************************************************** -# 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 third Sunday in March at 1 am. -#********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $NZL_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; return 1; - } elsif ($dd < ($dow+14)) { - $NZL_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; return 1; - } else { - $NZL_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; return 1; - } else { - $NZL_DST=0; return 0; - } - } - } else { - $NZL_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $NZL_DST=0; return 0; - } else { - $NZL_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 3600) { - $NZL_DST=0; return 0; - } else { - $NZL_DST=1; return 1; - } - } - } else { - $NZL_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc diff --git a/agc_2-X/trunk/VICIDIAL_web/log_test.php b/agc_2-X/trunk/VICIDIAL_web/log_test.php deleted file mode 100644 index cd7a86b7..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/log_test.php +++ /dev/null @@ -1,37 +0,0 @@ - LICENSE: GPLv2 -# - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - -$fp = fopen ("./closer_SQL_updates.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - fwrite ($fp, "CLOSER SQL UPDATE|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - - -exit; - - - -?> - - -Hello - - diff --git a/agc_2-X/trunk/VICIDIAL_web/new_listloader_superL.php b/agc_2-X/trunk/VICIDIAL_web/new_listloader_superL.php deleted file mode 100644 index 6c0ac713..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/new_listloader_superL.php +++ /dev/null @@ -1,1364 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60113-1603 - Fixed a few bugs in Excel import -# 60421-1624 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1240 - added listID override -# 60616-1604 - added gmt lookup for each lead -# 60619-1651 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12-1'; -$build = '60619-1651'; - - -require("dbconnect.php"); - -### links used for testing -#$link=mysql_connect("10.10.10.15", "cron", "1234"); -#mysql_select_db("asterisk"); -#$WeBServeRRooT = '/home/www/htdocs'; - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];} - elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} - elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} -if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} - elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} -if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} - elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];} -if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];} - elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];} -if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];} - elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];} -if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];} - elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];} -if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];} - elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];} -if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];} - elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];} -if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];} - elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];} -if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];} - elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];} -if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];} - elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];} -if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];} - elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];} -if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];} - elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];} -if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];} - elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];} -if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];} - elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];} -if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];} - elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];} -if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];} - elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];} -if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];} - elseif (isset($_POST["province_field"])) {$province_field=$_POST["province_field"];} -if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];} - elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];} -if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];} - elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];} -if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];} - elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];} -if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];} - elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];} -if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];} - elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];} -if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];} - elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];} -if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];} - elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];} -if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];} - elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];} -if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];} - elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); - -# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"HELP\""; - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -function macfontfix($fontsize) { - - $browser = getenv("HTTP_USER_AGENT"); - $pctype = explode("(", $browser); - if (ereg("Mac",$pctype[1])) { - /* Browser is a Mac. If not Netscape 6, raise fonts */ - - $blownbrowser = explode('/', $browser); - $ver = explode(' ', $blownbrowser[1]); - $ver = $ver[0]; - if ($ver >= 5.0) return $fontsize; else return ($fontsize+2); - - } else return $fontsize; /* Browser is not a Mac - don't touch fonts */ -} - -echo "\n"; - -?> - - - -VICIDIAL ADMIN: Super Lead Loader - - -
    method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> - - -
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    LEAD FILTER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1]MODIFY
    \n"; -} - - -###################### -# ADD=100000000 display all call times -###################### -if ($ADD==100000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_call_times order by call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    CALL TIME LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[3] $row[4] MODIFY
    \n"; -} - -###################### -# ADD=1000000000 display all state call times -###################### -if ($ADD==1000000000) -{ -echo "
    \n"; - - echo ""; - - $stmt="SELECT * from vicidial_state_call_times order by state_call_time_id"; - $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); - -echo "
    STATE CALL TIME LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($filters_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2] $row[3] $row[4] MODIFY
    \n"; -} - - - - - -echo "
    \n"; - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; -echo "             VERSION: $version"; -echo "             BUILD: $build
    \n"; - - -?> - - -
    - - - -1) - { - $g=0; - $p='13'; - $GMT_gmt[0] = ''; - $GMT_hour[0] = ''; - $GMT_day[0] = ''; - while ($p > -13) - { - $pzone=3600 * $p; - $pmin=(gmdate("i", time() + $pzone)); - $phour=( (gmdate("G", time() + $pzone)) * 100); - $pday=gmdate("w", time() + $pzone); - $tz = sprintf("%.2f", $p); - $GMT_gmt[$g] = "$tz"; - $GMT_day[$g] = "$pday"; - $GMT_hour[$g] = ($phour + $pmin); - $p = ($p - 0.25); - $g++; - } - - $stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $Gct_default_start = "$rowx[3]"; - $Gct_default_stop = "$rowx[4]"; - $Gct_sunday_start = "$rowx[5]"; - $Gct_sunday_stop = "$rowx[6]"; - $Gct_monday_start = "$rowx[7]"; - $Gct_monday_stop = "$rowx[8]"; - $Gct_tuesday_start = "$rowx[9]"; - $Gct_tuesday_stop = "$rowx[10]"; - $Gct_wednesday_start = "$rowx[11]"; - $Gct_wednesday_stop = "$rowx[12]"; - $Gct_thursday_start = "$rowx[13]"; - $Gct_thursday_stop = "$rowx[14]"; - $Gct_friday_start = "$rowx[15]"; - $Gct_friday_stop = "$rowx[16]"; - $Gct_saturday_start = "$rowx[17]"; - $Gct_saturday_stop = "$rowx[18]"; - $Gct_state_call_times = "$rowx[19]"; - - $ct_states = ''; - $ct_state_gmt_SQL = ''; - $ct_srs=0; - $b=0; - if (strlen($Gct_state_call_times)>2) - { - $state_rules = explode('|',$Gct_state_call_times); - $ct_srs = ((count($state_rules)) - 2); - } - while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>1) - { - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Gstate_call_time_id = "$row[0]"; - $Gstate_call_time_state = "$row[1]"; - $Gsct_default_start = "$row[4]"; - $Gsct_default_stop = "$row[5]"; - $Gsct_sunday_start = "$row[6]"; - $Gsct_sunday_stop = "$row[7]"; - $Gsct_monday_start = "$row[8]"; - $Gsct_monday_stop = "$row[9]"; - $Gsct_tuesday_start = "$row[10]"; - $Gsct_tuesday_stop = "$row[11]"; - $Gsct_wednesday_start = "$row[12]"; - $Gsct_wednesday_stop = "$row[13]"; - $Gsct_thursday_start = "$row[14]"; - $Gsct_thursday_stop = "$row[15]"; - $Gsct_friday_start = "$row[16]"; - $Gsct_friday_stop = "$row[17]"; - $Gsct_saturday_start = "$row[18]"; - $Gsct_saturday_stop = "$row[19]"; - - $ct_states .="'$Gstate_call_time_state',"; - - $r=0; - $state_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday local time - { - if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday local time - { - if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday local time - { - if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday local time - { - if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday local time - { - if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday local time - { - if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday local time - { - if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) ) - {$state_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - $state_gmt = "$state_gmt'99'"; - $ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) "; - } - - $b++; - } - if (strlen($ct_states)>2) - { - $ct_states = eregi_replace(",$",'',$ct_states); - $ct_statesSQL = "and state NOT IN($ct_states)"; - } - else - { - $ct_statesSQL = ""; - } - - $r=0; - $default_gmt=''; - while($r < $g) - { - if ($GMT_day[$r]==0) #### Sunday local time - { - if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==1) #### Monday local time - { - if (($Gct_monday_start==0) and ($Gct_monday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==2) #### Tuesday local time - { - if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==3) #### Wednesday local time - { - if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==4) #### Thursday local time - { - if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==5) #### Friday local time - { - if (($Gct_friday_start==0) and ($Gct_friday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - if ($GMT_day[$r]==6) #### Saturday local time - { - if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0)) - { - if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - else - { - if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) ) - {$default_gmt.="'$GMT_gmt[$r]',";} - } - } - $r++; - } - - $default_gmt = "$default_gmt'99'"; - $all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL"; - - $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN('$dial_status_a','$dial_status_b','$dial_status_c','$dial_status_d','$dial_status_e') and list_id IN($camp_lists) and ($all_gmtSQL) $fSQL"; - #$DB=1; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rslt_rows = mysql_num_rows($rslt); - if ($rslt_rows) - { - $rowx=mysql_fetch_row($rslt); - $active_leads = "$rowx[0]"; - } - else {$active_leads = '0';} - - echo "This campaign has $active_leads leads to be dialed in those lists\n"; - } - else - { - echo "no active lists selected for this campaign\n"; - } - } -else - { - echo "no active lists selected for this campaign\n"; - } -##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ### -} -?> diff --git a/agc_2-X/trunk/VICIDIAL_web/admin_modify_lead.php b/agc_2-X/trunk/VICIDIAL_web/admin_modify_lead.php deleted file mode 100644 index 9dad4f62..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/admin_modify_lead.php +++ /dev/null @@ -1,476 +0,0 @@ - LICENSE: GPLv2 -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"];} - elseif (isset($_POST["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];} -if (isset($_GET["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"];} - elseif (isset($_POST["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];} -if (isset($_GET["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"];} - elseif (isset($_POST["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["CBuser"])) {$CBuser=$_GET["CBuser"];} - elseif (isset($_POST["CBuser"])) {$CBuser=$_POST["CBuser"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Lead record modification - - -
    - - 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "information modified

    \n"; - echo "\n"; - - if ( ($dispo != $status) and ($dispo == 'CBHOLD') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status='ACTIVE';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - if ( ($dispo != $status) and ($dispo == 'CALLBK') ) - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record inactivated: $lead_id
    \n"; - } - - if ( ($dispo != $status) and ($status == 'DNC') ) - { - ### add lead to the internal DNC list - $stmt="INSERT INTO vicidial_dnc (phone_number) values('" . mysql_real_escape_string($phone_number) . "');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    Lead added to DNC List: $lead_id - $phone_number
    \n"; - } - -} -else -{ - - if ($CBchangeUSERtoANY == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set recipient='ANYONE' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to ANYONE
    \n"; - } - if ($CBchangeUSERtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record user changed to $CBuser
    \n"; - } - if ($CBchangeANYtoUSER == 'YES') - { - ### inactivate vicidial_callbacks record for this lead - $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "',recipient='USERONLY' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
    vicidial_callback record changed to USERONLY, user: $CBuser
    \n"; - } - - - - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $dispo = "$row[3]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Call information: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Lead ID: $lead_id
    Fronter: $tsr     List ID: $list_id
    First Name:   \n"; - echo " Last Name:
    Address 1 :
    Address 2 :
    Address 3 :
    City :
    State:   \n"; - echo " Postal Code:
    Province :
    Country :
    Alt Phone :
    Email :
    Security :
    Comments :
    Disposition:
    \n"; - echo "


    \n"; - - if ( ($dispo == 'CALLBK') or ($dispo == 'CBHOLD') ) - { - ### find any vicidial_callback records for this lead - $stmt="select * from vicidial_callbacks where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $CB_to_print = mysql_num_rows($rslt); - $rowx=mysql_fetch_row($rslt); - - if ($CB_to_print>0) - { - if ($rowx[9] == 'USERONLY') - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    \n"; - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - else - { - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "New Callback Owner UserID: \n"; - echo "

    \n"; - } - } - else - { - echo "
    No Callback records found
    \n"; - } - } - - - - - - - } - else - { - echo "lead lookup FAILED for lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - -echo "

    \n"; - -echo "
    \n"; - -echo "CALLS TO THIS LEAD:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS TSR CAMPAIGN LIST LEAD
    $row[4] $row[7] $row[8] $row[11] $row[3] $row[2] $row[1]
    \n"; - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/admin_search_lead.php b/agc_2-X/trunk/VICIDIAL_web/admin_search_lead.php deleted file mode 100644 index a727e3a1..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/admin_search_lead.php +++ /dev/null @@ -1,224 +0,0 @@ - LICENSE: GPLv2 -### -### AST GUI database administration search for lead info -### admin_modify_lead.php -# -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead -# -# changes: -# 60620-1055 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - Changed results to multi-record -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); - - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} - -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[0]; - $LOGmodify_leads =$row[1]; - - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -?> - - - -VICIDIAL ADMIN: Lead Search - -Lead Lookup - - - -
    \n"; - echo "
    \n"; - echo "\n"; - echo "Please enter a:
    Vendor ID(vendor lead code): or \n"; - echo "
    a Home Phone Number: or\n"; - echo "
    a lead ID:

    \n"; - echo "
    \n"; - echo "\n
    \n"; - echo "\n"; - exit; - } - -else - { - - if ($vendor_id) - { - $stmt="SELECT * from vicidial_list where vendor_lead_code='" . mysql_real_escape_string($vendor_id) . "' order by modify_date desc limit 1000"; - } - else - { - if ($phone) - { - $stmt="SELECT * from vicidial_list where phone_number='" . mysql_real_escape_string($phone) . "' order by modify_date desc limit 1000"; - } - else - { - if ($lead_id) - { - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "' order by modify_date desc limit 1000"; - } - else - { - print "ERROR: you must search for something! Go back and search for something"; - exit; - } - } - } - if ($DB) - { - echo "\n\n$stmt\n\n"; - } - - $rslt=mysql_query($stmt, $link); - $results_to_print = mysql_num_rows($rslt); - if ($results_to_print < 1) - { - echo date("l F j, Y G:i:s A"); - echo "\n

    \n"; - echo "The search variables you entered are not active in the system

    \n"; - echo "Please go back and double check the information you entered and submit again\n"; - echo "
    \n"; - echo "\n"; - exit; - } - else - { - echo "RESULTS: $results_to_print

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $o=0; - while ($results_to_print > $o) - { - $row=mysql_fetch_row($rslt); - $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - echo "
    #LEAD IDSTATUSVENDOR IDLAST AGENTLIST IDPHONENAMECITYSECURITYLAST CALL
    $o$row[0]$row[3]$row[5]$row[4]$row[7]$row[11]$row[13] $row[15]$row[19]$row[28]$row[2]
    \n"; - } - } - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \nNEW SEARCH"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; - - -?> - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/closer-fronter_popup.php b/agc_2-X/trunk/VICIDIAL_web/closer-fronter_popup.php deleted file mode 100644 index 84d31c97..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/closer-fronter_popup.php +++ /dev/null @@ -1,515 +0,0 @@ - LICENSE: GPLv2 -### -# this is the closer popup of a specific call that starts recording the call and allows you to go and fetch info on that caller in the local CRM system. -# CHANGES -# -# 60620-1020 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -#$DB = '1'; # DEBUG override -$US = '_'; -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$REC_TIME = date("Ymd-His"); -$FILE_datetime = $STARTtime; -$parked_time = $STARTtime; - -# $ext_context = 'default'; defined in dbconnect file - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name from vicidial_users where user='$user' and pass='$pass'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - if ( (strlen($customer_zap_channel)>2) and (eregi('zap',$customer_zap_channel)) ) - { - echo "\n\n"; - echo "\n\n"; - - } - else - { - echo "Bad channel: $customer_zap_channel\n"; - echo "Make sure the Zap channel is live and try again\n"; - exit; - } - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "VICIDIAL FRONTER-CLOSER: Popup\n"; -echo "\n"; - -if (eregi('CL_UNIV',$channel_group)) - { - ?> - - \n"; - echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n"; - echo "\n"; - } -?> - - -
    - - 0) -{ - -# $stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RZ$FILE_datetime$user"; - - ### insert a NEW record to the vicidial_manager table to be processed - - $channel = $customer_zap_channel; - $channel = eregi_replace('Zap/', "", $channel); - $SIPexten = eregi_replace('SIP/', "", $SIPexten); - $filename = "$REC_TIME$US$SIPexten"; - -# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: Zap/$channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - - # Local/78600098@demo-6617,2 - - $stmt = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','" . mysql_real_escape_string($server_ip) . "','','Originate','$DTqueryCID','Channel: $local_DEF$conf_silent_prefix" . mysql_real_escape_string($session_id) . "$local_AMP$ext_context','Context: $ext_context','Exten: $recording_exten','Priority: 1','Callerid: " . mysql_real_escape_string($filename) . "','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('Zap/" . mysql_real_escape_string($channel) . "','" . mysql_real_escape_string($server_ip) . "','SIP/" . mysql_real_escape_string($SIPexten) . "','$NOW_TIME','$STARTtime','" . mysql_real_escape_string($filename) . "')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='" . mysql_real_escape_string($filename) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - - echo "Recording command sent for channel $channel - $filename - $recording_id       $NOW_TIME\n

    \n"; - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - echo "Call Referred by: $user - $full_name\n

    \n"; - - $url = "http://10.10.99.2/vicidial/closer_dispo.php?lead_id=$lead_id&channel=$channel&server_ip=$server_ip&extension=$SIPexten&call_began=$STARTtime&parked_time=$parked_time&DB=$DB"; - - echo "View Customer Info and Disposition Call\n

    \n"; - - - -# $stmt="UPDATE park_log set grab_time='$NOW_TIME',status='TALKING',extension='$extension',user='$user' where parked_time='$parked_time' and server_ip='$server_ip' and channel='$channel'"; -# if ($DB) {echo "|$stmt|\n";} -# $fp = fopen ("./closer_SQL_updates.txt", "a"); -# fwrite ($fp, "$date|$user|$stmt|\n"); -# fclose($fp); -# $rslt=mysql_query($stmt, $link); - -########################################################################################### -####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX -########################################################################################### -if (eregi('CL_TEST',$channel_group)) - { - echo "GALLERIA TEST CLOSER GROUP: $channel_group\n"; - - $stmt="SELECT user,phone_number from vicidial_list where lead_id='" . mysql_real_escape_string($parked_by) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $fronter=$row[0]; - $search_phone=$row[1]; - - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - -- INTERNAL CALL GALLERIA FRONT --
    \n"; - $group_color='#99FF99'; - } - if (eregi('CL_GALLER2',$channel_group)) - { - echo "
    -- TouchAsia CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - if (eregi('CL_GALLER3',$channel_group)) - { - echo "
    -- DebitSupplies CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - if (eregi('CL_GALLER4',$channel_group)) - { - echo "
    -- Vishnu CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    New Search
    Reservation Number:
    Confirmation #:
    Phone #:


    Back
    - -
    - - - Close this window\n

    \n"; -} -else -{ - echo "Record command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "Please go back and try again\n

    \n"; -# echo "
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/closer-fronter_popup2.php b/agc_2-X/trunk/VICIDIAL_web/closer-fronter_popup2.php deleted file mode 100644 index 2ecd56d1..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/closer-fronter_popup2.php +++ /dev/null @@ -1,430 +0,0 @@ - LICENSE: GPLv2 -### -# this is the closer popup of a specific call that starts recording the call and allows you to go and fetch info on that caller in the local CRM system. -# CHANGES -# -# 60620-1025 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -#$DB = '1'; # DEBUG override -$US = '_'; -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$REC_TIME = date("Ymd-His"); -$FILE_datetime = $STARTtime; -$parked_time = $STARTtime; - -# $ext_context = 'default'; defined in dbconnect file -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if (!$auth) - { - if ( (strlen($PHP_AUTH_USER)>1) and ( (eregi("tsr",$PHP_AUTH_PW)) or (eregi("sales",$PHP_AUTH_PW)) ) ) - { - $auth=1; - $user = $PHP_AUTH_USER; - $pass = $PHP_AUTH_PW; - } - } - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER - $user - $PHP_AUTH_USER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name from vicidial_users where user='$user' and pass='$pass'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - if ( (strlen($customer_zap_channel)>2) and ( (eregi('zap',$customer_zap_channel)) or (eregi('iax',$customer_zap_channel)) ) ) - { - echo "\n\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - } - else - { - echo "Bad channel: $customer_zap_channel\n"; - echo "Make sure the Zap channel is live and try again\n"; - exit; - } - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "VICIDIAL FRONTER-CLOSER: Popup\n"; -echo "\n"; - -if (eregi('CL_UNIV',$channel_group)) - { - ?> - - \n"; - echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n"; - echo "\n"; - } -?> - - -
    - - 0) -{ - -# $stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RZ$FILE_datetime$user"; - - ### insert a NEW record to the vicidial_manager table to be processed - - $channel = $customer_zap_channel; -# $channel = eregi_replace('Zap/', "", $channel); - $SIPexten = eregi_replace('SIP/', "", $SIPexten); - $filename = "$REC_TIME$US$SIPexten"; - -# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: Zap/$channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - - # Local/78600098@demo-6617,2 - - $stmt = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','" . mysql_real_escape_string($server_ip) . "','','Originate','$DTqueryCID','Channel: $local_DEF$conf_silent_prefix" . mysql_real_escape_string($session_id) . "$local_AMP$ext_context','Context: $ext_context','Exten: $recording_exten','Priority: 1','Callerid: " . mysql_real_escape_string($filename) . "','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','" . mysql_real_escape_string($server_ip) . "','SIP/" . mysql_real_escape_string($SIPexten) . "','$NOW_TIME','$STARTtime','" . mysql_real_escape_string($filename) . "')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='" . mysql_real_escape_string($filename) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - - echo "Recording command sent for channel $channel - $filename - $recording_id       $NOW_TIME\n

    \n"; - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($fronter) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - echo "Call Referred by: $fronter - $full_name\n

    \n"; - - $url = "http://10.10.10.196/vicidial/closer_dispo.php?lead_id=$lead_id&channel=$channel&server_ip=$server_ip&extension=$SIPexten&call_began=$STARTtime&parked_time=$parked_time&DB=$DB"; - - echo "View Customer Info and Disposition Call\n

    \n"; - - - $stmt="SELECT group_name,group_color from vicidial_inbound_groups where group_id='" . mysql_real_escape_string($channel_group) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $group_name = $row[0]; - $group_color = $row[1]; - - echo "
    \n"; - echo "
    $channel_group - $group_name

    \n\n"; - -########################################################################################### -####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX -########################################################################################### - -if (eregi('CL',$channel_group)) - { - if (strlen($phone) > 9) {$search_phone = $phone;} - if ( (strlen($search_phone) < 10) or (strlen($fronter) < 1) ) - { - echo "\n"; - $stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($fronter) < 1) {$fronter=$row[0];} - if (strlen($search_phone) < 10) {$search_phone=$row[1];} - } - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    New Search
    Reservation Number:
    Confirmation #:
    Phone #:


    Back
    - -
    - - - Close this window\n

    \n"; -} -else -{ - echo "Record command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "Please go back and try again\n

    \n"; -# echo "
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/closer.php b/agc_2-X/trunk/VICIDIAL_web/closer.php deleted file mode 100644 index 59599edb..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/closer.php +++ /dev/null @@ -1,353 +0,0 @@ - LICENSE: GPLv2 -### -# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available) -# CHANGES -# -# 60620-1032 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["group_selected"])) {$group_selected=$_GET["group_selected"];} - elseif (isset($_POST["group_selected"])) {$group_selected=$_POST["group_selected"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["groupselect"])) {$groupselect=$_GET["groupselect"];} - elseif (isset($_POST["groupselect"])) {$groupselect=$_POST["groupselect"];} -if (isset($_GET["PHONE_LOGIN"])) {$PHONE_LOGIN=$_GET["PHONE_LOGIN"];} - elseif (isset($_POST["PHONE_LOGIN"])) {$PHONE_LOGIN=$_POST["PHONE_LOGIN"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["debugvars"])) {$debugvars=$_GET["debugvars"];} - elseif (isset($_POST["debugvars"])) {$debugvars=$_POST["debugvars"];} -if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];} - elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './closer_popup.php'; - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - -$color_class[0] = 'green'; -$color_class[1] = 'red'; -$color_class[2] = 'blue'; -$color_class[3] = 'purple'; -$color_class[4] = 'orange'; -$color_class[5] = 'green'; -$color_class[6] = 'red'; -$color_class[7] = 'blue'; -$color_class[8] = 'purple'; -$color_class[9] = 'orange'; -?> - - - - - -VICIDIAL CLOSER: Main - - -
    - - 0) - { - $stmt="SELECT dialplan_number,server_ip from phones where extension='" . mysql_real_escape_string($extension) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dialplan_number=$row[0]; - $server_ip=$row[1]; - - if (!$group_selected) - { - $stmt="select distinct channel_group from park_log;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $groups_to_print = mysql_num_rows($rslt); - $i=0; - while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - echo "
    Please select the groups you want to pick calls up from:
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Inbound Call Groups:
    \n"; - $o=0; - while ($groups_to_print > $o) - { - $group_form_print = sprintf("%-20s", $groups[$o]); - echo "$group_form_print
    \n"; - $o++; - } - echo "
    \n"; - echo "\n"; - echo "


    \n"; - } - else - { - $o=0; - while($o < $group_selected) - { - $form_groups = "$form_groups&groupselect[$o]=$groupselect[$o]"; - $o++; - } - - $stmt="INSERT INTO vicidial_user_log values('','" . mysql_real_escape_string($user) . "','LOGIN','CLOSER','$NOW_TIME','$STARTtime');"; - $rslt=mysql_query($stmt, $link); - - echo "\n"; - echo"\n"; - - echo "extension found, forwarding you to closer page, please wait 3 seconds...
    \n"; - } - - } - else - { - echo "The extension you entered does not exist, please try again
    \n"; - echo "
    Please enter your phone_ID: \n"; - echo "\n"; - echo "phone station ID:   \n"; - echo "\n"; - echo "


    \n"; - } - - } - else - { - echo "
    Please enter your phone_ID: \n"; - echo "\n"; - echo "phone station ID:   \n"; - echo "\n"; - echo "


    \n"; - } - -exit; - -} - -$o=0; -while($o < $group_selected) -{ - $listen_groups = "$listen_groups     $groupselect[$o]"; - $form_groups = "$form_groups&groupselect[$o]=$groupselect[$o]"; - $o++; -} - - -echo "\n"; -echo"\n"; - -#CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME -#---------------------------------------------------------------------------------------------- -#Zap/73-1 10.10.11.11 IN_800_TPP_CS TPPpark 7275338730 2004-04-22 12:41:00 - - - -echo "$NOW_TIME           $PHP_AUTH_USER - $fullname - CALLS SENT TO: $dialplan_number

    \n"; - -echo "Click on the channel below that you would like to have directed to your phone
    \n"; - -echo "
    \n";
    -echo "CHANNEL    SERVER        CHANNEL_GROUP   EXTENSION    PARKED_BY            PARKED_TIME         \n";
    -echo "---------------------------------------------------------------------------------------------- \n";
    -
    -
    -
    -
    -
    -$stmt="SELECT count(*) from parked_channels where server_ip='" . mysql_real_escape_string($server_ip) . "'";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="SELECT * from parked_channels where server_ip='" . mysql_real_escape_string($server_ip) . "' and channel_group LIKE \"CL_%\" order by channel_group,parked_time";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		$channel =			sprintf("%-11s", $row[0]);
    -		$server =			sprintf("%-14s", $row[1]);
    -		$channel_group =	sprintf("%-16s", $row[2]);
    -		$park_extension =	sprintf("%-13s", $row[3]);
    -		$parked_by =		sprintf("%-21s", $row[4]);
    -		$parked_time =		sprintf("%-19s", $row[5]);
    -
    -		$G='';   $EG='';
    -		$o=0;
    -		$with_color=0;
    -		while($o < $group_selected)
    -			{
    -				if (eregi("$groupselect[$o]",$channel_group))
    -					{
    -					$G=""; $EG='';
    -					$with_color++;
    -					}
    -				$o++;
    -			}
    -		if ($with_color)
    -			{
    -			if (eregi('CL_GAL',$row[2]))
    -				{
    -				echo "$G$channel$server$channel_group$park_extension                     $parked_time $EG\n";
    -				}
    -			else
    -				{
    -				echo "$G$channel$server$channel_group$park_extension$parked_by$parked_time $EG\n";
    -				}
    -			}
    -#	
    -		$i++;
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "********************************************************************************************** \n";
    -	echo "********************************************************************************************** \n";
    -	echo "*************************************** NO PARKED CALLS ************************************** \n";
    -	echo "********************************************************************************************** \n";
    -	echo "********************************************************************************************** \n";
    -	}
    -
    -echo "  \n\n";
    -echo "looking for calls on these groups:\n";
    -$o=0;
    -while($o < $group_selected)
    -{
    -	$group_print =		sprintf("%-20s", $groupselect[$o]);
    -	echo "             - $group_print\n";
    -	$o++;
    -}
    -
    -
    -$ENDtime = date("U");
    -
    -$RUNtime = ($ENDtime - $STARTtime);
    -
    -echo "
    \n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/closer_dispo.php b/agc_2-X/trunk/VICIDIAL_web/closer_dispo.php deleted file mode 100644 index 54e61219..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/closer_dispo.php +++ /dev/null @@ -1,329 +0,0 @@ - LICENSE: GPLv2 -### -# this is the closer disposition screen of a call that has been grabbed. This allows the closer to modify customer information and disposition the call -# CHANGES -# -# 60619-1641 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -VICIDIAL CLOSER: Call Disposition -\n"; -?> - - -
    - - 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from live_channels where server_ip='$server_ip' and channel='" . mysql_real_escape_string($channel) . "' and extension like \"%" . mysql_real_escape_string($extension) . "%\""; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $parked_count = $row[0]; - - if ($parked_count > 0) - { - - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','" . mysql_real_escape_string($server_ip) . "','','Hangup','$DTqueryCID','Channel: " . mysql_real_escape_string($channel) . "','','','','','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Hangup command sent for channel $channel       $NOW_TIME\n

    \n"; - - echo "\n"; - } - else - { - echo "Hangup command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "
    \n"; - } -} -else -{ - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Call information: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Campaign ID: $campaign_id
    Fronter: $tsr     List ID: $list_id
    First Name:   \n"; - echo " Last Name:
    Address 1 :
    Address 2 :
    Address 3 :
    City :
    State:   \n"; - echo " Postal Code:
    Province :
    Country :
    Alt Phone :
    Email :
    Security :
    Comments :
    Disposition:
    \n"; - echo "


    \n"; - - } - else - { - echo "lead lookup FAILED for lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/closer_popup.php b/agc_2-X/trunk/VICIDIAL_web/closer_popup.php deleted file mode 100644 index e12f02c3..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/closer_popup.php +++ /dev/null @@ -1,453 +0,0 @@ - LICENSE: GPLv2 -### -# this is the closer popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system. -# CHANGES -# -# 60620-1029 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["group_selected"])) {$group_selected=$_GET["group_selected"];} - elseif (isset($_POST["group_selected"])) {$group_selected=$_POST["group_selected"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["groupselect"])) {$groupselect=$_GET["groupselect"];} - elseif (isset($_POST["groupselect"])) {$groupselect=$_POST["groupselect"];} -if (isset($_GET["PHONE_LOGIN"])) {$PHONE_LOGIN=$_GET["PHONE_LOGIN"];} - elseif (isset($_POST["PHONE_LOGIN"])) {$PHONE_LOGIN=$_POST["PHONE_LOGIN"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["debugvars"])) {$debugvars=$_GET["debugvars"];} - elseif (isset($_POST["debugvars"])) {$debugvars=$_POST["debugvars"];} -if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];} - elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -#$DB=1; -$US = '_'; -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$REC_TIME = date("Ymd-His"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "VICIDIAL CLOSER: Popup\n"; -echo "\n"; - -if (eregi('CL_UNIV',$channel_group)) - { - ?> - - \n"; - echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n"; - echo "\n"; - } -?> - - -
    - - 0) -{ - $stmt="DELETE from parked_channels where server_ip='" . mysql_real_escape_string($server_ip) . "' and parked_time='" . mysql_real_escape_string($parked_time) . "' and channel='" . mysql_real_escape_string($channel) . "' LIMIT 1"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - - #$monitor_channel = eregi_replace('Zap/', "", $channel); - $monitor_channel = eregi_replace('-1', "", $channel); - $SIPexten = $extension; - $filename = "$REC_TIME$US$SIPexten"; - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - -# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: $monitor_channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - -# $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$monitor_channel','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')"; -# if ($DB) {echo "|$stmt|\n";} -# $rslt=mysql_query($stmt, $link); - -# $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; -# $rslt=mysql_query($stmt, $link); -# if ($DB) {echo "$stmt\n";} -# $row=mysql_fetch_row($rslt); -# $recording_id = $row[0]; - -# echo "Recording command sent for channel $channel - $filename - $recording_id
    \n"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','" . mysql_real_escape_string($server_ip) . "','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: " . mysql_real_escape_string($channel) . "','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for channel $channel       $NOW_TIME\n

    \n"; - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($parked_by) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - echo "Call Referred by: $parked_by - $full_name\n

    \n"; - - $url = "http://10.10.10.196/vicidial/closer_dispo.php?lead_id=$parked_by&channel=$channel&server_ip=$server_ip&extension=$extension&call_began=$STARTtime&parked_time=$parked_time&DB=$DB"; - - echo "View Customer Info and Disposition Call\n

    \n"; - - - - $stmt="UPDATE park_log set grab_time='$NOW_TIME',status='TALKING',extension='" . mysql_real_escape_string($extension) . "',user='$PHP_AUTH_USER' where parked_time='" . mysql_real_escape_string($parked_time) . "' and server_ip='" . mysql_real_escape_string($server_ip) . "' and channel='" . mysql_real_escape_string($channel) . "'"; - if ($DB) {echo "|$stmt|\n";} - $fp = fopen ("./closer_SQL_updates.txt", "a"); - fwrite ($fp, "$date|$PHP_AUTH_USER|$stmt|\n"); - fclose($fp); - - - $rslt=mysql_query($stmt, $link); - -########################################################################################### -####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX -########################################################################################### -if (eregi('CL_TEST',$channel_group)) - { - echo "GALLERIA TEST CLOSER GROUP: $channel_group\n"; - - $stmt="SELECT user,phone_number from vicidial_list where lead_id='" . mysql_real_escape_string($parked_by) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $fronter=$row[0]; - $search_phone=$row[1]; - - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - -- INTERNAL CALL GALLERIA FRONT --
    \n"; - $group_color='#99FF99'; - } - if (eregi('CL_GALLER2',$channel_group)) - { - echo "
    -- TouchAsia CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - if (eregi('CL_GALLER3',$channel_group)) - { - echo "
    -- DebitSupplies CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - if (eregi('CL_GALLER4',$channel_group)) - { - echo "
    -- Vishnu CALL Simple Escapes FRONT --
    \n"; - $group_color='#FF9999'; - } - - - ?> -
    - - - - - - - - - - - - - - - -
    COF MW Customer Search
    Phone number
    -
    -

    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    New Search
    Reservation Number:
    Confirmation #:
    Phone #:


    Back
    - -
    - - - Close this window\n

    \n"; -} -else -{ - echo "Redirect command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/count.htm b/agc_2-X/trunk/VICIDIAL_web/count.htm deleted file mode 100644 index 51f8a361..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/count.htm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/agc_2-X/trunk/VICIDIAL_web/dbconnect.php b/agc_2-X/trunk/VICIDIAL_web/dbconnect.php deleted file mode 100644 index 88078fc7..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/dbconnect.php +++ /dev/null @@ -1,20 +0,0 @@ - LICENSE: GPLv2 -# - -$link=mysql_connect("localhost", "cron", "1234"); -mysql_select_db("asterisk"); - -$local_DEF = 'Local/'; -$conf_silent_prefix = '7'; -$local_AMP = '@'; -$ext_context = 'demo'; -$recording_exten = '8309'; - -#$WeBServeRRooT = '/home/www/htdocs'; -$WeBServeRRooT = '/usr/local/apache2/htdocs'; -$WeBRooTWritablE = '1'; - -?> \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/group_hourly_stats.php b/agc_2-X/trunk/VICIDIAL_web/group_hourly_stats.php deleted file mode 100644 index b7eb1b31..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/group_hourly_stats.php +++ /dev/null @@ -1,252 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1014 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["date_with_hour"])) {$date_with_hour=$_GET["date_with_hour"];} - elseif (isset($_POST["date_with_hour"])) {$date_with_hour=$_POST["date_with_hour"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$date_with_hour_default = date("Y-m-d H"); -$date_no_hour_default = $TODAY; - -if (!isset($date_with_hour)) {$date_with_hour = $date_with_hour_default;} - $date_no_hour = $date_with_hour; - $date_no_hour = eregi_replace(" ([0-9]{2})",'',$date_no_hour); -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - -# $stmt="SELECT full_name from vicidial_users where user='$user';"; -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: Group Hourly Stats -\n"; -?> - - -
    - - - - - -= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDtotal[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_no_hour) . " 00:00:00' and call_date <= '" . mysql_real_escape_string($date_no_hour) . " 23:59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDday[$o] = "$row[0]"; - - $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $VDcount[$o] = "$row[0]"; - $o++; - } - -echo "
      VICIDIAL ADMIN: Group Hourly Stats  
    \n"; - -echo "
    \n"; - -echo "TSR HOUR COUNTS: $group | $status | $date_with_hour | $date_no_hour\n"; - -echo "
    \n"; -echo "\n"; - - $day_calls=0; - $hour_calls=0; - $total_calls=0; - $o=0; - while($o < $tsrs_to_print) - { - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $VDtotal[$o]); - $hour_calls = ($hour_calls + $VDcount[$o]); - $day_calls = ($day_calls + $VDday[$o]); - - $o++; - } - -echo "\n"; - - -} - -echo "
    TSR ID   $status   TOTAL CALLS   $status DAY    
    $VDuser[$o] $VDname[$o] $VDcount[$o] $VDtotal[$o] $VDday[$o]MODIFY | STATS
    TOTAL $status $hour_calls $total_calls $day_calls
    \n"; -echo "

    \n"; - - - echo "
    Please enter the group you want to get hourly stats for:
    \n"; - echo "\n"; - echo "group:
    \n"; - echo "status:   (example: XFER)
    \n"; - echo "date with hour:   (example: 2004-06-25 14)
    \n"; - echo "\n"; - echo "


    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/help.gif b/agc_2-X/trunk/VICIDIAL_web/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/VICIDIAL_web/listloader.php b/agc_2-X/trunk/VICIDIAL_web/listloader.php deleted file mode 100644 index 920505a8..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/listloader.php +++ /dev/null @@ -1,698 +0,0 @@ - LICENSE: GPLv2 -# -# AST Web GUI lead loader from formatted file -# -# CHANGES -# 50602-1640 - First version created by Joe Johnson -# 51128-1108 - Removed PHP global vars requirement -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60616-1006 - added listID override and gmt_offset lookup while loading -# 60619-1652 - Added variable filtering to eliminate SQL injection attack threat -# -# 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 = '1.1.12'; -$build = '60619-1652'; - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$leadfile=$_FILES["leadfile"]; - $LF_orig = $_FILES['leadfile']['name']; - $LF_path = $_FILES['leadfile']['tmp_name']; -$submit_file=$_GET["submit_file"]; if (!$submit_file) {$submit_file=$_POST["submit_file"];} -$list_id_override=$_GET["list_id_override"]; if (!$list_id_override) {$list_id_override=$_POST["list_id_override"];} - $list_id_override = (preg_replace("/\D/","",$list_id_override)); -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - - -#$DB=1; -#$DBX=1; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$list_id_override = ereg_replace("[^0-9]","",$list_id_override); - - -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -$admDIR = "$HTTPprotocol$server_name$script_name"; -$admDIR = eregi_replace('listloader.php','',$admDIR); -$admSCR = 'admin.php'; -$NWB = "   \"HELP\""; - - -$secX = date("U"); -$hour = date("H"); -$min = date("i"); -$sec = date("s"); -$mon = date("m"); -$mday = date("d"); -$year = date("Y"); -$isdst = date("I"); -$Shour = date("H"); -$Smin = date("i"); -$Ssec = date("s"); -$Smon = date("m"); -$Smday = date("d"); -$Syear = date("Y"); -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - ### Grab Server GMT value from the database - $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $rslt=mysql_query($stmt, $link); - $gmt_recs = mysql_num_rows($rslt); - if ($gmt_recs > 0) - { - $row=mysql_fetch_row($rslt); - $DBSERVER_GMT = "$row[0]"; - if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} - if ($isdst) {$SERVER_GMT++;} - } - else - { - $SERVER_GMT = date("O"); - $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); - $SERVER_GMT = ($SERVER_GMT + 0); - $SERVER_GMT = ($SERVER_GMT / 100); - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -?> - - - - - - method=post enctype="multipart/form-data"> -
    - - - - - - - - - - - - - -
    Load leads from this file:
    List ID Override: (numbers only or leave blank for values in the file)
    CLICK HERE TO GO TO THE SUPER LEAD LOADER (BETA VERSION)     BACK TO ADMIN
    - -document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - $pulldate=date("Y-m-d H:i:s"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("./vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Processing $delim_name-delimited file... ($tab_count|$pipe_count)\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city = $row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) - { - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $gmt_offset = '0'; - $called_since_last_reset='N'; - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =='1') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### MEXICO ### - if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### AUSTRALIA ### - if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - - if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - print ""; -} else if (filesize($leadfile)>8388608) { - print "
    ERROR: File exceeds the 8MB limit.
    "; -} -?> - - diff --git a/agc_2-X/trunk/VICIDIAL_web/listloader.pl b/agc_2-X/trunk/VICIDIAL_web/listloader.pl deleted file mode 100644 index 753c31f7..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/listloader.pl +++ /dev/null @@ -1,690 +0,0 @@ -#!/usr/bin/perl - -### listloader.pl -### -### Copyright (C) 2006 Matt Florell,Joe Johnson LICENSE: GPLv2 -### -# -# -# CHANGES -# 60616-1548 - Added listID override feature to force all leads into same list -# - Added gmt_offset_now lookup for each lead -# - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help|-h/i) - { - print "allowed run time options:\n [-forcelistid=1234] = overrides the listID given in the file with the 1234\n [-h] = this help screen\n\n"; - } - else - { - if ($args =~ /--forcelistid=/i) - { - @data_in = split(/--forcelistid=/,$args); - $forcelistid = $data_in[1]; - print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n"; - } - else - {$forcelistid = '';} - } -} -### end parsing run-time options ### - - -use Spreadsheet::ParseExcel; -use Time::Local; -use Net::MySQL; - -### Make sure this file is in a libs path or put the absolute path to it -require("/home/cron/AST_SERVER_conf.pl"); # local configuration file - -if (!$DB_port) {$DB_port='3306';} - -$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") - or die "Couldn't connect to database: $DB_server - $DB_database\n"; - - -$|=0; -$secX = time(); - -($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); -$year = ($year + 1900); -$mon++; -if ($hour < 10) {$hour = "0$hour";} -if ($min < 10) {$min = "0$min";} -if ($sec < 10) {$sec = "0$sec";} -if ($mon < 10) {$mon = "0$mon";} -if ($mday < 10) {$mday = "0$mday";} -$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; -$pulldate="$year-$mon-$mday $hour:$min:$sec"; -$inSD = $pulldate0; -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $dbhA->query("$stmtA"); - if ($dbhA->has_selected_record) - { - $iter=$dbhA->create_record_iterator; - while ( $record = $iter->each) - { - $DBSERVER_GMT = "$record->[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - } - } - - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - -if ($isdst) {$LOCAL_GMT_OFF++;} -if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} - - - -$total=0; $good=0; $bad=0; -print "
    Processing Excel file...\n"; -open(STMT_FILE, "> listloader_stmts.txt"); - -$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls"); -my($iR, $iC, $oWkS, $oWkC); - -foreach $oWkS (@{$oBook->{Worksheet}}) { - for($iR = 0 ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) { - - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user = ""; - $oWkC = $oWkS->{Cells}[$iR][0]; - if ($oWkC) {$vendor_lead_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][1]; - if ($oWkC) {$source_code=$oWkC->Value; } - $source_id=$source_code; - $oWkC = $oWkS->{Cells}[$iR][2]; - if ($oWkC) {$list_id=$oWkC->Value; } - $gmt_offset = '0'; - $called_since_last_reset='N'; - $oWkC = $oWkS->{Cells}[$iR][3]; - if ($oWkC) {$phone_code=$oWkC->Value; } - $phone_code=~s/[^0-9]//g; - $oWkC = $oWkS->{Cells}[$iR][4]; - if ($oWkC) {$phone_number=$oWkC->Value; } - $phone_number=~s/[^0-9]//g; - $USarea = substr($phone_number, 0, 3); - $oWkC = $oWkS->{Cells}[$iR][5]; - if ($oWkC) {$title=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][6]; - if ($oWkC) {$first_name=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][7]; - if ($oWkC) {$middle_initial=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][8]; - if ($oWkC) {$last_name=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][9]; - if ($oWkC) {$address1=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][10]; - if ($oWkC) {$address2=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][11]; - if ($oWkC) {$address3=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][12]; - if ($oWkC) {$city=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][13]; - if ($oWkC) {$state=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][14]; - if ($oWkC) {$province=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][15]; - if ($oWkC) {$postal_code=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][16]; - if ($oWkC) {$country=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][17]; - if ($oWkC) {$gender=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][18]; - if ($oWkC) {$date_of_birth=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][19]; - if ($oWkC) {$alt_phone=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][20]; - if ($oWkC) {$email=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][21]; - if ($oWkC) {$security_phrase=$oWkC->Value; } - $oWkC = $oWkS->{Cells}[$iR][22]; - if ($oWkC) {$comments=$oWkC->Value; } - $comments=~s/^\s*(.*?)\s*$/$1/; - - if (length($phone_number)>8) { - if (length($forcelistid) > 0) - { - $list_id = $forcelistid; # set list_id to override value - } - - $PC_processed=0; - ### UNITED STATES ### - if ($phone_code =~ /^1$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### MEXICO ### - if ($phone_code =~ /^52$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### AUSTRALIA ### - if ($phone_code =~ /^61$/) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - ### ALL OTHER COUNTRY CODES ### - if (!$PC_processed) - { - $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $dbhA->query($stmtA); - $rec_countW=0; - if ($dbhA->has_selected_record) - { - $iterA=$dbhA->create_record_iterator; - while ($recordA = $iterA->each) - { - $gmt_offset = $recordA->[4]; $gmt_offset =~ s/\+| //gi; - $dst = $recordA->[5]; - $dst_range = $recordA->[6]; - $PC_processed++; - } - } - } - - ### Find out if DST to raise the gmt offset ### - $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); - $AC_localtime = ($secX + (3600 * $AC_GMT_diff)); - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($AC_localtime); - $year = ($year + 1900); - $mon++; - if ($mon < 10) {$mon = "0$mon";} - if ($mday < 10) {$mday = "0$mday";} - if ($hour < 10) {$hour = "0$hour";} - if ($min < 10) {$min = "0$min";} - if ($sec < 10) {$sec = "0$sec";} - $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - - $AC_processed=0; - if ( (!$AC_processed) && ($dst_range =~ /FSA-LSO/) ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - &USA_dstcalc; - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /LSM-LSO/) ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - &GBR_dstcalc; - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /LSO-LSM/) ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - &AUS_dstcalc; - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /FSO-LSM/) ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - &AUST_dstcalc; - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } - if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - &NZL_dstcalc; - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } - if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $dbhA->query("$stmtZ"); - print STMT_FILE $stmtZ."\r\n"; - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - sleep(1); -# flush(); - } - } -} - -if ($multi_insert_counter > 0) { - $stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";"; - $dbhA->query("$stmtZ"); - print STMT_FILE $stmtZ."\r\n"; -} - -print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - -exit; - - - - - - -sub USA_dstcalc { -#********************************************************************** -# FSA-LSO -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on first Sunday in April and last Sunday in October at 2 am. -# INPUTS: -# mm INTEGER Month. -# dd INTEGER Day of the month. -# ns INTEGER Seconds into the day. -# dow INTEGER Day of week (0=Sunday, to 6=Saturday) -# OPTIONAL INPUT: -# timezone INTEGER hour difference UTC - local standard time -# (DEFAULT is blank) -# make calculations based on UTC time, -# which means shift at 10:00 UTC in April -# and 9:00 UTC in October -# OUTPUT: -# INTEGER 1 = DST, 0 = not DST -#********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; return 0; - } elsif ($mm >= 5 && $mm <= 9) { - $USA_DST=1; return 1; - } elsif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $USA_DST=0; return 0; - } else { - $USA_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 7200) { - $USA_DST=0; return 0; - } else { - $USA_DST=1; return 1; - } - } - } else { - $USA_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $USA_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; return 1; - } else { - $USA_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; return 1; - } else { - $USA_DST=0; return 0; - } - } - } else { - $USA_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - -sub GBR_dstcalc { -#********************************************************************** -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on last Sunday in March and last Sunday in October at 1 am. -#********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; return 0; - } elsif ($mm >= 4 && $mm <= 9) { - $GBR_DST=1; return 1; - } elsif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; return 0; - } elsif ($dd < ($dow+25)) { - $GBR_DST=0; return 0; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; return 0; - } else { - $GBR_DST=1; return 1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; return 0; - } else { - $GBR_DST=1; return 1; - } - } - } else { - $GBR_DST=1; return 1; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $GBR_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; return 1; - } else { - $GBR_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; return 1; - } else { - $GBR_DST=0; return 0; - } - } - } else { - $GBR_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - -sub AUS_dstcalc { -#********************************************************************** -# This is returns 1 if Daylight Savings Time is in effect and 0 if -# Standard time is in effect. -# Based on last Sunday in October and last Sunday in March at 1 am. -#********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $AUS_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $AUS_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; return 1; - } else { - $AUS_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; return 1; - } else { - $AUS_DST=0; return 0; - } - } - } else { - $AUS_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; return 0; - } elsif ($dd < ($dow+25)) { - $AUS_DST=0; return 0; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; return 0; - } else { - $AUS_DST=1; return 1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; return 0; - } else { - $AUS_DST=1; return 1; - } - } - } else { - $AUS_DST=1; return 1; - } - } # end of month checks -} # end of subroutine dstcalc - - - - - -sub AUST_dstcalc { -#********************************************************************** -# TASMANIA ONLY -# 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 last Sunday in March at 1 am. -#********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $AUST_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; return 1; - } elsif ($dd < ($dow+25)) { - $AUST_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; return 1; - } else { - $AUST_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; return 1; - } else { - $AUST_DST=0; return 0; - } - } - } else { - $AUST_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $AUST_DST=0; return 0; - } else { - $AUST_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 3600) { - $AUST_DST=0; return 0; - } else { - $AUST_DST=1; return 1; - } - } - } else { - $AUST_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc - - - - - -sub NZL_dstcalc { -#********************************************************************** -# 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 third Sunday in March at 1 am. -#********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; return 1; - } elsif ($mm >= 4 && $mm <= 9) { - $NZL_DST=0; return 0; - } elsif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; return 1; - } elsif ($dd < ($dow+14)) { - $NZL_DST=1; return 1; - } elsif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; return 1; - } else { - $NZL_DST=0; return 0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; return 1; - } else { - $NZL_DST=0; return 0; - } - } - } else { - $NZL_DST=0; return 0; - } - } elsif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; return 1; - } elsif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 && $ns < (7200+$timezone*3600)) { - $NZL_DST=0; return 0; - } else { - $NZL_DST=1; return 1; - } - } else { - if ($dow == 0 && $ns < 3600) { - $NZL_DST=0; return 0; - } else { - $NZL_DST=1; return 1; - } - } - } else { - $NZL_DST=0; return 0; - } - } # end of month checks -} # end of subroutine dstcalc diff --git a/agc_2-X/trunk/VICIDIAL_web/listloaderMAIN.php b/agc_2-X/trunk/VICIDIAL_web/listloaderMAIN.php deleted file mode 100644 index 67ee25bc..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/listloaderMAIN.php +++ /dev/null @@ -1,79 +0,0 @@ - LICENSE: GPLv2 -# -# this is the main frame page for the lead loading section. This is where you -# would upload a file and have it inserted into vicidial_list -# -# changes: -# 60620-1149 - Added variable filtering to eliminate SQL injection attack threat -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGload_leads =$row[0]; - - if ($LOGload_leads < 1) - { - echo "You do not have permissions to load leads\n"; - exit; - } - fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - -VICIDIAL: Lead Loader Module - - - - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/listloader_rowdisplay.pl b/agc_2-X/trunk/VICIDIAL_web/listloader_rowdisplay.pl deleted file mode 100644 index fc2b4fc7..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/listloader_rowdisplay.pl +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/perl - -### listloader_rowdisplay.pl -### -### Copyright (C) 2006 Matt Florell,Joe Johnson LICENSE: GPLv2 -### - -use Spreadsheet::ParseExcel; -use Time::Local; -use Net::MySQL; - -### Make sure this file is in a libs path or put the absolute path to it -require("/home/cron/AST_SERVER_conf.pl"); # local configuration file - -if (!$DB_port) {$DB_port='3306';} - -$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port") - or die "Couldn't connect to database: $DB_server - $DB_database\n"; - - -$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls"); -my($iR, $iC, $oWkS, $oWkC); -$var_str=""; - -foreach $oWkS (@{$oBook->{Worksheet}}) { - for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) { - $oWkC = $oWkS->{Cells}[0][$iC]; - if ($oWkC) { - $var_str.=$oWkC->Value."|"; - } else { - $var_str.="|"; - } - } -} - -@xls_row=split(/\|/, $var_str); - - -$dbhA->query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1"); - -if ($dbhA->has_selected_record) { - $rslt = $dbhA->create_record_iterator(); - my @row = $rslt->get_field_names(); - for ($i=0; $i\r\n"; - print "
    ".$field_name.": \r\n"; - print " \r\n"; - print "
    - - - - - - - - - - - - - - - - - -
    Load leads from this file:
    List ID Override: (numbers only or leave blank for values in the file)
    File layout to use:Standard VICIDIAL    Custom layout
            
    CLICK HERE TO GO TO THE BASIC LEAD LOADER         BACK TO ADMIN
    SUPER LIST LOADER-     VERSION:     BUILD:
    - - -document.forms[0].leadfile.disabled=true;document.forms[0].list_id_override.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; - flush(); - $total=0; $good=0; $bad=0; - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Processing $delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - # copy($leadfile, "./vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - print "
    Processing Excel file... \n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    \n"; - } - # print "$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field"; - passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override"); - } else { - # copy($leadfile, "./vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[$vendor_lead_code_field]; - $source_code = $row[$source_id_field]; - $source_id=$source_code; - $list_id = $row[$list_id_field]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); - $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); - $USarea = substr($phone_number, 0, 3); - $title = $row[$title_field]; - $first_name = $row[$first_name_field]; - $middle_initial = $row[$middle_initial_field]; - $last_name = $row[$last_name_field]; - $address1 = $row[$address1_field]; - $address2 = $row[$address2_field]; - $address3 = $row[$address3_field]; - $city =$row[$city_field]; - $state = $row[$state_field]; - $province = $row[$province_field]; - $postal_code = $row[$postal_code_field]; - $country_code = $row[$country_code_field]; - $gender = $row[$gender_field]; - $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; - $email = $row[$email_field]; - $security_phrase = $row[$security_phrase_field]; - $comments = trim($row[$comments_field]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - } - print ""; - } - -if ($leadfile && filesize($LF_path)<=8388608) { - $total=0; $good=0; $bad=0; - if ($file_layout=="standard") { - - print ""; - flush(); - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - if ($WeBRooTWritablE > 0) - {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - - if (count($field_check)>=5) { - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $total=0; $good=0; $bad=0; - print "
    Processing $delim_name-delimited file... ($tab_count|$pipe_count)\n"; - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - while (!feof($file)) { - $record++; - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - - if (strlen($buffer)>0) { - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } else { - print "
    ERROR: The file does not have the required number of fields to process it.
    "; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r"); - - passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - while($row=fgetcsv($file, 1000, ",")) { - $pulldate=date("Y-m-d H:i:s"); - $entry_date = "$pulldate"; - $modify_date = ""; - $status = "NEW"; - $user =""; - $vendor_lead_code = $row[0]; - $source_code = $row[1]; - $source_id=$source_code; - $list_id = $row[2]; - $gmt_offset = '0'; - $called_since_last_reset='N'; - $phone_code = eregi_replace("[^0-9]", "", $row[3]); - $phone_number = eregi_replace("[^0-9]", "", $row[4]); - $USarea = substr($phone_number, 0, 3); - $title = $row[5]; - $first_name = $row[6]; - $middle_initial = $row[7]; - $last_name = $row[8]; - $address1 = $row[9]; - $address2 = $row[10]; - $address3 = $row[11]; - $city =$row[12]; - $state = $row[13]; - $province = $row[14]; - $postal_code = $row[15]; - $country_code = $row[16]; - $gender = $row[17]; - $date_of_birth = $row[18]; - $alt_phone = $row[19]; - $email = $row[20]; - $security_phrase = $row[21]; - $comments = trim($row[22]); - - if (strlen($phone_number)>8) { - - if (strlen($list_id_override)>0) - { - # print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - $list_id = $list_id_override; - } - - $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear); - - - if ($multi_insert_counter > 8) { - ### insert good deal into pending_transactions table ### - $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; - $rslt=mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - $multistmt=''; - $multi_insert_counter=0; - - } else { - $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; - $multi_insert_counter++; - } - - $good++; - } else { - if ($bad < 10) {print "
    record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} - $bad++; - } - $total++; - if ($total%100==0) { - print ""; - usleep(1000); - flush(); - } - } - if ($multi_insert_counter!=0) { - $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; - mysql_query($stmtZ, $link); - if ($WeBRooTWritablE > 0) - {fwrite($stmt_file, $stmtZ."\r\n");} - } - - print "

    Done
    GOOD: $good       BAD: $bad       TOTAL: $total
    "; - - } - print ""; - - } else { - print "
    "; - flush(); - print "\r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - - $rslt=mysql_query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1", $link); - - - if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - $buffer=fgets($file, 4096); - $tab_count=substr_count($buffer, "\t"); - $pipe_count=substr_count($buffer, "|"); - - if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} - $field_check=explode($delimiter, $buffer); - flush(); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r"); - print "
    Processing $delim_name-delimited file...\n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - $buffer=rtrim(fgets($file, 4096)); - $buffer=stripslashes($buffer); - $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); - - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } else if (!eregi(".csv", $leadfile_name)) { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); - passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl"); - } else { - copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); - $file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r"); - $stmt_file=fopen("listloader_stmts.txt", "w"); - - print "
    Processing CSV file... \n"; - - if (strlen($list_id_override)>0) - { - print "

    LIST ID OVERRIDE FOR THIS FILE: $list_id_override

    "; - } - - $total=0; $good=0; $bad=0; - $row=fgetcsv($file, 1000, ","); - for ($i=0; $i\r\n"; - print "
    \r\n"; - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - } - } - print " \r\n"; - print " \r\n"; - print " \r\n"; - print " \r\n"; - print "
    VICIDIAL ColumnFile data
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
    ".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
    $row[$i]
            
    \r\n"; - # } - print ""; - } -} else if (filesize($leadfile)>8388608) { - print "
    ERROR: File exceeds the 8MB limit.
    "; -} -?> - - - - - - - - - 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### MEXICO ### -if ($phone_code =='52') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### AUSTRALIA ### -if ($phone_code =='61') - { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } -### ALL OTHER COUNTRY CODES ### -if (!$PC_processed) - { - $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; - $rslt=mysql_query($stmt, $link); - $pc_recs = mysql_num_rows($rslt); - if ($pc_recs > 0) - { - $row=mysql_fetch_row($rslt); - $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); - $dst = $row[5]; - $dst_range = $row[6]; - $PC_processed++; - } - } - -### Find out if DST to raise the gmt offset ### -$AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); -$AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); - $hour = date("H",$AC_localtime); - $min = date("i",$AC_localtime); - $sec = date("s",$AC_localtime); - $mon = date("m",$AC_localtime); - $mday = date("d",$AC_localtime); - $wday = date("w",$AC_localtime); - $year = date("Y",$AC_localtime); -$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); - -$AC_processed=0; -if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) - { - if ($DBX) {print " First Sunday April to Last Sunday October\n";} - #********************************************************************** - # FSA-LSO - # This is returns 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in April and last Sunday in October at 2 am. - # INPUTS: - # mm INTEGER Month. - # dd INTEGER Day of the month. - # ns INTEGER Seconds into the day. - # dow INTEGER Day of week (0=Sunday, to 6=Saturday) - # OPTIONAL INPUT: - # timezone INTEGER hour difference UTC - local standard time - # (DEFAULT is blank) - # make calculations based on UTC time, - # which means shift at 10:00 UTC in April - # and 9:00 UTC in October - # OUTPUT: - # INTEGER 1 = DST, 0 = not DST - #********************************************************************** - - $USA_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 4 || $mm > 10) { - $USA_DST=0; - } elseif ($mm >= 5 and $mm <= 9) { - $USA_DST=1; - } elseif ($mm == 4) { - if ($dd > 7) { - $USA_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } else { - if ($dow == 0 and $ns < 7200) { - $USA_DST=0; - } else { - $USA_DST=1; - } - } - } else { - $USA_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $USA_DST=1; - } elseif ($dd < ($dow+25)) { - $USA_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (7200+($timezone-1)*3600)) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } else { # local time calculations - if ($ns < 7200) { - $USA_DST=1; - } else { - $USA_DST=0; - } - } - } else { - $USA_DST=0; - } - } # end of month checks - - if ($DBX) {print " DST: $USA_DST\n";} - if ($USA_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) - { - if ($DBX) {print " Last Sunday March to Last Sunday October\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in March and last Sunday in October at 1 am. - #********************************************************************** - - $GBR_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $GBR_DST=0; - } elseif ($mm >= 4 and $mm <= 9) { - $GBR_DST=1; - } elseif ($mm == 3) { - if ($dd < 25) { - $GBR_DST=0; - } elseif ($dd < ($dow+25)) { - $GBR_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=0; - } else { - $GBR_DST=1; - } - } - } else { - $GBR_DST=1; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $GBR_DST=1; - } elseif ($dd < ($dow+25)) { - $GBR_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $GBR_DST=1; - } else { - $GBR_DST=0; - } - } - } else { - $GBR_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $GBR_DST\n";} - if ($GBR_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) - { - if ($DBX) {print " Last Sunday October to Last Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on last Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUS_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUS_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUS_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUS_DST=1; - } elseif ($dd < ($dow+25)) { - $AUS_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=1; - } else { - $AUS_DST=0; - } - } - } else { - $AUS_DST=0; - } - } elseif ($mm == 10) { - if ($dd < 25) { - $AUS_DST=0; - } elseif ($dd < ($dow+25)) { - $AUS_DST=0; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } else { # local time calculations - if ($ns < 3600) { - $AUS_DST=0; - } else { - $AUS_DST=1; - } - } - } else { - $AUS_DST=1; - } - } # end of month checks - if ($DBX) {print " DST: $AUS_DST\n";} - if ($AUS_DST) {$gmt_offset++;} - $AC_processed++; - } - -if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) - { - if ($DBX) {print " First Sunday October to Last Sunday March\n";} - #********************************************************************** - # TASMANIA ONLY - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and last Sunday in March at 1 am. - #********************************************************************** - - $AUST_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $AUST_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $AUST_DST=0; - } elseif ($mm == 3) { - if ($dd < 25) { - $AUST_DST=1; - } elseif ($dd < ($dow+25)) { - $AUST_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $AUST_DST=1; - } else { - $AUST_DST=0; - } - } - } else { - $AUST_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $AUST_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $AUST_DST=0; - } else { - $AUST_DST=1; - } - } - } else { - $AUST_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $AUST_DST\n";} - if ($AUST_DST) {$gmt_offset++;} - $AC_processed++; - } -if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) - { - if ($DBX) {print " First Sunday October to Third Sunday March\n";} - #********************************************************************** - # This is s 1 if Daylight Savings Time is in effect and 0 if - # Standard time is in effect. - # Based on first Sunday in October and third Sunday in March at 1 am. - #********************************************************************** - - $NZL_DST=0; - $mm = $mon; - $dd = $mday; - $ns = $dsec; - $dow= $wday; - - if ($mm < 3 || $mm > 10) { - $NZL_DST=1; - } elseif ($mm >= 4 and $mm <= 9) { - $NZL_DST=0; - } elseif ($mm == 3) { - if ($dd < 14) { - $NZL_DST=1; - } elseif ($dd < ($dow+14)) { - $NZL_DST=1; - } elseif ($dow == 0) { - if ($timezone) { # UTC calculations - if ($ns < (3600+($timezone-1)*3600)) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } else { # local time calculations - if ($ns < 3600) { - $NZL_DST=1; - } else { - $NZL_DST=0; - } - } - } else { - $NZL_DST=0; - } - } elseif ($mm == 10) { - if ($dd > 7) { - $NZL_DST=1; - } elseif ($dd >= ($dow+1)) { - if ($timezone) { - if ($dow == 0 and $ns < (7200+$timezone*3600)) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } else { - if ($dow == 0 and $ns < 3600) { - $NZL_DST=0; - } else { - $NZL_DST=1; - } - } - } else { - $NZL_DST=0; - } - } # end of month checks - if ($DBX) {print " DST: $NZL_DST\n";} - if ($NZL_DST) {$gmt_offset++;} - $AC_processed++; - } -if (!$AC_processed) - { - if ($DBX) {print " No DST Method Found\n";} - if ($DBX) {print " DST: 0\n";} - $AC_processed++; - } - -return $gmt_offset; -} \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/record_conf_1_hour.php b/agc_2-X/trunk/VICIDIAL_web/record_conf_1_hour.php deleted file mode 100644 index 59ae1f09..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/record_conf_1_hour.php +++ /dev/null @@ -1,156 +0,0 @@ - LICENSE: GPLv2 -### -# grab: $server_ip $station $session_id -# -# CHANGES -# -# 60620-1011 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["station"])) {$station=$_GET["station"];} - elseif (isset($_POST["station"])) {$station=$_POST["station"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["NEW_RECORDING"])) {$NEW_RECORDING=$_GET["NEW_RECORDING"];} - elseif (isset($_POST["NEW_RECORDING"])) {$NEW_RECORDING=$_POST["NEW_RECORDING"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$MYSQL_datetime = date("Y-m-d H:i:s"); -$FILE_datetime = date("Ymd-His_"); -$secX = $STARTtime; - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL RECORD CONFERENCE: 1 hour -\n"; -?> - - -
    - - 8) && (strlen($session_id) > 3) && (strlen($station) > 3) ) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $conf_silent_prefix = '7'; - $ext_context = 'demo'; - - $stmt="INSERT INTO vicidial_manager values('','','$MYSQL_datetime','NEW','N','" . mysql_real_escape_string($server_ip) . "','','Originate','RB$FILE_datetime" . mysql_real_escape_string($station) . "','Channel: $local_DEF$conf_silent_prefix" . mysql_real_escape_string($session_id) . "$local_AMP$ext_context','Context: $ext_context','Exten: 8309','Priority: 1','Callerid: $FILE_datetime" . mysql_real_escape_string($station) . "','','','','','')"; - echo "|$stmt|\n

    \n"; - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('" . mysql_real_escape_string($session_id) . "','" . mysql_real_escape_string($server_ip) . "','" . mysql_real_escape_string($station) . "','$MYSQL_datetime','$secX','$FILE_datetime" . mysql_real_escape_string($station) . "')"; - echo "|$stmt|\n

    \n"; - $rslt=mysql_query($stmt, $link); - - echo "Recording started\n

    \n"; - echo "Back to main recording screen\n

    \n"; - } - else - { - echo "ERROR!!!! Not all info entered properly\n

    \n"; - echo "|$server_ip| |$session_id| |$station|\n

    \n"; - echo "Back to main recording screen\n

    \n"; - } -} -else -{ -echo "
    Start recording a conference for 1 hour:
    \n"; -echo "\n"; -echo "server_ip: | \n"; -echo "session_id: | \n"; -echo "station: | \n"; -echo "\n"; -echo "


    \n"; - - - -} -?> - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/remote_dispo.php b/agc_2-X/trunk/VICIDIAL_web/remote_dispo.php deleted file mode 100644 index da249fba..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/remote_dispo.php +++ /dev/null @@ -1,327 +0,0 @@ - LICENSE: GPLv2 -### -# this is the remote agent disposition screen for calls sent to remote agents. This allows the remote agent to modify customer information and disposition the call - -# CHANGES -# -# 60619-1626 - Added variable filtering to eliminate SQL injection attack threat -# - - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} - elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} - elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} - elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - -$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 > 2;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $fullname = $row[0]; - fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - } - else - { - fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -VICIDIAL REMOTE: Call Disposition -\n"; -?> - - -
    - -"; - -if ($end_call > 0) -{ - -$call_length = ($STARTtime - $call_began); - - ### insert a NEW record to the vicidial_closer_log table - $stmt="UPDATE vicidial_closer_log set end_epoch='$STARTtime', length_in_sec='" . mysql_real_escape_string($call_length) . "', status='" . mysql_real_escape_string($status) . "', user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by start_epoch desc limit 1;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ### update the lead record in the vicidial_list table - $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "',user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Call has been dispositioned       $NOW_TIME\n

    \n"; - - echo "\n"; - -} -else -{ - $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_count = $row[0]; - - if ($lead_count > 0) - { - - $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $lead_id = "$row[0]"; - $tsr = "$row[4]"; - $vendor_id = "$row[5]"; - $list_id = "$row[7]"; - $campaign_id = "$row[8]"; - $phone_code = "$row[10]"; - $phone_number = "$row[11]"; - $title = "$row[12]"; - $first_name = "$row[13]"; # - $middle_initial = "$row[14]"; - $last_name = "$row[15]"; # - $address1 = "$row[16]"; # - $address2 = "$row[17]"; # - $address3 = "$row[18]"; # - $city = "$row[19]"; # - $state = "$row[20]"; # - $province = "$row[21]"; # - $postal_code = "$row[22]"; # - $country_code = "$row[23]"; # - $gender = "$row[24]"; - $date_of_birth = "$row[25]"; - $alt_phone = "$row[26]"; # - $email = "$row[27]"; # - $security = "$row[28]"; # - $comments = "$row[29]"; # - - echo "
    Call information: $first_name $last_name - $phone_number

    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "
    Vendor ID: $vendor_id     Campaign ID: $campaign_id
    Fronter: $tsr     List ID: $list_id
    First Name:   \n"; - echo " Last Name:
    Address 1 :
    Address 2 :
    Address 3 :
    City :
    State:   \n"; - echo " Postal Code:
    Province :
    Country :
    Alt Phone :
    Email :
    Security :
    Comments :
    Disposition:
    \n"; - echo "


    \n"; - - } - else - { - echo "lead lookup FAILED for lead_id $lead_id       $NOW_TIME\n

    \n"; -# echo "Close this window\n

    \n"; - } - - - - - - -} - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/server_stats.php b/agc_2-X/trunk/VICIDIAL_web/server_stats.php deleted file mode 100644 index a427f5c0..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/server_stats.php +++ /dev/null @@ -1,96 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1037 - Added Link back to Admin section -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - -$stmt="select * from servers;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$servers_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $servers_to_print) - { - $row=mysql_fetch_row($rslt); - $server_id[$i] = $row[0]; - $server_description[$i] = $row[1]; - $server_ip[$i] = $row[2]; - $active[$i] = $row[3]; - $i++; - } -?> - - - - - -VICIDIAL: Server Stats and Reports -VICIDIAL: Server Stats and Reports                           -BACK TO ADMIN

    - - -
    
    -
    - $o)
    -	{
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	echo "\n";
    -	$o++;
    -	}
    -
    -?>
    -
    SERVERDESCRIPTIONIP ADDRESSACTIVEVDAD timeVDcall timePARK timeCLOSER/INBOUND time
    $server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINKLINK
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/test.txt b/agc_2-X/trunk/VICIDIAL_web/test.txt deleted file mode 100644 index 70c379b6..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/test.txt +++ /dev/null @@ -1 +0,0 @@ -Hello world \ No newline at end of file diff --git a/agc_2-X/trunk/VICIDIAL_web/user_stats.php b/agc_2-X/trunk/VICIDIAL_web/user_stats.php deleted file mode 100644 index bdada227..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/user_stats.php +++ /dev/null @@ -1,316 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1743 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - } - - - - -?> - - -VICIDIAL ADMIN: User Stats -\n"; -?> - - -
    - - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Stats for  
      \n"; - -echo "
    \n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_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' group by status order by status"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - -echo "
    \n"; - -echo "TALK TIME AND STATUS:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from vicidial_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'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - -echo "\n"; -echo "
    STATUSCOUNTHOURS:MINUTES
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    TOTAL CALLS $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "LOGIN/LOGOUT TIME:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT event,event_epoch,event_date,campaign_id from vicidial_user_log where user='" . mysql_real_escape_string($user) . "' and event_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("LOGIN", $row[0])) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if (ereg("LOGIN", $row[0])) - { - $event_start_seconds = $row[1]; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - if (ereg("LOGOUT", $row[0])) - { - if ($event_start_seconds) - { - $event_stop_seconds = $row[1]; - $event_seconds = ($event_stop_seconds - $event_start_seconds); - $total_login_time = ($total_login_time + $event_seconds); - $event_hours = ($event_seconds / 3600); - $event_hours = round($event_hours, 2); - $event_hours_int = intval("$event_hours"); - $event_minutes = ($event_hours - $event_hours_int); - $event_minutes = ($event_minutes * 60); - $event_minutes_int = round($event_minutes, 0); - if ($event_minutes_int < 10) {$event_minutes_int = "0$event_minutes_int";} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - $event_start_seconds=''; - $event_stop_seconds=''; - } - else - { - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - } - } - - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - -$total_login_hours = ($total_login_time / 3600); -$total_login_hours = round($total_login_hours, 2); -$total_login_hours_int = intval("$total_login_hours"); -$total_login_minutes = ($total_login_hours - $total_login_hours_int); -$total_login_minutes = ($total_login_minutes * 60); -$total_login_minutes_int = round($total_login_minutes, 0); -if ($total_login_minutes_int < 10) {$total_login_minutes_int = "0$total_login_minutes_int";} - -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; - -echo "
    EVENT DATE CAMPAIGNHOURS:MINUTES
    $row[0] $row[2] $row[3]
    $row[0] $row[2] $row[3] $event_hours_int:$event_minutes_int
    $row[0] $row[2] $row[3]
    TOTAL $total_login_hours_int:$total_login_minutes_int
    \n"; - - -echo "

    \n"; - -echo "
    \n"; - -echo "LAST 50 CALLS:\n"; -echo "\n"; -echo "\n"; - - $stmt="select * from vicidial_log where user='" . mysql_real_escape_string($user) . "' order by uniqueid desc limit 50;"; - $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"';} - - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - $u++; - } - - -echo "
    DATE/TIME LENGTH STATUS PHONE CAMPAIGN LIST LEAD
    $row[4] $row[7] $row[8] $row[10] $row[3] $row[2] $row[1]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/user_status.php b/agc_2-X/trunk/VICIDIAL_web/user_status.php deleted file mode 100644 index 8efe670f..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/user_status.php +++ /dev/null @@ -1,238 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60619-1738 - Added variable filtering to eliminate SQL injection attack threat -# - -header ("Content-type: text/html; charset=utf-8"); - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $stmt="SELECT full_name,change_agent_campaign from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $change_agent_campaign=$row[1]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $full_name = $row[0]; - - $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $agents_to_print = mysql_num_rows($rslt); - $i=0; - while ($i < $agents_to_print) - { - $row=mysql_fetch_row($rslt); - $Aserver_ip = $row[2]; - $Asession_id = $row[3]; - $Aextension = $row[4]; - $Astatus = $row[5]; - $Acampaign = $row[7]; - $Alast_call = $row[14]; - $Acl_campaigns = $row[15]; - $i++; - } - - } - -$stmt="select * from vicidial_campaigns;"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$groups_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $groups_to_print) - { - $row=mysql_fetch_row($rslt); - $groups[$i] =$row[0]; - $i++; - } - - - -?> - - -VICIDIAL ADMIN: User Status -\n"; -?> - - -
    -
    - - - - -\n"; -echo "
      VICIDIAL ADMIN: User Status for  
      \n"; - -if ($stage == "live_campaign_change") -{ - $stmt="UPDATE vicidial_live_agents set campaign_id='" . mysql_real_escape_string($group) . "' where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name changed to $group campaign
    \n"; - - exit; -} - -if ($stage == "log_agent_out") -{ - $stmt="DELETE from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; - $rslt=mysql_query($stmt, $link); - - echo "Agent $user - $full_name has been emergency logged out, make sure they close their web browser
    \n"; - - exit; -} - -if ($agents_to_print > 0) -{ - echo "
    ";
    -	echo "Agent Logged in at server:  $Aserver_ip\n";
    -	echo "               in session:  $Asession_id\n";
    -	echo "               from phone:  $Aextension\n";
    -	echo "Agent is in campaign:       $Acampaign\n";
    -	echo "              status:       $Astatus\n";
    -	echo " hungup last call at:       $Alast_call\n";
    -	echo "       Closer groups:       $Acl_campaigns\n\n";
    -
    -	echo "
    "; - - - if ($change_agent_campaign > 0) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "Current Campaign: \n"; - echo "
    \n"; - - - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - } -} - -else -{ - echo "Agent is not logged in\n
    "; - -} - - -echo "           $user - $full_name - \n"; - -echo "VICIDIAL Time Sheet\n"; - -echo "
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - -echo "|$stage|$group|"; - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/VICIDIAL_web/vdremote.php b/agc_2-X/trunk/VICIDIAL_web/vdremote.php deleted file mode 100644 index dfe11fa3..00000000 --- a/agc_2-X/trunk/VICIDIAL_web/vdremote.php +++ /dev/null @@ -1,602 +0,0 @@ - LICENSE: GPLv2 -# -# Changes -# 50307-1721 - First version -# 51123-1502 - removed requirement of PHP Globals=on -# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1603 - Added variable filtering to eliminate SQL injection attack threat -# -# make sure you have added a user to the vicidial_users MySQL table with at least user_level 4 to access this page the first time - -$version = '1.1.12'; -$build = '60619-1603'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} - elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} - elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -if (!isset($force_logout)) {$force_logout = 0;} - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -$popup_page = './closer_popup.php'; -$STARTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - 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"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - header ("Content-type: text/html; charset=utf-8"); - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - - $stmt="SELECT count(*) from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $authx=$row[0]; - - if($authx>0) - { - $stmt="SELECT remote_agent_id,server_ip,number_of_lines from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id=$row[0]; - $server_ip=$row[1]; - if (!$number_of_lines) {$number_of_lines=$row[2];} - - fwrite ($fp, "VDremote|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - echo "This remote agent does not exist: |$PHP_AUTH_USER|\n"; - exit; - } - } - else - { - fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -echo "\n"; -echo "\n"; -echo "\n"; -if ($ADD==61111) - { - echo"\n"; - } -echo "\n"; -?> - -VICIDIAL REMOTE AGENTS: $LOGfullname - $PHP_AUTH_USER "; - -if (!$ADD) {$ADD="31111";} -if ($ADD==31111) {echo "Modify Remote Agents";} -if ($ADD==41111) {echo "Modify Remote Agents";} -if ($ADD==61111) {echo "Remote Agent Status";} -if ($ADD==71111) {echo "Remote Agent Closer Stats";} - - -if (strlen($ADD)>4) - { - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rslt=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rslt); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $servers_list .= "\n"; - $o++; - } - - ##### get campaigns listing for dynamic pulldown - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } - - ##### get inbound groups listing for checkboxes - if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $groups_to_print = mysql_num_rows($rslt); - $groups_list=''; - $groups_value=''; - - $o=0; - while ($groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_id_value = $rowx[0]; - $group_name_value = $rowx[1]; - $groups_list .= "2) {$groups_value .= " -";} - } - -?> - - - -
    -
    - - - -
      VICIDIAL REMOTE AGENTS:   Logout  
      MODIFY | ">STATUS | ">INBOUND STATS
    -"; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]
    \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: $user_start
    Number of Lines: (numbers only)
    Server IP: $row[3]
    External Extension: (number dialed to reach agents [i.e. 913125551212])
    Status:
    Campaign: $campaign_id
    Inbound Groups: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - - - -###################### -# ADD=41111 modify remote agents info in the system -###################### - -if ($ADD==41111) -{ - echo ""; - - if ( (strlen($number_of_lines) < 1) or (strlen($conf_exten) < 2) ) - {echo "
    REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - $stmt="UPDATE vicidial_remote_agents set number_of_lines='" . mysql_real_escape_string($number_of_lines) . "', conf_exten='" . mysql_real_escape_string($conf_exten) . "', status='" . mysql_real_escape_string($status) . "', closer_campaigns='" . mysql_real_escape_string($groups_value) . "' where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - -# echo "$stmt\n"; - echo "
    REMOTE AGENTS MODIFIED\n"; - - ### LOG CHANGES TO LOG FILE ### - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - - } - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - -echo "
    MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    User ID Start: $user_start
    Number of Lines: (numbers only)
    Server IP: $row[3]
    External Extension: (number dialed to reach agents [i.e. 913125551212])
    Status:
    Campaign: $campaign_id
    Inbound Groups: \n"; -echo "$groups_list"; -echo "
    \n"; -echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - -} - - - - -###################### -# ADD=61111 status of remote agent in the system and active calls and queue -###################### - -if ($ADD==61111) -{ - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    REMOTE AGENTS ERROR - Please go back and look at the data you entered\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'" . mysql_real_escape_string($nextuser) . "',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - echo "VICIDIAL: Remote Agent Time On Calls $NOW_TIME\n\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo "| STATION | USER | LEADID | CHANNEL | STATUS | START TIME | MINUTES |\n"; - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select extension,user,lead_id,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' and user IN($users_list) order by extension;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $leadlink=0; - $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) - { - $row[3]=''; - $row[5]=' - WAITING - '; - $row[6]=$row[7]; - } - $extension = sprintf("%-10s", $row[0]); - $user = sprintf("%-6s", $row[1]); - $leadid = sprintf("%-12s", $row[2]); - if ($row[2] > 0) - { - $leadidLINK=$row[2]; - $leadlink++; - if ( eregi("QUEUE",$row[4]) ) {$row[6]=$STARTtime;} - $leadid = "$leadid"; - } - $channel = sprintf("%-10s", $row[3]); - $cc=0; - while ( (strlen($channel) > 10) and ($cc < 100) ) - { - $channel = eregi_replace(".$","",$channel); - $cc++; - if (strlen($channel) <= 10) {$cc=101;} - } - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = ($STARTtime - $row[6]); - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - if ($call_time_M_int >= 5) {$G=''; $EG='';} - if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$extension$EG | $G$user$EG | $G$leadid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; - echo " $i agents logged in on server $server_ip\n\n"; - - echo " - 5 minutes or more on call\n"; - echo " - Over 10 minutes on call\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "********************************* NO AGENTS ON CALLS *********************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - -###################### -# ADD=71111 stats for remote agents from closer logs(vicidial_closer_log) -###################### - -if ($ADD==71111) -{ - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n\n"; - echo "
    ";
    -
    -	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
    -		{echo "
    REMOTE AGENTS ERROR - Please go back and look at the data you entered\n";} - else - { - - $users_list = ''; - $k=0; - while($k < $number_of_lines) - { - $nextuser=($user + $k); - $users_list .= "'$nextuser',"; - $k++; - } - $users_list = preg_replace("/.$/","",$users_list); - - $stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list);"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $in_calls = $row[0]; - $in_time = $row[1]; - $in_time_M = ($in_time / 60); - $in_time_M = round($in_time_M, 2); - $in_time_M_int = intval("$in_time_M"); - $in_time_SEC = ($in_time_M - $in_time_M_int); - $in_time_SEC = ($in_time_SEC * 60); - $in_time_SEC = round($in_time_SEC, 0); - if ($in_time_SEC < 10) {$in_time_SEC = "0$in_time_SEC";} - $in_time_MS = "$in_time_M_int:$in_time_SEC"; - $in_time_MS = sprintf("%7s", $in_time_MS); - - echo "VICIDIAL: Remote Agent inbound stats $NOW_TIME\n\n"; - echo "\n"; - echo "Total calls taken $query_date: $in_calls\n"; - echo "Total talk time on $query_date: $in_time_MS (minutes:seconds)\n"; - echo "\n"; - echo "\n"; - echo "Call list for $query_date:\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - echo "| USER | LEADID | GROUP | PHONE NUM | STATUS | CALL TIME | MINUTES |\n"; - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - - - $stmt="select user,lead_id,campaign_id,phone_number,status,call_date,length_in_sec from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list) order by call_date;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $talking_to_print = mysql_num_rows($rslt); - if ($talking_to_print > 0) - { - $i=0; - while ($i < $talking_to_print) - { - $row=mysql_fetch_row($rslt); - $user = sprintf("%-8s", $row[0]); - $leadid = sprintf("%-10s", $row[1]); - $group = sprintf("%-14s", $row[2]); - $phone = sprintf("%-10s", $row[3]); - $status = sprintf("%-6s", $row[4]); - $start_time = sprintf("%-19s", $row[5]); - $call_time_S = $row[6]; - - $call_time_M = ($call_time_S / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $call_time_MS = sprintf("%7s", $call_time_MS); - $G = ''; $EG = ''; - # if ($call_time_M_int >= 5) {$G=''; $EG='';} - # if ($call_time_M_int >= 10) {$G=''; $EG='';} - - echo "| $G$user$EG | $G$leadid$EG | $G$group$EG | $G$phone$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; - - $i++; - } - - echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; - # echo " $i agents logged in on server $server_ip\n\n"; - - # echo " - 5 minutes or more on call\n"; - # echo " - Over 10 minutes on call\n"; - - } - else - { - echo "**************************************************************************************\n"; - echo "********************************* NO CALLS ON THIS DAY *******************************\n"; - echo "**************************************************************************************\n"; - } - } - -echo "
    \n\n"; - -} - - - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/agc/active_list_refresh.php b/agc_2-X/trunk/agc/active_list_refresh.php deleted file mode 100644 index 7ea0bff0..00000000 --- a/agc_2-X/trunk/agc/active_list_refresh.php +++ /dev/null @@ -1,482 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to serve updates of the live data to the display scripts -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ADD - ('1','2','3','4','5') -### - $order - ('asc','desc') -### - $format - ('text','table','menu','selectlist','textarea') -### - $bgcolor - ('#123456','white','black','etc...') -### - $txtcolor - ('#654321','black','white','etc...') -### - $txtsize - ('1','2','3','etc...') -### - $selectsize - ('2','3','4','etc...') -### - $selectfontsize - ('8','10','12','etc...') -### - $selectedext - ('cc100') -### - $selectedtrunk - ('Zap/25-1') -### - $selectedlocal - ('SIP/cc100') -### - $textareaheight - ('8','10','12','etc...') -### - $textareawidth - ('8','10','12','etc...') -### - $field_name - ('extension','busyext','extension_xfer','etc...') -### - -# changes -# 50323-1147 - First build of script -# 50401-1132 - small formatting changes -# 50502-1402 - added field_name as modifiable variable -# 50503-1213 - added session_name checking for extra security -# 50503-1311 - added conferences list -# 50610-1155 - Added NULL check on MySQL results to reduced errors -# 50711-1209 - removed HTTP authentication in favor of user/pass vars -# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1118 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["order"])) {$order=$_GET["order"];} - elseif (isset($_POST["order"])) {$order=$_POST["order"];} -if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} - elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} -if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} - elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} -if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} - elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} -if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} - elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} -if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} - elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} -if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} - elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} -if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} - elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} -if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} - elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} -if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} - elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} -if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} - elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} -if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} - elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} - -### security strip all non-alphanumeric characters out of the variables ### - $user=ereg_replace("[^0-9a-zA-Z]","",$user); - $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); - $ADD=ereg_replace("[^0-9]","",$ADD); - $order=ereg_replace("[^0-9a-zA-Z]","",$order); - $format=ereg_replace("[^0-9a-zA-Z]","",$format); - $bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor); - $txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor); - $txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize); - $selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize); - $selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize); - $selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext); - $selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk); - $selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal); - $textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight); - $textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth); - $field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name); - -# default optional vars if not set -if (!isset($ADD)) {$ADD="1";} -if (!isset($order)) {$order='desc';} -if (!isset($format)) {$format="text";} -if (!isset($bgcolor)) {$bgcolor='white';} -if (!isset($txtcolor)) {$txtcolor='black';} -if (!isset($txtsize)) {$txtsize='2';} -if (!isset($selectsize)) {$selectsize='4';} -if (!isset($selectfontsize)) {$selectfontsize='10';} -if (!isset($textareaheight)) {$textareaheight='10';} -if (!isset($textareawidth)) {$textareawidth='20';} - -$version = '0.0.8'; -$build = '60619-1118'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "List Display: "; -if ($ADD==1) {echo "Live Extensions";} -if ($ADD==2) {echo "Busy Extensions";} -if ($ADD==3) {echo "Outside Lines";} -if ($ADD==4) {echo "Local Extensions";} -if ($ADD==5) {echo "Conferences";} -if ($ADD==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
    \n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/agc/astguiclient.php b/agc_2-X/trunk/agc/astguiclient.php deleted file mode 100644 index 614ce146..00000000 --- a/agc_2-X/trunk/agc/astguiclient.php +++ /dev/null @@ -1,2899 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass -# -# Other scripts that this application depends on: -# - active_list_refresh.php: displays active/live channels and phones -# - manager_send.php: sends Actions to be executed on Asterisk servers -# - live_exten_check.php: checks to see if user's phone is on a live call -# - call_log_display.php: retrieves log of inbound and outbound calls -# - voicemail_check.php: retrieves counts of new and old messages -# - inbound_popup.php: opens upon live_inbound call coming in -# - conf_exten_check.php: checks to see if and calls are in a specific conf -# - park_calls_display.php: retrieves list of parked calls -# - vdc_db_query.php: Changes values in the DB for non-calling records -# -# CHANGES -# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web -# 50323-1411 - First build version display-only -# 50331-1040 - Second-build, added phone login and hangup/hijack display -# 50401-1006 - Trunk/Local Hangup functions enabled -# 50404-1056 - Trunk/Local Hijack functions enabled -# 50404-1459 - Simple live calls display and grabs updated time from server -# 50405-1221 - Reorganized the display and layers, added some images -# 50406-1005 - Added In/Out call log display to MAIN panel -# 50407-1254 - Start/Stop Recording on live calls enabled -# 50422-1101 - Activated Check Voicemail button and new/old messages count -# 50428-1449 - Added dial from log and basic live_inbound call popup -# 50429-1455 - Modified inbound popup code for IE and to add more functions -# 50502-1442 - Added basic method to transfer live calls somewhere else -# 50503-1205 - Added web_client_sessions entry for more security of subscripts -# 50503-1537 - Added basic conferences display -# 50509-1132 - Added conference connected list and hangup/xfer for them -# 50511-1129 - Added registration of conference rooms and added manual dial -# 50523-1342 - Added Conference recording and send DTMF -# 50523-1622 - Added Local Dial window frame for calling local extensions -# 50524-1456 - Added ability to park call and display number of parked calls -# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls -# 50525-1224 - Added ability to place outbound call from within conferene -# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main -# 50711-1229 - removed HTTP authentication in favor of user/pass vars -# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens -# 50804-1604 - Minor bug fix in inbound_popup functions -# 50818-1715 - Added pretty login section -# 50913-1137 - Added custom outbound_cid from phones table -# 51110-1430 - Fixed non-standard http port issue -# 60103-1421 - Added code for favorite extensions chooser -# 60104-1347 - Added basic layout for favorites editing frame -# 60105-1124 - Finished Favorites frame and added DB submission -# 60112-1622 - Several formatting changes -# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1103 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.12'; -$build = '60619-1103'; - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $user=ereg_replace("[^0-9a-zA-Z]","",$user); - $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); - - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - 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: Login\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login
     
    User Login:
    User Password:
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone Login
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Phone Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Phone Login
     
    Sorry, your phone login and password are not active in this system, please try again:
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
    - - - - - - - - - -
    - - -LOGOUT
    \n"; ?> -
    Main PanelActive Lines PanelConferences PanelCheck VoicemailLive Call
    -
    - - -

    Logout
    -
    - - -
    TRUNK HANGUP

    - Active Trunks Menu
    - Hangup Trunk   |   - Hijack Trunk   |   - Listen Trunk   |   - Refresh   |   - Back to Main Window -
    -
    - - -
    LOCAL HANGUP

    - Active Local Menu
    - Hangup Local   |   - Hijack Local   |   - Listen Local   |   - Refresh   |   - Back to Main Window -
    -
    - - - - - - - -
    LIVE CALL TRANSFER
    Channel to be transferred: Channel
    Extensions:
    Extensions Menu
    -
    - Send to selected extension

    - Send to selected vmail box

    - Send to this number:


    - Refresh


    - Back to Main Window

    -
    Conferences:
    (click on a number below to send to a conference)
    Send my channel too
    Conferences Menu
    -
    - - - - - -
    LOCAL Extensions Dial
    Phone calling from: Channel
    Extensions:
    Extensions Menu
    -
    - Call selected extension

    - Call selected vmail box

    - Refresh


    - Back to Main Window

    -
    -
    - - -
    PARKED CALLS:
    - Back to Main Window

    -
    -
    - - - - - - - - - - - - - - - -
      -
    VOICEMAIL     NEW:     OLD:             MANUAL DIAL       DIAL
    PARKED CALLS: 0                LOCAL DIAL EXTENSIONS
    OUTBOUND CALLS:
    INBOUND CALLS:
    astGUIclient web-client VERSION: BUILD:
    - - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
    FAVORITES       edit
    $favorites[$h] - $favorites_names[$h]
     
    -
    - - - - - - - -
    FAVORITES

     
    SUBMIT FAVORITES CHANGES - requires logout
    BACK TO MAIN WINDOW - ignore changes made
    -
    - -
    - - - - - - - - - - - - - -
    -PAUSE | START     Refresh rate: 1000 ms Faster | Slower

    -
    Initializing..
    -
    Active Extensions
    -REFRESH | -ORDER | -
    Outside Lines
    -REFRESH | -ORDER | -
    Local Extensions
    -REFRESH | -ORDER | -
    - Data Goes Here

    -
    - Data Goes Here

    Trunk Action -
    - Data Goes Here

    Local Action -
    -
    - - - - -
    - - -Conferences List - - - -
    -Click on a conference room number on the left for info on that conference -
    - - - -
    - - - - - - - - - - - - - - diff --git a/agc_2-X/trunk/agc/call_log_display.php b/agc_2-X/trunk/agc/call_log_display.php deleted file mode 100644 index 28d3ea87..00000000 --- a/agc_2-X/trunk/agc/call_log_display.php +++ /dev/null @@ -1,196 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the inbound and outbound calls for a specific phone -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - $in_limit - ('10','20','50','100',...) -### - $out_limit - ('10','20','50','100',...) -### - -# changes -# 50406-1013 - First build of script -# 50407-1452 - Added definable limits -# 50503-1236 - added session_name checking for extra security -# 50610-1158 - Added NULL check on MySQL results to reduced errors -# 50711-1202 - removed HTTP authentication in favor of user/pass vars -# 60323-1550 - added option for showing different number dialed in log -# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1202 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($in_limit)) {$in_limit="100";} -if (!isset($out_limit)) {$out_limit="100";} -$number_dialed = 'number_dialed'; -#$number_dialed = 'extension'; - -$version = '0.0.8'; -$build = '60619-1202'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Call Log Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/agc/conf_exten_check.php b/agc_2-X/trunk/agc/conf_exten_check.php deleted file mode 100644 index 8915d813..00000000 --- a/agc_2-X/trunk/agc/conf_exten_check.php +++ /dev/null @@ -1,262 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('refresh','register') -# - $client - ('agc','vdc') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $campagentstdisp - ('YES',...) -# - -# changes -# 50509-1054 - First build of script -# 50511-1112 - Added ability to register a conference room -# 50610-1159 - Added NULL check on MySQL results to reduced errors -# 50706-1429 - script changed to not use HTTP login vars, user/pass instead -# 50706-1525 - Added date-time display for vicidial client display -# 50816-1500 - Added random update to vicidial_live_agents table for vdc users -# 51121-1353 - Altered echo statements for several small PHP speed optimizations -# 60410-1424 - Added ability to grab calls-being-placed and agent status -# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1201 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["client"])) {$client=$_GET["client"];} - elseif (isset($_POST["client"])) {$client=$_POST["client"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} - elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($ACTION)) {$ACTION="refresh";} -if (!isset($client)) {$client="agc";} - -$version = '0.0.9'; -$build = '60619-1201'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd_His"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$random = (rand(1000000, 9999999) + 10000000); - - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Conf Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - - if ($campagentstdisp == 'YES') - { - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $Astatus=$row[0]; - $Acampaign=$row[1]; - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - } - else - { - $Astatus='N'; - $RingCalls='N'; - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ChannelA[$counter] ~"; - # echo "$ChannelA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid or Exten $exten is not valid\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conference $conf_exten has been registered to $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/agc/dbconnect.php b/agc_2-X/trunk/agc/dbconnect.php deleted file mode 100644 index 16c021d5..00000000 --- a/agc_2-X/trunk/agc/dbconnect.php +++ /dev/null @@ -1,18 +0,0 @@ - LICENSE: GPLv2 -# -$link=mysql_connect("localhost", "cron", "1234"); -mysql_select_db("asterisk"); - -$local_DEF = 'Local/'; -$conf_silent_prefix = '7'; -$local_AMP = '@'; -$ext_context = 'demo'; -$recording_exten = '8309'; - -#$WeBServeRRooT = '/home/www/htdocs'; -$WeBServeRRooT = '/usr/local/apache2/htdocs'; -$WeBRooTWritablE = '1'; - -?> diff --git a/agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK.gif b/agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK.gif deleted file mode 100644 index 30703a781b7c0372eb9970cc001f1d8f0c5afba1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2627 zcmb`|dpr{g8^G~tqm7+%G8&ncgSL(eNulWCmRwSjQ)n)Qj@&kkp=}IfvY7k*Hfzdt z$EJ~6q+ANQU&7o*Zi&+6_3HFF?>V3M^Zxlhe?5Obe|$f`$M}NLNo_|qKmqU!2`Db^ z?R``g7x%o3{(Qb~xaEFEkR6?F=RPs?4v*)j`||AU=mRaIR#u)X!WBL~%G1jB)B0v} z&1iE;A3L(i)8<}#8Z$4rwkGFQrCX4jTcwkgXH#)6!>w}b&pEIqVPR-}<^0)8h8joI zfFb|@;J_wGR0DtnsBZ6o?`Hr+x5f|NcX7{hW0!a=JoQ$6g}eI}U$Pv$yj7p$ZK5g{ z*E$8M_t43H&BB>JzFs=uVM7OtbH>Z?W=F7l$GieNJoyh@H7}hh9bW!a6Z&fT%NCJz z4RQezEe<=SHLl6Srk`1e9}?hNK5tA_iOoCVNl^`){en?xj}H{(2!uqz|hE) z0ssOYgwl2mQ^yqYSEj+4fWc8=#pAVWC7EI&3InpLS37M^?iPS`%rqAz(LsygtS?C> z^17gxY8tEf-9(U2f$!G0;q|y2kjTN+@()DQf|k@hbi|tt!+j^oACyqY5P&bsd+E`pYl;02LrjX*emjI`3sHFjDtVX zEN|Yl9GHvk0VJ#F1{xL~J6IBR*G#02pPa8-Bso7P`^e_2GIfNea?%1(AH2Xj;B8LXq<}k^WuX-u3$F1`Mae zGJ~2T9x5nPzIx508kcuTMkd_RLC?0*Y#}ql|MNNUpPXUeIqw080;mAk zch39&!TBf?3isINyijqri@(j;dOf&~!JOoIgG-EC$YaKnO`>B!s7? zJA0eJ@UTd~IG~>t#y^$gN2{&kiSOb&HCG~`O`Kig2r0ji*2uWmoa)FL9!5Meh2K}? zSZZJX#4q1(*HATr&*jA@_bseQLFYT2`g*(ipuiPnf=mZOCkT`Pna7$WWcnw)Qv(A_ za^SwcI_B?)j>KblrZYXN2x8WD2l-A8=XsF4_dL?7V7AQp9HK7IX_M|;8heY{qVDQ#KM)q;swGE@bG^J4Qh&N;knDJV1LSi2 z#!ikZft35rW?g&MLbOV%QrGO+#ZXe4s!{OX5({$Owa;zWKd<%Es?lAu5$#aMde2u3 zVMg!US3taoJrN}1HckRKeP}lL6{@+I|L$bzI?VffC)f`N0 z>t{##B~U3iks2MOC>wXv!&uZy6v-?KXNuS{L0LsbC52_khe*Hjn?(sl zyE)7oBFw6?q`G1dzmn@+CS(6NrYXnc`XhEDv$S2ds}e^jQhdoS^P=_)YO>0@{}>(M z4|2m~Uo@>1FY)_J=HJ{kTAhe=ZR7eNUH)KCT^v>22pN4O!wQJSaF!iWKA*5J(6?z{0jO zM05)vn3rv6S@zsZ14dt) zd`i@b$6^^Xv$JKnf<(Q*;9vcb5lx75J%mGcDoN J{p~X8{u>&T{`3F< diff --git a/agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_e.gif b/agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_e.gif deleted file mode 100644 index 600cef8995d2783ac2eee7fbb1928ba1f98ca006..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 780 zcmV+n1M~bxNk%w1VX6Qg0J8u9>D1N1iHggcoV$I0hFV*kVq?&yrhQjfwsUpXu(6L_ zUdEAM)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH})(hUFe-fsslWFUI- zkS??8lI#Plog^f{XrNc6S8jhkWtc~n3tISyedEYitkSu0gGu;TRc293%K{(9DCib| zk;Dq0swPevW63y$Wek~=+1#LYq2auk*k~`mo}Ky>Y&5g6qMQU~P70e7D?t>fnhyDT z83IhTWn(@Ktm5j_bRjvcrBebcdRtR>UZ|E{W{xS-J`k{0fK=-exKA6jd7jMZkhfpn z-raT9kkA7o2d#W)Ed-l`IlwQ?4{GWq5o43Nb#2`QOh%*>7||fq9K#rL~=%I)vs_3GOHtOi3kVY!$ Kq?CRT0RTI6+hm;p diff --git a/agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_es.gif b/agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_es.gif deleted file mode 100644 index 600cef8995d2783ac2eee7fbb1928ba1f98ca006..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 780 zcmV+n1M~bxNk%w1VX6Qg0J8u9>D1N1iHggcoV$I0hFV*kVq?&yrhQjfwsUpXu(6L_ zUdEAM)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH})(hUFe-fsslWFUI- zkS??8lI#Plog^f{XrNc6S8jhkWtc~n3tISyedEYitkSu0gGu;TRc293%K{(9DCib| zk;Dq0swPevW63y$Wek~=+1#LYq2auk*k~`mo}Ky>Y&5g6qMQU~P70e7D?t>fnhyDT z83IhTWn(@Ktm5j_bRjvcrBebcdRtR>UZ|E{W{xS-J`k{0fK=-exKA6jd7jMZkhfpn z-raT9kkA7o2d#W)Ed-l`IlwQ?4{GWq5o43Nb#2`QOh%*>7||fq9K#rL~=%I)vs_3GOHtOi3kVY!$ Kq?CRT0RTI6+hm;p diff --git a/agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_ptbr.gif b/agc_2-X/trunk/agc/images/agc_check_voicemail_BLINK_ptbr.gif deleted file mode 100644 index 3670af28aa0d98d290db1bb982da788bc3ded829..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 886 zcmZ?wbhEHb>|_vOxXQqAYT}fhgrp;F9cO3EK2THt@$r*i-@e`7xBuIlx7Sv$eS7QH zrA13l_D_6r{KS&1oEH}^o|`qNBR-)lJfb-!?qFlf{EV!I=-B{ta_YGa8>gkDot-i3_LgmhpR zZ2JHI|L)>42C{(SPZqE~9S{lf69e0Shl^PrI#T^7mK2@Lv6_G3`61?$F6(csDccDuo=Fw*EFtMAD zacT}j^Q2j`=ggfqYs$2y`Ae2ATRwSeBZG`4bBm@X%f>BC%v&^@x3Ay9sk^adv*x}Q zo{j5uw{LAfbVT>qx|ZFCHf-8|pnb^N}Y#BSY%tEF}Lb(wTHbalRb z+5T0B?V*n5=dWDgou7#h9A)VOj-I9S2={WlX=Bnn*-$JZ$>#lWJM{K_BNYK|CTCEF`_Aar_eemAQi< zX|(~XWL`qUBHKAqqAFj%PLE&LFg03cg6Qo9dv0vzeR|K9duje^ma=VMrY9{o-fLQ{ zpOKz@plNO;b67}$OkS3c?xv^|x$OC?YmU}#l9k<-&A5=QW0lD<{@g!K?;f5$?!I3> zxLMPuz27=p@=|EVxzf~zw9w4yBJ~@WCNOa>YFHkjruFs8p@fYQUnUDzZ{TS;!1Q55 zs921Q)S(9*szOCd_Df@@hIFx9_{`g(^=`|8ZY8VDLEXD@mq^&khRop9@=#m(MESn# z&L@)tv}Q`ND$GfEIyE9~<d-Y;*sh5G10E0CEgM^Gd diff --git a/agc_2-X/trunk/agc/images/agc_check_voicemail_OFF.gif b/agc_2-X/trunk/agc/images/agc_check_voicemail_OFF.gif deleted file mode 100644 index 5b7e4c758bd5acee9357c1baab87a4c0c4f7b44f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 919 zcmV;I18Dq5Nk%w1VX6Qg0K^{v=jZ8=kd(N%y{xRU$;r&~^YpQ?w%gm??d|UQ`T4iE zyw%m%!^6j%oT0L^x8dRAudlR^kCKOnikX?6jEs-Jzr%}*j>yQ&m6e&#&(giU!G(o~ z&CSrIrK|t{|NsC0A^8LW0018VEC2ui0IC2U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEns;rRFxUd}r$;QBu z+^>?y*uIgVigl%s3JD(X9tp%6?-`Kq0MPL8`R)7i`aEP9fZ*MONd@Audv}1~J`V^6 zbja{7m^*j?DL%9Z0A4_WkOu5y5DDMJij&a)iSj|pR6-Bj-XRERuY*Z?9st~;^)eq=#5NHO|y{;8v`T6*Yp~_AX)5dpVuPlB81IBLfVTX^@Ch zr^bA3t)gYBmaR;9<|57I=%GM|gnl6b7CZMVfwfMnO6$`pA#ge9^6*XglObe(2DUvCJcO+fs%S?7NBS)P( zFd!Dt?M-}EXDerZ+9V|c@34DlW&O4X*{!F`VtA{SV+09Pfz-Y#t#GlL(;Z*e!QIT> zGo?S@8p(bK{2v{F)icGolTbb#K;{AeF$x$2pML-n7l~sF0OweOqFMHygpiaqpD9wk zWRHGfRriil=(UDZL^uUD$x<*~^G*T)Tog-YA+}bVNsj%tonyTf@CsHWnY80~9e6kj za*$LA&jK=TwckTc?gM3VOO+N0P8veOz)SJyLY$NDTzO8GHED(a}Dej0&%qf|=42CTN~>Z`EED(kGY)@tjmxaK;m1QwhcgsQp*E9|hu7E3Iz t5d_h|s>U|!?6c6?DuDz_RBP=Nwb*8>?Y7)@>+QGThAZy4M)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH}<_V2CXU%BXZotyYrLA+6X`$Galz<85$YLV3QL|c!TGo<* ziro^*j49TbXG2b7-UyUMFCQK=yhPxF_%~=s7)V#%Wq5 z0RDk^@2;|lJV*{IfRMxDi;bWt2#qn?c*qut*ws)U z#|TnjkVF<)q>nB1aex9$HtFP(P(m3%08v(H<&{`wspXbjGRfR50Tdtr17wzI=9y@w zspgt&w&~`ZaK_1|03x~&=9qHkspp=2_Q@xmF^K8spoA7`Xq-AEs_3GOHtOi3kVY!$ Pq?A@_>7|%{5CH%?p}u%; diff --git a/agc_2-X/trunk/agc/images/agc_check_voicemail_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/agc_check_voicemail_OFF_ptbr.gif deleted file mode 100644 index 3b1c464400dafdde5153aac50b724f54656043cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 880 zcmZ?wbhEHb>|_vOxXQqA_3G6rQ>I+FaN+FPvtPb^`ThI%vuDqK{P=PI{{4?1KiTO1ckkZ%_3O`^ zIkR!&#zl)3J%0T7^5x5O=g!@|dv`-a!~FU4A3b_>{rdIt^74ldAO8RU|K!P&4AcOM zKUu)W=zvI&pBUKwJ9KAy=t%XSSW|6xas-}>9{f9#pJZXwI1EGCWSme#iRj?S*`p5DIx30=JP4Gc{aXUv>6d(Mo> z^;y&AE?%;9*`z58#gtW=m6e&-Z(>r}q};T1?KTdL_01cV_cU{_U#qcobK8MK8b{VN z?>w+>!`^*u+om&f9As{0T7PKUzH`TRYRsQ1tInsvq|UCP{^`@!&+4rA)s;Vf=KS-P z^%rlFLVtsH^$!kC4vq8jTutgc-!6Us(9$HR&a-9q@&f{g7`dN6ls@pG#lHHJmYdBE z{#Xru#;vJOo~J$9$E^P9t+%JfQpW$a%p58&+9n_1bd<<{rt(F2TEHT~{#!1NpBx&Q z?+Uo2KKRJOwOFMtOT_!p+|Bdi*hQz#`VzCsfkn{5Vq?SoJ)NIM z3c=)iPW8RK(l(oQ;}VNSkLal6yErg*_RkEdOt`NwuZdG&-YcUC32dw?m$How8w2C2 zzux^NF4@W$At5Z#GW~by!du&uXWp?bWjHtWkK2QkwDPoE*4G&m0~$8J+kfrI?P+4E zQOe4aAH0Y;6+2c?`|RtrB|*B1F$GEbXPc0q50b!O+)Ypty^FBChPJ68B-gh;wR zV)#_DIkD41az;}7nI$cYawR3z&a(-06`h*kBKGq{*>s7OPbRrdGh^gXa?yM`B_u5K z>C}j{l~1R|l)Y4)Chx&;ibdQZ;LyyBWhe3O`4RMHn-;6 d%jfeOepN1Kk$fZhVqu5cDvddUEdneI)&MzUm68Ae diff --git a/agc_2-X/trunk/agc/images/agc_check_voicemail_ON.gif b/agc_2-X/trunk/agc/images/agc_check_voicemail_ON.gif deleted file mode 100644 index ad55916d60f2ee323295232f3b9982245ca11034..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 919 zcmV;I18Dq5Nk%w1VX6Qg0K^{v*VpTah{Rc0h;nkcq@>a7>-Btmz2V{T!^7eA_4atT@p+OT*`E|ns;rRFxUd}r$;QBu z+^>?y*uIgVigl%s3JD(X9tp%6?-`Kq0MPL8`R)7i`aEP9aNym8Nd@AudxwDFJ`V>5 zbja{7m^*j?DL%9Z0A4_WkOu5?5DDMJij&a)iSj|pR6-Bj-W>>NuY*Z?9st~;^)e`pA#ge9^6*XglObe(2DUzv!cO+fs%S?7NBS)P( zI3O0#?M-}EXDerZ+9V|c@34DlW&O4X*{!F`VtA{S;{yp(fz-Y#t#GlL(;Z*e!QIT> zGo?S@8p(bK{2w8J)icGolTbb#K;{AeF$x$2pML-n7l~sF0OweOqFMHygpiaqpD9wk zWRHGfRriil=(UDZL^uUD$x<*~^G*T)Tog-YA+}bVNsj%tonyTf@CsHWnY80~9e6kj za*$LA&jK=TwckTc?gM3VOO+N0P8veuz)SJyLY$NDTzO8GHED(a}Dema4Cqf}bK2CTN~>Z`EED(kGY)@tjmxaK-*1QnbbgsQp*E9|hu7E3Iz t69mD)s>U|!?6c6?8bJg~RBP=Nwb*8>?Y7)@>+QGThAZy4VwNk%w1VX6Qg0J8u9)YR%(S%|N%*P5Elhlj&*a=3hay;W6xq@>YcV4hrD zk&uwbQBiKItJP>|v;Y79A^8LV00000EC2ui0IC2U000F4@X1N5y*TU5yZ>M)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH}3xM%BXZotyYBo68xBR0C57SU%!A&SVtk+geDLF92gVX(Ln`J!zSe72ucDU3Me0R zO6iiMN|O{a1~ZV8(z1mP8qVsYETo`j%7S4`Nv-7rQ!;T1z|_ka$Zb*C4Fhm>WFUI- zkS??8lI#Plog@grh@e-cS8jhkWtc~n3tISyedEYitkSu0gGu;TRc293%K{(9DCib| zk;Dq0swPevW63y$Wek~=+1#LYq2auk*k~`mo}Ky>Y&5g6qMQU~P70e7D?t>fnhyDT zSpiJ7Wn(@Ktm5j_bRjvcrBebcdRtR>UZ|E{W{xS-J{YiefK=-exKA6jd7jMZkhfpn z-raT9kkA7o2d#W)tpb~aIlwQ?4{GWq5o43Ob#2`QOh%*>7||fq9K#- diff --git a/agc_2-X/trunk/agc/images/agc_check_voicemail_ON_ptbr.gif b/agc_2-X/trunk/agc/images/agc_check_voicemail_ON_ptbr.gif deleted file mode 100644 index ae53a393d4be0ee1922ea185cd90843830be8ab8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmZ?wbhEHb>|_vOxXQrL(Qza)vZJVI$HRvozJC2xQ?vK=>#sX^-noAL^^zqQ+u9Bt zKKw8tVcx7+XKHKrojv<3D5y9rtbX$3le1=>Eid045z!JKKeMQ4=ZY0qLPKklk`^vr ze6h84MNCY8aBx|E{)|K|No4P z%?uO(#h)x--8vu=*ZfR|6@96C6?&;{U%oRO=_&#Ti0&m)L!4bQEhKC*ZQ?Px9w;> zcv$=Bn&w>x*KOFhzwP7!&O=Pitm_YN+kgJ}F75eKm9_Y_S+&@-wLX2?`dN$RzLwg@ z&m4c=vi#zWQpj)6uKvLx%As-oK39_#&#z1016-MfwfMHozJ5T!iIMyHL*WAft@hQQ zwA^fV@W*PfGP0_iIC1{$ky^HpE4Qal3OMzj`4v45B*>9$oR|&{(t3Rat58 z&ZZ@dOl-T(+Uz>8xJ%UCpW&*-wVkvZ93D%q zrztfp-uvU#?yvrzx|lZ@C@FCGo4;||R(Ra#e7wP`nngZ%%k*!%tW6d@DAyK=j?w4Qk) zS!^s=a5Ln_P4n~B95WaWu`ghmG~Gz!?G~nl^#NCetJblk^f@rUTVXmaT0*SoLAxTK z(IUG=p`{_6OeZe$wyQl$Sy$1^_!Fhu#1H diff --git a/agc_2-X/trunk/agc/images/agc_live_call_OFF.gif b/agc_2-X/trunk/agc/images/agc_live_call_OFF.gif deleted file mode 100644 index 3752fb5ec4186f9563a250d45a9fb8e76187c5d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 541 zcmZ?wbhEHb%w>>cI3mFC@#Du^w{HFT@#FI4%YXj-xpwW^lP6EkpFjWq|NqyoUw{4j z^}&M&@7}$;d-v}1=g-faIRg}DAO$G?WMO1r5Ma;&X#&~F!1`Z7r7tCOUdF0*Ij{E> z=$tRfyrP{#Hr_vwUI8lJNk*U9{O_hs% zPLDEc7n^cpyUGfa*%Mpa`&lCznfs^ zeh$}qflhuV4vrgD0+V-4xZZgG=+n0R6y?+W+)A7bVbxO`dj&2mzhu)*r?o19pn*<6H4i*TVpB1T;)-Yvv zar_F25Y47W+cIXEhN8Ch$*XFgNN8AL8jk;TOz#U%bKjn0f(l5Q!VEw0}F zaamovNZ?=TrB<%2Q^j)_d{VFLEWE~E%Oq;R-6*2Me#2*P@0Rb%5ll;hG&yEmWI5uH zB{(UhMnZ>kW9v=T=7OzZ_xIVDob_>XSi47KfpfQ<@2)K`FRut*9d~xu*4NkloER9a E0ZDk_tpET3 diff --git a/agc_2-X/trunk/agc/images/agc_live_call_OFF_es.gif b/agc_2-X/trunk/agc/images/agc_live_call_OFF_es.gif deleted file mode 100644 index 1ff376d80923153360849a7c35a2252adb5eb4fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 513 zcmV+c0{;C+Nk%w1VQl~&0J8u9@$vE6+S>T|`0MNI&(F`+*4Fj)_2lH_{QUgj;Nace z-R|!0)6>)E=jY7K%>V!YA^8LV00000EC2ui0Brys000F4@X1N5y*TU5yZ>M)j$~<` zXsWJk>%MR-&vb3yc&_h!@BhG+pwW;38i2>3A;1xv6Jl#P00A71YQs?sIFdIkSb}X` z16C{nu`L<^2n0ZIG)SoOCLl@I8-@!LOGp-C6lD)b4OI_x2ulJ(V}p~64roe5V;5Ig z2W<~tdkzI^aRgYUMP;B445(iZ2Uu8)6Na}A4-2#o2@hMPq_B3gv{eedXvVb}SFm1P zU(X8+Ujvt+To0_$I6ox!O&APSg*RW&Do=v;9?c2C*L;wIg Dj27oH diff --git a/agc_2-X/trunk/agc/images/agc_live_call_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/agc_live_call_OFF_ptbr.gif deleted file mode 100644 index 86a7172371b28a1da5643a06ed43fcf97c86d89c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 459 zcmV;+0W|(cNk%w1VQ&Bn0J8u9+A0B z?$*}U@$vEJ=jY7K%>V!YA^8LV00000EC2ui0B-;b000F4@X1N5y*TU5yZ>M)j^w8_ zO(3Ccz@R~ZGS!=|4K4|@WXHV+Yr?uccnw+wNwcvSFUCoULNF^0ht@&cYG2w!LYtca zyj_PxD=BCftMJ&73v3nZtwHc`JKz<5a9Lg`bYlb$b_0EH6$f-v4_{D14g&xH19TGz z4h9Gf3ptc*51R`PDp{DCoMWj4c@Jl@sHzpWDwbtg4G0Df2x9=Jf4CC@!43p`UTRqc z3kL+8J`M*J&uRjHS;f)Q)j8D)!3dLT4A|YH4#mmd?{U4HZVA-_?cWqo3}=Zb(eOpa z+L1pG{-uG!Cd&agj0n=VCq2Wk)8z5Jp;pFB~1zf zAUP6MO~9G-;f0f1J5S_yS&&3no#j;g$OO9&oJxUk{Fhz&;o06UW8 B$_fAg diff --git a/agc_2-X/trunk/agc/images/agc_live_call_ON.gif b/agc_2-X/trunk/agc/images/agc_live_call_ON.gif deleted file mode 100644 index ed8ba2dd6e9d4cceed03fc567c6b3fbbb085561c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 793 zcmV+!1LpikNk%w1VQl~&0K^{vva+&SSy|rR-U+KJ@$vEc`ub&MWe{y6A|fK9qN0?P zlloUFB{3p$$!F00QW=3Q;5y)`Vk0Rdl~*h`Nh~jusTfBoL4! zFwe63nk_3LcpqD4d~P}g4gnpD9RUtg5{#0I2o?sDn2ZwwN&*&{7k819695yE7ZC&k zql^-qI}E3!3;>z8xRMo60<#?r8X66ZilCSm7`B)IJP#Kg86F-P9TyJ@i_#t)2htmi z4cZMG+T|J@1`7lbiy9o|8^ep?+6Rmp-iuY)(u)c_4iG?-Mh$@jb{(`Wdgno2HxC0k zkSizcTmS|EJK&?};oG8z(jvCY*C7Hzg&iRO02CN)S_gwC`wev2VSqGy6Eg%0HcSG6 z3X5`TWN5FZw09itku=F~TgsI)3m$AbvLnBw5<_O#O09ze0;lL<!S`I+5a{3Jesfy|s6v$iW>fQALO0!2&}y;u6G!a^?Y>9?oU$ zxS_Mh1c5b@#DrNV(yAUMRYq_@!UM=NB-2za^H<1ssV8cdq+mhVql^X&$k2cuM|+5A z-*vU%hU^VoiQAQAlVR7*I(H5WARs}|$s0W!07)_8Mh?->X^U>ppmUZSGf!tkUfyPk z)U08679O6_X~8^{RDbK)0+o_zM{=bwO{5CQ-@9+^tj diff --git a/agc_2-X/trunk/agc/images/agc_live_call_ON_es.gif b/agc_2-X/trunk/agc/images/agc_live_call_ON_es.gif deleted file mode 100644 index 041d398fa52f1f7c533744eab7a60320c32633d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 871 zcmV-t1DO0rNk%w1VQl~&0J8u97#kQ5Qx9)%ZwiMB*x1-cNJh7}x5&uI`T6FEN+ z0+*MU^78Wj{{8^}0RR90A^8LV00000EC2ui0Brys000F4@X1N5y*TU5yZ>M)j$~<` zXu36Q>#EYb%5w`pETZo`&yua4?nlW95k#EvXe${RjD&Pbg))Y&tTu?SPN6%O4qCkm z$y6yAxovbB-6&yBug|~Mync^P*zsdget&9xc64}pK5iIrf&>Q#29uPOk%(!Tnskwt z2X|?6lAechQr+Lg1`$iK$Y)yLh|)8E^l1PND+6tA(<1@rXv-G;Dj7^&;LR8Nh)8q&o{5Kc?CCegF;%Sw8)aXo~a1(ExIrC{# z#y|lWj!byKTEvZQGOp;fspGhi9q_&ODFFh&2?Rf`Z1ZVX$vAHUohg>=+SjyOYtBg* z=;wVZYU;`A6roza%zQN1akR&4)8rlEGQspuhX@J%)01oUBLpKOeQ2+?MR33#4y zjkyRHNj&oQp;G;chvbV3viMkoG0OK21JKwvPfazAR6v$)Npx417J<1XPf3OKrI}j- zuoGTt0%Xf4S12S$G!2ny=bd=wsVABJ$QY+fRf?0*poA7`=%I-AS=w_nJ~K)_kVY!$ zq?A^QO=$^L;K(4wY~$&tpn|%KE}?2es;TO*)Ql2wNKwkGu*NFuthClzMK0ctg&XSs_7C(H0$gXv(QE>?X+Pid&9NZW~=SC+&&Ni06S$%ui^jz diff --git a/agc_2-X/trunk/agc/images/agc_live_call_ON_ptbr.gif b/agc_2-X/trunk/agc/images/agc_live_call_ON_ptbr.gif deleted file mode 100644 index c0601666192c90273ff44138e9417135ef69c137..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2750 zcmV;v3PJTpNk%w1VQl~t0QUd@NJvOxVq!i%J_4))ii(O#TS|t8h7_C>tgNhrgoKZe zk3m5}adB}R92^^x8v(olMMXugudifeWC2A1Awwaao}MvNF;-SqC5t6QL_~UedSGB+ zIyyRnf`S0<00II6OG`_foSX*I28f7=mX?+rM;ry>1;WC@3~~%qR8$cW5tNja(b3TW znE(q53t3rN2`dQ=l?|$@s=&a&1J46&Y-}8)95yyKXlQ6oPEIm*G60AG7L68uetsKp z8wJ1xT3T8Q#tVFWd@Cy}8$BBgwhRr(4Fd220~7;*fPh|JUQ$w0GBPqCARrP}5}BEq z1X%=TW@Z5+0VgLXYHDf)d<7$#BNbT{4uuW}O9vTl87Mg@0yP3HPc0u(A1Ej&=;-L? z=H~G5@Bq62^78V^%F6Na@!8qg<>lq=?d?rXP0r5Fd3kxw&CSWl$)u#Dsi~;}cmZ8q zUChkP?(Xi~+}ympy#D_F)z#GsfeMn6lIQ2=sHmvv>FEI70C;$KqN1Yj@9*T~j7{rmg-xVX4;b8~cbbfcrA?Ck8z%gguo_ot_)`uh5j zk&&gPrL?rP0Cxby#KgL~x^{MUv9YmkZf+lzAJ^B{*4EY?lpV9Pv-S1$rlzL1x3{68 zp?7z8a&mHvjEud#z2M;BprD`vc>>4B#{%C1-QC^%{QT6^)b#Z9xw*O1)6>$@(zdp? zZ*Om0TwJ@myO5BO+0(2#l^+4va0h5!Hu&}VczP<`h z3MgzS1iu6uUmFZi35S1`i+)7=9QKsSpvn5g~^m3t$Tfp$I==KM6buC21usU@a?NDL>m?1-v zjG2oR&4>v^r(;8j88K!Q(=m{lW}|?Onne+%u|*_o?Y6BU9r2v(gsg$jL5bmkK%Ja|BTI+N&Y*somc zl&xB4l^`^NR&`y4Ce18k(VwXxWT3t%DCOg@ZWm9EGmo7VYG%>n$NtCEdw-~*yeOpy*JG6M;vU7q^ z8A2zLCCjv?P-Ze|4B>GzLsM(s#W-RA8-Kc3F;U}6(XvBZmnK@PH6?RpYZatXv63p1 zlxC0{Q57g)KmrDgKtM0Oq@rLi3h1!{2_#&jMixL|IAOQ|hND#o9Yi=M15L$2hYWI!@xDA;2}(uiZr7PF|3@DLN)(H{7(!GToJJo4PX&*6C8^W zF~t>23=TLFU(rAVF+?l^$4yAA@)ytyp@qZ+bW+JA2vm@S95zHuLjz8@EOF5PV1dFv zM{rz1#6+MRaWxlc@CG5g%%Vsvft*3hE)rl6F*5^13_}(XXW;@f5xd|*I{zTjw%TMz z38^nQHvj{_<6fWR_+Fa{-r!GZ`RVF^a~#{=LOyxj@yAHn;@KdiBX zf9wExW5}Qeo%ewXw!jzv_{H`9k-guI;R7J_1Lyvsjzerf0xwv=0sip~5Q?yU?;9Z| zK46Uyt}u5Vq+2lmAi#hMWI`FU7@#d8(18>raDlgLAn!2oI|xdFcVY7b2ATH{Dsqr? zW2oRiau=~3n(zbE^FtiI2M-PaAO{Oz0^}Yb#@v0teJ9l62Ugg_8-h`c76^a>G?54~ zEP@W7xCH@t_74wyAR3L7f&-s7JP5|&fn3<#119Od2}Dn5*~1C|i z2ZGz?Kk^{|xT8fZ9V!UtJo7-#Y5*Yt5wOKD6fuf0v;hGI2ml6-5V0e8;S1r2SU9G@ zgNRWeVm=tc5N2qCZu}z%QwT;drVxaGbOUk+5UCHC<}wlZ;0y8iM=(UXg@|Eb0T~cL zJN|Kin9cMb6kzE|p%Jr)@qnp4)#((b08^Pp>>LCTMJjqg(Gr{3kKZwwhSmPDjabN;BKN3xTpaRs8EAW$QBu= zIK>};+gu^^;71+kK@T*bf#4zox69qccG>WU_OgMzY}mwb8IayTl$Q-X7=bf5(S}l? ziV|c911K^f3QJTV1QlS#BP?NwH#is&rbw_U9zhB?z+n<^fUqe5;ot|GV#9BkgoR1* z2v!^z!K~o0B}g#|KDfBWa6mu=B7gt{$iTuEw!|X<@rXB&!o_@;1dQPz13r-A4Le@& zk1fmx1aLwXb9j;@1fqy(G@}oLs6`owkqKhBq70FUL>b2H212;P70#K%8rCp}GL)H{ z5N;SVnF#^sGN_r&WpD+TyX=ZMM`8|hXoH{wy@qA5;Lyuh#+unIW;et+(1R9q8`j*0 zMmze?lU~E5ZE*%e+~-tOHi#I8fd)e;!w`Z9gQ{1J2D}I&)q4N~81@i`R^MgSwZ01) z!Vv3Ohd~g$FoYp^aqB(wTGqYp!!U#~j6OJ9*1m2vuc1xtXVY5R)28+?(m)1Da3&xC EJH5!D-v9sr diff --git a/agc_2-X/trunk/agc/images/agc_tab_active_lines.gif b/agc_2-X/trunk/agc/images/agc_tab_active_lines.gif deleted file mode 100644 index 9f8eaf67dda1a9f7790905c84baa7002dceedefd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 886 zcmV-+1Bv`cNk%w1VT%AB0K^{v?)2)>;>P0b+t1;|(&NcDJTz^0XATby8y*^@vzxNQ zs9_z(X~=qPKlL)dxmuW{{BQuLHqst^7rr7=FR;5{NC%=-Rjod>eZH{j??7I z`TO?(007P4!vFvOA^8LW0018VEC2ui0E++~000I5;3tk`X`X1Ru59bRa4gSsZQppV z?>s$mz@TtQEER?)S$Uj7EjlKd22SU=)|T$E^h)4 zXz-u_SO*0jcxiCZfq}*b&lI@&hvtDRjK>`RXygS^pD%tdt(`OWN}$S>-Vk(fV2atT zL@ZRXG6#$ungqMji1er?UcP-gC8SwkPT7lH+Hfu<1JCf+$<4g^-NO_y{Uow;oTbSL_y*3z$9 z9Zy;;A?w zEkM$go<=Z{IA2EYsYv0Iym-*SHVj~7WHE2-X95OpB&ddCu%rXv8c9;Qq6Z^BHjO)P zTB(bhGt$_VJ3+crU>g{iV8H-x+_hFmN8N+KpM4%!XJBhM7o(lI;Atb80`VE7I_6;L z#sC)ZcnC=KiDK#;q#zb%2^pN~>Z^QYK*FG~)@th;ppMYvt-SUs<_E3zDy*%ticrC@ M$i7;E2q6FfJ5czjNB{r; diff --git a/agc_2-X/trunk/agc/images/agc_tab_active_lines_el.gif b/agc_2-X/trunk/agc/images/agc_tab_active_lines_el.gif deleted file mode 100644 index 1bea40dcd0754c269e0f4ad77f133ce23913d9c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 984 zcmZ?wbhEHb>|l^%xXJ(m|NsC0{rC6Ze}Dh{{Ua?W_4&s~7jMU)C_hbI^*gVwe)#rw z|HZ8dnbDV@oVxV*L&D)26T=FL3{%#IlW`2wUi~#%AAhqZf};qtB;Nz0b6Sh;F-q=pBRf-K+WEnBy3-?4Mo?mc_=?cXD- zz~rN}=J<(|r^1!onI%K#)-%+w<`uO>REvofgx;KZB~p2TXjEH7=ACw)1-ZGE4XO;y z%AIW-TI{T~g;Bf=d?_al96H)lIfS)Bo+@@7ZWmDYnqzU~z@cu5iIN#fN{f&8FZa<% zJg9iq+9~IU>*2DXJ9Eofy=t;gu2q#YGg-f<=J?ALrvJsEYkE1@8H8Bb-s^463}|(k zJx_h%rzHm#_DmGf_WzW4nPH0UH1*GS919j|D;IUs&ut z-*4}(udi=x&OYz==4A832aa|XN{V|b`-NsnSfBrww0WY;t<(Myp`OQo{+Qb7vPr=& zZJ7n@rB3Okp^H4Fodqo-Sv6CSB}mtMvQ3e5^*weaS0ZAuP;Tc+*01fsxf-D%q6|01 zW~PX1t%wxmmO02|a;b%xOP={x;w{CBug1Pf;Xa3^n=Sw8tfZ`^!XOY3)48}af#K=K z>77v)OAlp*rX+|83akm4Wy8qZakEKj-{I-$yzj0}k-m3l#yL-|6CwPptSeYfDCA60 zh|VbQNl3~J^*N->Dj-tGl#<=C_?o#{)WMsgDP6^^%ynWyDLo=*gcGGWb}U=Y_2-0H zKi5pB&Z9Q0ODd0YItwgdOwrvL);cf2ck2q#-fbm~QSU!ktez06uvLPUVPe2dC6iT+ qewKe{Y?-#nGjd^LA*05G`&+m*1spi8q|FZCkj;3VYa|QI1l9n|>Zh{+ diff --git a/agc_2-X/trunk/agc/images/agc_tab_active_lines_es.gif b/agc_2-X/trunk/agc/images/agc_tab_active_lines_es.gif deleted file mode 100644 index bdefd01514c2e122ca1b6017d3b8deb994f4fc03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 704 zcmV;x0zdsnNk%w1VT%AB0J8u9GdM9!Q%L;%{L2xt zXVc`$`TO?(00960|IOgSA^8LV00000EC2ui0E++~000F4(8)=wy*TU5yZ>M)j$~<` zXsWI(DKKy>&vb3yc&_jKE{KA{Vn{3+kI1BQ$!t2G&cZJ=cv!F4tai)odcWYXI6M#; z#^|(q%^n*W7uV)KXyME92mOp2Gf`fZ+9&u<23WSV}4|pC`SPBgQTmTJ=j$Hu_ z4Q!N_eSaK*la*Wz0h?X~o~vOB1e&3Ph8u{dqFIWpU6h^#Vwjo_#eI+)lDb^Sw8vJ8 z(8j&I)tsuH)6!U&0kl`p*WA|A52P8U%v!Y%#ID*`@D0Mzp7+J`s$JThu=4k2xx4qN z7NvT|_H`miiy%TQw=m>d#|za!0sv%L#FUYv6<6Q?FnxO9PmwEg2NRC8!chSxVHzK^?_)Sb-&+WinGZm+^pAGDlU~QKH@4W?h@`pRoY&J_h^7C1M2x%`6sWsaLIB zhAJyfef%&SL4x*tUP-HX=}E@)L;}3$_X+|G0)!4#jJ9!2y!He>m>Lc6zAPdyyCqtU z^Dci~_o{s>dhC=62Y$_!*3hWyku`N%Y6ol)0NJo->(v^3s#Djy|~H;xXQpVZAl*=KkuePE0%1Y9Ter4kQv=MwQ>K&t<`NMn!4)Ja#Akd zj{pAsyY}qt!#B4sK05yC`}+%zj{f=k=jr?VAHKdh_wexFe}6AMK5^&O)i=A0B!4<<+IfC-1zx^8V}VM{n=keRb{gkB|3WU;ps!t+|a!Zh89UC#TLFdhq}M ze+CAIvkwjdN%DZ=PZqF79S{lf69e0Shp7b`cYLH)EGasfV>SQ6iW0B2Uec3!3r~ku zMm*S1;iEVE{EIDBXXC1O6k$kL1^kOF8GiHV@E9k^H}z(f9Mxp( znKh&A7E^_B!~5A@$vTk=AJWz^NHFU63K}FkEIjo;S0`iMuBip;Gg#L0DSQ=s5NE!O z?c$V<#S52&imhRqVX@H2@pOJnc!lkPqJx}a+F61TjtmS;Qw@)=VcmZ1^>r4r{IgSB z&&_BEV)PRU*ct4g!^|LbD|9g9-8# zMs8_d{VV)<;dUvlgv_3qFZNCNqkqq&qLz zx$+}hcd7fvQ0{yo*>s+|G?#>fVhVEty_kf*cJO)~PLP<>_U`SCd-ZB(*d9nsZ9Kx1 zn6Tu=nHsru0>awM6%r05$**EOB&PHtBS8sZO!a)JqImX>KsWJu^<+olG43zw6a@~#HIYHs|h9mPD z8wG?y0^V#o6ZRpC?TlM=4x3hu!rQISYZf>$-zdB7$*kF;{cgvTY1!{~zF4-J>)oz5 O+g`uht;xd3U=09Zp}lGV diff --git a/agc_2-X/trunk/agc/images/agc_tab_astguiclient.gif b/agc_2-X/trunk/agc/images/agc_tab_astguiclient.gif deleted file mode 100644 index 3037357602871896af76d7e1ba02b910c0256318..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1092 zcmb7<={p;C0LOnciLl1iIc7#!Bcw^$)>$^=Nj#YnS7dQNLp*fVCnhzG@u(-R63-qp zS0aMAT1vH6M4yeuEmR$2&D`QB5~Pl*3fa2slst2fJY+lr0-g%|Qk$?9nD z^7FpsNy*Bt;&5(yYi)6N@oz;*UhU-Y>YJkz0DxMpe%7<}ul%oB9Yg->vG4fq6M(4+ zT&6qL?3bb1cnRaH%JKRH@`I3v(k9l(b~5+62L^{q^?mdtd^iRJe?HZq=Z&}^)`XNopyzNh*?A0a zr4-0OF-E3QwS!aI?;Uim3oi6}_IJUTq~B4$Xcl&8a>wb`w&P)cByJ-YK4l8C?nQg@ zk0bF+bM_DRa0gS7xS%HwXGT`7Dzn(vk+J1-3Em#<-kQch+TcpCQ5!jFV0i(Xv&5Lo zy=@NpoNhMox-{C<*Rn87h9_tancNJk<65g5m)R&vObF7rgzpDrj_{;Bw@+~ zR%A@0*s+N$h+ZcDZS@ULZt8n8+vMFx?7kJbPh3O##gC ziUHi`02JxaVv=O;Hia7-28yr$mS?1dX`8uC=w^(n74TBQXZQG$D@w& zsK;>R3jSOX%{192%n(6A8(ia&7Gn&po%1K^=)W#Ohbquk=5!*9e-S2*?@h}QFwi@A zI&~wsx->30EIyQmLnU%Sr~%rKA06<)%UoZUbsE$yO3aA~p9l&9H7FW4^X>BIJ{m|X zK*&&Y3ReOlZ3J457Rfz7al2kt%8!&p!_`h*(BNOE$^=Nj#YnS7dQNLp*fVCnhzG@u(-R63-qp zS0aMAT1vH6M4yeuEmR$2&D`QB5~Pl*3fa2slst2fJY+lr0-g%|Qk$?9nD z^7FpsNy*Bt;&5(yYi)6N@oz;*UhU-Y>YJkz0DxMpe%7<}ul%oB9Yg->vG4fq6M(4+ zT&6qL?3bb1cnRaH%JKRH@`I3v(k9l(b~5+62L^{q^?mdtd^iRJe?HZq=Z&}^)`XNopyzNh*?A0a zr4-0OF-E3QwS!aI?;Uim3oi6}_IJUTq~B4$Xcl&8a>wb`w&P)cByJ-YK4l8C?nQg@ zk0bF+bM_DRa0gS7xS%HwXGT`7Dzn(vk+J1-3Em#<-kQch+TcpCQ5!jFV0i(Xv&5Lo zy=@NpoNhMox-{C<*Rn87h9_tancNJk<65g5m)R&vObF7rgzpDrj_{;Bw@+~ zR%A@0*s+N$h+ZcDZS@ULZt8n8+vMFx?7kJbPh3O##gC ziUHi`02JxaVv=O;Hia7-28yr$mS?1dX`8uC=w^(n74TBQXZQG$D@w& zsK;>R3jSOX%{192%n(6A8(ia&7Gn&po%1K^=)W#Ohbquk=5!*9e-S2*?@h}QFwi@A zI&~wsx->30EIyQmLnU%Sr~%rKA06<)%UoZUbsE$yO3aA~p9l&9H7FW4^X>BIJ{m|X zK*&&Y3ReOlZ3J457Rfz7al2kt%8!&p!_`h*(BNOE0PFA|ZLn2-`LgKP{8ZycbRq-mdg92{?o zEsSdh3LPB^25JZova_{mvJhzo9km>}#Aw912gbw-5u?M$!5+^EX$KvuXt1)h)zBSj z4!PWHlP#8N;m5lk4bTp}9SgtF&&SHg$sXSF(%!UFfHDq=K>v(Q*GU=rJc zo4E2NV&Mv02cZZ$G@#b*U7Du%_yPMTRE;b*SG!SdQ!k(gnjXR-RZ0yk8(9b-9;lk8 zoQiW=ZNVFrFyFQgzNYqLs|@S6r}U0;oyGC%HN)#P3T*SU0fe-08m4$ya`4|Y&y)d^ zr+1iwwQEsA!zR&yfe5o=dP6g8ZHIthQ@S}=Fk!9;*xIl{5dgy)*=#ba5so$%gwCVy z5hHy}LCby!_fCs_xDD-G>$K%s$OZ!?6a>yzUn3lI)~lP5FEDMoV@i{dC8F*?ci2mk zdksIJo_ozsn6^OhKr9xyK|l%vu+dKcVh%9ZA24=(gFq}lZ6%&xXrQJ5WUURB%rif! zvLHIxm}LtG+#wL68w2p>+ZsWoVG}6rc!kDKPGz-HV0?Lmp$9fO)nRagc`)B$F+wB@ zC?=Z6k51#Q;oS-0d6H2A?eK#UP=)z;V@5;%c1=%x*{0fkC*=oZE~+qaWtLF#1Yc6G zrL_`dZ5(Jqf^86#%X93w15X-TS}108S!onYK=lywVUZr-Qk|c&Ja-+N9_*Nljcv48 z!UP4pq1^)9X++RCWqxU>RjYYvW~0ccx#oDIa(5|kenx<28wE^ILX~ic5(-_VWFqVy zsqFfOo+I#C?6c7J;i(9qMr-XIwQ}@20n$400`Tp)-2yNI1>~k1Ed?Kh002A3 CNw=W@ diff --git a/agc_2-X/trunk/agc/images/agc_tab_conferences_el.gif b/agc_2-X/trunk/agc/images/agc_tab_conferences_el.gif deleted file mode 100644 index 91282b42f0a2c1c3e9ac3c46ad19e875232ab130..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 861 zcmZ?wbhEHb>|l^%xXJ(m|NsC0_xHDgtmNNc-wIR062rWHe|quf>sv=lLjgV>Lv7X1 z*LE)Iul{^}*W(jw53QcEX>P~o>$|_)-1p_y{x7!=etUHG`{VQ9pIrR$?8=Yl*M7db z{ppx%L z|Nr+7=mxM`NG242vM@3*=rZVlbb|ck!1n(@LxG2mRR4)3MJIEt<_9QuA6gN${>GZJ z({HQxKiDwiP*B>D2%!aqvW!lO2RZ~98F)$@mi%JixfYri##)~fCQ!!^R+PZW8QGJ^ znh`7MDm!K7tl4wsCdqopORK9bUABD1%2lh^tX;Q$!^U;$((*nW^LFmqy_>^bL3K_C zcVu5!sbFD!wGx8>Pi;jLPkmW=V?Iyb`JVV=5k36OT#CC@6`aKOyngd`wpifDPoKYh z{pPIw?$_^~+P<29n7EcqapLUeocStZa$F4 z<()9?^^z&I2g{rkT^gDjJA~7V6dufbe0+kk^-qTdo1UJYVVr&M%+Afv&o6Lp-u87# z)1%AG+BO#(c9lBt`WEb*xAy#W$CfR{>$6v~EO>W+H<||`6>6x3a{$jIgP7`VjlMF~; zbl-Yb;!>}8lV<2-Dfy>CP2MgE7doX)BMlk+Llqte`W4(|KVjlxs8AImT6kvTO{?N~E~o6S|`z)5EAfL7Ls3#L;pcUb*ZIbqP(^I5c2aovrM?(Q=eCn)Zg zF=$~BN?AHd)Z*C@2WLT(%~Kega!QZ7{ows{EJ%5W;H2Q-Y1=3037Lo;U_Eg3UQzhv)BE%4{{8#(*}nDN#M)j$~<` zXsWI(Nic9M&vb3yc&_jKPKX47VL>b!kI1BQ$!t2G(56A~3oRbltai)odcWYXcuXEI zM1!(=&2GEPgOK1&uiNiiL8yT5`~P4CAZdVwhJJA#b8QC)ca4XUTzVdSYX}XQ4G44r znF*3xnSg>Fgle9enVfA3pRA!+qkxGUi)F5x4+;shYzGaXv09LTlpB_1p2EAq3RnsN z2mr*63e(V-2?x*72#(O)(%sVFyW9`sTHfZxy9m?I(9#IxhTsxrayUz4CTpty8c-us3&X84AHDQSfM6w-fEP0< z04Q)-OOX#hfwD;u;j4`=gQapbYvs*@o&p@uR^}LnWGEY$Bj#*ZFGsx`UiB$VCfA(I zyaEH2@L55!!LYO>+5n5RifOZ&wI>GO1$|McW`UT+6Q`{YwvOcr4^vydgyD@E{1sC_ zS#9UV1Z6nbNH`fz?$g!Rk>kC(01Hm*QBzJ==fR zWVpixkn0GkhJO4FqvVobIHe(zP)6B>jW|kaUQzhv)BE%4{{8#(*}nDN#M)j$~<` zXsWI(Nic9M&vb3yc&_jKPKX47VL>b!kI1BQ$!t2G(56A~3oRbltai)odcWYXcuXEI zM1!(=&2GEPgOK1&uiNiiL8yT5`~P4CAZdVwhJJA#b8QC)ca4XUTzVdSYX}XQ4G44r znF*3xnSg>Fgle9enVfA3pRA!+qkxGUi)F5x4+;shYzGaXv09LTlpB_1p2EAq3RnsN z2mr*63e(V-2?x*72#(O)(%sVFyW9`sTHfZxy9m?I(9#IxhTsxrayUz4CTpty8c-us3&X84AHDQSfM6w-fEP0< z04Q)-OOX#hfwD;u;j4`=gQapbYvs*@o&p@uR^}LnWGEY$Bj#*ZFGsx`UiB$VCfA(I zyaEH2@L55!!LYO>+5n5RifOZ&wI>GO1$|McW`UT+6Q`{YwvOcr4^vydgyD@E{1sC_ zS#9UV1Z6nbNH`fz?$g!Rk>kC(01Hm*QBzJ==fR zWVpixkn0GkhJO4FqvVobIHe(zP)6B>jW|kah0?E(a7U%XLpv4q&74>8yX&ZbcPNM z5B~oCqnoo*PFlXT(TIVSL_tfjsKQ@cY1Pf<{QUjk+U)%M{m{qaDJL!E-|ykv?b6ER z`1kt&007Lw;Q#;sA^8LW0018VEC2ui08;=S000I5;3tk`X`X1Ru59bRa4gSsZIc$K z?|kq7z@QLliCHp}jdICsI-k&})H%r%VH=Nj%k6r<;IJ6Hi3P^!w0a$YY1Z&~T=QBG zr~n~$B4l3b%-gDQoMuMb-duU@W|30}LNnYy-Mi7Ja;st1n^Te8;AT-(gF zqTI}o3|qTir7EbYj|UJP3R(=0xXvK`6JupZ2m_gJ0t((A-8dj~Le5GLVKgn`?V zDFkOu9KCJWJPhm-?Zg5AU#dOqfK3*ybMxTQWqY(w%QAWn04CeW1%N3N1He@CfB{}g z2^zV1AQs7h(RcUw-Rhu8m4cN0zzjekKxaFD?H(Bj+Hd5mO2S-PWU8fMhn_;e2=E9p zOjSQ%rt31OS9(95jm}Pu#y%#dv*5k!!w5-?Av;A@$Ai2C2c`|QJU(y7f(FCaQxBLv(Ii{d3opR ztNS&PnW|YrGy)W#JG|H8Z&}k2uLjSN%rf~OL~IO zDSiwPekR9YzgXqO)*voDZUgpncdm1%irBW6P5WSZ^su1VhHITGXBKYIYcE=|hf%=e zRFd74#TtjD6Ax`nW9zi=;5d-4n3kI3W*OMQqZljNc$ewnh7WdCyOvsL7&$$8rpZ|O z)-h4~s6qVxPZw)+((cJ$TDabRiBZxCF1B-`Q5K(T<))gdf6&~c`Df>phBAh0%z_nM f%}W?_0M)j$~<4 z!lJHh>%MR-!$K$wO0MsG@BhHyZ%_j%9>}C}$!t2GP^Thfh+41MtN}F0dcWTRC;%>- zoq`2uJ3DAAq?tF)?(Id2v z(1UVFSY0@<5I#7NjETc}(typwh$K@=B^)Uo zjF{`0L6Hy6Q6OLv(Jf!|B&u^6G)YWss@N6aHxtzZ0v7}@Y&eR^%akmezU+0hqEA4H zLPkt-pa=zJ%&JNXidC&KiyPm??c+|CTyE=bjx}e2XU`^ASGrX-2wt9k2LB;|cI}V7 z!%dk$MKP5sV77vhYGP+_u0(b+zYPk6bEH`ZXy-inX;m9*U{0Z&^Q-#IOE!}oNUhE0 f_L;I0QuFqbYuA}Kw1+GIGWp2z=UJvWhyVaP^xXZL diff --git a/agc_2-X/trunk/agc/images/agc_tab_main_ptbr.gif b/agc_2-X/trunk/agc/images/agc_tab_main_ptbr.gif deleted file mode 100644 index b5fc2a5e5136d1fc47a06c48a30a4dbd3920ce58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 541 zcmV+&0^M)j$~<4 z!lJHh>%MR-!$K$wO0MsG@BhHyZ%_j%9>}C}$!t2GP^Thfh+41MtN}F0dcWTRC;%>- zoq`2uJ3DAAq?tF)?(Id2v z(1UVFSY0@<5I#7NjETc}(typwh$K@=B^)Uo zjF{`0L6Hy6Q6OLv(Jf!|B&u^6G)YWss@N6aHxtzZ0v7}@Y&eR^%akmezU+0hqEA4H zLPkt-pa=zJ%&JNXidC&KiyPm??c+|CTyE=bjx}e2XU`^ASGrX-2wt9k2LB;|cI}V7 z!%dk$MKP5sV77vhYGP+_u0(b+zYPk6bEH`ZXy-inX;m9*U{0Z&^Q-#IOE!}oNUhE0 f_L;I0QuFqbYuA}Kw1+GIGWp2z=UJvWhyVaP^xXZL diff --git a/agc_2-X/trunk/agc/images/blank.gif b/agc_2-X/trunk/agc/images/blank.gif deleted file mode 100644 index 3a46969559121702f82e857181bf431069555d91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 scmZ?wbhEHbWMp7uXkcJCaNs~11B2pE7Dfgj&;b!383raM7e)qa0KNkTq5uE@ diff --git a/agc_2-X/trunk/agc/images/br.gif b/agc_2-X/trunk/agc/images/br.gif deleted file mode 100644 index 423b8a0cc6e0f1370e9f9a9a7249323954c30a27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 397 zcmV;80doFFNk%w1VIBY!0K@08l zZ05uTk+2&7$^o^BC3C4F?zsj4k3(NXQ(0w^7M3~yi96T46Z^#gAPsQ#!vO%0LI9CK z0F6BWjy(XAKLCKEys2>)Ndy`Wi9#W9Gy+g*j%vjL zAB)QX!|x9o3lAR}I&?^70R{~g6B7jr1buE70SQq!h8hPC8BG@mjR*jskrEjf1{n_r zgmfDM7EPxR3Vj3x2nYoP5ErKg7GSQhvKO=j$dMSh2))0-8=0G(z7ojw9_XVR=`^Tv`KO#R~Z(847j7(zn~ r9pQ0+0jekNA|@Qd!$*uG{5sH>5o6?w4k9`Vs9edirAwC;LI40es)CL7 diff --git a/agc_2-X/trunk/agc/images/de.gif b/agc_2-X/trunk/agc/images/de.gif deleted file mode 100644 index 4dd34f6a6bbfdbdbfdfb23f49aad444b14ca1981..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmZ?wbhEHblw%NK*v!E2jDg|*d4^{@7@oy2{J+ca>d996FAK}<=@NL!p2OG?M^s0|PGm%)EXME#b2@8WY E04O>?s{jB1 diff --git a/agc_2-X/trunk/agc/images/down.gif b/agc_2-X/trunk/agc/images/down.gif deleted file mode 100644 index 32d0a007e39335e82e173fc5d1045ef81eb224d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmZ?wbhEHb2HoM{iq4)$AGUsXRvwvJPL$185tD~8M&*HX)Vh&S;OpkRMD6}##SOWmv2robY diff --git a/agc_2-X/trunk/agc/images/el.gif b/agc_2-X/trunk/agc/images/el.gif deleted file mode 100644 index 9e79d8bfee73ff55997a1643470b07bf73d5c23c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmVs;j1#u1!_3va__Z0Askhy1Tp#9Sgw0!o$SH3K0N1P<3y8 diff --git a/agc_2-X/trunk/agc/images/en.gif b/agc_2-X/trunk/agc/images/en.gif deleted file mode 100644 index cb45f5f4e26b8b9f4bb93784217f944c8bb92198..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmV-I0lof5Nk%w1VIBY!0J8u9Ra%|T4-e#-oCE}9-&a-Y)Y;CulsiDHs6cf)3 z3;pr&|K{V%007JY0RR90A^8LV00000EC2ui03HAo000EfF4pFeUM1`-7j0Pkn6e`vWm23rLv)bU6+f_1DUj;S<8Idce%XnH9 z3{YC3X9d0haQK>#Jfs-{`f3~3EdC1y3kM4fe+&Ub1%D5O27-Va36qqSCLJ9CmYWIBhGT_NHR-64$boy3Ny;>2Ya##uJ6{KZqyPW_ diff --git a/agc_2-X/trunk/agc/images/es.gif b/agc_2-X/trunk/agc/images/es.gif deleted file mode 100644 index 308ea3cb1fed4dc419f0fbb49c051ded44e42fef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmZ?wbhEHblw%NK*v!E2I8o}wRL)Ot_+HOVzI%`H%i+LBC9|KO5#6#|=fnlY|8)$v z85r&}F#Jzr_zxuiGbsLKVE_Rg5CJlSfu*}(qwDIuKh8bf^*=$wFDbL`$;vjK3wsK5 z&YL*cRIGbn<9}y2ixT4-N%{SE84s{<^c`E`C&0kMcOm1WV=e;^^Fia)lZ)7|H8RF1 zOz&=LTx7W7`d!Q7KMNAfxN<8zqB&~nI60e|tvJj%*_k@JSQxmbO`kDy)@%kD?fJ5r W3$zz4Ru|@3xoY*Awd=SA8LR5;2;kGE}IHDpba>c-5LnxOg`M> z^8Whz05F{ZF`V8Z5dZ)GA^8LV00000EC2ui03HAo000Dr@UTW}G3x29S3*uGhEio= z9Or?fSenh1rQO%M6D-p;d%va~Z*?Q(f~cXb2t3VbMCQ@SdqjUziV(WQ!eU9TuhrCs zQ&(~p{6u%v->rK*DzmHU`dY4f>*HsAbU1)*f<+E?d>eT#0t}Fm0)dPl1echX00Eqx ToB#?7qNAb;2?MC9sSyA>Do$Bc diff --git a/agc_2-X/trunk/agc/images/it.gif b/agc_2-X/trunk/agc/images/it.gif deleted file mode 100644 index 6c7b17921936a8feb27e9a0cf2c668f07732c6a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 198 zcmZ?wbhEHblw%NK*v!Ci_1*R3Dn?h{0!hO&eDYV{UHkF=?J*UjBX;mDRX;}1?48FH%GSCwrkils5-`0E4O*Y=?XGf0{}SvQi1>g diff --git a/agc_2-X/trunk/agc/images/pt.gif b/agc_2-X/trunk/agc/images/pt.gif deleted file mode 100644 index 646b76ac68792d5bb88a7ac96f94cbaccc4da1a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 208 zcmZ?wbhEHblw%NK*v!CiOF>4aRsMFU-pwiV{TCZ-UE*+NiA&EO$14XfoUb=8uho2) zkZ}04|K`*08K%jMdj3txF;<0617+v zZcjQ=DAB1h($ diff --git a/agc_2-X/trunk/agc/images/remove.gif b/agc_2-X/trunk/agc/images/remove.gif deleted file mode 100644 index 89b0521ce1d802a03fc69a7a788f8b57b3d2475e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 176 zcmZ?wbhEHbIu<3BU=e;b?syLbQB z*Z)6%{(nZs|1~xLCr%>!PzOYU>||ioT_D)=B!k0Y)v~57>lzR6 ml&qEE3wiUWNQJ+t;D&{aQqvM4!>W}@e$!UC7_~4kSOWmeJT*-K diff --git a/agc_2-X/trunk/agc/images/up.gif b/agc_2-X/trunk/agc/images/up.gif deleted file mode 100644 index 0d55544fb366ab4c9e91ee6b3b697504a7744326..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmZ?wbhEHb2HoM{iq4&&E7|i2jFi5{Dk=4*6vSihv5Z6<+@~y4TLK{nLt0=4^9fum%9x{xDtu diff --git a/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber.gif b/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber.gif deleted file mode 100644 index a5a080d6787aa49e59d18da261d38a105816b240..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 831 zcmV-F1Hk-8Nk%w1VUYk50K@rJbV{vSuh^`1%k6rj0s`YP5PZ()w0g~MyWjA*d`_>U z1CR*WZ14O3fPsK`dS!787l{`Z3Lgy@3}_Y?5@{C+ZHOIbj}0FQiir#p7Y1h?i;tm@ zmZoP3n24SqvY(V^3Zk}(60@rpo~sFsZG?Mq79I;13(5)=9u{Z_2p+Q^9v5xN4vo+i z9~aq*kqOZX)Dx=Jx@aEJXNe!l;PW2f;vS71@6zIm9uPDN7|IhtX4%{rGX#g;nPd#0 zN&CPr8KyG{*(8JaEu4on=nxoyhejNmcLKxzX>(`~pSVq+;F)}N51TeM89y{rnCDo- znjaK+Fd*@a1bqt}xVyO~nFN6y#Z{PEffzq!YG&d*>Te}bhl(&QNapX})CDP(QLU%8 zLI(s&i}hsqhNaD-9}q0~WDO%zHOVF*kP!8q;d*&Vmi)LTnmJNl>w#UgKxol?h9?>} zjB&GrYikzrsSETjJbsIgUd##jBiWi#sS?}R%@Sjrj6}*~Ihh{=eKO5fkcw@=T8zd= zM&em$v>TQciyrmtciTq=4yxh1jYcp6a~I=rcPA|w0`m}aW!rkp}* JfB_)@06V80bb9~* diff --git a/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF.gif b/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF.gif deleted file mode 100644 index 75bc0e8fed5acb00b66cc6e2319f3c2d499fafd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 827 zcmV-B1H}ACNk%w1VUYk50K@iHV7~x3}iz z=IiV0A0Hpv+uO3TvgqjOe}8{mTwKS;$L{X#VPRpYsHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL^000I5peBxFX`X1Ru59bR@VP0|wB2~F z?|kq7z@TtQEanyp$6~>0I-k&}bV{vSuh^`1`}_b9i-+PvE}PHjw0g~MyWjA*yxed= z!sEGq&+q&Db$4QJ2p5JI76l&(7YJn*7ZGL`25N;JWQ++P28V_S5*Gqw9f*vcjgzBf z29<@IAFrH|WCfqIhY_%-7n`UCifVy)ZWbN~7YD}$6&@C41Oy(iA08KK#te$h6(1MY zhmHo$1alXxOww{rW^qQ?aF*h!|tEAYYXT9)%%92Q@fF@=vBLR#^MKM2kj73DDy)B z4+0*NiE!@#gLO2~7>n>vD+J4T>1IG5zgL=T^v8eLSR_H+B zs4$%g*`%B)^aFtdoTgPwdd8Rp0uh|D8!XRmNRb@TI2#vgtGup=4*V2qZ!pBcgDYZY zKn)GTJaT)|ZI=%bQHnPEattf;Y1CjCwM|M~GttL)DIw=WaPQ^V3QwyYKwEJ*NJlvZ zfnJkRqEMon_hRE%fPu7nw9EV@Fpi?T?CYKxBd`^d%9B42;PqWbXlm&0+o_zM{=bwNED(Iku=4k;1b4Gx{qKr1`=%bKED(R$@R%+>`m}c6j00M*n F06Sl0hfDwf diff --git a/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF_es.gif deleted file mode 100644 index 405ff336c759af317ff601d5142701ad7b3145a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 914 zcmV;D18w|ANk%w1VUYk50K@#>QM+TrMsy>+9?0=H_c_YqGMke}8|uxw(3JdObZo)z#HhR8;Zt@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL^000I5peBxFX`X1Ru59bR@VP}>ZQppV z?|kq7z@TuLgG43}2xrM`I-k&}bV{vSuh?w!BTzs9k&k#xE}PHjw0g~MyWj9}U_$wZ zB^Sb{ak(hsfD#g99S9x>3m*#?iEIiNZU>ELj|XCYV+4PIX>)a89~T}T9|xlroN#?( z3<(LM2#Sntk8KMcmS`3pkRKkX9~}=2sc4>dp`r^GqNoc57ad|29RwW=4$)#Ad5H%W z3VLJAz^h`W(h9f@77f7{-w~qxXlOKW2@{ ziK!<66|;h3j)Cffpo0W}s1l6w;LgLVMI#&k+!_^Y*MmXRMxru@?@+sQ>qd!0rEt}* zP$LtH4Cw3B$X+pD`QkYflF3mISniV^*FT&9>No0`@F0|X9yT{sMBmxT-n80>Nvb5~ixt9a2( zfQ?k$4|l7IL9iIEJFdwr5J(VMuLDB~QTb)1TIAF+BS#G;!=Rc61%7`n9qtoXZl_I4 z;Sv?}U@JqIkq`cvo0K_)vr+dE=7GU4bryETR`k0;0tK%v0K82mLE;Y5Xzr!_D>%u* zz6Oz=daGfgo{;zz+5!p~bX!(D=_g(PaUZxBOnkjKs7@lBY+fLQ=^KF#zH-;{tGv00Dd|`AHbX6naJj2T(S~0Vz6W=%bJdicF-Gnqi1ZidL$r8=e5b zK>!$pD(a}DmTKy$sHRG41qK*UfvT{^D(kGNHc$X60u%t>uDtf@>#x8DE9|hu7HjOW o$o6W%00kJ}KnBo8EA6z@R%`7Kwb*8>?Y7)@>#ei|5D)?YJGt|cMF0Q* diff --git a/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_OFF_ptbr.gif deleted file mode 100644 index 0d297820b18336af1e10a01b08f968ba32f21cca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 961 zcmZ?wbhEHboX8-=aFv09pP#?8v-8-oW7n=-+rE9fyu7@RkB^?7UQA3(c6Ro&XU|^0 zetrA)?fUxq7cX9H+O+A@r%&(Rz4P|=E-o&9`0(L}4<8mTT)1@U(%|6W{rmSPCMHHi zMC{qK=jF?nTefVeuCA`As5pK4^s85|mMvR$=gytUlPBBS+E!Intyr-lBqZeO)vF&r zeth%h&GYBaXU?3-z`*eI=~Ey{JW%|}0#>X8B0+v)VEgaDk>aW&)qi41(a9XE`4?7P ziAdB`5}a0c`fb(z2OBDU^k$#Wc<1ymvLouljvBx9x8MKRQ+NLT@23WmjNE)&2JIc4 zUEMvsef<+APMSPrY6lNLZ%bQ0r`mk=c1E>ny)5(9*jRd))K+&dUq6kLt(}vzW9_D; zQ)kR-ouH42d^ci|MIhL*4bBNJke#iL}OZUw_xP)2ltj0nXHZ@M>c6GId z22a)W44BmQ)R@{&X&9*MYdmJ$8X#e?AYZPLQ9a;{uzn{A@UCq`ogW-QFtH;CF+w-4w zGjmQ6j28XE(lGz;AzteT#SZ5a-|}%*8+M8KN*w+1l_ely`PD=QHU`r|G3_PO=Exj8 zTw1L;L?+5B?I+w4RW4HGGD_%4M_P zeBG8?x?O*h^tC?%nG!z_%)8KO`uqC&jrB)!SuPtLy3NF4q5736s*z>F_V1_l=4dQh z&&I`bL;8a5=S4Rpw{|g}^)P2Bb>&q!P-Po*FW@K)6;*jcHym!#um+$t*`yjVQJP3z^7DPdVJ zm(ECA^>W!9JE=pg3IPWiS@ou5y;`|q*{WBo)@*zAYW0R=TCdkEoA#lRP1$FIBiEj9 fuU@Y|z^46X!x6FUHycl=t?X zC>8Q&a!Gt57Z(n7gcB2J9Sj}}4<8Q~jc^VZato1blM7~oX9i8{+x9;7k zldK%R`UMhY!;=MttwI^h<}6`BaZ*}&N-~LK{qTyf(IRV3G)+S z*nerE>1cQ2kYh+z0U$Ltiivy3Jb&6xQ(KVi5z(_#k1ByU)93_l3@Bm%v zp;6qK?p&beo4R?q2$;b@kiefzj#5T4h^`UA0{5M<0E@p6ljx+Bu14vlY$&o)qnLI| z$1)rgfWfGwmTKy$sHUpws-`|5fB+A$D(kGY*1GDVtRS$!e7yGR>#x8DE9|hu7HjOW o$R_J+dkYAlKnBo8EA6z@R%`7Kwb*8>?Y7)@>#ej2BoG1sJMyubQ~&?~ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_dialnextnumber_ptbr.gif deleted file mode 100644 index 8625b1c99bc27790c1337f10357142f177c95348..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 965 zcmV;$13LUiNk%w1VUYk50M!5h4iOG|nR>C^v7^kRzV5yoA{#_iL@6^VQf5+LcVEu` z&e#9fp2nWT^uyBs(s7M(<^Sc{|Jv36)yezGR%}*7R6}lwZsh;ulem*+fM(JE(Zuz{ zkF$?XVospQplgO}wc@o(TuPL=l;Z#5-T&Rq|IMe-r-P(}s@1CB|KB!5Hf@M)mb;cp zT}r;~zT^Mn+5g$k|Idi3hyVZp%>T>)00000000000000000000000000000000000 z00000A^8LV00000EC2ui0FeL^000L6KnUdWDjJW-q;kn@I-k&}bZQ($6e&^!#_f8) z;IMd1E}PHjw7R=ccwiDuY)-G+@A$la&+q&HfPr)+C;+n;6EA#4*Z+;&looU0LKJ0D{yKbKz}x897xdYm@A?y00;$0&e(yV1b`ZY zr>NKrQ>SjyK=uzPfC4_V8UsLJs0y`PC&By_X(qp$N@d6@V1Ph@6#@(hs2LC$qo&3< z{&R%@z<>b&rUiILiXS-w2>?!JF*yK%0~|FTIIB%8S%5VGBb)sAYqMluKZkzF37pKL zcV{4d*3a;w00__)?zgDf0amWW&YXFbo#n8)bGOs2@trZ~icZtuH+DtOt=z?mr7esu zq?wr)>J~5{>Zuvi3M8299U%AOM;D1TP=J76f^j{E)OJa^VgNMN5pW$+1PGuVcc%%k z&{X{_M#F(})fQ7-0H|={6;CrbhyV)(Ok;pjr;TP`ent^DT`4mZfEGO-Hr5tZ*zw~a z09TdN)hP(f09^q<)kk1&s>!$_LeKP=VR^(H)7O9j0F@67;|Pi6RV(OpUyF>47Zm`o zv5?h>I1b323}_+1PIdKY`PmGa83|!BK<#oLoAA9!o^9O(D(Iku20B-vh$gD2qQOWI z!v-!yD(R$@R%+>`m}aW!rkr-_>8Fx{fWZe7n81MysHUpws;su^>Z`EED(kGY)@p02 nCs;s%2pM$H!mq#vE9|hu7HjOW$R?}ovdlIMYzP$?5Ci}_R${Kb diff --git a/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall.gif b/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall.gif deleted file mode 100644 index a6779255a93d90921769e3400414eb3e2211c1e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 804 zcmV+<1Ka#ZNk%w1VUYk30K@T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehDU>MY< z?|kq7z@TtQEEU z0~1L(4oO@t2@q!ve}4rXX$=<^X@!3Y3~GLbjAx3KXO4i84;Kz+ehD9hj-s7~4G(M% z1s4q!X%?<&erklOYq-AOd`b(7Ry;cry$Y?hG|6qo^e(nmO}^#T8@I)0L?#_0@D!W^`@LC zauq5VL#B-12L=c(AeA|BfdvZ*Jp8n|O_qlSNR`F}msDKKa=?t9Sy$+j%1juknzV+1 z!G&-B(xO4RW@oQ9XXTAsr)`0tnF%Uf`>R(T0!(Q2Vs#)@um{3Pd4m2JLo(oopTcv zwtz(MfdZn5h~T!(Spza~Oko&NCXZ8VK+pg%G%7Tej&T)M!Hd4>q#93l6lvsA+slxgOfXr`&=nryb|=9_TFDd(JL ijud7C804wvo_zM{=bwNED(Iku7Ha6BdlpbY2mm`eFn6Z_ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF.gif b/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF.gif deleted file mode 100644 index 74b1f5a1369d2b352e85a76987e28dfbc797e2ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmV+-1Ks>bNk%w1VUYk30K@+9y`=IH3?+uPf+va)}Ff9~$?b8~a3sHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPnDwB2~F z?|kq7z@TtQEan=HNTb1NI-k&}bV{vSuh^`1`}_bDjfdkyE}PHjw0g~MyWjA*ybOs* z!sGU$aJdu~WD0$K0v%=v7ZzrNeFX?-e1nQ)h?8WDevb?n3S@i*AA*dan}Z1qX$k@t z2^D4*tY&;?f~aYAcVcZF1RfU#9t5Zs9tM5At{)7+1ZKf~z!zs1z841`ipvDeWzWC9 z9~Iai3B`}Z#*N_~2YntM$z{Op@111Z9=0FUXTVWKz-s zVa1N+`+$JJg`zJZ9Lp9f50#9(d#vFFb~mfC-+&QNY)-XJp@{Eseo8)*e(kC7&QfSBkU%dm9t4$*ZV6Vwio4x(T26BWDddnu7C9s?4{!iM z223{T0+o_zM{=bwNED(Iku7MiC30)zknJ85fv2LJ#7 diff --git a/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF_es.gif deleted file mode 100644 index 21991dd5746c7752dcf53417fbf89ab68d4fc87b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 827 zcmV-B1H}ACNk%w1VUYk30K@=H}+>>+64if3mW&=;-J@Jw2$XsCs&O)z#HhR8;Zt@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VP--ZQppV z?|kq7z@TuLi$Erk2xrM`I-k&}bV{vSuh?w!BVa@*kdJswE}PHjw0g~MyWj9}U?Ta3 zKMsQDaB*7}ab_1D9~BjWf`o`134D4CYzvf&mV}0+rKn4zp~Tb{`$19}S?51Ro3)gB1@69tjH-fCva52n`7h76-`=%LpD0tEPv* z!WG)SuMZ!3e8R7Kc*qJJWDE!C&U(SAAD7kF*&Ym(9gGbtbOBi(c?vEZ`haWGB{B{? z5YS_xn6`q+230y$!2<#d3KCqLl%P+yLKPzaPNXzwrAQAK{vkm2;6O=hz4#nh_(2qb z1|F7qkQTI5t5+XFj?6fz!+~Ff_8^$|!RAy&4Z}RdBWA$@Z52J3OHe_UER=;3&|2{C zLQ_WGdVXao_AShw7COGw_Tj;T4hnb{>!?ue*=~*?;b9B&?IfEgJ?5k20Ulq5baL&g zRI|Z?z(B)}ElcSvS+ox-ymZU!q@m9hLhBm^lYs&PdMiUCgg`-qz@<7^u;Ad-;mKrD zuRc3T!8YV~HR`^cRg3~Y$igDfYq9ZAQPVseGA{pNG93F z0UvcTBpnoR5C8^LR%xY`0C;famRxq}<(FWFDdw1DZdrgM9soe40|pGhg#jJJDd(JX zG5`Rbc;>0+o_zM{=bwNEnx~x%%y~fp1_01N28=f9=%bKED(R$@R%+>`m}aV}qZ5Sy F06SRAboKxM diff --git a/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_OFF_ptbr.gif deleted file mode 100644 index 19932ad2e14d91f75d5c1f535d625d6217b1e833..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 981 zcmV;`11kJSNk%w1VUYk30M!5h4-XHhsHkgeYabsUTwGi(E-p+=OxD)ciHV8E#>Tg| zx9jWc=H}+;=;(icf7{#Jva+&paB!TQobvMW?(Xi7kB{*1@N;u>%gf8*;o(b5OT4_i zczAfKs;cVh>SJSLlarI7p`m+wd+F)vzrVlS+}t@iIa50000000000 z00000A^8LV00000EC2ui0FeL?000L6z{$i$EE41ejE#XMEwws3q!T|&c37-SaGM)np2mk;AtEX1*$xE(+#xQYs3qcVIs6t&01nm71PJ^FcAB%{;ZC63LCwswSxba6KDh#*mT@y` zb7ce#P8GHADnSksgeoZpDR7X%1|jI+>Z`EE8o>*()@tjm zxXKzquDtf@E3XwqP{FUYf*?W+D_o#L4a_#{?6c5DEA6z@R%`9G*k-G3vnOa^Ko9^s D=?t=h diff --git a/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_es.gif deleted file mode 100644 index 9acc363a85b980c650f992720c785e1b234646e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 826 zcmV-A1I7GDNk%w1VUYk30K@RL|vEA;z?#7SV z?|kq7z@TtQEE?P zCKR$ca_}fFauyDCY8M_K6%~Yqhl^;29v%&YZ5AFDXNGcjc?M-441awOa1NJ_nTLs} zsjOy(7Z(Z*ZkCvPw{V<#9j6}u+64;6+L5)2*;4i$q73m*#*3=kFy%Mr~B9ucpq zio(Pd+`zLEAANtsvwa^C$_*W84+`theZ#FEn%CLe9v)okfUFpz3(5f1Yj8o)hh3id zH98Z)!+|~)j&Vb{%n+tk6+A4k(15{4OAG-2eM3~C;>AmbUYhi9LEr*q5)`Dw_Un%V zhaXHGfZ(B-2WmxA#hUe@1ZK{w=kJ?fU0xzncxf0UJ7;8$bhqo%5PP-NU9QP#PTCo;qx?}xQCEBtYu)g;el zSAhz>+E>x>uVz>>)OVQJQVn!~7?P8>ebwplPDoR|gPkD{us5Cr5;*5TAF7e(P)Ijf z)0%oMO&HK@n9w8@L)|Ro&N06|f=x8#0+o_zM{=bwP$S?2?CUI0M?2tbg*qKr1`=%bKED(R$@R%+>`m}c7OMIitH EI~($RE&u=k diff --git a/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_grabparkedcall_ptbr.gif deleted file mode 100644 index e37d0fb4ed85d38b8ae318b4d77687903f75a284..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 985 zcmV;~119`ONk%w1VUYk30M!5h5e^Z%mb-UfcOn}iGbuAwL{(-|X70Z3nR=PsvE9t0 z%>T~+|JVPGagFrD^#9WT#-7G~WPShI|E`O!|Kd|35Q7FD5U@pveE^|JAD1R6|s`l(|GUM2KyO?Y`|@N?rfs|Nq(l|Ih!bh^hbp z0RPPYA^8LV00000EC2ui0FeL?000L6Kng{sD;kf;q;kn@I-k&}bZSIN7Os_K$L)H* z;IMd1E}PHjw7Sb!#C8=EZ%(h<@A$la&+q&HfPr)vGYAY13qOjBjE#L43Y7;4nU6j=EIskOF^o1KV?Jw63D0JM|^ueXY;j0&Zh z2>}5;#?hI%o{9v;0R{;Pq65%2p#usC0008#KM1c1HUd5gHa-BX0tN&Ii^z-U?l(55 zJplM1kl=>_d8oMg@Rm+gfdhZG=<41u1fj1DWBG5CQfB^YeEpqjOP|zdlO94OJ z{m`kCr%xZyekceKZ!v*JFc*XK5g1v5ajSGDKoFR4RGttOgBlfYD(9cjU@o*FDi(mY zkD*<&YlCP2)IUB8RqEGTF`fx#&3fenv0}!r9REa0j#$xRNn361eB%HCxuGwQ#yVg* zaMgHwI7=Yi2U6K>odp+A8}^Ug1Dpjo;MhBO;+#~IjxSy@Czn<<%|x3&s|fTMQg(%M z9cJK6rCC!?-O$uQu2psR)md7F)y`LngjIl7zx6cTOG^Eq)(r#{5Rhw=owW*81q{HS ziel+g94G>jgqIDoyrh;mc*z*dQxE2D{FtM{xDF>PP(?KL*h0vLcHOFON0lHL4X3|I!0F*qn*a(b$+OlFTxm3VI1~@e8 z=%bMOZ~>&0R%+>`kHSEu3MW*W0tqi*D(a}CPT<1?q*e-o1}&7}fe1asD(kGYMi2t6 zxaO+suC+$M>#x8D`>O>JSRgE}9gM(14I6xr!?VyvEA6z@R%`9G*k-Hkw%m3LEekXh H5Ci}_ZMDrc diff --git a/agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer.gif b/agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer.gif deleted file mode 100644 index b4fdfae8fe0eb85e6efbb6b8b98210353b4aa749..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmV+;1Kj*aNk%w1VUYk30K@e zo12cQ7Y?hev8IKNt%aqzoo#u0W^WfBX~St29tsF)6&@ZIAI;DZ4;~G}9*)vz+sM}q z9)N1#57>^#l;|JB*U1ox7YgB+3-ayR(ayx{&d|xNrT$$2CvMFzKEn3#OY`6X0S~j9 zx!d;8(FX_$0By?$P2C4@YLG#@sO*DBbsir7pb=S2Ap(3P733RsDBQCT;n?Iv1Cq_b zU~YzOlE>}Y#%9$F-L%H2f>Vw~J9;2s;i1Zwp4Oc7aLAhj2D8u@L&G!>S7}C{EzP)z zEL(8PeCk0MbY8rD6)PyXDs9+Hf8wwaJ9-nDz6+&Vs+qNw5(Enl9w_Lbm~26lXPxIS=+0tXge%KRXYYPGJr+hA1S{^o*Y z4jd@Bo}B71;|t-2p9R(2Ce3|m`SXCF1q@nHlQ_9ihsIB)v4NT~;9!^GMt?E#QcAKg z0!~U6c_beJ@+_DJ1JziQ7z7{EhaGCseAvK9+sHH9QmZXhP>0!-cE^xJ7HQ;>NB)uk z2L@!|0+o_zM{=bwNED(Iku7HX)T2p|vw06W$8bglpZ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF.gif b/agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF.gif deleted file mode 100644 index e5736ae0d003492fed8edc78dee85dea732dc9e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmV+;1Kj*aNk%w1VUYk30K@X8Z8kPGN=nbq&)M18 zh=_>3zPgTX`X1Ru59bRa4ehCBM8%` z?|kq7z@TtQEE}Y#%9$F-L%H2f>Vw~J9=L&G!>S7}C{EzP)z zEL(8PeCk0MbY8rD6)POLDs9+Hf8wwaJ9-nDz6+&Vs+qNwQUePM7#!fBm~26lXPIS>nfdv*`%KRXYYPGJr+h9E4{w9KC z3lo}B71;|t-2p9R(2Ce3|m`NM#q1q@nHlQ_9ihsIB)v4NT~;9!^GMt?E#QcAKg z0!~U6c_g0$@+_D}0@YZPSOXu@haGCse5k-k+sHH9QmZXhP>0!-cE^xJ7HQ;>NB%;A z1_5;70+o_zM{=bwNED(Iku7HX)T1r!hh06V?Od?)|_ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF_es.gif deleted file mode 100644 index 570a6e5ab1d915650a9360b2f4125dc32b3c006a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 693 zcmV;m0!sZyNk%w1VUYk30K@k)K&eGD-!^6WVDJkCG-fL@XL_|boWo3_# zkAs7QmX?+d4h|a|8(&{vdU|@Xv9Y70qu1Bho}Qj@adB;JZ8kPGN=nbq&)M18 zzP`SQh=>3H0L;wHA^8LV00000EC2ui0FeL?000I5U?5^-X`X1Ru59bRa4egfU>IAj z?|kq7z@TtQEE?T zC>3&j&9OK<4Hj({9t?YL9v5j501X}v9cGCi7anwihi`Xz17(?Kl>io%4{U^npKFt6 z91RT*ejbsN5~y(qmZ@x;dZ`Q^rDh0%9E~0b5g(@?5Uvmx5X_Da63iD59?@nJe+}BJ zW`vO+5f`(H4~iVPuV&ZS)Xj+!5Pt>Ly1bpb%V_||*a|2sB;ipk3lTgNz@~^$0fc89 z1ac%v5vW{gCRO_I?*T4B9y|cRg+Sf~1qvZyVbRPrQ*;9tYFXMQcD z7#B?hR}UUI>WkMBE&$l>R^_?CU;zh&Q*qVBL9{_L#T+3UXh>ybo)P|BK+vEM=8Fz& zcJ_=*;kdu+LINP{R}s(#^!`9%Ih!RN2Co?W!{oiZc{jW?5a7VRz5Dm@`*uDB*+@R%qdc3@%^+01PAmKn5U& bDB_4DmT2OMD5j|5iY&J1qKF6}5CQ-@6hbN| diff --git a/agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_hangupcustomer_OFF_ptbr.gif deleted file mode 100644 index 57918268a48e7e057b24d7d1b1502d9e88867e6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 811 zcmV+`1JwLSNk%w1VUYk30M!5h4h{}qUtcLHDMUm>Qc_YI8yn8f&ezx1adC0O!^57Q zp3>6NdU|@JqoaR+f3dN#WMpLJ<>d_x4RUgF)z#J7+S=dW-)n1YR#sMngM;GY;y*t> zPEJl{W@hB%P4$;ruCSy_{llWuNqs;a7#l$2#-QC@_ zwYAaF(QR#QmX?+_Ha5P#zT@NLN=i!4&(GP}*@%dU0002Y%*+4)000000000000000 z00000A^8LV00000EC2ui0FeL?000L6z(~Y1D;kf;q;kn@I-k&}bZXR83>H?!#_f8) z;IMd1E}PHjw7PpRq-+#dZBDP-@A$la&+q&HfPr);Bn$@&204n0jE#_o1KWeilQ$s1ULeysyQ$X zz_E?Xzzi}kH^7m-p4Os^FF4f!0HrcH3VSIS--)0j@HlIP5tw1OmE>&W!8r z@8ac{H_BcE0XPa&BUn#Sg8}CPj01-47qD&oR52(Opi~Y31z-dqAj26ghy;q^$WiPC zLKv*-F<8`Z(McRBN3m4(@*{x%7XSdrXxY4$e%ggG-3w7MVuZVwkU%w)u8b){ z$Pb1nm|9^ao0aug4z9|);(*}{hP1R_Q`tkiOR2V%in`qpb%QNTasmd&zTS0awv(5;NgYvo2x$|>7LRm8M*ive_ii~<5+bbCPKqNsDa>I$*~5qvllxj~t^Pd$H*N&Ae?R|zNDrCCpCr9dP{Rr`B>m3^wTCgAg|8 zfCQvW5aERkPFNv?CTtK$0)`-h*n$WbfS>{j`K74hiY&J1;)^ai009IJz-VKOGSYbC pjy&F&!3Y?X&;bWD6lvs z?|kq7z@TtQEE_M76Bd)7H<|F4t{YS7i$y<4;}#>XpA2h9(IL_ad~@YoNAZ|7MKujhl!zW zmT40Y4-kPKl$HXja|D^IZk~L+4j!jy1ceij9t0F0sUH%s5*HHAkpTkE7Z4uPXaa%{ z+^uMblphoqwT%#s6S}cz+1l36i~;qeBrC zrU^hOQl&;|FtKW+F(3q8g*H3Pq%5 zLRJJwonl0ztz58>95YFB!1r3Kr?Do3pe3 z&z{}j>lPWe&aM3H_!2tH_uu+Ja%B_zh>cJ?&x6o;LOX{ zXWqU)&BVaS`t|bdyC;61I&yc1BSQy6$*ZOZ1q=ppn_C&AC3bvdPS{d+Pp2!ojM?KT z1H&mvj!O#|1Zud1pK%C0X|!Nsydx>V-jX^&hK1!t@UsawPfgQLW}9hwZW%M916PPj zRPfAZMs?;MmX43|2YPL;nretIh!J35EnrbdIG|{|f`yBTGw1_bkj$I^S!NN}if=|L zWFFrb`u&@BgERw!M8@swDGXc0R@dEbH+{-mXj#;h{Wl)lddljb!1rd;m`N-?W(UrkGfAJoY`3{sJ!;~WOQy|Pt3e+J9hIeEJqnWwWC zt~dWzv%i7!+5Id>3AU-eTT9bLlb=i}_7hN$JaU0wZK2B?Z`0f>7vniEDn~Vc*x8)u zlbyRGPJnO5k`MtkwJ#wd!KyFLCy8CHn9N}RM_@*;`Li9$CjK*zEjIaE^WZSImCDK| zNt1lcUOt%|U}nk4`ou%v=~N%TNYyEdX95_fB{Xq1vumz6aFEM#*~(|La<;vEHapKr zz>!7ZKxX>vqDz&}=hfWHWad>ZxxmC_Et2(OVTanP7mIq#UcFd6!AT z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5U?FB?X`X1Ru59bRa4egf5d>SV z?|kq7z@TtQEE?T z8V_=PkG}XX2pwk;7Xy8N7Yh&{6c-F;3yEqB2p16vXakmLk!g*Od~|nt2W6pq9twU6 z9+(uV3TUZ*5*`;H2_A+K9ukXawG$T}9-toztQ2R%X}N}{a-(|Cbhc(4x*xm)#b?%L zwYa*xzG>Xg4hjfn47wf>%O1_y)NsZE*0|OJq5L5+RXJ*!gTI+JL@}MluuwM=p zK)4Xg3^O#&^1ZodO5+=1#1t56w;;hV2L)Bu5qp-)RxdRd&7l0?z*d3<-9E%LlhGp^ zjy^x$0tRwr!CMrNEy}eH=Ylji1$_v33un=xJHcgW6PdRySDAyxK}%xqep*4Ea>#>TR;vVVVnA0HnsE-qYLT(`Hk?(Xh$b92kf%RN0kR8&;e)z$Iw@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VO-vwcU8G z?|kq7z@TtQEansmheE+=I-k&}bV{vSuh^`1`}_Wz}S~ zx4FB$XWPyV2Lxmbxg8S9%-GXz(WUcn9S{Kl5X20r|J0F@b%B;TT&p@HJ0r{&!vhR1 zz#=0op0j&v>gB=MX4tR;h1el5AgsZ_RKuLy;i|<8O~o=MKQyRi00FlTFUvIJn9+_j zo@~68q2*CtwF$=*;ZkQ)5~mJsV_4+kUSesElApRf}Z-A}nAew0)VU@lQ*PLSR zAW2x!vPHx4BwV<(>C<%V0N@}XgX`C@W6PdRySDAyxO3~?&HJ^50)++?@Ibt{@#Dyo tD__pMx%21Hqf0j)Kth2E5-@1r&b_<$@8H9WA5Xr#`Sa+x6Ce-*06SAnAT0m@ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_parkcall_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_parkcall_OFF_es.gif deleted file mode 100644 index 110ce6b01a093bac934c742c76f268dfa7e76130..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 644 zcmV-~0(<>ONk%w1VUYk30K@+9&~=-b=dzP`S4a&mZhcuY)8sHmuGYikb= z57yS!iHV6HA0OuC=3HD{va+%+E-rt6f48@{$H&L+?(TYedObZo)z#HhR8;Zt@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPlvwcU8G z?|kq7z@TtQEan0ZNFcyzI-k&}bV{vSuh^`1`}`0X0fFN~E}PHjw0g~MyWjA*ygYzN z!sEI6(P`-aXcrwH799wHYK4c0YIS#FjAaXb9UhT?f`o>bW{R9=j(D659i$Ir6BibO z31kckeG?xH7YU^c2OSC)WVRg_3m*v=d=zDwp1#1sstOGVg3HRm3w#Z^htrp#ke3k( zAGyH@y2Bk76de(^7n%|1xd{=5qzAdYf(N|EgNpU{AENQ;@Ia7-f9EvSf`tI#K1ST~ zFq-fSfh}I-T1{$4q2Vu0mOiNaKmpx{2^JIo3JPWh*(Q`119k{Dk{mCXDrX9Nneri` zh?jhI7#iV2#t$1OG+6i1lgOeaDZC<dPfKNN8@#aD6AXlbUO?&%h>T2{HD}xFXFg%Q4S_?C&BfZTxwk||)m za6rKVr?_kUPVBf?`gk;ZMHVuZs#>avtK(-+wGGXo4$h!2joZqhXELp zD__pMx%1_b3p}4ry}I@5*t1)w0KkA303O1NA5Xr#`SA=2FgVY?z5Dm@IWA&%eL_{{RLk;D7`cXyAbe@@G#02mm|$|0|LJ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_parkcall_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_parkcall_OFF_ptbr.gif deleted file mode 100644 index 25a6a2f2ace8cab78ce6f27644c31bd8aa2e3449..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 830 zcmV-E1Ht@9Nk%w1VUYk30M!5hmX?-8L_`}K8(&{v4h{}dQc@`?DWjvKv9Ynv&dz#z zde_(2!^6X#o}SXu(s6Nd<>lqo)z#YC+NYP4 z-{0Te-Q8|(Zpq2XprD|&wY9{=#Hy;QR#sNc&CQdOla!Q{c6N4TWMqPZf@^DQ(b3U1 zHa2Z-ZR6wPN=i!4&(GP}*@%dUzP`Qy007L)%m4rY0000000000000000000000000 z00000A^8LV00000EC2ui0FeL?000L6KnO(hDjJW-q;kn@I-k&}bZWFn5}b}i#_f8) z;IMd1E}PHjw7R=UfMgL?Y)-G+@A$la&+q&HfPr)+BMJ)+2{ww0jE#ursI`u)!i+U7F3AYR z!ndBT0|YcSGywpp3N-8Z_3TnwjpN*sfo> zs;c-2RJ3VZ6$IM~;6TfE{4!2PsZu4vz^rH(Fi;L|3jqL93%;lMr=psQQW6j_R z)7AsT&00LwqAIkc3K~bpbDVY?lu_}f&5l@8hyk@jfKmRnW=t%sARx|wHnpSB0Rt5z z6n)tEMiny{W(W#i8b)$kO9U~95ZH($mT2OMD5j|5iY&H>A_joDC}WBtn6SbJ6HqY2 zjy(40RLNfue?MhX2?9|K9)IvEB5;^#A4m|IYva(*IRN zReoiDyOz6mUw07>5$?Y3nR=Nb8zPNyjWa1T#-7H_qs@qIh(tC-?Y`|@N?rfs|Nq(l z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5;2~;cX`X1Ru59bRa4ee}LJ(W7 z?|kq7z@TtQEE?b zC=znL4e&(vfNB>W9~K@Afoz6|iEMXy31y9D4}KmUlYoPThnZ-Lo@tMInGhbP0A>{z z7K06D5DtD79}pJ}rwyS{@8zR84(_ws$1*2e>YK^6k0<8(_F1BLw> zd6U$rLNErne3^Sy>0N<`!8l?1!0tl0d<0_LIUgby1(bgU4eT}V(QkDe6cz}QYf|Lj%mqmK~DcQ|8N?K%wC!>tP^37rIu zf!kdwi=wk&NI{=>Q0LW?=3y>Ptep7z-Sib{I#&o8HgJeItwcPe5_RZ%W^w~_3L;Q0 zp!tFV2M?g?;^nJ@tOgO@5q_DKf$6@f{}#si8uh!L*$&l?trqgPP-$=iA5J{bC=LcN zC|}OJx%21DCoh0by}I@5*t2WD{!u_m*B!!(A5Xr#dGP@jKse97z5Dm@rdueFVvorshK0RaFq0y?Iswv()`#gDNw zGR-o{wz!^@0K$p}GYC7V1*8W%2%`eu2+RTj2-V}@;@lY5-j(j@y?U+$ufdB#mbpWU&P1huWk7N~)H^2a@YN=QWkTGgT zwUQ@^v2r;o1_B);br@9C4S>A=X98V{{7I11jH4S_$;dIoR8RoDcJw4F3jl&{G8W96 z)bW!fkc$kQT5u|r0h=CHP3quS1G0ge)jn{Y?Lq5_V(^ec;**tpeV zD9hRNULE%mhoh*I5h=(qzJVq7_i^h+ z24n~nAUbuc*O0$uhB`nXvdNsLO)}660MvPzQL!4(E#Zo>&1D%7%nSnrKtO2N35ZI8zQxl@4x<1N z*g>)ka1VCq6*Y@2F}x#pi$bEQ;|@X=0ti|}N>Q>OG%U8*B3Lfo!bu1?fI!2IIOeG1 zjy(40KN=1u9_BK@LzxDdm(@R%zvxSZ1l^mRia{0heG-`GN%# ktZ)GfHKeKLnryb|=9_TFDd(JY)@kRRYN7za06_o%J1ez>lK=n! diff --git a/agc_2-X/trunk/agc/images/vdc_LB_pause.gif b/agc_2-X/trunk/agc/images/vdc_LB_pause.gif deleted file mode 100644 index 3486a1c1a2a6e5ea87f0f093eead6eef02fc5787..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 483 zcmV<90UZ8ENk%w1VMYKF0K@QTIzV5!G%%dqYDH|di+W*>?yOuUYHf@M)N?l66?Y`sx{O7Z($`wdZ%AfJ9lthDe?;FT|`Id$+8asag#H zSOF#K7nxwHSW)xPp$a*33>Y}50IJ;qOcgp{i2{%>UqLkoyCkdvYE~6ovmE?+Wa>+7jhyH1&(k?EEem4J~J7Y&w>9t~}UTZd|79u|S0 z4G|I^4^x@4pBAtm4;F=ybZ1|PsHz_dmJS{Z9Ugd?pUi*@ipW%v7ZuizrN5_Rii`{n zksS{nlg_k&xs84hpz6(C+G5;`782~97Z(w?v*vZ3en3^bW++}FVR76w!c&RVtOXLN zcmmaHj463sQdJ2zWn4K13=~xG#7=;v3Y$P+NywM4U>b~DG)lZR#a1i@eHxK+;Hgmr zc99gi1ZKtz!730cuq#>x4FV1cGDw|DwW`&tShH%)>R>CcCYHEpzi9J0%R8&;e)z$Iw z@$BsE=jZ2{nVA3p0OjT7A^8LV00000EC2ui07d{3000F4P{~QFy*TSF7h7N`j$~<` zXbLjJA~0|)&vb3yIQ|TV%RIoKa7Zi~kH}+U0PrQB&}ekod_4_^>;aGf0uBga;Sd}H z2M32EFbF2HgelXR1UR&g@I&or1Jgl(32FreYC(2ua#cTd4sj2F4Gwk%fex1s1P+!D zUw&B#4qZ=FbVzoPfTC|?f0(ZigLhnRoRbDnrdE!4mUj<^ps$;%~S<(%Y7YSm@ yoJq5$&6_xL>NL26K!cw^g9;r=w5ZXeM*$Qth@h#{r%x;#z07+S%D{Ikv?s){Bvm@#)j247h>fPZqGG4u}NV$-w%5 zfofk$=Ddtm>vCT2`yg?oAv#ukPy*1*6dNsk`UlL=c4 z{w=xDl~^q#q}`NVsBIwSa^CBT(N-O8F6WO5UJ1`jGK6@l9i7!mxm+1|U8_Xx3yVv$ zcsXr3z4}DCl}kBFQ`=SDS#u{;F)b+a3rGmzT%N(6lFQaBI|g(L1_;S4t4;8fzSlPQB# zfngwl&6_xL>fFh*r_Y`%3m72Kps3NKNRujE%CxD|0ssO4KtQ#s)vH*uYTe4UE7b@9 EI|81q{{R30 diff --git a/agc_2-X/trunk/agc/images/vdc_LB_pause_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_pause_ptbr.gif deleted file mode 100644 index bea56d65628a5056533247952e994e5f4d8d2de8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 989 zcmZ?wbhEHbbYl==_|Cv^^3TcKj@-p(7V``7Z@jxv%S3D6yM5I&t7VjBT*F+0(t{Ez z5;|6Oc*S~6+da+P)qKg>C5()WXa1jI7zLvtF!Vz}@h1z|6FMLglqVQCb}^`O$arj6 zaIl#}SS#klhJ}aQ1(dz!cx+sBw40eR;f_b(Q<&w9ODKjaf%%j); z*I##EzV5zpjd7mFo(>TX8zLK0W>R{Yda~ZK+W*=%L^f@RZI-*1N?l66?Y`sxkLQzm#ZQppV z?|kpu3V~yz7;uirq;kn@I-gLafFLOfKG>{w%k6r<;BYqJXjsMQv|3Fz53bxqWj?oH zCG`0MyLfmYb{}{NcNK(nSQm4Ld4^$aXIvM5a}XYO79I$6dzlp$2$vt37g(ep9-4fq zr5+D?gkX?wU6X+f9u=b=rCJpp3?B>?oxG;TxxgQr$hvH0kz11y7Z;fkyB5_K6CVq% z3msXfyRDfWxTl)iy|U1>lBx0)!I|=+!}1V>8$aZ)P;>?Kllc7@WTb1g8gr{~wF`!Ct zs~4VYz9hI1E6dso!Q!HU#34Y2zkmY^9!$8f;lqdlPdH$QzyYR^BTJr4xw7TUm?c|? Zz&HYi&!9t#9!C>n~0{{>L06T30_^bc` diff --git a/agc_2-X/trunk/agc/images/vdc_LB_resume_OFF.gif b/agc_2-X/trunk/agc/images/vdc_LB_resume_OFF.gif deleted file mode 100644 index 0ae4cb9ad8838d1d853f5e494d3f9f5ba5a0753f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 533 zcmV+w0_y!oNk%w1VM_oK0K@uYOkx3{;}*4DDJ zvgqjOe}8}5+uIKh4<8>NTwGjzj9tj@_6`HxD!?wL2n8mkfuw__~5EmDg5V#i77ZM)_s|Ouc zq`0b<9kryF*t)M`jzkfE>NzkmY^9!$8fVZRat1b89CXcOga80Le(>@_ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_resume_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_resume_OFF_es.gif deleted file mode 100644 index 921d5d5e38e6e3ce11a6898e5511517585050892..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmVn_>yZXI(+5)D8fyS3nP;kwaTU@^5el38LJY#9Wp(p+aEp z8n7S-gKT034IY4L2^cxBb|{-22ek1DsjpE0e5ArxNjM@_UPK&BxUk{Fh!ZPbY`B0K ly$vEuo=my2<;$2eYo46QF@n#aLyI0wy0q!js7Xfv06Pnd%zgj> diff --git a/agc_2-X/trunk/agc/images/vdc_LB_resume_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_resume_OFF_ptbr.gif deleted file mode 100644 index 43bb9235492045f41452893cdfc8e1e7f78f794a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmZ?wbhEHbbYl==IKsei{`UET?g9Y;f$iJ3S65dbKYm)N$z^78UAF)_Zr zzS-H?kDorCIdf)QSzPPv))gyO*xA`_Ikv?s){Bvm@#)j247h>fPZqGG4u}NV$-w%5 zfofk$=Ddtm>vCT2`@nIeo;%e zTkKuKvEk&7z3MCa1(}nJLMDl(v9ocx%$&U|YUWLr3(NOk-V%OYjJ1-jqH4oyQMMMZ z9Wyx&omtxPV%mz$3l4~?a5JybI63LGlTkf?`qfnl@8Ty4Id#OiBxWsk7nQZ|Qn~oR rqnT49Sawy+$xTa7Pd7+rt6+G**gD&y_|=`0o0p%T?~vcdz+epknKqsg diff --git a/agc_2-X/trunk/agc/images/vdc_LB_resume_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_resume_es.gif deleted file mode 100644 index 1b096144c2d29f00b803c8f5331b20b2afca3d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 500 zcmV|Nk%w1VM_oK0J8u9S#Mbs85Gk0(y-jHkF$@KyOwQ;Z8k(UN?l66?Y`sx zu?PYq&vb3yc&_jBGZ-(%V@NC-kI1BQ$s{HUz*uuityZ5=A+d3AI1qzj0uXQn z3`D>IAU+(>>xaQjXU`kM!C|1MyYmQM2Y60UL0e`90A>jfT?lgyY>r-y4PIyt2XdNq zoB@pm4h4N~UOoW<00w1*4_Jposf}_04F(QqLtSB}cxt&1nw$kjxWS^uL|tf$$_c53 zS$UF2fnh_qaBggG!Nb}G;$gUCPorto57Ft^uu>1Ax&zlh(9RTCvC5()WXa1jIAPy-0WC1JG0g)g(8Cd@>Q0Ys_oR_g`UC!%$ z1v=+Ta_=iQ%x`-9MoadTVCSDMEXoC4T0jmJ)+q_U|~7G@0rX<7^``^Mtrv6ZyE(h02u*1giu?Cr7ZccB&_< zdAkP-a`1He&8|?LBE;Ai$Qc_a$lc`Zx`d~sq+->&wVm_a%Gp*Q*}Ox2aTgy`T&{nw zU?Mv!m;ID!TSKQ@VLZKP*SYmUmxNeKSc^+nKNDoFcilXNZSU~~nrEK~ajooD;phlz z;nL+i@=3LXRols;*1_Y;4?)4Cquq`MSuTQEkKGuK^EgO&Zd!73vPLlbs+f~PPR#-g F)&Rd2gq#2X diff --git a/agc_2-X/trunk/agc/images/vdc_LB_senddtmf.gif b/agc_2-X/trunk/agc/images/vdc_LB_senddtmf.gif deleted file mode 100644 index d19888ad1b70cd3e65fd2d38e46267353bc872bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 567 zcmV-70?7SGNk%w1VO;B-v9K&^oVVU)2Y+{<^TWA|NqkeRYX<)*Z+54 zca3q4#-7F^8zRi3%n=R|nR=NsDKp-(-tNBcW>RMV)&Hb}q+Lo~|KtDdzU}|n|Nqbb zs)(vYHbejb0RPPYA^8LV00000EC2ui09^nQ000I5U?E~;X`X1Ru59bFnh^wAZQppV z?|kq7y@Y|GsT?-Qq;kn@I-k&}^l2bK5(mR)%k6r<;IMd1E{g?>1y*ZryWem!TAdwF z2Az&VvQ^~&5FdU3eH~kW9S9s>et!d75QupWe_ND#ACZU-U~_9@9Uc*(4}77BfuRi( zAE8?w4|xwBk6ou74IYM?u#+CYgaf~Z!lRR&X`f;q4O_yGu3n)Y3auWmh946R57O6L z2p*i+T)MQarys(EW1e+l#R?F7)|=M30MWW!>$cw?0M3!amgfVleZ}%rLq>;<7zqOu za9eciSg3#vB7EED%mcea{{q%Bn2qE*aR^1UDGcMz;TH)FD3mi4&7YuO8%u^_#igdO zMFUAX(A6#FN0!Onh0#a>j|Z8d21p%{>e{wnuNp`VCDWf&3e382B>7<$0Z=2X}qAcN)0m@{kM z%(=7Y&!9U?0Pu(a01l{At6t5zwd>cgW6OSRVE_fv6fWrA&AYen-@t*nU>sHmuGYiqKy zvVVVnA0HpLx3>=u4~dD1E-o&{#>Upx)?8d%?(Xh$b92kf%T!cU)z#JU@$u~J?C0m_ zJv}{{nVA3p0OjT7A^8LV00000EC2ui09^nQ000I5U?z@aX`X1Ru57Cv6s65{ZQppV z?|i=-2Zh0~DH@N+q;kn@I-kwY;9&q9KG>{w%k6r<;IQ}`P%Ns~v3kvJhs$RxSR&wX z5)o{|&VPLN2zne?d>jNFTzh;1SPzAE4SZOUcOQ<04P9_(U>qJ0o(_4Qg?^q45+9ye z9u9U69*kO~91I?Vm#vTE&jH_Fo9to-*tb-pC3=YrKSOgxK z)mgW(s-z#kfnb|*U&09wdDEEFwg}F*S?IIe9|+{()$DwTg-@6rX~p8C`4T}uf^3Lr z5%c7a0R(RNmU&1=h@U@M1FeNb_pRWkgI?CKE#wk`!31%GobCI=3!_L+sj|rYg$Q8C z2Dh}CXo?h;IIw6^sj3Gb3A`n)eI-@IDdTTWy z6||Z$xdFvk(?NoqI%|3$5YHz*Z;Xb%LF=Zl;lpGIBVNq74IBU)0$`X-xw7TUm@{kM z%(=5>3k4VrDA1v_>C>oFt6t5zwd>cd1xzSVVZw#mxO3~?&AYen-@t?aCO{wr06Sl} B4E+EA diff --git a/agc_2-X/trunk/agc/images/vdc_LB_senddtmf_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_senddtmf_OFF_es.gif deleted file mode 100644 index 2d32c5e96ebf85c685d86208da558b548cce8fa2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 563 zcmV-30?hqKNk%w1VO;*nU>Yinz=va;LT z+vw=%e}8|sx3?c3AJ*2^E-o%yTwKS;$L{X#;o;$^sHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui09^nQ000I5peBxFX`X1Ru57y<)3nWWZQppV z?|i=-hlIhvDH@N+q;kn@I-kuCpkP=WKG>{w%k6r<;IR0sNHD6`v3kvJhs$THw{WS~ z5o>ybZNCUQSbcX5cUW{61s{TVTX1Mz79J3GjAIoR5^Np>bp#$3iWd%&7YG#|sDY@U zo0MFRa$S)XTL_2*1c??GScDyV9|fKcdvq2Al^-6w9}f-$S+iKD7ap|BpUTW$uxVV8 zlXZ#JrJKPXi4h(Wvl5aB%O8;h7PMLMSkm&=)1RNGkyvr6v!{`nN3uwXQ{>?RLo5z1 zJRlHZA1w(L3dD<)XbV1z`S^VRDB!{|fXW82UMQ%g8zhlgs;LSoZB_#Z5a99Br{!Zc zhag9OisT37$1W}tMzFvXl+1_C2t*8d$%6oOJ7L~)z_eOLs{Jf9SY>n@(u1+Sp<3$! z>eCPEI<_0-hrk1#_tqi<8Wg3c24%q{bwjwY;j?kP9bU|M4V(oW6l9o8xw7TUm@{kM z%(=5>2?GL905G6~>C>oFt6t5zwd>cgU0a9{Is%5*nU>Yinz=va;LT z+vw=%e}8|sx3?c3AJ*2^E-o%yTwKS;$L{X#;o;$^sHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui09^nQ000I5peBxFX`X1Ru57y<)3nWWZQppV z?|i=-hlIhvDH@N+q;kn@I-kuCpkP=WKG>{w%k6r<;IR0sNHD6`v3kvJhs$THw{WS~ z5o>ybZNCUQSbcX5cUW{61s{TVTX1Mz79J3GjAIoR5^Np>bp#$3iWd%&7YG#|sDY@U zo0MFRa$S)XTL_2*1c??GScDyV9|fKcdvq2Al^-6w9}f-$S+iKD7ap|BpUTW$uxVV8 zlXZ#JrJKPXi4h(Wvl5aB%O8;h7PMLMSkm&=)1RNGkyvr6v!{`nN3uwXQ{>?RLo5z1 zJRlHZA1w(L3dD<)XbV1z`S^VRDB!{|fXW82UMQ%g8zhlgs;LSoZB_#Z5a99Br{!Zc zhag9OisT37$1W}tMzFvXl+1_C2t*8d$%6oOJ7L~)z_eOLs{Jf9SY>n@(u1+Sp<3$! z>eCPEI<_0-hrk1#_tqi<8Wg3c24%q{bwjwY;j?kP9bU|M4V(oW6l9o8xw7TUm@{kM z%(=5>2?GL905G6~>C>oFt6t5zwd>cgU0a9{Is%5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui09^nQ000I5pde;sX`X1Ru59bF)KC=EX5VTmtT=|VU!hK3X2E`j20JLhaG(%384>ucNPekA0EFS5Dy4kwp*$f9=Fb-&Cg-8 zbzhX0c#PPnp2QxE5*`z_6O{_iACw3dw_NmF)%DrdqC}~p^y(8HKakQ$5_hUxBM%TB zZh3G40s;yCZcV6=fF31AUiM|=_wU0%0~eIB4Qyuc0>UofYL(=Itrf{?wj4Z&Fz;8t zE+Vl-9BEP%r9dl1f{8iFg9HmuN7a-F4FN@xnmib2=X0jM2T-wL#0t=Y16N7CEmcUX z>8iI>r+#P$5}v6*2q65__jcJ(qANo=NIQlpoWqC{ubmT4vE#>WB5?qqp|a)6m@{kM z%(=7Y&zvV57!}|^htsH2t6t5zwd>cgW52c_VYCDcxO3~?&AYen-@tT z|Ih!bh^hbp0RPPYA^8LV00000EC2ui09^nQ000I5pde;sX`X1Ru59bF)KC=EX5VTmtT=|VU!hK3X2E`j20JLhaG(%384>ucNPekA0EFS5Dy4kwp*$f9=Fb-&Cg-8 zbzhX0c#PPnp2QxE5*`z_6O{_iACw3dw_NmF)%DrdqC}~p^y(8HKakQ$5_hUxBM%TB zZh3G40s;yCZcV6=fF31AUiM|=_wU0%0~eIB4Qyuc0>UofYL(=Itrf{?wj4Z&Fz;8t zE+Vl-9BEP%r9dl1f{8iFg9HmuN7a-F4FN@xnmib2=X0jM2T-wL#0t=Y16N7CEmcUX z>8iI>r+#P$5}v6*2q65__jcJ(qANo=NIQlpoWqC{ubmT4vE#>WB5?qqp|a)6m@{kM z%(=7Y&zvV57!}|^htsH2t6t5zwd>cgW52c_VYCDcxO3~?&AYen-@tA{!#^zV6JU%y(aRnR=OKQf7^DjmDnFgK2|ePGX2{h(tC-T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zCK7VIVYyr$3m*=CgclGW2!0J`5QPUFf`xvEXOa(#gOZE~7ZC_&e13qHg_j?Vgr*;V zkr8Htl%buUZ+CeHWpEcB3cCplnF$_~9|yt~XBNDE!U(~`hG-rMehR~g9t?$M*4iE( zhYrHM-;~qU*UG)t35(YV-^lRD3k=KUwRn1P*=EYfW_F!f;2{D72FX0o>fiz3Di3R} zaf3K7%|9~>5*#Q74r77@W+Z;F_CXn~i|@Yw{i+zDn%C98&vnbO{cio9MS7%OuhoCOvhFh~HY z=$W+$AQS{@k3mkiYR<(o!!*@HG&x0P{iL@cPg+*F#+9!MFpQ}z`2%5rQX*4k7#?{G zjzJRFNBOMdX%Rs6R|8?0L7-I9Igky9RMj07lNpX#01s#1e6m0U!Z6?v0{Ixc_! zG6Epb!IMx%Ddm(@R%zvxSZ1l^mRxojr3Ic)Pyq&HmTBghXr`&=nryb|=9_TFDW{nS I91sEkJJ-f+VgLXD diff --git a/agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF.gif b/agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF.gif deleted file mode 100644 index 3ee4ca62464a9aabe253bf236ac4e5d1f24971c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 778 zcmV+l1NHnzNk%w1VUYk30K@U1UA0O7% z*0;B}YinzXiHTfXTYIkI-k&}bV{vSuh^`1`}_nNj|k*LE}PHjw0g~MyWjA*ybO>` z!eh6>a=9=N9}9hh7Y!c;eF|j_gaaLcgnfo(kqnB0k&6Qt4h3a1_+o29+Dpez!qf|x_!U}zrlrO9tM2}!G|6Rgk;p%9v+4Z zz`Na((bLt)yVM4X)dk(g?#2iS$>X$kcyHHa$i`&3We|99kRZV^53@RW@TbZ{nrhk{ z#yiuG3<3iKhIzASzyKMDAE@ebP&ClP#KZ@5m@c)zHjMkXJq7U8r*wRjn`Mu_=nqoYDv%b^gHQ$Z*p2SU8LK-6hfQD1o2%!70wUSeBHM zuIvyNnW4_D4FeR7`Q!x)*exKqXy7FMII5k~|Q7@6fm<8@=){Q3!H~>rn3>DDd0StlkpnTmN zFbjMR5*A2*35b$kOmnp8;)^iG7-KCFZ~#CCIOeG1jy(40mTBghXr`&=nryb|=9_TFDW{nO I3=jeUJ9?XCO#lD@ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF_es.gif deleted file mode 100644 index ff9a3447481573b9d6e54da199c844ad7a754bf2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 788 zcmV+v1MB=pNk%w1VUYk30K@U3x=H~0`>wkZL=;-L%+uO3TvhMEgVPRoA^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPb9wB2~F z?|kq7z@TtQEan^yiNnEZI-k&}bV{vSuh^`1`}_bB4oKreE}PHjw0g~MyWjA*yd04{ z!eg{zVdx+ZbAfRe7jYg49UTIIZG>}aCLWLX$S@d6$Azhf}w1XZjuBQ1qK9e zq;Lm}A08fYmUw6$9kU+{0v53Z9T$KJ7X`rbC3=gSU~201$rkbnfdn0 z7)&xUPbR9_P1^yt0}+s!XVS()xj~R!MK0Udm$zmo7=}I#lg&HEPyu;Urb4 z>5JjOLSo5&NI*aUTEyg5mL+h3VqyX2Xl6#etTpAldxf!f{dctBtOpHeLwzP8V>6oi z88D#0p~i@w<1$oL0RczLgcvNZAo2n>uf)Bb;?A8Uy~L(a0W*6$T!HgD1^9FiUufK- zB#~Y|nV5|6G<)NG7S| zl1w(~0+o^QGo0suRf`d+O7 diff --git a/agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_startrecording_OFF_ptbr.gif deleted file mode 100644 index 221057781e3724d1d457e17ae173cc85f590ddc8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 783 zcmV+q1MvJuNk%w1VUYk30M!5hmX?+d4h|a|8?mvmL_|b-dU{`9U!$X=DJdz=&d%4@ z*HTha($dny!^57Qo^f$;<>lqo)z#YC+F4mylarH9PEMeppxxcw-{0SlkB{W!mn;DV04=4w zk-#&r%#*pE(Tu1DEi5!FGBqp(H3QlL#0Ca61*{0c1qQ~!HL|vfEyV4{2igIqGrsu; z258VAph#RRd+Ok|V6~uIHAT~QJ@ht8TLERJmJtvD0D%CCH4qq(Wl9+VXv!2F004lP z$rdvL03bjk9E}+@3`%al2! zSJRuoQCd~DK+u%{Qdi+x(6qITYK^M_O|d|rC}7g1NuBzV3Uz8#ZUG1s$l7($ft!m^ zrL3{A#e%LeWeos80~-yteq{t6ESGN1!qxCj)T@XuP>&QTx4_64v?6237J}`{f+N{Q z0t66LHskS6+Z;===6v)nCu*ZB?#(!L95JWc2+VdQ!vHG*3xX| z5zM2^GbuBfdYSIN?q*VE-Lc*O*Z+-ijmDnF|JwhEZHT*;yF@lbT}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehDU>MY< z?|kq7z@TtQEEU z0~1M^?RY3W3=4LHbQc$N9Sj~G1%hyfc93Tl9u0GNdIV-`3hk6v%f#vl2|o1E#_hv}3ikr8!KG;pxit^~ zRcJMi*aK||LVZxcV4^v4-^>{rR-u811d90oNgPG*5SoYuvIRrqftv#hIB%|GB-5aW z2Nx^A?8z}1H%J!~WV3`((X2apa;16rvZA_O7RaePS&@>xVO9;gT%h2=nFSW^skD?v zoUCLs&(u`82q(C13*Z`LaK;{9xRh))sCJ0!2fth?#f6$_Q<`19D8=(|)k9Vfa=DSC zQ~_r&s*uQ<{m=kG0kw+Hxjc*D!o|e}(%syg+L>$1d;1n^{W>sd!XFGH=9XFwL&s@4 z0aT#CLBx&}sm^`asse+Ln8iY1UZLcLZD5OsQ`Nou$$N`atr~_FH@O7peHIA%K7P@; zNKY;eP8_%Ks12>r#~;P4^Nb+UX@;4RGaev-V0MO3vIsF9aA%o#^h~%21jA%h5E>RJ z!bmWwad?s{d)-rja~-1C&jsp0GSD`eskGP`$CaYvjy(3rBQ6{Spuvzt7HQ;>NG7S| zl1w(~rwPdN~mRxq}<(FWFDdw1DmTBge6+BSo0~oaF=9_TFDd(JY S)@kRRc;>0+o^Qq!0suS8{BPa> diff --git a/agc_2-X/trunk/agc/images/vdc_LB_startrecording_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_startrecording_ptbr.gif deleted file mode 100644 index 15b25990c217f66c0c06cadaa54da9323734c84b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 784 zcmV+r1MmDtNk%w1VUYk30M!5hyOz5V4iO?7BHgjwRYX;HUw4^$narci?!N9bDKr1h z|Nqzj^uzT3(*KQdjmDnFW>RMV<^TWM|Nqth|IPool(}zNZ{oG$$e_rEYli>b|5QU% z|Iz>T#Py_uq}8g`er0}QPGbAX`)pQhxRbcEkF$VgfQfF2|KI;yN?iZq|NrFwPd`u5 zr_n?`H{o1KWar=yPm1CIv>mo5PY057Gy zk-#;t%#*pE(Tu1CFD^DN2sbVUHv`%N#03R62CNCe1_j2!H?p>hFU0M}2igIqHNN== z1#H+Lph#RRd+Ol5UW!-bO}R**C}7g1NuBzV3Uz8#ZUG1w$l7($ft!m^ zrM$851%$3KWeose1Dg%Deh~y7ESGN1!qxCj)T@XuP>&QTzre^Cv?6237J}{Sf+N{Q z0t66LR^#zc+Z;===6v)nCu*ZB?#(!L95JWc2+Vebpa3fY5P~g^x$iPpoC5?@Mr)9q zR~ORhG29yZxWuIJ<3~C`z_a{FxhBx)0HeSE{{RLk;D7`cXyAbe{s#gJ79{B4fftaF zfe0;>P{V~7W~kwY9Cqj};fElGDB_4DmWZJTCyY>m2_eMb;)^iGDC3MY)@b96IOeG1 Ojy%4Y!UhBc0RTHeduROs diff --git a/agc_2-X/trunk/agc/images/vdc_LB_stoprecording.gif b/agc_2-X/trunk/agc/images/vdc_LB_stoprecording.gif deleted file mode 100644 index 6f3bfedef7d3482f2667125fb2e348054fe81098..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 758 zcmVT z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zCK7Tza=0`QW(*gDgk~0fe`kV(7HJWL7Y7}IkQWhV5Q`QHXB`cZmu8QIl9Y^Q50)Q- zfU6g02%i_5b9Z?LWpfrD2^S6?lY$Gpg9^jFzYS&=9)k%Ujc2j91W^y~=lRTyd zzY;JIDtap6fb%e8S40sEBhW?)Sn!N<0|#vM9DoW9*dTcq1vHmI=N%A=O?dEA$A=(> zDB_4A?!&k!H+-&Dddnu7HQ;>NG7S| ol1w%kBzC{Nk%w1VUYk30K@YinFw zTn`Tqx3{;(#>VF6=IiV0iHV7Se}A&FvgqjO?(XjD>gsxWdObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPk@wcU8G z?|kq7z@TtQEan~#$)mz)I-k&}bV{vSuh^`1`}_nTkBQ?$E}PHjw0g~MyWjA*ybO>; z!ecpPa8VS<2^WHcWEOmWWr2ehXApxI108^m7Z79(iWUcD9SV?^WR8Q8lZ#{wl^=nB zsuyJio)?;Nb$4QN79Iu{3m%ez2)cp?!MnW*WEUQS1|E!Mxd?*2f69-R9UjZg2%8EX z3m4p*(bFE)%i_x)1<*t%`hfQC&;PW1LPu>sroW+#;hs1Dr;vT7{Q3`w7G3_cAtSVhzBMZ z_`#&4tY|`h_y+fkLj({DWD7`-rD)Q7A$CyAaI-e80S^?&HJMH2IGbgCyG(}bhX%)r zzKpF#^oL;Rh!VB58G(i2n}P`k*Uvfhg+zzHC3&D(Tx%8*H0!NG7S| nl1w%k*r&ga80LJ#}7} diff --git a/agc_2-X/trunk/agc/images/vdc_LB_stoprecording_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_stoprecording_OFF_es.gif deleted file mode 100644 index 2806311fd1ccdfba0fd88e5dd7940e9d2351ef09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 701 zcmV;u0z&;qNk%w1VUYk30K@A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VP}*wcU8G z?|kq7z@TtQEan~&$>YIkI-k&}bV{vSuh^`1`}_zX4?yHYE}PHjw0g~MyWjA*yd02F z!sGd+!|yZ}b7uz~atj1}3KwsC26F}-ie!%vfogSkVu5=M7YrQ=m1To*3kV1a7YZE- zZj5sd1`}l-9-(QMc$yuJAEOJZ2$Ty42?z`hho^#sW)6d^XNQ1f1gsFm9S{%*pMaaD zkqLYU4j;%J2#UkP$qD5N2iw7cxS4t#oSp|C3hCS*kJ1_Nl;BV#GNa58Y_Q8rhkYLw z7?}8BPlF2+{D|APCy}ZJ5IPVr_~B3jh7%$G@mqC>L9d765YV%e>t3G&fM9u01rXW? zbO#1OM99p{#6i5s_#w)tVuxBECKw3G@#zN-DkX|jv~&W-M;9Kk`oQpIxrB1+<&opc z%mD=qc!E``V4{I(M9*A6Kme&3X%P*Sbu~djgN;sWVZGo1!2wTP8$|sINi3PN3DL$; zt1D^G!~f=%#JANgqzkA6rfOKG)Ts-}oHp7+K%die9|yrxX%gjJRRy7CF1nefJ+`bx zeG->4(m8zPl=nG}ZqGq7h7cu?MOf7V0tg&@o7Z@if_>-G^;FmHEHlk;INO>}zrKC? zmjG}GkfFc-{{RLk;D7`cXyAbeCaB;#g8ofVzyMwpK+A*_R%qdc7-p#9h8%Y2;fEkn jXhA0rGJwH}D5j|5iY&J1;)^iGDC3MY)|lc*Apih7IqX2* diff --git a/agc_2-X/trunk/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_stoprecording_OFF_ptbr.gif deleted file mode 100644 index c0259410348526d42f3ae43c3aa57a7eaa1caad6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 778 zcmV+l1NHnzNk%w1VUYk30M!5hHa0d64i1)(DJdHp8_v$oQc_YxL`2uu z*TciZ($dm#adEM+v7Vluqobqc<>l4Y)!N$H&CSiHr>9m{R>Z`_larHXW@dwfgWcWT z$;ruUYis1>ISV^jcK|Z>Z9Qc*o+wg1SFuLh@pT217f-2Hg3_i8W4QRBS~NY z0D}Jr&^TBCfdgZ`Y6M7t5kU?AkRofSdKOILLr&BriW=oj5rh^6IMyhoNJh(SH2|=) zCY2kFe_Gpx`=^tD1Bx{qwAknit-Kmmfw`jkldMCCpB$bv=?#HYtTJ}W9BJ1njeLp# zfF-LHDp{B6Y6vLRYjQ1lffEd#%CA7-Xn2k8O>E%fUssb`B+L3at1)B&7I)+sThZB8 z6KD9XwX9p~af@YXaGgWDHnkz$R;Wtfn7qe$c_a0k{c%J;)8f zbGUw+8ZBKJiY&J1;)^iGDC3MY)@b96II>7W I0zm)(J7?2Y82|tP diff --git a/agc_2-X/trunk/agc/images/vdc_LB_stoprecording_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_stoprecording_es.gif deleted file mode 100644 index 94f9de9d67f7767cad0dbf53bd0c8900613cc8f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 699 zcmV;s0z~~sNk%w1VUYk30K@?!NAsdYQ(a#@(^qjd6{MZi$0wgNSX2T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zBouP}bMg2+4-I>02_AF}2Yw6}aeWAN2p)`Pkr9JycXJppdtcm3)5U!a6l=VY9A_zEhAPdb~c{1hPRtTqMW=Mx~ucZqa zlv6oL9cgq%|M*G0u8+cri9{)=MYvUh0}CLCv)9-a1Apq+{cHyhEkn(5jOUt9zrOuC zyEqKcz`wu${{RLk;D7`cXyAbeCa7RIe^W6c00Or}DB*+@R%qdc7-p#9h8%Y2;e-`9 hfPe)KU|`~jD5j|5iY&J1;)^iGDC3MYqDWE*06UjbG~NIJ diff --git a/agc_2-X/trunk/agc/images/vdc_LB_stoprecording_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_stoprecording_ptbr.gif deleted file mode 100644 index 8a76e8605464cf9539f20a04d82aa76d4450d482..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 779 zcmV+m1N8hyNk%w1VUYk30M!5hL^edbmb(!S5qDpAnR=NsDKjD)BJRHKW>RMV&i_?J zRsYxj^uzSsvE9a=#*J}}|I+`=qs;&1|Nq+m|JDDbgQRR$Z2QUk|IPn^W`O_X|MkT6 z$e_r%l(~j$hKX*8|K0zykF(;n;#^8x|Kk7u(f?FKRANqI(WlY4lej-KKmXtVj&hEE zWq#GF)rf6~?Y`|@N?rfs|Nq(l|Ih!bh^hbp0RPPY0000000000000000000000000 z00000A^8LV00000EC2ui0FeL?000L6K#4>nD;kf;q;kn@I-k&}bZR6`5-ZST#_f8) z;IMd1E}PHjw7R=UaAuSeZBDP-@A$la&+q&HfPr)vE(8k@2{($1jE#wort!Oq5%N|HUzti00IO7qOQY^ z0Sz_E%agdC(Tt*tHZKPNHUi23F9HJus|5`=11|;zi?OweFA?bK1rY|UH8(G&Hv|Ca zqZB9#a1X$Ne&x=k>ISXajcK|Z>a*bsSdAJ20w}Pdh+%*N17f-2Hg3_i8xefTBS~NY z0D}Jr*f>}KK?7sGZU|6-5y1`rkRorWdKOILLr&BriW=ojQG^!-INm6w=s?SCHvq7+ zCY76we_Gpx`=^sY1By2qyx8aqt-Kpnfw`jkldMCCpB$bv=?#HYtOs_=9BJ37jeLp# zfF-LHDp{B6ZUiXRYjQ1lffWp%%CA7-Xn2k8O>E%fUssb~B+L3at1)B(7I)+sThZB8 z6KnXbwX72q=Te@W`Kxoh(tC-T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zA`-H^aq0UPe0~QVXcHF}XnhZ67Z7F$h6fF13x0i*mVFB!5SA00aSaC-69{Jy7JU#5 zl%%bbfq!y$c?M;neI5y#79I|L2_B{&3%Utt9v%l~9v2@7x)%x_j?fBzlhLvl&AADS zZw?;U$&(Agzva)#h|q|=znZgndUVZay~7hpbC>2`8g6GG z2z%43AAfCC^MO{qISxPnzys!C(}P_vmoc06?H&V#2P_P;=7-s? zo*%gR83(Qnx1wi!p^=EdS~HQpRLwDIt4>OI(-g4!(102OZd;r6(&)@g2Mc7^UF+l1 z5~F6p4j^S

    84%Xu_5?lg}MDjqjp1no6&#y}cv<^%Iwj9W!T)o%Pzr5xVz|hWF4xvP$HiAfinYTO%W(i@R(RKXZsXbfDkOCWn{wZ z>I{naLr0`*I!>@K4bi>?5U5jI7ud3EIqiKFn|UWR%qdc7-p#9h8%Y2;fElG zC}M>nAtC?*9i*t@iY&J1;)^iGDC3MY)@b96DpFuUDHTkB!H+-&Dddnu7HQ;>NG7S| Ol1w%kNx3{-0E-uE# z#)*lE*4EZ*YisN4>*nU>=;-Kwe}7zDT(YvV?(Xh$b8~undObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPw{wcU8G z?|kq7z@TtQEan`KiNnEZI-k&}bV{vSuh^`1`}_nJ4#?v}E}PHjw0g~MyWjA*ybPE` z!sGYi!tW#YeFGh45*HR`d<XeKVFW*|NpUbZNDhu$W%A9~gWC z=7@1p4}&t}`ta?OK@SYpQEUuyj?_Gc$+q6C;Mmdv2M#z6W^5V00~Q+i@|aH{aJo2u z-uPi&p-p|(a-@d-dfJZ*!;*PzNr88>cd^_Uw4 z5_|zKQ{dt*eU<&S7iWXb0$WH3CaB<9f(*VP3j`bhkimo$R%qdc7-p#9h8%Y2;fElG zNTC7*2;c<)9i*t@iY&J1;)^iGDC3MY)@b96D_S4{0ToDq!H+-&Dddnu7HQ;>NG7S| Ol1w%k+9=(e}Cxc=-b=dva+&VTwKS;$L{X#b8~ZgdU`!QJ*cRtR8&;e)z$Iw@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPD1wB2~F z?|kq7z@TtQEan&s2!p|CI-k&}bV{vSuh^`1`}_bB49DU_E}PHjw0g~MyWjA*y!?PP z!eh9>!si?2X%!X`fNvHFfCqvW6$f&Hgl~0sVsU#29S9bGg=H6+7M*Ps7jp-g2&j&4 zpPF!!cyphn3XB8>3I!bnr3r@w1qvUz9k(B-hz1=UoQwqs2NuPMwFw0Th#v_A9RiMr z!@9hq9i<;01Rm$Q7Q)rnh{&&Yv2wE?p9G}W6$GIb9X56QAb?ke2&Xb70BAs2g%8UN zBoLraKnDe%3iKl|ETBV(5Bd3PV*vpg37Pu;6~MP^<1vNvDCLQB?^Ct|7d#aB*Wnw_ z0uf5xv*3?ts1A{K@##RSgF1j806Iz_jOhoQIzyFNNU97UGZLcqJXh}1(+(`nNupQD zUb(baOB&cImdw`!2@GILFqGGY3soON6!7Y6~0h8%Y2;fElG uDB_4DmT2OMD0Xlqo)z#YC+Gb{E;^N}u{f9gM)*hprFLW#A|D7 zkB^T|PEMMdnzgmH-{0S-r>B#Xld7t!Zf zN=nbq&)M18h=_>3zPnT`qqG6$0~q?9VC1Fe=SG6MvYF#@)iD=U_porsVsDl4oi0Huwz z0S1!*3a&CMDg`nDmof+{(ULGQ1hSL_x0S%2lC+8j)G{yz1Jls~^wTjj@G=4h1gI+n zF^mmxMu6IY04to)TQQ*9q8Ol=pJvt{WlDZkRwt1MQk(9Cj1J+2%C;%XUik1Hg#Ii;Jz(uD%hl*3=R3;;f0jxRu z8I)rH0#XMQm|?5{v1>hN)Czz=#;pO{2KeeVLx2Dkav{V=BzWwLS^`YKt~DU2BaUek>c8?s(b z=xjQ^*>6Q!x}otMK&9a3PyomU%aEDa*CU9kOkU>fnXL1|g=xV+o(%Ykn8+Du40rBmZ@S&^16cHVT}7?~0BD7CtW^F00+o_zM{=bwPmi2(@~pfEuPEhMVwqKr1` W=%bKED(R$@R%+>`i=I$G5CA(uS(GjS diff --git a/agc_2-X/trunk/agc/images/vdc_LB_transferconf_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_transferconf_es.gif deleted file mode 100644 index 10cfa495e22198ce1fe7c347d6befa0ad7a00e78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 714 zcmV;*0yX_dNk%w1VUYk30K@UQ_#-7HFagAnDX5O;i|JDD9ZHPoRM7x%|T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehKU>IAj z?|kq7z@TtQEEU z1CR*WJXcu$e+qVN6&4bMauy7O3xyUH3w4Eua(H@WbbbvU4HklkXcwFopl}rzb_<&g ztC4b|opY9ZcA}^bj|d752_6Zk42lQ|4j;T8x*w~H3LYMxj|mM67RZaZ3<(H}9}EZ{ z1(Axzy}za&s2?2&9qPRn#n{@5%d&a2b+#X(2&dW=2uM}%;0fG^0>3IqP{oPCKn2Yz zd~l|KL4ke+JU9@Q03ZTm1S3wA_%9$F3k}x)OyC4C!9HIel{K_?i4PrpqPQ)%&>?|9 z58{3%kbp{`g@8v%d7$L$kB3tp+70|LFcO1ePe1JJNeYd_Q)vFAnLrh&I&`9>dU%~_uTtni0suF^K{ zfL88QeKhgil#3Ib0+Uleh)s~7181nH21+RJ|DKr1h z|J||O|JVP|Iw$>;MuY000000000000000000000000000000 z00000A^8LV00000EC2ui0FeL?000L6z{v#jDjJW-q;kn@I-k&}bZYEG6dF+^#_f8) z;IMd1E}PHjw7SbssA7_gY)-G+@A$la&+q&HfPr)z76uFt3N?z0jE#a2LiU2EiIOtorsVuEG?`o0i}(! z00xr*3$8RRECnl=pJvt{WlDZnSwr!ZEk(4q21lCB=C=dVuihR)B=!z#;pO{2Kee#Lx2Dlav{nEKTHO`|Fu;mz0!4+5 zCHRWduUY}USUGj3)~5hSRTp(DStG&R!<9qR>V=BzWwLS^`YKt~>5LiyUei4g8?s(b z=xjQ^*{?-fx}otQK(*lJ&;ZB<(~z0i*CU9kOkU>fnXL1|g=x(|o(y=4n8+Jy40rBmZ@S&^0a)~TokcDL0ceGDtW^F00+o_zM{=bwPm=>ZBMd{Dv#E+nexqKr1` Y=%bKED(R$@R%+>`ih^K50YLx&JE4W7SpWb4 diff --git a/agc_2-X/trunk/agc/images/vdc_LB_webform.gif b/agc_2-X/trunk/agc/images/vdc_LB_webform.gif deleted file mode 100644 index 4d5228f315a95554722d2f1f2ba7a652cfbfe1d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 542 zcmV+(0^$8fNk%w1VUYk30K@(4h=@c)L|t87 z?d|QVs;U400RR90A^8LV00000EC2ui0FeL?000I5;3tk`X`X1Ru59bRa4gSsZQpH$ z?|kpK7{zZ$EYcDOgwYfTh%y?@Q^PPsuR_ID6X=w*+kvRF;0i_7>q0z;8bsjp5~*C0 z0v^Jr;qfp&1p*%$9$P{g9tBYX9sneWicw+<9s(MC1$u;6l>`8N9wLMu8Fn9ZrXz?Q z1ce@~9!`WNh>jl}q>qgx1BrSc2D!6njh}>$uBCRUsUN)=xSs}}rJGk`hzl7Rfq$xr zZXc^7ty0#64W6W=)Va$^%_5eFfEtKm=Nj0cefqkQZ)%Y!G^h}x0D7neuqS|;DQ3;^ zXea>8pr}wK1UieQ%hni(BTJr4xw7TUm=`

    C>oFt6t5zwQJE90)zknJMka$ga7~l diff --git a/agc_2-X/trunk/agc/images/vdc_LB_webform_OFF.gif b/agc_2-X/trunk/agc/images/vdc_LB_webform_OFF.gif deleted file mode 100644 index 64316ced737605d7f1754494f4d37c999f6a11ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 615 zcmV-t0+{_rNk%w1VUYk30K@hg4aqR5uR#sL^OG}}lp{1pz4-XHtw6xOF z(&FOcEiEl+X=&%@=ZA-fe0+S@*VnJFuUlJN#KgoN9v*mjcsx8j(b3UTQc~~l@8jd+ z>FMc~mX-hj0O8@`A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@X0O1z}AfY z3b-EN9(}iHyTKnF*TTSN3B0Wz4ejTcz|yzD;@I78rMUfL6VC!WX$_=db7n}=t_c<_ z(2`YVn5Pfl%7hEV@K%Lr*RCmSH;_%hQzhHvB-=IX!Y)Z2FF2eAOQt(wpVFDZWeeA@ z0<9DlaEU-+$~7lZ9Zj?90t0$Jt5G|n^FzEo72lO%hZUoTPv;acc&Bg|Bcn^vBu$%U z*VjbI0`-g-QI`jZ7LHADr>@Lcm&Xvux<>&40+1Hsi6qIE&Nh^d;lXl50hT{&(*n7j z29)m^1r}Z*C_wR^*8)a=B|sbb!`jxcV@EF4Bm#!pxO3~?&AYen-@t^x%21Hqf4Joy}I@5*t2Wj{yeV%0R%FLA5Xr#`Sa-0t6$H)z5Dm@$@2*T06V9> BAbJ1* diff --git a/agc_2-X/trunk/agc/images/vdc_LB_webform_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_webform_OFF_es.gif deleted file mode 100644 index 75a5619688a3e2a42a61dbbe8fa79b3db34ebd4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4w7Nk%w1VUYk30K@{eD*OG`_kp`mGMX%7z%EiEmyw6q=` z9^&HS($doB=jVrqhu7EFudlD=<>h>Qe8a=T@bK`ZrKNaycsx8j(b3UTQc~~l@8jd+ z>FMc~mX-hj0O8@`A^8LV00000EC2ui0FeL?000I5AVq0pX`X1Ru59bRa4etPA_!cr z?|kq7z@TtQEE?< zAQEzY?YQ{;343uD25<=%4sQemW)^;p7ZYlSiGpl*c@brnXBHj^e}SBB9v5&E78Qyf z3?B*}9+C(LYZV?AqiUFXxt^+M9S9x@xF3WU2Zsh19tI8v2Z?=w(;uZD49v}D$H|Bv z2?QPo2CbbQ9So)D>Wm4(3W>G^uK?zwyPCNlo}h$b<17g4V9f)8RO1Z1A~uen2UWhT znF7#Em?~HYZQ*)lKwP0S32t?G*i56V0|Gt&B(Oz}SuuQgc#Z1kr;sOt>P!tYW6LHw zV;&qrd?=A;1!fl&@VwR2jIcBZE_nI?%G1hW7la`!lyhIcO*4s}!+Gu62a^$*3H@Mz z=rsce2p}zbmgzRCLD7iI%C;1(c@+XrXxcT`*L@MsOb9rTE?S~$`@waq6XmOmrs{5N z<}r<@Z4Sm|hSu>wU|7p;d5x*Bm)JAGh7~jWSe4prpTuEyh*C9e)!`D}GZXUXV%6Y; zp{z^qu3^?-_eq~ly}GWL8y;ZT&b_<$@8H9WA5Xr#`Sa-0bDvNESAqf^;>({;zrOwZ v`19-E&%eL_|MOV@Kmh>^kimfnCaB;Nf($n3;DZoGDB*+@R+!)-Apih73uZNM diff --git a/agc_2-X/trunk/agc/images/vdc_LB_webform_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_LB_webform_OFF_ptbr.gif deleted file mode 100644 index 75a5619688a3e2a42a61dbbe8fa79b3db34ebd4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4w7Nk%w1VUYk30K@{eD*OG`_kp`mGMX%7z%EiEmyw6q=` z9^&HS($doB=jVrqhu7EFudlD=<>h>Qe8a=T@bK`ZrKNaycsx8j(b3UTQc~~l@8jd+ z>FMc~mX-hj0O8@`A^8LV00000EC2ui0FeL?000I5AVq0pX`X1Ru59bRa4etPA_!cr z?|kq7z@TtQEE?< zAQEzY?YQ{;343uD25<=%4sQemW)^;p7ZYlSiGpl*c@brnXBHj^e}SBB9v5&E78Qyf z3?B*}9+C(LYZV?AqiUFXxt^+M9S9x@xF3WU2Zsh19tI8v2Z?=w(;uZD49v}D$H|Bv z2?QPo2CbbQ9So)D>Wm4(3W>G^uK?zwyPCNlo}h$b<17g4V9f)8RO1Z1A~uen2UWhT znF7#Em?~HYZQ*)lKwP0S32t?G*i56V0|Gt&B(Oz}SuuQgc#Z1kr;sOt>P!tYW6LHw zV;&qrd?=A;1!fl&@VwR2jIcBZE_nI?%G1hW7la`!lyhIcO*4s}!+Gu62a^$*3H@Mz z=rsce2p}zbmgzRCLD7iI%C;1(c@+XrXxcT`*L@MsOb9rTE?S~$`@waq6XmOmrs{5N z<}r<@Z4Sm|hSu>wU|7p;d5x*Bm)JAGh7~jWSe4prpTuEyh*C9e)!`D}GZXUXV%6Y; zp{z^qu3^?-_eq~ly}GWL8y;ZT&b_<$@8H9WA5Xr#`Sa-0bDvNESAqf^;>({;zrOwZ v`19-E&%eL_|MOV@Kmh>^kimfnCaB;Nf($n3;DZoGDB*+@R+!)-Apih73uZNM diff --git a/agc_2-X/trunk/agc/images/vdc_LB_webform_es.gif b/agc_2-X/trunk/agc/images/vdc_LB_webform_es.gif deleted file mode 100644 index d7590d66ce46679810c1cf0441b664cde042b36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 583 zcmV-N0=WH0Nk%w1VUYk30K@E0aXAR9smac0YXern;&i;29%W|kC9d%1a$!b zcOz&W25ug(9$Ey71ww!Wc?_*KglB0@Qwtse8HydAwQ|P*d5p&&hSVN&pA40X*v)`~ zc>r}&BLsmR*OlLR$chAjtCWqvNrl5w*2}SPiz0wiuN-->HmBOB4;U~|!dAdvpnoD1 zl?b2#%?CAT-YwFg$k~*AID+k{=4uwGPY2h;Rii}k1AuFu-T(+NU|~#$9wQDUQHP^T zH-2^{#IOJ&$QvSYkQ8C8oynAeTCzkVU?xnI$ns!&gD`5iaV5}X{T3 zX+2?wMkHF)2&$l!14E^$v(*~1sCH4QVpYPNNn>qq9TT)G+>WG1B1@he>;Z?%m@{kM z%(=7Y&!9t#9!E0aXAR9smac0YXern;&i;29%W|kC9d%1a$!b zcOz&W25ug(9$Ey71ww!Wc?_*KglB0@Qwtse8HydAwQ|P*d5p&&hSVN&pA40X*v)`~ zc>r}&BLsmR*OlLR$chAjtCWqvNrl5w*2}SPiz0wiuN-->HmBOB4;U~|!dAdvpnoD1 zl?b2#%?CAT-YwFg$k~*AID+k{=4uwGPY2h;Rii}k1AuFu-T(+NU|~#$9wQDUQHP^T zH-2^{#IOJ&$QvSYkQ8C8oynAeTCzkVU?xnI$ns!&gD`5iaV5}X{T3 zX+2?wMkHF)2&$l!14E^$v(*~1sCH4QVpYPNNn>qq9TT)G+>WG1B1@he>;Z?%m@{kM z%(=7Y&!9t#9!%-i^U<0Yt_C0RzD+x(KRp!W}C(G2Ae5N+^6UdOwJZ4Oo quxlvrAp`*)0%+XGvExPxAVZ1-sjEa*$p9i`z{62!H!8#Drd?ok z2@{2e$3Ywv3K0MlfB*(`4j3Oj9|UwB8cGBjfdG^fe`yMY01R{jKp0YO7m@%RU=ezM z2pks*2nqlLFGfs4w2?X=5FG#(8~}f+2OX+CL$n4J%*#3iA9ny53IQDu!V0Vu$7&7| z4Gj`>;8LK{ud!x-2OJy_-D_1?Q%N9kSU6u_naB*T#btI{5%dJEH*1KUDz+ xBAnPp-;yRx|_vNxXQrb?p`h;qQu1|7!xzIs_Klqyz%no|2J;@UsrdjzyDoY+N##p zyT-<$wzg^W=l_q4oU(WC|3ioVo0>)%83iv`@c-)7|LN(gTUzey-~T@)W%-pW{|gFs z2L*L#YPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>C*Kb<9~us{h22 zqLVpR^Dn$GessXW;l`S>({HQxKiE*=qt`DxvpMld-tPM!cGUQ-zy1ElA6dqL*Z&(D zo0?l{>gr`XI~h2YS!9{>Wf_#2Wo2@vu_!ZiP0#P2H(_Ddj9eL6-n_ZeIdgNk=T7fc zUNmLeyzTRNxJuiy>y?-~S(Rj!rInWD9#fW4Qks2!t?V&b#>H_+niBwZKG$J zmg6?YQ!Xp4*n2PSN|Bb&6FQN0OM0@hh{T`k>@(y987&GJ6qN!KVLa zw)wP?A(GZgOhM$|{BI8+xBx+9Wk2UnK9onV5WIs^f#R znc;TlJvw{6`l~n{W=HTWTX}`E_1fIJmksVG8adQfJdo?vees}KfawrBt9VVq!&Zs3 y6%X5F%3dfxY*%R0c+{b2r_jhM+_K|_vNxXQo~A0IC*EzQfzTUAxHc=2LQP0bZ6R$RV(`NoYK`}XbY=;+wE zaifciOJHE&`Sa&nTU$45*x>H&{_54MmoH!5yLYdwtn9&q2lwyacXD#-?ChL6b!u*I zu9=zH#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T9Zo)R){*Kzv83o^ zj@A4NFD^gY5nyv;P1)(URr?=osPNJ2m*qd=cqDK4{SP~8{MO%o|KrbHhJe@q8ycIM zTWad+WjZ?Al$d3tbEdH3ma}bx8)w%#mTjK zMnjyEn8alV;~?Foxzd{yH!N&yVBmIfd1_E9zodqB1LL==Mh^_ll&+pSy)s1AWQ*!a zw=1tV2bs-^-Mp6h?uIpYXRCjg)(HzfLGMow<(rNMd%E z+A;=46ODR_idd!`UhxUc8yIK5JHFiH)RdJ~3fVXGKDV?}40l7xq?5@{zP`SwsHoG^ z)7aS9qobqG&(G@W>fYYou&}U4M@P`m(20qO;o;%m-`@@n4wjadHa0eGZEcZ}k=fbV z=jZ1%G&BGJ0L;wHA^8LV00000EC2ui0Eqw)000I5pyP04X`X1Ru59bRaQsqD^=x>q z?|kq7z@TtQEDjrmh2q0(I-k&}bV{vSuh{H0Ay8_+;IMd1=6XLF4~FUST$lk%Gu^fr zn1zAoz-Y$jZ60<`7=Z(Q7#W0$9so>+0|lJ}85suy9|UR{1HiYryS=}Ji5V6FACOIuZJ*Qt8HI11Y1jnB z%Ekz|x@e7{q5!4<9(|3yckjJuyuQG%ofsAb1_8DP2Lw1mv*tqqQ34JyArRmbK!N%2 zh?;gvz#3_f7+G*cZ5xJxl(uD)$mHQbXC4Uug!&Lb022W5wy}{(kR(2W0SsWX6(GX} zPR=msyLie;&!3$v2vtgGfKU&*Fh*nKsbfSZwqh+Ucoe8m04skE08p;dn>|8Z1|9n0 zX0{9oLtPl>6RK7Z0T4`WqL*$cT|x2co#s@ZOQ{`&TCIsyq*B4R>H@|PD$PQjgXDce zi$U$BcnkRmdJv_>KCpv#sFeiWguXc9V2Y)Xr8`Go~3nX zHHD?KAV9#z`IKPO%Qpqp7u{Y^F=s(@0oloAkRBK?Fpf+MHppBdZ4B@RhL%_*3?p@D z(%4mhDac?!?2O_MWXz!w$R!2IbrTsh)@b96Rm_Ovjy(3L1s4)Ppuvzt7HQ;>NG7S| ol1w(~|_vNxXQpFEiD}%A0HGHR8>{AZ{I!_7nhEXjuk6bT)uqy#*G^rH*VC_ z)LguH@%i)TU%h&@VZ#O|C#SNqvU~ULUAS=J;lqb*ZEg4O-|y_~ba!{>x zS#ECb#EBDc-n{wz`EwH!69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T9oio|>qzyVSW77k}^tCU5YXbx@Puv_A4##UclTTrNq#v zt7HLVClkx6g;Gm$dgtZLR-C*3@Vtdb+p?$2C^E@#NlVMfNHXQHF(~fazix&S(_ALS zgNtsyx+$~n`pw&`ZrtQrFiq*D5(C2w#qUlM+>8erW-}@>v3Q7`ms`Oz!AK=JxsTZ@ z;&+JQ;xL8<9qIW-Ny)+r!8;kaV^*F@=)BX$Ai{nl%Xo6o#z|6lZAzw|b7=ctz(MI^0ym&SDTV31Xj6>FD1auU_o#1#6A=sZDoSzF*Ds3Y=g#F!KQCxD9cTO)Qm18j_0HQgm2atyt{JaAZ*B8wGMZDL8-aF}iHN z;mhPjA#9AiY7Pds6ij{Nr5ng9R* diff --git a/agc_2-X/trunk/agc/images/vdc_XB_blindtransfer_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_blindtransfer_es.gif deleted file mode 100644 index fdad633a72c62d52421726d166b2b1c4c1fc6604..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 758 zcmV+0|lJ}85sxz9|UR{1HiYryS=}Ji5V6FACOIuZJ*Qt8HI11Y1jnB z%Ekw{x@e7{q5!4<9(|3yckjJuyuQG%ofsAb1_8DP2n0Anv*tqqQ34P!ArRmbK!N%2 zh?;gvz#3_f7+G*cZ5xJxl(uD)$mHQbXC4Uug!&Lb022W5wy}{(kR(2W0SsWX6(GX} zPR=msyLie;&!3$v2vtgGfKU&*Fh*nKsbfSZwqh+Ucoe8m04skE08p;dn>|8Z1|9n0 zX0{9oLtPl>6RK7Z0S-)UqL*$cT|x2co#s@ZOQ{`&TCIsyq*B4R>H@|PD$PQjgXDce zi$U$BcnkRmdJv_>KCpv#sFeiWguXc9V2Y)Xr8`Go~3nX zHHD?KAV9#z`IKPO%Qpqp7u{Y^F=s(@0oloAkRBK?Fpf+MHppBdZ4B@RhL%_*3?p@D z(%4mhDac?!?2O_MWXz!w$R!2IbrTsh)@b96Rm_Ovjy(3L1s4rWu)&Z-7HQ;>NG7S| ol1w(~|_vNxXQpFBBJE(UT$lf785hGzyF=FacElFs=B&M%a{M(xbc5$>s@(y z*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E)NJnF0?)qi41 z(a9XE`4?UoUn)p&xUr_}^xLZa4>nZz==Dp_WJx-bxBLEw9W{RIZ@>TX=dVD(>;Dan zP0cMebva6%ozgO03_Q6~thq7_IkGa!EWJ{)%F zvQct_0>gGQS+STV%Sp>Rn3zQ}GFEY=SFU8Ct0F7bJ`Dq{aA_t6717l$;p>hvvaZ;~`XFp(SXQq{ z%^T*mXRotz?*7ZVJW%?aAQxN6li9v{vAY+nHQJ{(-C_BDHPe$5S zW%CVRCNG-8#>lJYU~o&p)Hi;b$&!T*y-$v~wQv_6K4|&h^1EB3*{&76j7>+G{DKoQ zFI@~~36S9GKAKV7qqLZ#O+aUpz!xzK$=(GA^Obc}4lzwwb7{7No~HYO39LVama>I~ zTFR!kY&@hWvVOG_!Jyuule@!`TPbptrrVg#Ijy2>`<%HU=_1raO9Za aruA~kl(4LqOJ}65dbw;)*{w_g25SJL^|W)2P!L_}4iqs(7lcN-fbv9aALDKm(O zs+N|!Ha0|UZHNE>0L;w)A^8LV00000EC2ui07L)|000E%@X1N5y*TU5yZ>Od2n?Y} zg+T$pgb=Gh8O38X6eBTwzk`AVU;#L^7P?6TClL@@l7@r%U@WSRtHiNgc)iu#v#fZA z!e)u)K#8XU2j&F}Og_SWAVYzR?|@@~14~0QE7QkIj64=`ZU$>?<}n=fb5&qrX<*e3 zl!y@Kd@EM#DRJa+ql<%lfpngAkyM~47mJy95(8sZA`=TYR}FV#vos@5AtzUI#+=G( qCT9EahOp_9EUp~9JPvm5?5sU~HD1AUO{}-C+_(S0!9((b4AuZE&rgg1 diff --git a/agc_2-X/trunk/agc/images/vdc_XB_channel_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_channel_ptbr.gif deleted file mode 100644 index a4fbf1f57848740d610db3eab175d98fc1bb2548..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmZ?wbhEHbbYb9Q*v!Ci=FERHGnd@lj%m|&@7woIT3V^9YG!u#v#fZA z!e)u)K#8XU2j&F}Og_SWAVYzR?|@@~14~0QE7QkIj64=`ZU$>?<}n=fb5&qrX<*e3 zl!y@Kd@EM#DRJa+ql<%lfpngAkyM~47mJy95(8sZA`=TYR}FV#vos@5AtzUI#+=G( qCT9EahOp_9EUp~9JPvm5?5sU~HD1AUO{}-C+_(S0!9((b4AuZE&rgg1 diff --git a/agc_2-X/trunk/agc/images/vdc_XB_code.gif b/agc_2-X/trunk/agc/images/vdc_XB_code.gif deleted file mode 100644 index 8fb2b8c52d136fe0dde19cb30b348c465b4ea4f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 247 zcmV|W<*3)8yg~)mb+hHccY`sh={7OvE3;t zGkSWNZEc7)Hbejb0L;w)A^8LV00000EC2ui04o3x000D}@X1N5y*TU5yZ>M)T7}RI z3&jkLP)tT6H_SB8M`k!c12}?5K;a*rKNfoTTK84YzYEC1hRb&x&wS=y1$Mi!o$SH#>c}E06Sd+Tg?Cf diff --git a/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer.gif b/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer.gif deleted file mode 100644 index 68697edca82b97cd549e24bb7f031ba0b74c8fba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmZ?wbhEHboWLN!aFv09i%Zbmy}YXGOiav7d3odh{&ylGN@;1U>gp~T8;34m{(s}f z|E;ZeZEe%$&;P$*!T&2){_oxUKQeMkdirWp)5t@I{$IWN-^eI<|Nj3iEq78c3-v|vry>9ZSD1q%CbGOoa}kbvP^lbJ<|D1vdqOYvOLP{JyRC3Phy(Y+rzwk;^ZP`PFda= z%4@f+=V9!TVO3taY7WzG*}dy#=N(zGsweLZ1`%>8|w3o2x(MeJx;7Vv~I}=lciNXHS(saL?`tWxi5+g1sSVdvo5EO6BeA z1CL~LD|!Vl+1S9yaA(g>!vqD{6@pK;ofK41I>5p7Cq{^&GJj%+`G1#3I_6D|JN{3& zuhy0EK&^4N`Ja0X884nSa1`F1H0kkn#icU6`uTZF+C<~_P6-SAG^KcL!?xC|3tny6 zDV)a6oSo~|JXu(He-it%O`@+q`R08r+s+H~>TKm*z_3X)|clTsF{Cslnbk0M@4^tTAj=Ht2Um3h}N7Um>tPEaL zIylYlHY;&iJbhm9HhsYY&;AVdOqT=4?yf4fV`!Khac}-vsg7fl6l@}I<@DDw2ObF8 zt1MJ#df?#YfCZeEA*Eg=S+#ukRxaan_u9$Grse(4K1`iH&C?etN_co!kx7u+^K&xk5p9{#&5#9KMDWkK@AqX!wX ze|<1xh*=oe6lCXk=;It+k1~M}n`;cNj|*lbq>AK!^esLyEvD?{Q#tKA&1W-G#6BHo zmaJLuY*x;;m(OMw9MgP0r{r4Z^SKq9G#OciV+0P(Z(!4Uv7kjP>&3zjwN)<`^_W>@ I2ryU!0KPqJ;s5{u diff --git a/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF.gif b/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF.gif deleted file mode 100644 index 8bf2e44b703b46e4cbd6fccaf960afea356b8fda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmZ?wbhEHboWLN!aFv09mzOs_K7R4y#Z^^R($dnJnwtCe?d$01aB*?DeEIT<6)SGs zxUq5L#=yY9^XJdszkh$jh7C?mPWSHJd-dwo%a<=7Jb2*l?p{__*4f$F+S)pG>eSra zTr)GXi4!N@ym|B4vu7qICJYP=XU?1flC%JdKUu)W>VQa)pBUKwAK-lItRvNbVoA}- z9IN>kR$PfFv{9M2rtI|Fs{Ic(RQTx4J|FF#Hc?>b{SP~8{MO%o|6@@qO_8<;?}zi9QjhW<|lu?xabNmn$xn>DABAThb;Pw|7cd;HN3YXB)P)US05N%T8f6 zcBbrHx8}*h!uylhpKTI-{mFOVgt)DoYfmg(Z|e5*NN(?m#N};OFWE8}91i$KSh}6e z%t+sw7F4Zx=g``xKC5R>F1@=a+u`Svd#7_AGJa@bkUQ$uwti*s&K*&YFR?LrP3hn? zyW6bDWAXHP!Q1o&3p~3s*gahi9J{-!*p8uLa>Tv)XN5YBO;WIlyp_{m%N%$hXs?n` zq3VW%mjf1XnunBnm1O&1c=v8)#hJJeRaSkz-?l_9`j F4FH_pY;XVo diff --git a/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif deleted file mode 100644 index 7ef98a94dd44bdb7586a2095872a72cada57f81f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776 zcmV+j1NZz#Nk%w1VUPe20K@000I5;PY@~X`X1Ru59bRa4egWBS~AX z?|kq7z@TtQEEbsrv%mWFbdRFH=YA8Uzr7$0|drFR9P z9v76FuXs*rO=|)Oj{=+rhX8f~85xYL00ILDe@?sszJ(aU0s&A3(HVDc3myO&$O9jg z0fC%P9?!vv<5Ahqkp-eq7^%R)Zg&Q(7p}+%8LpSXduXvT;A;RKIRx5xSY@izhin(J zf%@j{kwS*!26%v?G0+DCZU9Jgg6zPnO_fMdLZ8sHHuJ;w2*`C7mcrNa3Um5D!Cxr&CnoqiHH>yn4j|?A(bp zUd5lS1SD*5i5G$kE}bA{1RxNlCk*Z4ZFVRUF0xKAI=Z^h!$Bxf<9!vo67X26NW0d< zkdThfnLN9`1yie4Q2|dA8d?>PCn$+}rK!fVic?mO9s(V>^+Dv5l7CM^W=Xksvo!>E z>a7{2^{LOJ{`w@1kJ7zM1oHuH=p?|%Vg`w-m5K7r)Wp>oCCUcuj<>(NRh9$jX8yS+ z>oN!sa9|C;U27mDddn^{7B@HNG3_f z7Z6aO!IMx%Ddm(@R%zvxSZ1l^mRxojWds#WU_l3DmTBghXr`&=nryb|=9_TFDJPmC G002A1=T#*D diff --git a/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_OFF_ptbr.gif deleted file mode 100644 index 1ac7dbbb6fc70ce069c6ec44b09a8fdbad971fd7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 873 zcmZ?wbhEHboWLN!aFu~!+O%o$@$r0oeA3d=K|w)_7cbtpabs0gm8PcVzJ2>TIyzij zTyEUBaryG)6)RS}diCo3`SbVg-770AYinzBcXz*V;ewNs)5C`kJ3Bi!Y}j!B{(Unu zv)tU=i4!N@ym|Ba^XDceCJYP=XU?1flC%JdKUu)W>VQa)pBUKwA2|NlSx2h>#FCl+Ig6nmK%^JEm2SUD7#Wb)aW6`8s6S?A_Y>Q!VZnmu>E5+`@BG^ z@67zQ>o*oMGAV9QnpCJbbLkGHMTaL#pHSSqbZ1d#Zuc^obu*7J&p5}R#C1?+4qG1M zoYj+LZf+@fB>hD38AtyUCbk}?T8pX9uqh3&omv^LTVlSST0Qj?m8|vKJ^k_4o+F#els2r=)X0!wapBt57_4s|x3ufVhQ^6Y zSU9fr&ic~!c6MLkqD8i54Qn?f+<4*j_R04gnbqYBdwU}n+})VT!pk(_i{~XaMkXVx z)-}^|-5J@PT4pV~zD|128le?)SFO>%9dV4KrNH$1%Irib#z^lug^o_1tZYxVbTcf` zDWBstSLqmskniIjK8~xB3m!L}UUS!H|I?Ud#h#w5@6YbL$zX6W@ba^;DKi+@Z{Aib z%E{Df6|QCyXt=O$8Dz4UQUX51&gu6%%sW zXUUbewrOplFOLOk_UnXsDzmImbJF5Ck~E>KM`J+<6Vn0~_U^qZ3eg4|OH87gtv)Fo z*WbL-%}aBQZS$nSITb5-jLd?RA1Q`}Wj>u+rO@_tT1=Vc33<_!3kPSUOv`*WGh^Ax wXR~s)y?i#i;8^4`7LkMmMvjVSE1%D+`S$Yp{026y7Yka%vNYy9GB8*J09;pJhyVZp diff --git a/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_es.gif deleted file mode 100644 index d71bca154129935a3575853146678737e8ead24e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776 zcmV+j1NZz#Nk%w1VUPe20K@000I5;3R2eX`X1Ru59bRa4egZQ(0WD z?|kq7z@TtQEEbsrv%mWFbdRFH=XA8Uzr7$0|drFR9P z9v76FuXs*rO=|)Oj{=+qhX8f~85xYL00ILDe@?sszJ(aU0s&A3(HVDc3LXF%$O9jg z0fC%P9?!vv<5Ahqkp-eq7^%R)Zg&T)7p}+%8LpSXduXvb;A;RKIRx5xSY@izhin(J zf%@j{kwS*!26%v?G0=wtZU9Jgg3Q3HO_fMdLZ8sHHuJ;w2*`C7mcrNa3Um5D!Cxr&CnoqiHH>yn4j|?A(bp zUd5lS1SD*5i5G$kE}bA{1RxNlCk*Z4ZFVRUF0xKAI=Z^h!$Bxf<9!vo67X26NW0d< zkdThfnLN9`1yie4Q2|dA8d?>PCn$+}rK!fVic?mO9s(J-^+Dv5l7CM^W=Xksvo!>E z>a7{2^{LOJ{`w@1kJ7zM1oHuH=p?|%Vg`w-m5K7r)Wp>oCCUcuj<>(NRh9$jX8yS+ z>oN!sU|27mDddn^{7B@HNG3_f z7Y;zM!IMx%Ddm(@R%zvxSZ1l^mRxojWdsi>KtTs&mTBghXr`&=nryb|=9_TFDJPmC G0027-y;48` diff --git a/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_dialwithcustomer_ptbr.gif deleted file mode 100644 index 90ec03f81c903c0b7800dacaff8a7b71609565f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 873 zcmZ?wbhEHboWLN!aFv0fpkTMVdpQ@EpooZ)t!-LW)tT1TyD>2{`}^O?%NwVqtui(a zUB3K(UEQUP8~@Lr|35NvN=wU~t5^T;-~ZppDA?3A^2(L}hYtNuPhY)v@Bal0{->lY z*VJ?g3hFp_?tgCX*3Fy$tE)RQFfh!V`5#D99Vq@}0h_4w+v|vry>9eRZ?cniKS@v-1*8J+`Tfa$~{W# z%51$e^VhE5Sjfnvv_W}Nq0-EyJCqk4o-A`hY4g&ZMV-0b%VgKhJi(K%tE;LsGz6)D+VZ1mKtaBEIy$`*zchX1+w z1$iLQzb*wR1-#l(<--82< z6IEC^ul3IQ()M@F>{mR(;by=RTUin*)S=--Yw#?et=dVOVfq7-AK_nbmUCr?(kCtGGS zEYT^S<26_57>AJW;~qYatC9;IH=SN{*JuCJm}SMDo~-ZB?z_oga4_)lv#=>M9N2H( zRx9OJ_${($1Cu}x8$&}w#L`WIOYU0CSee#YJ>x0!wVWr6Ext_!5-tsn8fy=qOFk77 za@uFfmA1BNZJ{rZ1#0%|gn25ntT1!Z;yjWxp{qw@fd~`R0v7h}y$TA^1{+IEqMEHf zDIM3}ywc4}bB%5Dq`)~9D|n2|f|MUAhJP_H|qdKxXQp#=I$=Y#ib-7Vk9T`y07n4Rn>~r)DUCi>Cw@DmM#0capQ&B z+EiQHTP-br=FR(e<;ueDr3^3c5NS$=iMZ!;Tui^|#;u*i*+C@cMs4V^ecW zZcSaDJVS0*u9UnyOD>1Jbj}pk9A1VA47@q4@*E2mDb1NMHGj$qcD7vB<r6#H4w1%l^L0xY@3cmwtmxlt z#>nWFEzs1+!1!?+ufRj!7KY*+o+Zxhy-(LRDRHEzNIsI@QNkE-FJuMZY`6bC%*6*) zIt*G?XX@R}kam5bV%(j7Y9ZGP-)Oa2@69Tl-2x9TPimP0C{p4;WY*te0DZc4yz4GC_$XO4CuKDcZ&Ad@M)%x72 zX_8TmOPn75n&M@?;;u`Dw&%Oq-}9xJrTNa}h?PDtnL6|Pr7I1))fyR?R4TXn1TJ0L zT;$cIF(DwWAVAUW8;h6h*SoDxbbdeilezt2H@CQv!K>1hIS$K*_87-u8z3KfR>YbEMTx#w?)d6wj!FbVSX zUCN&4SH^sT$*YV>$5>wGR!Z3c9gdXmj)^=+rv}EpN%`iHHD}|so8})nzsO6Ah$%gp z;38(}KEX|G<&#O39~2o`|qdKxXQo~7Z=CN%PTD{y=TuJ4GoP&ix#!DwK+RGFI%?k;>C-Vm6d^k zf$P_=KYRA<%aLoJfF$jJ;!hT^;W{7^4CzceQ%(0q(Va1n= zJ3_2(tSLMFwrc-_4HZ6mv!y5aF&)X zZda~^j0|%wmyBf26xJLbh6xNjIjk~V3l=HNnJ_hf$_jS2T-N21la{Smq0pPNBX>^z zp6wHNb}!s2lOw?`!@fALJv&eSXwHRPc1HPWIg;}7GjB;Kuw9d3k!PGKasAj!nF}&Z zFLQ6POt^NR>-OWPGv_>EnxJrbiEHwghrHIA@_ZaDjpyd;mN4F_jYwJ1zuAnD(JlEy zVj~0N$8CZP4|!V{igS3DIJfscUE8FWkuJNjPwo*V6q1gIkNq z=cSG_FU>5;cP2-y^nuCLncpuRY1sX&fq_Y-a;s0^(xuHsUQHSk z0@4ZsCMf}M@L88+}z*a-$Ft{&d$z+goNJS-mb2$Ha0eFY;5M{=8un$ z*VorGGcy1H0LseBA^8LV00000EC2ui0E_?-000I5pyOy{X`X1Ru59bRa4buY6>)g3 z?|kq7z@TtQEE*pb4&%dYI-k&}bV{vSuTw!_f$cgQ0Ht?KE}N+e?%4_!I{^U?Moma~ zuMl$DKh8P(c0l7~Fl7f`c9|(VcLV}T zCC*@Hkv=goY0p?1;RDM6RMzFj8eDei<(F8L2j-Y$mRSZE6kM>unryb|=9_TFDd(JY n)@kRRc;|qdKxXQqgl$0bRBg4nXw|)C|EiJ8(kdXTN`lCmWy1BWnT)DEhxA*4F zo9ouCyLRo`+qZAKy1J^Ws$5-Ny}Z1hK7D%i>eX%Awmo_B#n{*ihl4H(Q$jJkyc9-SBYvr(b0{kjK8C zC5Ks_Wg$~vE(;UuqntZ)=XWhN;CLP06T?uf@aQaefIi=53wf_bfr&gKfIPDy;oRDjBTWNz&bW{`FcZ6iCeepQPgZ={G}gvrl{N zti2m8d4w4K=ks+`J>yuep2uvGF@v*7L}lH68^fyR2lHLRRd?=FTz>7<{(>uPr#`DZ z2oC3ozqx>Q!MC%AU4%+4TTeY}V4BRRmG|Yi?*fye3VVf;?+Y9D9-3+@P;s1}xskut zQRT$+?2rDNf5l{0&046(abkji-6tL?%|%OvSkp{>Gv_AU+j}gn)+#7;RnXeNjR(bE z&SD7hx!LnCqAI+Ahgs*O>Nn5(N(pT93Dpr z%E~8`e9kqdOb&3yC~x9v)>qJ(pWs+JuBuGc(G1 zdZ=Y({jst9rl!z+eg4$c{GOiu!osCwWZ8p*QZX_7pP&7_y#2qwLn$eSQBnTR&i%5o zvutcYCno>^0Q{JkA^8LV00000EC2ui0E_?-000I5;PYr?X`X1Ru59bRa4bjAWo>w_ z?|kq7z@TtQEE*vaM&rY5I-k&}bV{vSuhT(5f$cgS0Ht?KE}N+f?%4_!I{^U?Moma~ zuMl$DKh8P(c0l7~Fl7f`c9|(VcLV}T zCC*@Hkv=goY0p?1;RA~RRMzFj8eDei<(F8L2j-Y$mRSZE6->avnryb|=9_TFDd(JY n)@kRRc;|qdKxXQp#=I*W}A|lAeb*rVtNKP)*)^>Vy^y|L95M$$0RaGleQ!muk z{@u9o&$4BI=FR(e<;vefhyL!_GbtkCW^;3dscDd*;mWkMr70`@RvAMCP?DX5J{SP)&_~^}+6?bz!lDGT*haEM3>uN5`XK&8(jhlDpwP$xqOEFBJ#VU1`nXPB){9So_FP@iPpTo7EA$R&! zrUQBG`&n|B6J+G05O3fv zwJrD6wuP~cW*iBf8V(Extm1_h?>*S2E3CrWZ>EyLs+}a=z2{%Al|q5U?EgtBzMr@m zCpY`F*Us9z(UM1q(SJT)N7XZqtNUhOZq z!glJj%7fr=-uRmfSQmUdd)P&&)Ux%|vj(Qgj9PhLj{7b!DXMT*C=p-Ou=mhZOM!~x z{>+U6wXP~Bre}Zj-~1~kvufAEbsQ%q2-tn%kf*qDP5K( zla!9fx2mjsGRfy$W6I=9`zpH7P@d--&FLYwBZ87b2;m$8UM1Tb>s dY!<@oc5~Y)1wLYXFSfP?i7y diff --git a/agc_2-X/trunk/agc/images/vdc_XB_hangupxferline.gif b/agc_2-X/trunk/agc/images/vdc_XB_hangupxferline.gif deleted file mode 100644 index d25a105ae5164b0fcd7dd0f1940a3980842cd26f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmZ?wbhEHb>|_vNxXQp#=I$=Y#ib-7^183@R8^IcoZO#f%T}bO{@u9oLTzoTt!;?0 z@$~5ETP-br=FR(eEHePCq+d3nLmGNO3KQ#w7+}y{5^Ci$k6a+bMwyp{IeDwNdMOqw>TYjv8lPG zrY>KBA-6MENyyRqqqC9EInn&Nk$}Hak>(h5z}=RsGxko<826y}y{z?%bSH9SQT3G}caXb~9{X zW8+@fdO$46kz>(|C7RZqA@7}Ha@pnxH+Ub^P7VW$Ketr~TD(h?w5JOY8Qw>1lIMZwb|!;cYT& zMQ7RjUm^=av}dPrna$aJ&5+M6y*v3SvUz5I zZO<#iM=l3Xt^cUEfl-|C9#h99?(F;?u?BVC8)gT}^nZq)bSyJ9TM*y(;#io8aba3- zb-TbLhllM7Z9i^TD^1II)Y>r= alL;|_vNxXQo~7Z=CN%PTD{y=Tv!MT-_`XlS&xwOzb;aoMtEfq{X}&d!yU zmFw59KYRA<%a<=(T3YVhxl>wN>gMLQZr!?j_wKc~x8J{i-_g-=%9JVD+1byYJ?ro9 zzkdC?nVFffu`vS!!>LoJfF$jJ;!hT^;W{7^4CzceQ%(0q(;l<@k z3mhzNtSLMFwrc-_4HZ6m{nGsB7?0%bzW-rIjoyuweO;jr}t=Gfd2zoxe+= ze@D-TjU{c_`SP;4$8)(D<)`LI%FEBVD51c1R+d$safZaXocmK{kIOPW=#^(xxP9$D z)AB`kHqQ8b>r~#84*8r*Tz^m868<%>LS*SB8&V z4xU>7QEvjHIO9F0j!WFx`8{F{>O42h4wUKt3_a;sW@@$|zVF4cFcag#wBG7=fkzGx z+ZEb=+^$xdmhq^w;lsrPEYe$EJnA+$rt!GPD=7hb#-;l&dx$YLf+oquCA`%-`__^N0gM5Y;0^cHa6zw=8un$ z*VorGGcy1H0LseBA^8LV00000EC2ui0Eqw)000I5pyOy{X`X1Ru59bRaQs%y^l*5t z?|kq7z@TtQEDjq5j^e{?I-k&}bV{un1ca(~%jG5j%C2}!USP=RwDcRUE;1egz`z6u zJb?l;lX)5lcLRD&0UiiU7aodu7fyUmi5H1k9~d5$i;7JL9+XW59%q&XiJ2d8i+z@< zhg57!R0skA7z7>w9{?T<7;t)zP6M47g{`0gxF3@k7_*LjO_8OImYB@UO#_8=jsmiM z%h(yT%m>yOx}Ixbuv5C+=mwpH1ETI0{{d-1zT}(V<8PojCk3;NH46Q-DP)*rb|BOiUL4NIE1B!vYU_5_N>5?xeI^p&EMNlOdU% z4-D!(u|=trqB9u;@HA(MkFbd!+es05kt7q79vz}O!-p4K$9zdk~+2;_?oCon4m^U?FNpVl6Ug#$<*ghAaj733>Y99?r8GF4HPQA2vo8U zpa$t`ln8+6@uqB~&1Bp8rN)5>CaB;$7~C!B;DZpV@kIm_Y+&Jq7-p#9h8%Y2;fElG kDB_4ALSR7w5_F*AiY&J1;)^iGDC3MY)@b96H--QJJ9*hPPXGV_ diff --git a/agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_OFF_ptbr.gif deleted file mode 100644 index f6d9080b113a23fd577b028c7d083301499abe68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 828 zcmZ?wbhEHb>|_vNxXQpFBO{ZPloS#Y!pFy_rKPoU<;vdP-un9bqeqY4ym@oox^>&P zZ+CNZyLRo`+qZA8UcLJC>C>vJDlacDS6A0<+qOM=^r)+=>&cTRg@uK)XV12 zX-A07jWuPb-&XB^u%W_7uU}fspXo^6?)x8h)cCEx{r<cnp@+IWE z7}#^V`Xv-tS>%}~Do9D?NyyqLwY|HLAA~9v2yp+WCc?{E}=5Ag;ZwiwHgZvo<#wSY^IdB4eIbsF}SQQu;BL(b3dzPP+*Gc^z^^7_2lZp&uS4!a=%k|P6|Cw~9zg0d{Te>}P zrpXO&7KesibLR$$IUIWv!p6gVL*oq?t@uPyQ7OHxr3V;d;$xLw0|Pw3C(U$0=$sYuv-|(t z;84*pUl~(W@ma{XRN@FjnD$MP1eIA~7y2eE`>yrKyK1#>j@mBG8tyG`=iO{GObOmu z^fv!~9c#APmqe4iD{Er2m*_J1g)QFxoLjy3#>%FJb(;@n`h9WusBc?n-S^vO)0Z{H z)y0~8(fgPc4n7nx={{iWV>&5dlK@kP=45`2MFJN(oOsGo9K815VVmCkvGGErSnc+J z8pS^0Q{JkA^8LV00000EC2ui0Eqw)000I5;PYr?X`X1Ru59bRaQsG2RBd>! z?|kq7z@TtQEDjw8M&iS4I-k&}bV{uj0)(n|%jGTr%C2}!R$$2JwDcRUDl(n`puhwK zJOTqVlX(^hcLRD&0v-rV7aodu7fyUmi5H1k9~d5$i;7JL9+XW69%q&YiJ2d8i+z@< zhg57!R0shA7z7>w9{?T=7;t)zP6M47g{`0hxF3@k7_*LjO_8OImYB@UO#_8=jsdcL z%h(yT%m>yOx}Ixbuv5C+=mnjG1E1zT}(V<8PojCk3;NH46Q-DP)*rb|BOiUF2NIE1Bg8~nF5_N>5?xeI^p&EMNlOdU% z4-M))u|=trqB9u+@HA(MkFbd!+es05kt7q79vz}O!--UY2Fg5W3-!dN!h%T;HszB{ zKtEjyo(K~fu2IsZn34t<Y99?r8GF3lu882vo8U zpa$t`ln8+6@uqB~&1Bp8rN)5>CaB;$7~C!B;DZpV@r45raA4tu7-p#9h8%Y2;fElG kDB_4AN?^eR6m+2CiY&J1;)^iGDC3MY)@b96H--QJJ0|QfxBvhE diff --git a/agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_hangupxferline_ptbr.gif deleted file mode 100644 index c7d264173c8b9ef83a2031fac39fcfd36474596d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 828 zcmZ?wbhEHb>|_vNxXQqwBqCDg?w)FEE6BxVBqw*Os%m<4^y|L9Kg*V_NKO5_apQ&B z+FLCxA;!jk=FR(e<;tXph`)RG{5^E&@BaNao10grrTv*dKgiH9!qjwWN=jQ`;LiMf zXHCt2=g$4zv}torj)S^70|UdK88d(+Er8-r7O=58AQI#!2DbkPjxToBk?KFOr08Uh z)%*)Df*;LrvAMCP?DX5J{SP)&_~`Y^O0qf~$=iMZ!;Tui^|#;u_){ww@cMs4V^ecW zOXnLKGlX(e_hW<>_hT-L?8o&8MtGiT48vu4JubxL#Q zO0@0oJcVu99Y>_5%u|$+x;~F#n#|nI>*q~jl44Liqr~`R zsZ!^4Ud7(rtvTC|vEJLdJ?DkutK2!)?^-bI2-6XBWMgA)neg?P=q`I(pLvJmFGy99AH&oV2l*75A9igQeG$Zd(<=Gz)vbNj9n>(b1c`-=J?N~EB&qV zncC9rfio>`c(XV(?3z0_NX+5bn=5R*%r{g{xtx>N*QM1Sc9>|H z*KfsCdX!URskalqDDOwnOttl_COf)WzG}rMii%30L;w)A^8LV00000EC2ui0OM)j$~<` zXsWJk>rw}F4L-P^01E-1 z3p)?83k3l_(9%1|6U)55i@|5D&J^3W)#yUr65s;F;{Xbn*_aOtdjtoq1v2j(06DYZ zOae>|4(zI+>f68v(IhM~FwlsoSos1_0Mc;d!*>t=BTh*0u)&T4)ZRhTM-rs6kNPfj zeDE({GDSInfNS|}2ZMqbVlrfBljqKoDSzU8pg*w*2M9DURc#qKWnGuuiu;w}!i*IFsL}`EKtXU-+!kEWPjD=^1O^nyS9sar zE`DEDyL$$KTbPaE%#6u5GB~Rllu8sLwL;Bh@sKDrFu-z30e5ExCLr+20#*&OB`Mgl zqXGl`AhmV-F78^mQfm*jAe6#hA*lh!9o)Fp;oJeJ5x)GG7Zo2fDKM~199?F!qiuTs ztU=#;9olPFFMFn|O7 zj0$UuomR?Xq-G}MKx?MJCjcr6BtU5)uf)C}?X=WZYwfkzW~=SC+;;2jx8Q~=?zrTZ KYc2>800283h;Ot2 diff --git a/agc_2-X/trunk/agc/images/vdc_XB_header_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_header_es.gif deleted file mode 100644 index a92c2df01aa8d9aea2d97d0d6511661cb01b7cd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YKTNk%w1Vd(%40J8u9%*_97ZHP8DM3$Dj0002KzV4%=%u-TjUtf0)4iT}j z-5VPsdU}~DDKkVwRfveHA^8LV00000EC2ui0OM)j$~<` zXsWJk>%MR-&-6STg7bieaJUSH2q7pI5vYPgP-q#DwJ7M&Uro{;^ zg)#-1DOC}ZaRxM~z(*xGtx;tzLh9w_0;B^JH2o?QTmhj}=y{`Hom7XO{P{&3v2=?SkEDJ={ Z-GvxtsNsejcIe@UAciR7h-gIs06Vm=^J)M9 diff --git a/agc_2-X/trunk/agc/images/vdc_XB_header_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_header_ptbr.gif deleted file mode 100644 index a92c2df01aa8d9aea2d97d0d6511661cb01b7cd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YKTNk%w1Vd(%40J8u9%*_97ZHP8DM3$Dj0002KzV4%=%u-TjUtf0)4iT}j z-5VPsdU}~DDKkVwRfveHA^8LV00000EC2ui0OM)j$~<` zXsWJk>%MR-&-6STg7bieaJUSH2q7pI5vYPgP-q#DwJ7M&Uro{;^ zg)#-1DOC}ZaRxM~z(*xGtx;tzLh9w_0;B^JH2o?QTmhj}=y{`Hom7XO{P{&3v2=?SkEDJ={ Z-GvxtsNsejcIe@UAciR7h-gIs06Vm=^J)M9 diff --git a/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive.gif b/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive.gif deleted file mode 100644 index 8382205e6fc8bea086053783549dc60c04626c82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 791 zcmV+y1L*umNk%w1VTk}B0J8u985IxCt$cQ4M~ZY)sEuV{Q99bVg#F~d{Mx2NIVt|? z&a;+m{ok@cHYWf80Q}ULA^8LV00000EC2ui0Eqw~000F4P{~QFy*TU5yZ_(u90y~b zXsWJk>%MR-&+$Vr$fNIk@BhG{a7Zi~kHvrhhip2Z(5O_&lv=OYERmYidcR;NH%u;@ zcjL2qeND69aHBg;uk+^eg~7fvEEZ9I0c>~<4m^fC1OSE(340F-jgx>oi8=y?fRl|2 z1&%ulhI^TY00Te)hNwISpQeKkoSmSIl@9|B1(CC?I)#Up!J-ZT35)=HlC!t6!33*1 zvkrQrI-k3_jt!bW+PgfG#>jiq)S#cfk_5b*z7N2N!HnPr+~7Kr&BE~X{65$o7_gS^ znyw$q0Px7wV2?cq0_24Pl`DZTWz>SiM2O1{k?=z)BJ;0|Vaa z80bjkgHP;qED+G_(gRTzY3g*)AfHVi!2bM6lnb8@MzMJ9lcvj1RA);6?5J1_lC}l| zAo+k+AXmhv4#fWO2^1}$TrF8RLmYl3mVhackFB0|XD|q4Gg%XG0p7t|-eRuLh*AZlrqG zscQ#OJImWukT;OFKLUKR{mT$$Myy^7yb610X_}(&3GcBRw&IV>w^Ma^y7~{~M#cKn zp=}bl;tw)8mA!+J%e_arSMIU?l0Sj>gfx}Jc>$T{1A4rGBMNg5a5I2X)+`7JF@FW~ zlVgurW7L4Z>?hGb#EetkhM%Ef%{0Cs2n|uoyhD>%+~o91Bc+{$o;KmlQX@PbF6PrB zG*Ty?fs*Wk;zT>%WmpdkEp!lj$Oxd8dFat}SUZ#Kh({87@DWOvUdqv9m}H)@WtnJt zab}uqTCrxEaEdWzoOH@rMV)vep#%bcWaa0dfCeh)poA7`=%I)v`o{nT5Kuq^kVY!$ Vq?A@_>7|%vs_CYjcG_tK06Rd}cxV6s diff --git a/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF.gif b/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF.gif deleted file mode 100644 index 3357ed2be1c10e76f3dfc5e992c9356475384dc7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 786 zcmV+t1MU1rNk%w1VTk}B0J8u9d3kw%MR-&+!v5#iQ?h@BhG{a7Zi~kHx_Ohip2Z(5O_&lv=OYERmYidcR;NH%u;@ zcjL2qeND69aHBg;uk+@`M4~>}hx=!E4hB004m$`AiVXughKi5~I|&Yw4*-e}l#q%E z4GxVupN*f22R)RMiKm*CJPr*#1COo`oRF!QmaPYyoPIijgpP+ci=~aUk&~_iiUF;+ z37D+Z4+pT1(9Eitt-F|@Jf98Pwzm$c&chFh0KT|)OIJC z94s9H9I(PI+z4fJ?ATn5j%MOfUbfC@oA!MCx4)AX0Peq zl5eZj8)V>7U$=>XC1#ebB&Bkd`*o6+mq){NpAuPW5X)K2z^2EpK4hrT=g@&e66^a@ zDAdgvK_#?=vxgxd4r6zlw#*r2j50MT4=VICb&zoRiG)c~J4#j@i}N@hOe@czna{a$ z$f*(4-z$O2#{}^D(d_luk^e*!+rqok^(BeFc;}sC7Fc^YB#9wPsdf<~Lg^)2Fk#sz z3w|c)S4={%Amd$twiI>CF62ezmm)2l<_C%)zOs@s;!uZ^htY7-l5YQ$6b>w30qBp3 zVvSf}j((xEoQVjibx$Y~8SvF&yI>RFV>e=$hg)y-(W4zt;KAjWYj_Ffm}H1a=9yZU ziRPM9Sjpy_QK$*$oJkx|zyJ&6spp=2_UY%JfCeh)poA7`D4_rl5C8$JHR|Z2kVY!$ Qq?A@_>7|%vs%ZoOJGAd}TL1t6 diff --git a/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif b/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif deleted file mode 100644 index 638ef859afb2ed25d03b46cf000bbfc80f92055a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1231 zcmV;=1TgzYNk%w1VTk}B0K@FLeQ&2@EkLPA2{-`~#8&fMJGuCA`$-rh$?M{I0tl$4YZ z?|kq7z@TtQEDjw9&f>#tI-k&}bV{vSuh{IB5m0KsOajIL4r2yiG5I;bTn%F=#$D!m zzn;AQlF{ccOaXcs1Rob3Q3f6eP6&DeYfl0NPl9=bOalUW0E`%Zc}xX^O$Y#-2Vizf zUl|#jt_T?buCaz58GIgqhf#+LO#~hS7o)&z9so{005M< zoGX*?!#XF57%^E>u}Q{78;2n%=R`n&1Q9d;dK49K<-ta{4%GV~;20AHEwfAnQ?ZYq zIUeXNLxj)+fdn=!;cD1qfQJLrn7njy(a9%2?h@!JP-xfCFFU{Vq*bd;P$(UlAiXsc z!@gmalsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!6y9xi6hgqbSfBv`)FP9Vk%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKgKfRqA(C;%D)UUJW70QnQ0Lm&bmqJJc2F`p}& z2z3fmwrv88SF_x9oHu=}*~Fbq4O0v*9A=iHteU~J~0IVS|tyBJs#=7>jOWUYW9^5LucoB4#FbK@W zpEGYq&d$!>-rh$?M}&lgb#-;z+}uJ!LX?!0Y;0`i=H`!&kJs1N zHa0dhGcy1H0LseBA^8LV00000EC2ui0Eqw~000I5pyOm@X`X1Ru59bRaQr?^RBd>! z?|kq7z@TtQEDjr!&EmssI-k&}bV{vSuh{IB5m0KsOu|I~4qpymG5LA8Tm@t3#a-rl zzn;7v!_nt4OaXcv1Roe4Q34(YP6m1aYfk_LPl9=bOa}mY1B@4bc}xX^O$Gy;3Sf3i zUmP5pt_B!9s^E?xqW~H00RL50|R0n2(=s^3b?v} ziqg~`kyxu`w@t240NYHj=}-upg&&`Eqfh~xsZ8za06sXP^U1)yC%yb_8-?b>fdQ1X zoGX*?!#XF57%^E>u}Q{78;2Pv=LA3i1Q9d;dK49K<-ta{6x90w;24txEwfAnQ?ZYq zIUeXNLxj)+0R%QJ;cD3AfCmNCn7njy(a9%2?hxoHP-xfCFFU{Vq*bd;P$(UlAiXv7 z!oFdZlsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!3x9xi6hgqf=Wz#R4KCe&%RSIR!ji;bHbV1}PZ z)f4oAVI~g|b*4r)R@>fBv`)FP9SZ@1CV~hMs5Y&dlkiNs(M>k%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKg>fS zm~ie01Hg9&HZdBa6^%j$0I)IPh>wOwS=Cz<{_{>wFZD8)n6DYt1YiSk`d<}*2~e6q zi$oa@hlup)(IS^Q5#g_Z{7FgwRVJYnQfTGmN|ZGI0P|63(O^(xoWnK=3LOa`AWUKj z7K00_wCz&Ymt1n7>P2%!WsiGuxR+1?0jYGzQ8smxhk?Q}IR%}0^z*K0q*}Q!8qQLC z?_v2WQouz~?fO|0-c|~kuWKFb5e8Z*J4L630^&%ZppbFM971Kh<}T4TF)b7MHbjOS?NeR^dp`MTV}!QUErZ8wrr*%(8YZd&sJ--U4g2+cdU~Z>~i18gWPq z%vu6?-cn0(itMGd)KS1pZAgT8V7GAJ3D#$wfF3w#*g%sl%Dm_qw_bJtCygwBfP?32 z9|d5r$+=GGow$_29(Xck6n$PPWgc33s`$>^*viDT3QUL>9Th23@TUtpw8zA{<> diff --git a/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_OFF_ptbr.gif deleted file mode 100644 index 335e635665e8555552db46e1547275437ae845ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 948 zcmZ?wbhEHb>|{`2xXQp_VPTP!lr($xY#AAun>TOr@$qSCX{}qguD-rLBqZeM(WAY+ zy>4!9D_5@EzJ2?(YuDbsecRR5_2|)~r%#`Hd3jyEdUe~jZLY4aRaI3_o;)cmESxrN z+N)Qu%*@R0-Mh!Yz;OBUWgtmAp!kyoY`6}H1o?@9?Y{#@i?fbY|A{3#n{*ihl4*Do)~&v+zn_x%q$YW&vUe*fdoUx9$v{~H>cnpS~@zr zy35+KdnQbr)X+D1+VmN@Q)kYZ+c|sQ!bKGe7B5?#w{*qoMXT1VpSfv&vg3w(ftR{KT%*{ z&XKx)fcy2H_fniZxreyV6-?!jVrIzDnC8&jmbjbA;KzjnbEH|Aw=@=fXk^?__>L`u zBf!CVYZLq302zh%@dp|ORKpH)Jd%|z=4`AidH!1LP&PB0jj?7x!-4;``dd{c81zEt zyT4BBI&5a#$k3iE#3LKl6V;SxV!W=0IWSAQF=q+ifn6rrhRJM~GBsWaIW(5(X)^t> z5`J@uVV_A|!3Q>x8(C}&3=&~xFJ?1wi)=c1jA3S&Ecc?VlYRBJto?qSU7_*_Ph7QV^2G}d zY!<2xQ5y{p_%NN$aJl6!zfG`#(O;E;FGA5SRiTaTZ*ZUCZWV>eRtbt1PTTpv-Nakb z{j%kZ!_gCqJ#+ts9zJb(XwFq$=P1L=+@|lI81+sO+4NAhxQ5eZV$m;Cj|I*$ADN%{ zFy5Vf-hjVsCj-;@z_v$|UtfHbuCnQm<_m>JzN{5;t#Yd}WIOd-Kzm Q^?LmQHtjVV92pp_0jU;(yZ`_I diff --git a/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_hotkeysactive_es.gif deleted file mode 100644 index b064725c50f6ae0e8b8a0adcd4d6e92c19197c74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1231 zcmV;=1TgzYNk%w1VTk}B0K@&A{{RXy6cgs6>Wmw#I_Djrlv zGyK}7{ob+AuYLaQ)TN7L{MVmSMKS!>o|1c5sg7p-005M< zoGX*?!#XF57%^E>u}Q{78;2n%=R`n&1Q9d;dK49K<-ta{4%GV~;20AHEwfAnQ?ZYq zIUeXNLxj)+fdn=!;cD1qfQJLrn7njy(a9%2?h@!JP-xfCFFU{Vq*bd;P$(UlAiXsc z!@gmalsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!6y9xi6hgqbSfBv`)FP9Vk%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKgKfRqA(C;%D)UUJW70QnQ0Lm&bmqJJc2F`p}& z2z3fmwrv88SF_x9oHu=}*~Fbq4O0v*9A=iHteU~J~0IVS|tyBJs#=7>jOWUYW9^5LucoB4#FbK@W zp|{`2xXQrLRv1{8?0#xh)rIx7fA4Mlb8DF(AJ^++ebeisjkM&HWJFR! zZEx*p32`@G(VP13?UkF`n}b{pmv*Q8eX{@0^?84;&!1Es@%QPWm3?UuUZ#H^@A-3W z-p<+i|6ZNjJT2$%{Y?&L>duy$3=9l^uFL?ER0oPbS-@uMfJl&^7})+FIKJ3fN2>qC zlA@D2R`V~s_`GRmhTV-dWvAa(?SHVL!bh)PQ^+atNZ#)IA9mFEt-t;L$Ddk(fY<*U z8k?G1YU)}#I=i~d+Om5lOq|rvH+kCh8M#wu&Y9aed)~rD6$=(GTb{Rc#p*??)~uho zZo}qDeT<4b6d9Rz?#N-{RN`V%=1?qPP?X7KU{g|L&)dF(A?NZAj{K9S_v}5wdttxg zkw;GyZ?f|$u`w3#C~{xh%XsWP-=psjF0QO)Ra9b_U&z5xaD-T++5+mr-hHMe5W| zDUX9z9bcD!fcGj_*>k4#%2ENj9n5PPp_T zfp22Hk=k~%{EoED+bnW#gkC&3mdB&=`RCRw!z*l$8kygI7ffh6K0&YU@#&?e4Qw6T z{ALAbX5aU`$>nxeQq_^6Yxd?Pwl&Wiw<*2bDdW+1cG+$21?k2i=C8i_hq`G@Fv7 z9N>0=k#WM+|1v?05ld%FORFTwQvjYUm{QAVmcs zhf_05oAQ|~n1fSHSEkHrdd}z~RMh+L#|c%Y1UGJ(mQtnDE7vG(%38f4C@Eyk7QRne zYj>P0%wD(0>&EN#yUuaF+3+WXp^^QB+Uhr(&X~P^v-yIX_S-F2!mQV_N+t*}a@;9< a{dW6&A{{RXvw~Tgs|>GAbTaM>D96 zW&GNv{ob+AuYLaQ)cn?-{p7#=*Po?}WZAcal6zQEMKP(4X1SYhhH+8;>dv#4Z2jM| zKsF~sIVk`D0Q}ULA^8LV00000EC2ui0Eqw~000I5pyOm@X`X1Ru59bRaQs3K1Z{Y( z?|kq7z@TtQEDj?Q#^S?lI-k&}bV{vSuh{Ih5m0KsOu}UV4qpymG5LA8TnA(5#a-rl zzn;7v)6wTKOaXcw1Roe4Q3D!9s*8>xqW~H00IF40s>+l2(=v_3b?v} ziqg~`kyxu`w@t240NYHj=}-upg&&`Eqfh~xsZ8za06sXP^U1)yC%yb_8-?b>0Rfb> zoGX*?!#XF57%^E>u}Q{78;2Pv=LA3i1Q9d;dK49K<-ta{6x90w;24txEwfAnQ?ZYq zIUeXNLxj)+0R%QJ;cD3AfCmNCn7njy(a9%2?hxoHP-xfCFFU{Vq*bd;P$(UlAiXv7 z!oFdZlsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM52FEzZwaO8hmxYm1%UPS z2tYwyhZ;X5KvdHSPOx2A@g!>Tuv!3x9xi6hgqbS=z#R4KCe&%RSIR!ji;bHbV1}PZ z)f4oAVI~g|b*4r)R@>fBv`)FP9SZ@1CV~hMs5Y&dlkiNs(M>k%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKg>fS zm~ie01Hg9&HZdBa6^%j$0I)IPh>wOwS=Cz<{_{>wFZD8)n6DYt1YiSk`d<}*4N#gu zi$oa@hlup)(IS^Q5#g_Z{7FgwRVJYnQfTGmN|ZGI0P|63(O^(xoWnK=3LOa`AWUKj z7K00_wCz&Ymt1zB>P2%!WsiGuxR+1?0jYGzQ8smxhk?Q}IR%}0^z*K0q*}Q!8qQLC z?_v2WQouz~?fO|0-c|~kuWKFb5e8Z*J4L630^&%ZppbFM971Kh<}T4TF)b7MHbjOS?NeR^dp`MTV}!QUErZ8wrr*%(8YZd&sJ--U4g2+cdU~Z>~i18gWPq z%vu6?-cn0(itMGd)KS1pZAgT8V7GAJ3D#$wfF3w#*g%sl%Dm_qw_bJtCygwBfP?32 z9|d5r$+=GGow$_29(Xck6n$PPWgc33s`$>^*viDT3QUL>9Th23@TUtpw8~`K{|gFs z2L*MUJNG{~cdMqR%jV7h)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E&9yVzMrs{h22 zqLVpR^Dn$OQrOwB?#7z3({HQxKiE*=Qx+l6IkD<&-tPM!cGUQ-zx|$_;n%tMzyCK> zRAnl&$+Idm$V+E+DYME?oWwR^k~~BIG%lXr?z!146MM4SItsYEla&itwgx`hwbHXZ zVD6#xEGCu=g{Em6i}P7nK5#fNEN;sZ=`h&p(7@2H?JmIaq3AxlIWO}jMYj_RHvKP? z7F(A&!&hk0qT4P%eqHlj;W%G@@=nWT>v>PrGT&f$v8`bl6Q97($ROo!&IgK^yMLCH z=`@^MXns|}mZjKX_r$fkbgNHqJis=Q)p1*+R`89`Dg5e10g~HuR5o3@;^}+)^PNL$ zUr8Km9yyp*yrl+?_ zZ)9wLd{U^N<3(@D?sV1(xi==PJLn#Iyi|47u}0+`sV62c6=rB~-Y58ysX!xB+NS8b zaNxf_sdX0$HqBl+vu@d)1DgUQet!3H*eh7kleykjXaWaU#TI!t=@m!jTAb%SaMJF# z>g5Sulh2CVooH8R(@;uPo|f^bv*?MUBdgq&7mvCPj%hsZF}arUxYy#@iexsC1O`VA b2R6+o6I{eHpG@>nTlr*?j~Qo*0E0CEWCuUM diff --git a/agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF.gif b/agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF.gif deleted file mode 100644 index 9d3489fa69695efe455efeb36ae42ac915aae10d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 801 zcmZ?wbhEHbtYHvfxXQo~A0IC*Ev>1k$;->TZ{NPEs;b3{7hk@7dButqH*VZ;adFwW zabrhEM_^#!`Sa&DY}oMN!GnAE?zy|WJ2^SEwzj@}`SSk#`>$TTDl04N?ChL6b!u*I zu9=zH#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T4|qRy){*Kzv83o^ zj@A4N8b=a4E7sjuQ+E1o)&2(?DtyWUgxDumoz2^Q|HFL)7w2an`L58R$E5_cbAMbOV;!}7U_u$+}TpR zGF;1)rcGqqJ&j>ac4f7al%n)*MaDHUiZjnK@0C_$nl$6eH5q2bo^xkTWnW?D+IpgZ zM^RCR@#>n_xomf?z3MoA>Fo?9#Y>Za|7Ci>E4}1dgi*Spfn~CC0L#|EN4r*fmIur| zl%B=Jk|EGEZDVmh8_Nfd1ct?JSt2b4TN4g2v}?NxaC|6|XE*0%-lXVuV!@{WWm016 zGH3V-En0Nj>Bp~YzAGH(%TL~Exokb}samER3@^4dENkKw_!$|bJk9w)5p(y?k}{o! za|_L{D%i3FJM5mgc9(AT>5UC+6ImU%HEIRl2%W;Oo);jwJx68Jr7NDkw?E%GwDy(6 zu~yE&buN8D`m3wm624@(wcMO??$ysHX{L;|Cv(_WCuh&L$Uh~m;KO_VfM|MpoAkzm zZI4e1b#uJvE!myUIwAAIgmnkqLywoLuG-e9yd(9*yuh{p-8rx+K;q|jABVky6+M~jZG{3jxGJ{DyGgA$GS}if=Yf-Uzf~_! z@S1#9-0noXLYszCs`9jqN1a7a9v)zp-SXm5x4|)u$2}(3G9LF@JX@j6CX`~p$l<`I Z`DB8NSmu+79%?I}O!6_~Oc7wP1^@>AKm`B* diff --git a/agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF_es.gif deleted file mode 100644 index 45bc42903668d2b577952a8946d2bd179c5726c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmV-`0)PESNk%w1VSE4(0K@ zO@aXcXC7+@gt3=;8Mzq@f*84R2ZxDrtBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP6?_@25Z+$1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#n;~4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IA|atS+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYEnk9b# diff --git a/agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_internalcloser_OFF_ptbr.gif deleted file mode 100644 index 45bc42903668d2b577952a8946d2bd179c5726c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmV-`0)PESNk%w1VSE4(0K@ zO@aXcXC7+@gt3=;8Mzq@f*84R2ZxDrtBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP6?_@25Z+$1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#n;~4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IA|atS+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYEnk9b# diff --git a/agc_2-X/trunk/agc/images/vdc_XB_internalcloser_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_internalcloser_es.gif deleted file mode 100644 index d5c05657affed58bd7db42399b8e774277bff82c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmV-`0)PESNk%w1VSE4(0K@|FN zO@aXcXC7+_gt3=;8Mzq@f*84R35SVttBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP710^2y53&1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#oaF4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IEWx2S+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYE|FN zO@aXcXC7+_gt3=;8Mzq@f*84R35SVttBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP710^2y53&1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#oaF4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IEWx2S+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYE|_vNxXQrb?p|I{u)Dwi9T%5iTG}cR5v7=zney_+t*v)$ZPTi%&eYXi z+PLxm^5y@HjYH?p|9|!Be^b-Q^z_w6M!{FE{9mx(e@e>o$jB*s_x?Y0=>Pux|65w_ z1O;_yYPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E)7IO?n;)qi41 z(a9XE`4?Uof4-35aAQr`>9TXr8w&d^XwM-mV-OSFT)C5#8TxwJ@)`MLS@KyHDRazSE-RD6xq9m2Ra5df zX0K+-W$Iph zrld6G%9`sJa+ogcxV0zu%JE0+JCsi`^W`$SY$z(uiI|^M!nG?f>^!ek>Si{X1ZIaQ zGr?j9)`ahFi9CQSjq}U)jzOk{CSZ&|Y9QJ2oL)|hUCV;af|H6a@gvRgb`@wm_C+l$Bj4s4oF nCb)=MK4BH~FmUAXF?;!Ba)6uW(|_vNxXQo~A0Iz;>ePMv_VM!ac64+|OG|5NYF1TM1qKFg+_-V^;>9ag zthjvn@{JoeTwGkvpFjWL!2>5JrBKpDbWwbwDJ@PYi7T4|F|o){*Kzv83o^ zj@A4NFN8l`h_Jb_rtI|Fs{Ic(RQTxi%TH!=K9aZl{)Zhke(P_)|M91mG2r$8hQ_Am zmYTX!8HRjzncm*69BCPji85Tdla(0ydfD?C`D9q~Sr#dA&Rs4eox`zu>f%*X@;GO& zX3AyiWz6N0nU~jD+Lm3aD3dR($ksPOiJ4h(I*Z~2uB%Ei$NLWCa4IshDsIfV-o>t{ zIOWQk>lbpEF6_9qC-=(nM{GNkPBHW4GCFN2D$a?RpH#xND=_RluT|=1Hi-mghp24= z#SW|q-`y51OBU9Sb5by1G00*FDASqH@Tj4Rm1{zdrqY80W?at&HcvLbWb{8T$AagA z>4MOXX@<>t*(IG<82EnQvN&+UM>0_GFAGFF#2(CMe#tmVt2g-K0k%o3EH+d8 zdV>yxHrTcX?ECX$Vaq{N@i|^OD@uG*#2==~FkH0wASxaF(@n@tbYk$sszRB9Xb!$D zCBD%i@@z{Ma2!lzaZhhqvf@#f&a&2+Zi8bQ$_h0$6CBwso~?M?XY=jF<9-J=%_kFF k#4J@(asHj9l zMA+Ea>gwvx&(C&tcHiIMLPA2`-rk0WhOn@(;o;$5Utb#=8#XpJZEbCqmX?u`k=fbV z=jZ1%G&BGJ0L;wHA^8LV00000EC2ui0Eqw)000I5Aj5EEX`X1Ru59bRaQsru6K!~| z?|kq7z@TtQEDjrz1>(bOI-k&}bV{vSuh{H0QBi8Y;IMd1=6XK`kD%#k3kuAN$H2^Z zGM@|P)An58A94c$Odfj}7jbh;7=3?DdQEmu0v>>Ec$gms9u;+co{Dr$1Qr$tO&DvO zo)rool?4PIgtGx=OPdy!g#Z`>d$1Ovc8QT502KqCjjnfm0|kgo0>g|J7{9@J+mlUc z7NZ`(2LsO)7Hc1N7yygHp-cb*0Jdx6<`sCrjF+2ca z1-sy>O}0b|)lK6DshbBU1}r2iMA5*7X961k!SSX502)K;>SVxR@53wt7cLC=U?D)r zk+Td864)hI&yjot=p^tVfQ4BrJ&1g`?&C9jiKJpnca z1N~)aObD4O0Jda+4r`4_=F2kpbfUn&Gj|jd;DFPN2T5D|8Inx^1MGK!OLv?U-Y^-E zMgTi<81Ud=u+W2Ig0D1k0frj76drIz@f1u;e6(>2hD;pb!H6Fzl%pSj2y!1DO7ZxC zj|6O_9a()~V8?a#M07_%e2|992ZK!6NmDy5`D2d*46r2=oa|u-T2&5)UyWqMDd(JY zS}{`m}aW!rkr-_ M>8GHE8fpjtJLwc=dH?_b diff --git a/agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_OFF_ptbr.gif deleted file mode 100644 index 63594d6570eee9c43792a3620cb74e10791af6b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 816 zcmZ?wbhEHb>|_vNxXQo~A0Iz;>ePMv_VM!ac64+|OG|5NYF1TM1qKFg+_-V^;>9ag zthjvn@{JoeTwGkvpFjWL!2>5JrBKpDbWwbwDJ@PYi7T4|F|o){*Kzv83o^ zj@A4NFN8l`h_Jb_rtI|Fs{Ic(RQTxi%TH!=K9aZl{)Zhke(P_)|M91mG2r$8hQ_Am zmYTX!8HRjzncm*69BCPji85Tdla(0ydfD?C`D9q~Sr#dA&Rs4eox`zu>f%*X@;GO& zX3AyiWz6N0nU~jD+Lm3aD3dR($ksPOiJ4h(I*Z~2uB%Ei$NLWCa4IshDsIfV-o>t{ zIOWQk>lbpEF6_9qC-=(nM{GNkPBHW4GCFN2D$a?RpH#xND=_RluT|=1Hi-mghp24= z#SW|q-`y51OBU9Sb5by1G00*FDASqH@Tj4Rm1{zdrqY80W?at&HcvLbWb{8T$AagA z>4MOXX@<>t*(IG<82EnQvN&+UM>0_GFAGFF#2(CMe#tmVt2g-K0k%o3EH+d8 zdV>yxHrTcX?ECX$Vaq{N@i|^OD@uG*#2==~FkH0wASxaF(@n@tbYk$sszRB9Xb!$D zCBD%i@@z{Ma2!lzaZhhqvf@#f&a&2+Zi8bQ$_h0$6CBwso~?M?XY=jF<9-J=%_kFF k#4J@s(O0Nr>FljGgYy% z|9*bbpP&C(S(Me)|GvKeWMrpjXR9(YQ^LakprHRpM|TtyA}J|EQc{R;aJ$aV|7~rx zv$OvvCqV!J0GXNpA^8LV00000EC2ui0Eqw)000I5pyOy{X`X1Ru59bRaQsfp^Kf{s z?|kq7z@TtQEDjkE1>(bOI-k&}bV{vSuh{H$QBi8Y;IMd1=6XK`kD%#k3kuAN$H2^Z zGM@|P)An58A94c$Odfj}7jbh;7=3?DdQEmu0v>>Ec$gms9u;+co{Dr$1Qr$tO&DvO zo)rlnl?4PIgtGx=OPdy!g#Z`>d$1Ovc8QT502KqCjjnfm0|kgo0>g|J7{9@J+mlUc z7NZ`(2LsO)7Hc1N7yygHp-cb*0Jdx6<`sCrjF+2ca z1-sy>O}0b|)lK6DshbBU1}r2iMA5*7X961k!SR*=02)K;>SVxR@53wt7cLC=U?D)r zk+Td864)hI&yjot=p^tVfQ4BrJ&1g`?&C9jiKJpnca z1N~)aObD4O0Jda+4r`4_=F2kpbdtcoGj|jd;DFPN2T5D|8Inx^1MGK!OLv?U-Y^-E zMgTi<81Ud=u+W2Ig0D1k0frj76drIz@f1u;e6(>2hD;pb!H6Fzl%pSj2y!1DO7ZxC zj|6O_9a()~V8?a#M07_%e2|992ZK!6NmDy5`D2d*46r2=oa|u-T2&5)UyWqMDd(JY zS}{`m}aW!rkr-_ M>8GHE8fpjtJ9O4$D*ylh diff --git a/agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_leave3waycall_ptbr.gif deleted file mode 100644 index 7bca06f94630a6e8ad47d9e2b5fa7768cac0d2a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 816 zcmZ?wbhEHb>|_vNxXQrb?p|I{u)Dwi9T%5iTG}cR5v7=zney_+t*v)$ZPTi%&eYXi z+PLxm^5y@HjYH?p|9|!Be^b-Q^z_w6M!{FE{9mx(e@e>o$jB*s_x?Y0=>Pux|65w_ z1O;_yYPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E)7IO?n;)qi41 z(a9XE`4?Uof4-35aAQr`>9TXr8w&d^XwM-mV-OSFT)C5#8TxwJ@)`MLS@KyHDRazSE-RD6xq9m2Ra5df zX0K+-W$Iph zrld6G%9`sJa+ogcxV0zu%JE0+JCsi`^W`$SY$z(uiI|^M!nG?f>^!ek>Si{X1ZIaQ zGr?j9)`ahFi9CQSjq}U)jzOk{CSZ&|Y9QJ2oL)|hUCV;af|H6a@gvRgb`@wm_C+l$Bj4s4oF nCb)=MK4BH~FmUAXF?;!Ba)6uW(FKNY?){&VvV6gU|A!9!zk2n5WaJbhqhM3h$SYU= z2L*L#YPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>C)9`k1qhRR4)3 zMJIEt=KGyyHe!rie`8JA>9 z?7EV%Icr-s*D+=06Hk?7GCpx-uzyvWd|D}Q$<1zYh51`b__i%%49GuXV8Zlr>Ew=O zj)(2bGZtnZU&pXCbMKCgF9jGFJslZtx1iGTa8o$4P zczAoIz{BRhzkhsweg8Z#;r(Y|<4|Ce@|fVr!J)R|K@*SJiwDgDZW<3;MA#S^tO0TG BA87yp diff --git a/agc_2-X/trunk/agc/images/vdc_XB_localcloser_OFF.gif b/agc_2-X/trunk/agc/images/vdc_XB_localcloser_OFF.gif deleted file mode 100644 index ed11b7aca56f642f2c94b6f0aaf0dc776759e7c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 728 zcmZ?wbhEHb%w`Z^xXQo~A0N-l%R6=I)QuZAN=r*?YH9`s23A#7?c2BS#*G^;E-oup zthjvnaz{tU;>C;4pFe;9{{0ObHoScKva_?($;rvx-TmIZdu3&14<0;dZEbz^>Xn(9 zS#ECb#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T9eSTQ>qzyVSWopnQa{mU9&q@x6E11#hcTRo~bx3 zi;q!}Ra#MTi4vDD~f zQq6|QSs~0hoCzFfUYwZnUBOTJ)Vpg8d<+~c9j(R9=a_DBEIA~Ru{glw&=kcBZ4HV( zEH_*XzC3+B?XqcJ^0C~R$CB(;uHg7loY9#-YuYuoNmpM?U}!)7O^1!)fTOfxB_mHr zo<~DN!}<3jUz^S(>ZF~$^~Uq^ABjmDcxBeG2B`QHulHQ-8O&o=YG}P{-vy3}?cN_5 zn0Lu^Z}3==#Nl-G#WL%8H4980eB;T~?wC@MmUq4Jy`P7}l3hJ@msZE`XV>`s{lmlC zl>!T!|Nj2*`Stzt`}hC<&%nmW>d(*5M@L8B-`|OeiLkJ+(9qD~;o;ui-jqodih?0s={*k6}y;ut*mI37MO79tq0HyhsGX#7oH^0ozF4 zNVR7Hz@{E+rUeEc2C&i4#gR;+a!Jlg)k&2f36vSq=JtGBg`w5658yHZ@r*%5D?EmO9BquB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp#! z1{{&tT*r>ohXKAmILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=F@pl;@@62qL~N4)*Zi*G z>NU{<23;AT!`yX%G*MoYc^gomUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- tP?(^hx%21Hqf4Joy}I@5*snK$Ab~-L@8H9WA5Xr#`Sa-0t6v`i06U$v6t(~W diff --git a/agc_2-X/trunk/agc/images/vdc_XB_localcloser_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_localcloser_OFF_ptbr.gif deleted file mode 100644 index fbad052dc2e69833d6c28150b84307a91a0a6645..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 607 zcmV-l0-*gzNk%w1VQT;o0K@W>d(*5M@L8B-`|OeiLkJ+(9qD~;o;ui-jqodih?0s={*k6}y;ut*mI37MO79tq0HyhsGX#7oH^0ozF4 zNVR7Hz@{E+rUeEc2C&i4#gR;+a!Jlg)k&2f36vSq=JtGBg`w5658yHZ@r*%5D?EmO9BquB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp#! z1{{&tT*r>ohXKAmILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=F@pl;@@62qL~N4)*Zi*G z>NU{<23;AT!`yX%G*MoYc^gomUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- tP?(^hx%21Hqf4Joy}I@5*snK$Ab~-L@8H9WA5Xr#`Sa-0t6v`i06U$v6t(~W diff --git a/agc_2-X/trunk/agc/images/vdc_XB_localcloser_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_localcloser_es.gif deleted file mode 100644 index d36e1944c7976070d7192840703d0a7963d2ebe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcmV-k0-^m!Nk%w1VQT;o0K@ z|9X1NTwIwmGgY6T|Dd4%GBQ)u)&JDg|GmBc!ovS#WT(Hs|8Q`-DJeu!Qi#sZ|7~rx zv$OvvCqV!J0GXNpA^8LV00000EC2ui0BZmc000I5U?gc|X`X1Ru59bRF6CGgXWw|P z?|kq7z#!03K`1`Rq;kn@I-k&}bSg~%jMS`l%k3(y*e9cb0R%n^%wieHU@)08(hWy4 z-uN~C%~)dkOBZAW7fEez8A=y*b{JJxM@|GD0vMD57aoO%0+gKsXBnOz03V`zYaRt} z1)548iAoF}0~iAyeF2>qodih@0|QB-k6}y;ut*mJ2br659tX@r*v5D?EmO9KwuB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp!J z1{{&tT*r>o2LZl5ILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=af1Tp@@62qL~N4)*Zi*G z>NU}V23;GV!`xMXG*MoYc@t2eUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- sJTS1Kx%21Hqf4Joy}I@5*sqT{0HK5T@8H9WA5Xr#`Sa-0s}BJHJIMbIl>h($ diff --git a/agc_2-X/trunk/agc/images/vdc_XB_localcloser_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_localcloser_ptbr.gif deleted file mode 100644 index d36e1944c7976070d7192840703d0a7963d2ebe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcmV-k0-^m!Nk%w1VQT;o0K@ z|9X1NTwIwmGgY6T|Dd4%GBQ)u)&JDg|GmBc!ovS#WT(Hs|8Q`-DJeu!Qi#sZ|7~rx zv$OvvCqV!J0GXNpA^8LV00000EC2ui0BZmc000I5U?gc|X`X1Ru59bRF6CGgXWw|P z?|kq7z#!03K`1`Rq;kn@I-k&}bSg~%jMS`l%k3(y*e9cb0R%n^%wieHU@)08(hWy4 z-uN~C%~)dkOBZAW7fEez8A=y*b{JJxM@|GD0vMD57aoO%0+gKsXBnOz03V`zYaRt} z1)548iAoF}0~iAyeF2>qodih@0|QB-k6}y;ut*mJ2br659tX@r*v5D?EmO9KwuB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp!J z1{{&tT*r>o2LZl5ILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=af1Tp@@62qL~N4)*Zi*G z>NU}V23;GV!`xMXG*MoYc@t2eUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- sJTS1Kx%21Hqf4Joy}I@5*sqT{0HK5T@8H9WA5Xr#`Sa-0s}BJHJIMbIl>h($ diff --git a/agc_2-X/trunk/agc/images/vdc_XB_number.gif b/agc_2-X/trunk/agc/images/vdc_XB_number.gif deleted file mode 100644 index 33f303308b856190585ce243cd5c6585bd7de6eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 480 zcmV<60U!QHNk%w1VR8Tt0J8u98yg~{qs)4GnGOySUtf1bL{(B!X0fr|DJe6)zV3*K zs+N|!Ha0|UZHNE>0L;w)A^8LV00000EC2ui0CE5h000F4@X1N5y*TU5yZ>M)j%4{T z%M=jLN(sUvpi{#HGNUt%6zn?I52&aBb+O07z$hdwf&#;Un;Z(Sr-V@5I0gyHf}teW zdX0f$0vMzkhJ~D`M9Ag1gi|f`BzR zLr$asu|)v~4w^-5-~fjyv}h6JfeV-EmYAF>MEWw&LV&Xl49UPXp&MJcWEjxx!PA7} W$B-jSo=my2<;$2eYu;QU0suSAL%4$g diff --git a/agc_2-X/trunk/agc/images/vdc_XB_number_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_number_es.gif deleted file mode 100644 index 6d672accc6b9494df75a7665685349aea7210c73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmV;R0bl+{Nk%w1VQv5p0J8u9%*_97ZHNE>05mX^D|zV4%=%wJ!38yg}H4iS2K znNm__L_}4wvE3;tGl+<)A^8LV00000EC2ui0B!&d000F45XecZy*TU5yZ>M)j$~<` zXlf0_WE|?LDAf>;LQ+VCeUpJeMeqv=0=^z#CV2r40YpM^$Qb~IMGgj73mKnf0uguuMeBd!NkTmViRL<~YoZvaXI3 zR}+C)h!l$xL=6ZHj6_il1qhFk01s@FHjV(Q5|A83uLO!hjJGWSM8n1d$__Ti1P-9W zEI6DkOQMMNOp8E5G9Zk2$CBd}TeJoPiJ?5zY61d164b$~w;-RW0qrEb}&;kIPaY+F-tfOt?uiw9VBLDz9KM0~| diff --git a/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial.gif b/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial.gif deleted file mode 100644 index 195b1a9032282c3fe36670f53ef490eb05a366a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 896 zcmZ?wbhEHboXjA=aFv09i%Zbmy9H(@)%_qi&)rXIi>ShWSLj4R%Vr%!7+P! z@4OA0^5!gDJ6Cz@x~(${7xYb4UbQA~^6{QUbq%?BN({XWN-LPJFce(rWm1w=mR6d| zsl+s^-~qd=lF~ex8+o5rykmODz_I)KHsz>R;FAl#sOABQATBHO0 zuW!rad#W+XEa?#k>r=Nmlb>fsxfMJ6*{hlEU15dylbK$8S%wL?OYLXe|N&la5 z=fuvwRK=aIiF+zp!uEyx4idqYK|;wH7flI50)EF5zWhWJy?{_CVnUU-`YpBMD85 z-YoUCe4aRUt|+_9PR0Zo*TMomzpoF{@74Xi`z6s>+2NUdoYESzLnX$$E(&*8F>aM( z;*4p&D$U~2(r3i+#l@E?`)cWoNlY@%w@sPnw9ko`eEVZU3fq|={=WHFZd{!DMYrk1 z%#39#pUE1nd--g30oSMFEJ8I2&*xS=Tlsum&9|4&=Qprvy;#ul&hsF%n2W%nMLlM( ZUM!yAruA~kl(4LqOJ}5MWePA@0|3E^b0h!& diff --git a/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF.gif b/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF.gif deleted file mode 100644 index 7c2757329221b9c5c8cb424de56c21a5f601e295..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 896 zcmZ?wbhEHboXjA=aFv09mzOs_K3-E(bMfNE($dl{E-qD7Rr~hs+qiLKU|?WJN5_pD zH!fekykffcJa{m5>eSra zTr)GXi4!N@ym|B4vu7qICJYP=XU?1flC%JdKUu)W>VQa)pBUKwJNP_x){*Kzv83o^ zj@A4ND@2pO0%#IViC6{)Zhke(P_)|FNg;{Csn!oZ6=5 zme#iR{QAZ`nO+%Iu6#}z>4LsqMs_7;8MZt|8O9zF8 z^7x)=Oj1i)#KHR1WzOX1nNe;9k5A3@7I(jA$il!CFvnatl!NJulT=MG!#wH#Gwz(& zx%nku;xThM*9A2vjE^*QDV_dl;+d`-#3XIzVN$RlDtzYURfP=dlkb==FS@g`nR)9X z8%9Q+GgXiIRx(&HZkSlS(>&#nTjKs!25<8tv-gVbF8a~+MMGxw<$HmvQxsenc;7v% zvVPI_VDFZ;`)6{!g%7qdurRpX^8D(%ckfa&h8wp7bspS$S7P)wW?jWDyHsIJBt8?A43K W6Wp|3E}0UR^>XQqG_6bl25SJM3vzk@ diff --git a/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif deleted file mode 100644 index ef710c9c52b9504fcc81678712bb63d7f50799f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4w7Nk%w1VUqw50J8u9dU|@()6NTJVmjb zXsWJk>%MR-&veZ`!V)}u@BhG{a7Zi~kI1AlI7sN0(5Q4ut@fJFN5a893?2>y&XM3D z9KdaNaOOG==b*swW}|zDM7w(i@WO6nYFuRxdj?_$foEbqhhkd-Jc9;)2n`O1hIe2H zif#y4J6Z+_2?ht9qzz`AJ*TFqXQl}NaX$kN1g8YIJbAOGwwZqb2?wPJu%?Z{1_lEM zd8WCIJ;4nI57~vw*#ia*3E#e9(zFAjlc}54+go40uk3xU^6O^3uE6%0eqmbJ9RqR; z9DqDN06MyJCf7K8V+1((0!~0VPlb4>3)lltsEG#uB;Diq=Zv%i!+;>XwolI+X~Ryr z8%XM8GfsJsom90jRwZZ?YwD!=fL}*XsH8pENYo<$b7e+0H3@U%%6KiQqHI_SAk9-Y zTj4pDG?hY@To4gxfFNYeIz)|@)Txvyy@_E6xX~u{?$d>71R~1XkCaz|>;Utqw6f$6 zd33lC;0RA*lSmDhLiNG46xdG5p4y?+XqhZQwSwtswTp~ujH**UpaV%T=~kwYMVpo& z*REP(H9D|$iev)<;0)-622Px!-RPLQ@dD;)qe^?oOqyJ11KQjgcMe2 v;e{AxsNsejcIe@UAYKRn0RpVmz=!EFvck3j5OBRVgvv?;L$4! diff --git a/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_OFF_ptbr.gif deleted file mode 100644 index 72dee5c09484be2ce4a5a9a274703f47d6492d2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 916 zcmZ?wbhEHboXjA=aFu}}DJe-tMuv}%FC-+SzP|qG(W6>gTHCj8U%7JSx^?Sr-n`k{ z+w11$cJ11=w{PD*efsptlP8ZJJ?iS}a&>j}^77iYZQIqWSF5V3X3w5&VPR2NSU7Fk zv{$cQnVFg0yLXR)f#LGy%RrKLK=CIF*l-;X3Gx#I+kc1lW@jC#{u4`zPUcw6zp%pO z=LQF*d27l}zpdK;U_*tE-t6=D+Kwz{*m?iMjvBx9x8MKRQ+Iy8IzvuvQ*%peTYG+e zW0916A2X|hyaWfMyyQd$26-lyd^Y)+eSHiCtdjDK91467X`yLy&9cWGB{52F+V)4IvbcbS& z60;PuJo~-}Y)os8oZcw8_R{VzYJwRo@8_EM=l${&R%>A7V0>_|reXQP;0B)AVh1Lv zB^+?elrSj~wmi_=$gu4X!!0p)XMF*s{KS^XQw)av3Sul03E4s%|H~xqF#J9Fz+rXx zpD%B(QQN9beNNPP}?_CTy~ZSIC>p%NP4)6ThBraAwmsUQeQW(u#uLhH`&?tl7T$p!n{{ z55CMMKC^z8iZPtJ#=tDWvSV`btc#~-OlGQhb?a^Va^}r8zD@!cd4Da~(8K1(<-S1q z!H=ggXOAZs7Oha&;C?=QqXKJt1oIcxCe{8K%f!s@xtMS=e`8??wp=08z{9q~Ky>4j z^qD4VlUlh#Rc6>fWJ&d`V+%F8>h#m3iJ?fO(rIqGoM=XLhC*j3gT;$N)`nIs-Ak7= zCfsRa&{)-Tv{Rkgf@N~6-QN}GHCL|r1#Qb_0L!w8+0K4caPH9 z@&^xuAK18VYB@2t;@QgOvUlIUd_KQ{?~^;TXimb5g&k_EUM%V{d-Y=R1UIdhOQz^m kF|u;|TsXLFPT8xM%NMk1y;`wkTGp$TE0$?x2{2d#07AEQZvX%Q diff --git a/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_es.gif b/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_es.gif deleted file mode 100644 index accda01c85b5f905d644563725477b017d5950f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 659 zcmV;E0&M+9Nk%w1VUqw50J8u9rl$WmI9^;_nPz6He}B}!zyHM)X2nw! zOscMI>%MR-&vb3y?lUmJ}YLgz^M z5DsDY`#^gg2lQ~zfVb1XL&E(<3&MP5YhGq|UJV2f2XA6xL4jjk13rTee*|@icRyl_ zZwOjFTn!0bV2%k54QF^jsikmer3nIZK?Du~T>-W}da|Xp4yzBA2?wMIucc#mrFDvW zrMS&Mz^V_bh0EB(scF5P(g_5ilwfz%*&Md}Y1wE%BcK~3rdSJQ&=qK@ha*IJr2k@^WW%t^pi zf{cIE@e+V<7Xl4oJp>rBP+y9aNTs@&tSJFtdqO{pBZwC2W@vPkd5v#Y)jEk)Gs}4_ zO~_febkQ<-)RMAQ{u)#sh8K^wMbUuMeS^-D#xTO(Y@=?d4!EFvck3j4Va~06Po*Dyskh diff --git a/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_XB_parkcustomerdial_ptbr.gif deleted file mode 100644 index 0101ea9e8939ac0f00b6ccfc170e45c9fb9e029c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 916 zcmZ?wbhEHboXjA=aFv0<-Mw5yM2U+_(AG9BCT3=T|2uhkMm{E_<#BG z|7mHfjEzI*&;Nhu(Et7W{~H+vx3t{3a^-(Y%5qcF$OQ}jM@CM$diDR_z5mnGR~HoQ z*3@(f3hFp_?tgCX*3Fy$tE)RQFfh!V`5#D99Vq@}0h_48{c$!AlV+1JNVz$&A}$gV6Sn=h@jX7NU) zrIVyrES|JjCVyw&rgbaUu9)s zFqnaFw#0!+Y6%D2GNr9bge?#BHZpAc!*EM%x$}BKrToN}$Wsi4{mK$75((LtIR2MO z-(mQBlfiLy_@6ItwO)P>+qj^x@7JS*hPffjg*NgkFr4l^y)Hjy7vqKQSa#-{Vdn&Q zzZYW`WMgp2`jvJdY|A8`0uBWQ;fVNOyWYJG&w8|HS;yBRhZCFlGB93830-P6}{EbE`K zI5y}&{O=y6v*iyS2tTlK-PCeoZpE{e%VqDreffNT1K+21R-u}N7YjSoR=rr%WA^IB t;t6hAFPBWwt8!$OauGPRY);v$m&+HlX}wypWLnm%l`EEMWeG4?0|3}ucW?jz diff --git a/agc_2-X/trunk/agc/images/vdc_XB_seconds.gif b/agc_2-X/trunk/agc/images/vdc_XB_seconds.gif deleted file mode 100644 index 92fc7f2b380b00341c73446d06dec171457d0a9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 352 zcmV-m0iXUyNk%w1VMG890J8u9zP|2ydYKLm5no?-v9aALDKkVwRT~>3qod4HQf7#V zsx~%6ZEc8_mb(A|0L;w)A^8LV00000EC2ui07L)|000F4@X1N5y*TU5yZ<0X49mg* zQmHP}STa{U;9zSA z0@Fh7(kM`JV2c1jNdO23)TG8^2=sAr5(EMd3L{z1#|#@C^U2g?z;~N0^0-zhylwF?FSm#IB?Jp y*1&_`7#tXAK$W3|0un@`XDHCYEa?_HFc3*sh>su*Ly805mX^B?4iR5pcPS||v9aC0zU~_v zB6@n6qod4-h^j!BA^8LV00000EC2ui07L)|000E~5XecZy*TU5yZ>M)jvrzS zLy(Z&z*kR~XgheYDw8W1D_pa6&{Fc<}C4>|#C2@f{|QUOc|X&eX(1_}=V0SYJs1q60M zb$6C}6LxtL2|5D}ri2A4D;*0!69)tV4m30godBFuprtwzq*nl_ssN`F423=&eNq4o zfq-{z2@7#^E)IppwFe8UPJA5C)>f3^Xp1hyVaP7j05mX^B?4iR5pcPS||v9aC0zU~_v zB6@n6qod4-h^j!BA^8LV00000EC2ui07L)|000E~5XecZy*TU5yZ>M)jvrzS zLy(Z&z*kR~XgheYDw8W1D_pa6&{Fc<}C4>|#C2@f{|QUOc|X&eX(1_}=V0SYJs1q60M zb$6C}6LxtL2|5D}ri2A4D;*0!69)tV4m30godBFuprtwzq*nl_ssN`F423=&eNq4o zfq-{z2@7#^E)IppwFe8UPJA5C)>f3^Xp1hyVaP7j9<{j1f?`|A2*3%N?=bPDG zt0XUz7887C=dw^=*SjaS{Qv*&|H~_@W_AC6edGU&%m06V{{Qju|9^k}Kfn0@@1OFV z#Q)#l|9}7B|Hmi)e|-4={lotckN&^E|Nqi-v){{Q^) z|J{9{?PLSRpDbX#Iv^6{CkD3v2O0`Ibfo%EEGasfV>SQ6iW0B2QR{EKPB{IxYX5@` z6+U|Xrv7I;olXec`>>Duo=f<9tPSFh<2^AYc0-Q2^+DzJ8EtGM^VR$(@#Lx(uo+qgLo zAL8e0W<7O^hmE`WAQNlj`3p>3Y{wd}-9F6Lw%lt~3;Ux(yv-aZUthWT`taKahi)+3 zdd>O$3)2&xyWz7{h7JMPlO?5(x#Wr0>=9LU{4%sf@ebu;|eTUkHpQhOg zEIh5X(j{eq9m;}Q7nX9pZH%nx{+1hj;ecAhzW?9EwAQR(TBRf}qNq{upfQ;7{u4K` zwCUQ+Qw0>8=f>O=NOzU*DKSWSeZbZ6)jYOERuUB*ui-; zxHZyLqvu)hX@+fFe5XF&b-Xd-u->e`6-}H<3NI$@d2wLYV}}nyHdomF8_zy@XnB+& z{@g@W&gzZ^hZc?w0o6XH4Ku$h@CY)gTz~g)~|G?A} zzRVh790!EFzjAA^Z%cp|6g5mu`}-J+Z}DPpdp9an-Eu|NsB}e|hEq>l^=ne*XXO&;J*f|9^b^|L>pw z&oBP}_~ie)d;h<^{r~R%|Mw66zq(v2~AU`p%{Xfu9;GrYce_~0|$sDWs7gm&bt&LiLLp$;G+p7H! zHdOfN^_%*iT@`dgkKY z-mOOk51(Q`bWnh+k(r6@>V<xe2BRWletwj^At}bY@$Tn>c{fHn(NnTsyf(0L$`U@APZS@wNv-KFeoHEM?3C0u7YJENj6fEL59y<7h z(IX}!VZ)?}&%>6zsY+8|V|w%OT^0xPDkWt;#$t|-caCuIHF>7^W)!Avp7iwCGN0d{ z9?x!?(JJ#{hx$T6HwTXO)-M`c=6&hui{W-?YKqD$be<P5(q*eij;5 zc4S_vgXp3|tWFCqoYbkl> diff --git a/agc_2-X/trunk/agc/images/vdc_tab_script_ptbr.gif b/agc_2-X/trunk/agc/images/vdc_tab_script_ptbr.gif deleted file mode 100644 index 69e43b796cf4e54e22bffc09ba16377d76657104..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 825 zcmZ?wbhEHb%w&*bxXQrr|M`Xg|Nk=p8GnBMe|2s5%9$>9<{j1f?`|A2*3%N?=bPDG zt0XUz7887C=dw^=*SjaS{Qv*&|H~_@W_AC6edGU&%m06V{{Qju|9^k}Kfn0@@1OFV z#Q)#l|9}7B|Hmi)e|-4={lotckN&^E|Nqi-v){{Q^) z|J{9{?PLSRpDbX#Iv^6{CkD3v2O0`Ibfo%EEGasfV>SQ6iW0B2QR{EKPB{IxYX5@` z6+U|Xrv7I;olXec`>>Duo=f<9tPSFh<2^AYc0-Q2^+DzJ8EtGM^VR$(@#Lx(uo+qgLo zAL8e0W<7O^hmE`WAQNlj`3p>3Y{wd}-9F6Lw%lt~3;Ux(yv-aZUthWT`taKahi)+3 zdd>O$3)2&xyWz7{h7JMPlO?5(x#Wr0>=9LU{4%sf@ebu;|eTUkHpQhOg zEIh5X(j{eq9m;}Q7nX9pZH%nx{+1hj;ecAhzW?9EwAQR(TBRf}qNq{upfQ;7{u4K` zwCUQ+Qw0>8=f>O=NOzU*DKSWSeZbZ6)jYOERuUB*ui-; zxHZyLqvu)hX@+fFe5XF&b-Xd-u->e`6-}H<3NI$@d2wLYV}}nyHdomF8_zy@XnB+& z{@g@W&gzZ^hZc?w0o6XH4Ku$h@CY)gTz~g)~|G?A} zzRVh790!EFqEekJvnvz_xE2*`sO}3e7&ut;o{a4a#FH3 zCYJoXe7fq|QGQ{ER_ye4bl*IC^}m1rrZ)Ef{qy(l?>~=@-uV9hYi4xHn_JJGoxS_$ z_|1ohufMwX_|?_NpI^Lxc;x!)>rWn^y#4sZtsfu1zPzb$=i>P-2l3TB%t_{1*~2NM1uUp!1n(@LxG2mRR4)3MJIEt=3iJ* z;e{VImjv#8*iqxRUYPI4p1Skri{tdlnwnXp)H3~) z7`l6U`}!wLoHTjL)M@=n{wmYw%$+xXfr_8%f~Cur&r|gkQeLrc{RReQAs_LL+jq

    >?4tw&tk9Gv&APT)Fo zZo;i8(px;Y^>W_g=;P!$bN9-F?h8jciw~TTS8imIw$b?UR*00C9>)WylN(-M+a|S~ ziKDw=vAcV|>Rg9INTzb*Lo*JK-R@~}&x&P>ycl*vrz0*_`b61I&U?SOI zm&Prt&-L3PDCu;M1h>H169yK$D+0YYDfD}EduB2gv^1EFqEekJvnvz_xE2*`sO}3e7&ut;o{a4a#FH3 zCYJoXe7fq|QGQ{ER_ye4bl*IC^}m1rrZ)Ef{qy(l?>~=@-uV9hYi4xHn_JJGoxS_$ z_|1ohufMwX_|?_NpI^Lxc;x!)>rWn^y#4sZtsfu1zPzb$=i>P-2l3TB%t_{1*~2NM1uUp!1n(@LxG2mRR4)3MJIEt=3iJ* z;e{VImjv#8*iqxRUYPI4p1Skri{tdlnwnXp)H3~) z7`l6U`}!wLoHTjL)M@=n{wmYw%$+xXfr_8%f~Cur&r|gkQeLrc{RReQAs_LL+jq

    >?4tw&tk9Gv&APT)Fo zZo;i8(px;Y^>W_g=;P!$bN9-F?h8jciw~TTS8imIw$b?UR*00C9>)WylN(-M+a|S~ ziKDw=vAcV|>Rg9INTzb*Lo*JK-R@~}&x&P>ycl*vrz0*_`b61I&U?SOI zm&Prt&-L3PDCu;M1h>H169yK$D+0YYDfD}EduB2gv^1 LICENSE: GPLv2 -### -### This script is designed to open up when a live_inbound call comes in giving the user -### options of what to do with the call or options to lookup the callerID on various web sites -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $uniqueid - ('1234567890.123456',...) -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $voicemail_dump_exten - ('85026666666666') -### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) -### - -# changes -# 50428-1500 - First build of script display only -# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links -# 50503-1244 - added session_name checking for extra security -# 50711-1203 - removed HTTP authentication in favor of user/pass vars -# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1205 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} - elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} -if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} - else {$local_web_callerID_URL = '';} - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.6'; -$build = '60619-1205'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$DO = '-1'; -if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -LIVE INBOUND CALL"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

    LIVE INBOUND CALL

    \n"; -echo "$NOW_TIME

    \n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid is not valid\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Channel: $row[1]
    CallerID: $row[3]
    \n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "CUSTOM - \n"; - - echo "
    Number Dialed: $row[8]
    Notes: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
    \n"; - echo "HANGUP - \n"; - echo "SEND TO MY VOICEMAIL\n"; - echo "
    \n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/agc/live_exten_check.php b/agc_2-X/trunk/agc/live_exten_check.php deleted file mode 100644 index 0c54ec4b..00000000 --- a/agc_2-X/trunk/agc/live_exten_check.php +++ /dev/null @@ -1,277 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the client channel is live and to what channel it is connected -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50404-1249 - First build of script -# 50406-1402 - added connected trunk lookup -# 50428-1452 - added live_inbound check for exten on 2nd line of output -# 50503-1233 - added session_name checking for extra security -# 50524-1429 - added parked calls count -# 50610-1204 - Added NULL check on MySQL results to reduced errors -# 50711-1204 - removed HTTP authentication in favor of user/pass vars -# 60103-1541 - added favorite extens status display -# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1203 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} - elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '1.1.12'; -$build = '60619-1203'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Live Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ChannelA[$loop_count] = "$row[0]"; - $ChannelB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $ChannelA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/agc/manager_send.php b/agc_2-X/trunk/agc/manager_send.php deleted file mode 100644 index 296094a4..00000000 --- a/agc_2-X/trunk/agc/manager_send.php +++ /dev/null @@ -1,908 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -# - $queryCID - ('CN012345678901234567',...) -# - $format - ('text','debug') -# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $exten - ('1234','913125551212',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $filename - ('20050406-125623_44444',...) -# - $extenName - ('phone100',...) -# - $parkedby - ('phone100',...) -# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -# - $auto_dial_level - ('0','1','1.1',...) -# - $campaign - ('CLOSER','TESTCAMP',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('1234',...) -# - $seconds - ('32',...) -# - $outbound_cid - ('3125551212','0000000000',...) -# - $agent_log_id - ('123456',...) -# - $call_server_ip - ('10.10.10.15',...) -# - $CalLCID - ('VD01234567890123456',...) -# - -# changes -# 50401-1002 - First build of script, Hangup function only -# 50404-1045 - Redirect basic function enabled -# 50406-1522 - Monitor basic function enabled -# 50407-1647 - Monitor and StopMonitor full functions enabled -# 50422-1120 - basic Originate function enabled -# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 - basic RedirectName and RedirectNameVmail added -# 50503-1227 - added session_name checking for extra security -# 50523-1341 - added Conference call start/stop recording -# 50523-1421 - added OriginateName and OriginateNameVmail for local calls -# 50524-1602 - added RedirectToPark and RedirectFromPark -# 50531-1203 - added RedirecXtra for dual channel redirection -# 50630-1100 - script changed to not use HTTP login vars, user/pass instead -# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 - Added outbound_cid set if present to originate call -# 51020-1556 - Added agent_log_id framework for detailed agent activity logging -# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 - Added ability to accept calls from other VICIDIAL servers -# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1158 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -### These are variable assignments for PHP globals off -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} - elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["filename"])) {$filename=$_GET["filename"];} - elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} -if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} - elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} -if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} - elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} -if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} - elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} - elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} - elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} -if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} - elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$secondS = ereg_replace("[^0-9]","",$secondS); - -# default optional vars if not set -if (!isset($ACTION)) {$ACTION="Originate";} -if (!isset($format)) {$format="alert";} -if (!isset($ext_priority)) {$ext_priority="1";} - -$version = '0.0.24'; -$build = '60619-1158'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Manager Send: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten is not valid or ext_context $ext_context or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel is not live on $call_server_ip, Checking Live Channel...\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";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup command sent for Channel $channel on $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "auto_dial_level $auto_dial_level must be set\n"; - echo "campaign $campaign must be set\n"; - echo "uniqueid $uniqueid must be set\n"; - echo "lead_id $lead_id must be set\n"; - echo "\nRedirectVD Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "parkedby $parkedby must be set\n"; - echo "\nRedirectToPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectFromPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "ExtraChannel $extrachannel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Cannot find empty conference on $server_ip, Redirect command not inserted\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel on $call_server_ip and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - 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 "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for Channel $channel on $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, $ACTION command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or exten $exten is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going on in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_2-X/trunk/agc/park_calls_display.php b/agc_2-X/trunk/agc/park_calls_display.php deleted file mode 100644 index 872f5780..00000000 --- a/agc_2-X/trunk/agc/park_calls_display.php +++ /dev/null @@ -1,146 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send the details on the parked calls on the server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) -### - $protocol - ('SIP','Zap','IAX2',...) -### - -# changes -# 50524-1515 - First build of script -# 50711-1208 - removed HTTP authentication in favor of user/pass vars -# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1205 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); - -# default optional vars if not set -if (!isset($format)) {$format="text";} -if (!isset($park_limit)) {$park_limit="1000";} - -$version = '0.0.4'; -$build = '60619-1205'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Parked Calls Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/agc/vdc_db_query.php b/agc_2-X/trunk/agc/vdc_db_query.php deleted file mode 100644 index ef287987..00000000 --- a/agc_2-X/trunk/agc/vdc_db_query.php +++ /dev/null @@ -1,1512 +0,0 @@ - LICENSE: GPLv2 -# -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -# -# required variables: -# - $server_ip -# - $session_name -# - $user -# - $pass -# optional variables: -# - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') -# - $stage - ('start','finish','lookup','new') -# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -# - $conf_exten - ('8600011',...) -# - $exten - ('123test',...) -# - $ext_context - ('default','demo',...) -# - $ext_priority - ('1','2',...) -# - $campaign - ('testcamp',...) -# - $dial_timeout - ('60','26',...) -# - $dial_prefix - ('9','8',...) -# - $campaign_cid - ('3125551212','0000000000',...) -# - $MDnextCID - ('M06301413000000002',...) -# - $uniqueid - ('1120232758.2406800',...) -# - $lead_id - ('36524',...) -# - $list_id - ('101','123456',...) -# - $length_in_sec - ('12',...) -# - $phone_code - ('1',...) -# - $phone_number - ('3125551212',...) -# - $channel - ('Zap/12-1',...) -# - $start_epoch - ('1120236911',...) -# - $vendor_lead_code - ('1234test',...) -# - $title - ('Mr.',...) -# - $first_name - ('Bob',...) -# - $middle_initial - ('L',...) -# - $last_name - ('Wilson',...) -# - $address1 - ('1324 Main St.',...) -# - $address2 - ('Apt. 12',...) -# - $address3 - ('co Robert Wilson',...) -# - $city - ('Chicago',...) -# - $state - ('IL',...) -# - $province - ('NA',...) -# - $postal_code - ('60054',...) -# - $country_code - ('USA',...) -# - $gender - ('M',...) -# - $date_of_birth - ('1970-01-01',...) -# - $alt_phone - ('3125551213',...) -# - $email - ('bob@bob.com',...) -# - $security_phrase - ('Hello',...) -# - $comments - ('Good Customer',...) -# - $auto_dial_level - ('0','1','1.2',...) -# - $VDstop_rec_after_each_call - ('0','1') -# - $conf_silent_prefix - ('7','8','',...) -# - $extension - ('123','user123','25-1',...) -# - $protocol - ('Zap','SIP','IAX2',...) -# - $user_abb - ('1234','6666',...) -# - $preview - ('YES','NO',...) -# - $called_count - ('0','1','2',...) -# - $agent_log_id - ('123456',...) -# - $agent_log - ('NO',...) -# - $favorites_list - (",'cc160','cc100'",...) -# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) -# - $recipient - ('ANYONE,'USERONLY') -# - $callback_id - ('12345','12346',...) -# - $use_internal_dnc - ('Y','N') - -# changes -# 50629-1044 - First build of script -# 50630-1422 - Added manual dial action and MD channel lookup -# 50701-1451 - Added dial log for start and end of vicidial calls -# 50705-1239 - Added call disposition update -# 50804-1627 - Fixed updateDispo to update vicidial_log entry -# 50816-1605 - Added VDADpause/ready for auto dialing -# 50816-1811 - Added basic autodial call pickup functions -# 50817-1005 - Altered logging functions to accomodate auto_dialing -# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 - Added hangup of agent phone after Logout -# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 - Fixed CLOSER log length_in_sec bug -# 50902-1730 - Added functions for manual preview dialing and revert -# 50913-1214 - Added agent random update to leadupdate -# 51020-1421 - Added agent_log_id framework for detailed agent activity logging -# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 - Altered echo statements for several small PHP speed optimizations -# 51122-1328 - Fixed UserLogout issue not removing conference reservation -# 51129-1012 - Added ability to accept calls from other VICIDIAL servers -# 51129-1729 - Changed manual dial to use the '/n' flag for calls -# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 - Added Updating of astguiclient favorites in the DB -# 60208-1617 - Added dtmf buttons output per call -# 60213-1521 - Added closer_campaigns update to vicidial_users -# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table -# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT -# - Added USERONLY Callback count output - CalLBacKCounT -# 60414-1140 - Added Callback lead lookup for manual dialing -# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE -# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1236 - Fixed closer_choice error for CLOSER campaigns -# 60609-1148 - Added ability to check for manual dial numbers in DNC -# 60619-1117 - Added variable filters to close security holes for login form -# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic -# - -$version = '0.0.34'; -$build = '60623-1414'; - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} - elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} - elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["exten"])) {$exten=$_GET["exten"];} - elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} - elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} -if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} - elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} -if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} - elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} -if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} - elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} - elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} - elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} -if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} - elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} -if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} - elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} -if (isset($_GET["title"])) {$title=$_GET["title"];} - elseif (isset($_POST["title"])) {$title=$_POST["title"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} - elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["gender"])) {$gender=$_GET["gender"];} - elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} -if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} - elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} - elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} - elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} - elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} - elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} -if (isset($_GET["preview"])) {$preview=$_GET["preview"];} - elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} -if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} - elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} -if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} - elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} -if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} - elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} -if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} - elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} -if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} - elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} - elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} -if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} - elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} -if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} - elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} - - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); -$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$phone_code); -$phone_number = ereg_replace("[^0-9]","",$phone_number); - - -# default optional vars if not set -if (!isset($format)) {$format="text";} - if ($format == 'debug') {$DB=1;} -if (!isset($ACTION)) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -$ENTRYdate = date("YmdHis"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) -{ -echo "Invalid Username/Password: |$user|$pass|\n"; -exit; -} -else -{ - -if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Database Query Script"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Group Choice $closer_choice is not valid\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK-") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Group Choice $closer_choice has been registered to user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "HOPPER EMPTY\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE - if ( (strlen($callback_id)>0) && (strlen($lead_id)>0) ) - { - $affected_rows=1; - $CBleadIDset=1; - - $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - if (strlen($phone_number)>3) - { - if ($use_internal_dnc=='Y') - { - $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - echo "DNC NUMBER\n"; - exit; - } - } - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - } - } - - if ($affected_rows > 0) - { - if (!$CBleadIDset) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (!$CBleadIDset) - { - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "HOPPER EMPTY\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CALL NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID is not valid\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign is not valid\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inserted: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "LOG NOT ENTERED\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CALL_LOG Inserted: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "LOG NOT ENTERED\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id is not valid\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "LOG NOT ENTERED\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campaign $campaign is not valid\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCALL - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCALL - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send on to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### If CALLBK, change vicidial_callback record to INACTIVE - if ($dispo == 'CALLBK') - { - $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user on $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten is not valid\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation on the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) - { - $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - } - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CALLBACK ENTRY - if ( ($dispo_choice == 'CBHOLD') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id information has been updated\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage is not valid\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $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 ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' is now in status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list is not valid\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - -################################################################################ -### CalLBacKLisT - List the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKLisT') -{ -$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} -echo "$callbacks_count\n"; -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $row=mysql_fetch_row($rslt); - $callback_id[$loop_count] = $row[0]; - $lead_id[$loop_count] = $row[1]; - $campaign_id[$loop_count] = $row[2]; - $status[$loop_count] = $row[3]; - $entry_time[$loop_count] = $row[4]; - $callback_time[$loop_count] = $row[5]; - $comments[$loop_count] = $row[6]; - $loop_count++; - } -$loop_count=0; - while ($callbacks_count>$loop_count) - { - $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; - $loop_count++; - } - -} - - -################################################################################ -### CalLBacKCounT - send the count of the USERONLY callbacks for an agent -################################################################################ -if ($ACTION == 'CalLBacKCounT') -{ -$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and status NOT IN('INACTIVE','DEAD');"; -if ($DB) {echo "$stmt\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$cbcount=$row[0]; - -echo "$cbcount"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_2-X/trunk/agc/vicidial.php b/agc_2-X/trunk/agc/vicidial.php deleted file mode 100644 index 9d3763bb..00000000 --- a/agc_2-X/trunk/agc/vicidial.php +++ /dev/null @@ -1,5435 +0,0 @@ - LICENSE: GPLv2 -# -# make sure you have added a user to the vicidial_users MySQL table with at least -# user_level 1 or greater to access this page. Also, you need to have the login -# and pass of a phone listed in the asterisk.phones table. The page grabs the -# server info and other details from this login and pass. -# -# This script works best with Firefox or Mozilla, but will run for a couple -# hours on Internet Explorer before the memory leaks cause a crash. -# -# Other scripts that this application depends on: -# - vdc_db_query.php: Updates information in the database -# - manager_send.php: Sends manager actions to the DB for execution -# -# CHANGES -# 50607-1426 - First Build of VICIDIAL web client basic login process finished -# 50628-1620 - Added some basic formatting and worked on process flow -# 50628-1715 - Startup variables mapped to javascript variables -# 50629-1303 - Added Login Closer in-groups selection box and vla update -# 50629-1530 - Rough layout for customer info form section and button links -# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -# 50701-1450 - Added vicidial_log entries on dial and hangup -# 50701-1634 - Added Logout function -# 50705-1259 - Added call disposition functionality -# 50705-1432 - Added lead info DB update function -# 50705-1658 - Added web form functionality -# 50706-1043 - Added call park and pickup functions -# 50706-1234 - Added Start/Stop Recording functionality -# 50706-1614 - Added conference channels display option -# 50711-1333 - Removed call check redundancy and fixed a span bug -# 50727-1424 - Added customer channel and participant present sensing/alerts -# 50804-1057 - Added SendDTMF function and reconfigured the transfer span -# 50804-1224 - Added Local and Internal Closer transfer functions -# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -# 50804-1808 - Added button images for left buttons -# 50815-1151 - Added 3Way calling functions to Transfer-conf frame -# 50815-1602 - Added images and buttons for xfer functions -# 50816-1813 - Added basic autodial outbound call pickup functions -# 50817-1113 - Fixes to auto_dialing call receipt -# 50817-1234 - Added inbound call receipt capability -# 50817-1541 - Added customer time display -# 50817-1541 - Added customer time display -# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -# 50818-1703 - Added pretty login section -# 50825-1200 - Modified form field lengths, added double-click dispositions -# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -# 50903-0904 - Added preview-lead code for manual dialing -# 50904-0016 - Added ability to hangup manual dials before pickup -# 50906-1319 - Added override for filters on xfer calls, fixed login display bug -# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -# 50913-1212 - Added campaign_cid to 3rd party calls -# 50923-1546 - Modified to work with language translation -# 50926-1656 - Added campaign pull-down at login of active campaigns -# 50928-1633 - Added manual dial alternate number dial option -# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -# 51004-1656 - Fixed recording filename bug and new Spanish translation -# 51020-1103 - Added campaign-specific recording control abilities -# 51020-1352 - Added Basic vicidial_agent_log framework -# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -# 51110-1432 - Fixed non-standard http port issue -# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -# 51118-1305 - Activate multi-line comments from $multi_line_comments var -# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -# 51129-1010 - Added ability to accept calls from other VICIDIAL servers -# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -# 51208-1732 - Created user-first login that looks for default phone info -# 51219-1526 - Added variable framework for campaign and in-group scripts -# 51221-1200 - Added SCRIPT tab, layout and functionality -# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -# 51229-1028 - Added checks on web_form_address to allow for var in the DB value -# 60117-1312 - Added Transfer-conf frame toggle on button press -# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -# 60213-1210 - Added ability to sort routing of calls by user_level -# 60214-0932 - Initial Callback calendar display framework -# 60214-1407 - Added ability to minimize the dispo screen to see info below -# 60215-1104 - Added ANYONE scheduled callbacks functionality -# 60410-1116 - Added persistant pause after dispo option and change dispo text -# - Added web form submit that opens new window with dispo on submit -# - Added PREVIOUS CALLBACK in customer info to flag callbacks -# - Added link to try to hangup the call again in the dispo screen -# - Added link noone-in-session screen to call agent phone again -# - Added link customer-hungup screen to go straight to dispo screen -# 60410-1532 - Added agent status and campaign calls dialing display option -# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting -# 60413-1752 - Add basic USERONLY callback frame and listings -# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans -# - Added beta-level USERONLY callback functionality -# - Added beta-level manual dialing with lead insertion functionality -# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug -# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode -# - Changed several permissions to database-defined -# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished -# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error -# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials -# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER -# 60501-1008 - Added option to manual dial screen to manually lookup phone number -# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen -# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug -# - Fixed recording filename display to not overrun 25 characters -# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo -# 60608-1453 - Added CLOSER campaign allowable in-groups limitations -# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC -# 60619-1047 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} - elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} -if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} - elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} -if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} - elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} -if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} - elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - -### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); - - -$forever_stop=0; - -$version = '1.1.85'; -$build = '60619-1047'; - -if ($force_logout) -{ - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_preview = '1'; # allow preview lead option when manual dial -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo -$agentcallsstatus = '0'; # set to 1 to show agent status and call count - $campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -# options now set in DB: -#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers -#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks -# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks -#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIDIAL web client: Re-Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Re-Login
     
    Phone Login:
    Phone Password:
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

    User Login

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Campaign Login
     
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIDIAL web client: Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login
     
    Phone Login:
    Phone Password:
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIDIAL web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    \n"; -echo "\n"; -echo "


    "; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone Login
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - $VU_scheduled_callbacks=$row[4]; - $agentonly_callbacks=$row[5]; - $agentcall_manual=$row[6]; - $VU_vicidial_recording=$row[7]; - $VU_vicidial_transfers=$row[8]; - $VU_closer_default_blended=$row[9]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
    ";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - $alt_number_dialing=$row[24]; - $VC_scheduled_callbacks=$row[25]; - $wrapup_seconds=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - - if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) - {$scheduled_callbacks='1';} - if ($VU_vicidial_recording=='0') - {$campaign_recording='NEVER';} - if ($alt_number_dialing=='Y') - {$alt_phone_dialing='1';} - else - {$alt_phone_dialing='0';} - $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); - $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); - $closer_campaigns = "'$closer_campaigns'"; - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Campaign not active, please try again
    "; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Login incorrect, please try again
    "; - } - } - if ($VDloginDISPLAY) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

    $VDdisplayMESSAGE

    "; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Campaign Login
     
    User Login:
    User Password:
    Campaign: $camp_form_code

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIDIAL web client: Phone Login Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


    "; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    Login Error
     
    Sorry, your phone login and password are not active in this system, please try again:
     
    Phone Login:
    Phone Password:

    VERSION: $version       BUILD: $build
    \n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIDIAL web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed on this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login on phone: $SIP_user to campaign: $VD_campaign
    \n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $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,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "Sorry, there are no leads in the hopper for this campaign\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
    "; - echo "Password:
    \n"; - echo "Campaign: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
    \n"; - echo "Sorry, there are no available sessions\n"; - echo "
    \n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
    "; - echo "Password:
    \n"; - echo "Campaign: $camp_form_code
    \n"; - echo "\n"; - echo "
    \n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
    "; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
    "; -$CCAL_OUT .= "
     "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
    "; - $CCAL_OUT .= "
    "; -$CCAL_OUT .= "
    "; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
    - - -
    - - - -LOGOUT\n"; ?> -
    -
    - - - - - - - - -
    VICIDIALSCRIPT   LIVE     session ID: Live Call
    -
    - - - - -

    VICIDIAL
    -
    - - -MANUAL DIAL
    -
    - - -X ACTIVE CALLBACKS
    -
    - - -
    CALLBACKS FOR AGENT :
    Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list. -
    -
    -
      - Refresh -                 - Go Back -
    -
    - - -
    NEW MANUAL DIAL LEAD FOR :

    Enter information below for the new lead you wish to call. -
    - \n"; - } - ?> - Note: all new manual dial leads will go into list 999

    - - - - - - - - - - - - - - - -
    Dial Code:   (This is usually a 1 in the USA-Canada)
    Phone Number:   (10 digits max - digits only)
    Search Existing Leads:   (This option if checked will attempt to find the phone number in the system before inserting it as a new lead)


    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 Dial Override field below. To hangup this call you will have to open the CALLS IN THIS SESSION link at the bottom of the screen and hang it up by clicking on its channel link there.
     
    Dial Override:   (digits only please)
    -
    - Dial Now -                 - Go Back -
    -
    - - - - -Your Status:
    Calls Dialing: -
    - - - - - -
    - - Transfer - Conference
    - INTERNAL CLOSER - LOCAL CLOSER - CODE - Hangup Xfer Line - Hangup Both Lines - -
    - - Number to call   - seconds   - channel - - OVERRIDE   - D1 - D2 -
    - - Dial With Customer - Park Customer Dial - LEAVE 3-WAY CALL - Dial Blind Transfer - Blind Transfer VMail Message -
    -
    -
    - - - - -
    Lead Dispositioned As:

    - -
    -
    -
    - - - - - - - -
    Disposition Hot Keys: - When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically:
    - - - - - -
    -
    - - -
    Noone is in your session:
    - Go Back -

    - Call Agent Again -
    -
    - - -
    Customer has hung up:
    - Go Back -

    - Finish and Disposition Call - -
    -
    - - -
    Call Wrapup: seconds remaining in wrapup

    - -

    - Finish Wrapup and Move On - -
    -
    - - -

    LOGOUT
    -
    - - -
    -
    - - -
     
    -
    - - -
    Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call.
    -
    - - -
    DISPOSITION CALL :       Hangup Again       minimize
    - End-of-call Disposition Selection -
    - PAUSE AGENT DIALING
    - CLEAR FORM | - SUBMIT -

    - WEB FORM SUBMIT -

      -
    -
    - - - -
    Select a CallBack Date :
    - - - Select a Date Below   -     - Hour: -   - Minutes: -   - -  
    - MY CALLBACK ONLY
    ";} - ?> - CB Comments:

    - - SUBMIT

    - -

      -
    -
    - - -
    CLOSER INBOUND GROUP SELECTION
    - Closer Inbound Group Selection -
    - BLENDED CALLING(outbound activated)
    - RESET | - SUBMIT -



      -
    -
    - - - - Channel - Channel - MY CALLBACK ONLY
    ";} - ?> -
    - - - - - - - -
    LIVE CALL TRANSFER
    Channel to be transferred: Channel
    Extensions:
    Extensions Menu
    -
    - Send to selected extension

    - Send to selected vmail box

    - Send to this number:


    - REFRESH


    - Back to Main Window

    -
    Conferences:
    (click on a number below to send to a conference)
    Send my channel too
    Conferences Menu
    -
    - - - - -
    VICIDIAL SCRIPT
    -
    - - - - - - - - - - - - - - - - - -
    STATUS:
    -
    -Dial Next Number
    - LEAD PREVIEW
    - ALT PHONE DIAL
    - - -RECORDING FILE:
    -
    -
    -RECORD ID:
    -
    - -Start Recording
    -
    -Web Form
    -
    -Park Call
    -Transfer - Conference
    -
    -Hangup Customer
    -
    -Send DTMF
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
    seconds:   Channel:   Cust Time:
    Customer Information:
    Title:   First:   MI:   Last:
    Address1:
    Address2:   Address3:
    City:   State:   PostCode:
    Province:   Vendor ID:
    Phone:   DialCode:   Alt. Phone:
    Show:   Email:
    Comments:
    - -
    -


      - -
    - - - - -
    VICIDIAL web-client version:     BUILD:               Server:              
    -Show conference call channel information
    - 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -HOT KEYS INACTIVE - -
    - - - -
    - - - - -
    - - - - - - - - - - - - diff --git a/agc_2-X/trunk/agc/voicemail_check.php b/agc_2-X/trunk/agc/voicemail_check.php deleted file mode 100644 index 0aa152d7..00000000 --- a/agc_2-X/trunk/agc/voicemail_check.php +++ /dev/null @@ -1,140 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to check whether the voicemail box on the server defined has new and old messages -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $vmail_box - ('101','1234',...) -### - -# changes -# 50422-1147 - First build of script -# 50503-1241 - added session_name checking for extra security -# 50711-1201 - removed HTTP authentication in favor of user/pass vars -# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60619-1204 - Added variable filters to close security holes for login form -# - -require("dbconnect.php"); - -### If you have globals turned off uncomment these lines -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} - elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} -if (isset($_GET["format"])) {$format=$_GET["format"];} - elseif (isset($_POST["format"])) {$format=$_POST["format"];} -if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} - elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} - -$user=ereg_replace("[^0-9a-zA-Z]","",$user); -$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); - -# default optional vars if not set -if (!isset($format)) {$format="text";} - -$version = '0.0.5'; -$build = '60619-1204'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Voicemail Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "voicemail box $vmail_box is not valid\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_2-X/trunk/app_conference/0.gsm b/agc_2-X/trunk/app_conference/0.gsm deleted file mode 100644 index 8c57c4117ffddedb818b6b0e6b4e15364ce9ea05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 429 zcmV;e0aE_ec#AgtP%`nIJarvX3!dC=Hygf02+C$7Qtm@g*lbiN)p&b5Gw{PSTNpT( zsUwQagC!bO!lPN~;^|d_K3+1L4%K;M{_=SO8q|WPA@L!ZQ^PYT?_trIuwtss;dJ9% zX6My-p#5M?F!<|ASQS*wpO`{5=B9fOL!x^;k(!K+w*$>jzdKhABj3EyYpIJ zN{j8k##CptM-;e@YBS8`h%9_EoZ)Qo9SzUnU7^$rS2Zv1d50FHpU&cv*XhUPW`iCJ zvaS+y`~}`J>_svekPOxKs75}gF|y#KNO(YgUYatxpZP=LB}N-G%Y0}2FknO8vR@q@ zfS3`dlO4=u=AIAx+up+|$vvV!sj`s~rO0Fk<`D}}=RH^9hOl2FcjJ8ezhwd4BuaJm zec@BU-t)bz&m^F%jb2ANJ8^5Ag~Sj>11pT*s>57+*efzMG2SteR3Ni^PQ+eG9ibN4 ztp>Y&7Ep~o<8B&r1xh2!;*Obwh;N|cV>;bRNA5X-D zLxFN_Rp%Z{edM^fG9k}>Pe6=7P8vjw zhr3>*si`y42%)Uu6Kanw5<45e*{5_ZL+O~CqauO*eT~h_h7K_1h|?fy|ZFb*+uLtBV`g@dnK&o|0E!XqHKIqsCN!#N04Y! zSZ)B5c*_!w;Zyr=H^yrggr#OJOQ}b_QlD4dbbK2UBwh-Zd+4Zhv@#lVV!0~VzR^+7 zEzGUq&9W(5Iy)Q?hW#iy2Fx9=94`fy;Lk#6!y|(SNlrke?oO>io-e6%+5vzG%|+ZG zZ6n%Un^YCOVF6^~?(8y#*ibK7s%QZCaRa;|tYnODiwa)Cj6%c_$LL&efj}e(2ex$Y zY?K%_G5ndF_$;_mt<}DOQbY3bM(=gc1AI$l8I3Yd=+w0@f!-u6$gO2>HcgUUP~Hr@ zioC(v3=E9xd?K(F_lsklT4uP7Bd0zPE&zX2;u`a{E6L>4WjsIPf5Ww=a#)FJ@^2i| zI~k-e;udh|9%S3P=4g8_FCk}R^j62C?kDOm{SZYKx&jt?i?Jr!wa`xMnywSQ6~M~0 zCE5MtaLxV?Th+hgcg9Arvye1E5~Ip_t0>#n$vza%UraIHgH^gU&U+ZOzxN1F~2P!>$CnJQq=C zNOYr>CjMEv5;$FFZ%_&VA?Wr+AA%;3 z?PD>b<8s2z83|2)bWcOy6VA_)kp}b+JIahj*vWJ?f$jUm_XfO4?L?UjgH=J`}djK_AW^r=u&8QpZJ0IASXkGJp$`?u#5r&@1Uc>=M*jN%V4&A0`At}(_?1p~1~>8bRe47VD-=-Pw^QW{b|4aplhsC(u#VahShp4HCl z0GHhz?M1b!wl%#PoWYcf?MdB!QqO27%h5=wWz57jK+|DG$fu;~-hA~!l@mJ7AJ6`g z{d%P4LqmrSE{+Yv83?CsN{io@hPmWdnd{B3&|mP6B|gOO?`>;{*W9J7$lRX9Kt0qJ z^&fH-5^fM6|8dWAG>UbYL7$l3Q`{Eoc*t|*QhC>Hd9C`c{E57Xf7p4rShp79W52*p za~JEV1An1166a+cB_C9ezxSz@g4rqC6ZT?&k#6H=?_4Y$amGI1@f>X9?TI-K8#X!_c^EtrbA;%zej=3GP;2#RAcp8D3qO>b=Lcr{`Pr^xX} zq1H`?dF1ur#fcr>OQ4-)?(Zn~i`Z%jYe7 zJDTCLl&{4g-8{6Y{k47p@Q6M@iiDHA3$X#p6zr4{VmEuxOnNRlo3;!X??irhU~Hjo z6L2GJK7wWC_-o)Us?q+H@zi)FV<@GFqp|I2`n=_=r$7EsW;CzFl^yA|1l1KgM_O9k!D}_Z~nv?ypTkNAL$yEkxn35o;}9Rwmp{mTW@*{ zF~<|%l0%$J%x|D<%*&v0Ol#^xER1=WSW0ARvm2i(?-AZ*V1yNTlzyp-Yx@kpjmSc5 z@hFhXX-dZJ0Iu&ddEICUdu?u9LagUgxx8(%i^ObN;!jMW<(B@cpv^# zfmYNxndB$odO!mig0slA+Y=79fGU1?xzl$1hINg@fgP=81ZxTk>AaE;!#?ns;>Qpnok)posU zt+4BPzvfnR*V`w{H}-6sILYL)R%70~ss0~9E7rTkTT9&bWm<8l2L>k*ZBsqts$1{}&HVY3X0@{ezT4oE$)T zW3fKkRq`aq;jXEQzy3SJU&Lg_UV}qAuDT3ZW7^m)z#~VJ=RVqxdF_0nZ!oP1Igm1t z!~^bhY8yfaJ@kr<+q`Ff>_FL2ntvv~4$<#i>X}L8a4#?+$5(QJyw3A5;YJR?E*$-> zt+xN?;01;}YK>CU0)SH&JU+V3k%SCG z%g5ghcRPL$t4#Wb%k%szb4wrFSiGLB>6{d2es8G(hH1nh%m8#~Vl>nkIh}OO49U+a zr=Tl^@3S4`Qti8DmhL?6GUo{Walqwz3GW7H0?C$n>VnZ-)WnRXiFo+F9F{yVDh2X|BQWT6m-5Cm`3i&qzPjISy!<%Y50EFuW=Cly6@ze5emWjkd4+ihE?Mo%$Bsb zoO+u~s%*LIX^Be_RWjPgzE+Q#w8)3x>p-pRDttLSDQ0Vk)-bu**?WhuDs!G_7U6Us zOCB=3AmoS0{Uog~=-GprPjn)_9U`a{)(+OutZ(A?x@%kBH=FDuQ8mf!G{-n)q|em~ zY(w##W#$ooMdV;&Y%d}IS%f(wwk8X@&(YN=v(nRVu{mgsq%GUM&M)S`jG*|K3;Un zZIWBFs$s5bKOs6DPI-YVG+gU%win@Q2o8UNdmXTtc{QRmU{PkZP8!`9H7(Z`f5#nc zyW6pJ{5(C6O$Oh3?s+9x0pSPeJKbH496lG%$~;ML8bCCj?1q55f=2=ue)*_ics=w2 z;|#vF7uh(t6}+|ly{Hq4a}t?B%)BM$CmQ@Xl~+j~Ur9Poeu`KFZACqx{vD=pi4lWw5#L5KHl*J%bHNBxuvx4$# z`o4tiNZG)=0Ty%^e+0eCo#r0FKjrjASRhk}zU3qPd7e6VGS^}|&^}A~W&+1(p}j(t zdnO0_L$48}ju)yBO(|eV9?B$8wy5Vf^7=|Zp5Q)j0{~c*Rzh$C=6kQvG}%@iI+{=w zy91uuPWkZMlpe(ri(^?(T<;96bix~Y5p0~e3&D7H#N05gEwQ7zTLT|UF3*|4Ko8Do z-r08nkaGTtV58Q!u1|#GAOAP16`J1RS)t)+p5!Fpqb_^H$Aey4iSPoq#9ut99C-)p zu(j~_cD83Rc>}*V;x9);>!a3do}GfcoY|54MjJY~+Unp8S`$eH|LFB%mQf4A2ctK- zZfQ4xc^UQ$Cs?3L{cuEYB%0!Fk=FvZtOesmz;1x$Bn@qMIH_@|4|s3gb7im;w6Ev3 oWdc!0oOS(TqcBJf5u?_-xxQQEe$GMibklv=GsS9jmC%&+|5D}*g#Z8m diff --git a/agc_2-X/trunk/app_conference/1.gsm b/agc_2-X/trunk/app_conference/1.gsm deleted file mode 100644 index 7f6c842f..00000000 --- a/agc_2-X/trunk/app_conference/1.gsm +++ /dev/null @@ -1 +0,0 @@ -Õ8z*½PScOȪP,ór)" × ‰¼+àEÓ<7‘Ôøj2ýîÕhØÕÑ#8誙éBØ,ƒ65ŸÂCb (ÔøRºý¡aá.4³ Áµ‘•™âáäWFR2¹Á) ±‰Õ8z.ý¿¤hÜÍK]…º%Mq]¤œ°Í·M]ƒ %tñ•Ôøyî½\ƒ á‘,Yµc:â•SÄÏd<,ióŸ£UäôÔøK:ô»B.e©Z%¢Vn*àóä¡Q´­Eã!tä+DìÔùC5ÑWETÁbíÁ´øo‡k]¡Žb­ÉŸ›”cÔøCz´ãÁÕ”ª.”ãÂ4û6±£_ÂM¬è]]¸æDóÔøbv¼]áÅ–)`]¢kéÊœ_uYª®©]ÁUU2FòÔør.½]á·Mt÷…ÃZÇlöd]£C]6¦ø]‚Y[Ê.jÔøR÷=_a ë­º_ ‚Ü­ÊÜâÁ1©Z…šâÁÌ]…æßÔør2ýÕ¢)6A›]â­É]¢(,Qáœ]™”\gSÕ4Âaõ‹¦&¬Q2cÊ>”¬vø\ud’I$P`ë®ÚÝu \ No newline at end of file diff --git a/agc_2-X/trunk/app_conference/1.wav b/agc_2-X/trunk/app_conference/1.wav deleted file mode 100644 index e5f5359a294a5900b1b74f9df930ece805b3e34b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4100 zcmWN{XIN8*0)XL@y%Q3W03jq{g%uLO09C1qs4aC?oGlKlIBK=lxaETG_pAy`{S$SG5H{Jz+e@j5*^rc?M9ClozOeow9R^=z+z} zcqYtBm*C3{^M}2L??VE_QTMOv1*%zrIL=4msuU*_8~|FXq%PkhvN#L`Y_5XPBif7j z-=nU$&WK9tK1mNFP>JV~Ux(YliMFgjIc_|r#eP#P6G^o#_!Mqwp3oe(G)&J4EBv29e zir>l%g)W)oHXYP~KJ80V9_hWTI)trDFUeWVI_hc>?-z%epTJk5SNhJHZaMA|?k0P9 ze^Rz+YMT;UUAhY5C~F!WfU-OgNOpKwqy!$LoY&mb`N46IwLj|&_Y~^9@uGI7rxo!6 zGS&21+N&T!_1yWnnnZD6)&N6PrP>0VBs@l3bfr6^s=Uo?YI(=yWO*^T=?flhm=%xHy75=6ilEsn(=doHf>l9B{L{NVQ0L7o5*}Arz$D zL@ts~Y;78N?ERVa7ij|U+1VA`LtCE+V?OcnyU*3dOO8Nu;!=~v;WvFQTWat!J{Onh zY!lz_IHi`8oEb^Nqmd8ov*Z?~&YgoQ zw@-Rfa=^3!whSfr#v2XRDfo%WW&AvPfgz!#w8fy=i~G!!P#;17&oPK4d;;S-im&Qw z&TFSxI~i9qOL^hX(CDMY%PWQRc5S!MX9tF zkLXRwKqq{I`{_vZ@M=#r^RaMT`fChhcwgJ!k~;S%0*fdPzHt-=_tAE9FR(uO^Ltfa zuJoM?_OJ)I+o`<3w+?EkjG)1DWi9}#@2=w^~cs3doK8-%+kbfX<0$1!yD=)J|gyeT#~1)6Ngr!U+~I= z8Yap+Pw{00bni!837s(NlMsLI%2!KbGvaNHj~+v|6Ph_vE-I5w05nNqxr2$5fvv-Hr5}xaXeZ*T zN2gt8I*5)+x}RCb#M`kQ+NS3tlaQRK?cu|aah|zQ3oU_Fj<3}gxA0rm>K;(t=?zJP z_%F70qYI2hKZ5m{8pZPm;=L7|E4lqV82XV?+@n_>@>gTppb&e9=`Ns;spmU5U-_ALZeQd(lFT+N>TEiyyhb>m{zhqplduncQ2O75yX2iMas1eu(tbVVMKGvVK#sacYv-6EH(lgz8ymH#6nNd zd)RA9WW(33f~J?FzmUiC4kT|T?r~O`)jknA0AFT4AkG!%I&Z|B&RNTc;Kr*@_Z2HI z`ts1*A*HrE#>mjOF;fMj@$z77Ut|4mVqQQQX^KYU62PfGHBKLuMLF;I(q(Og4^?B* z(u{)V5w|@^-8gF*qySmuaSd-6C^Iu??O8EnTEj_tLU*QQgI$b1iT&9>WMP6u;nm6W zxSNp+Wl!svqJ7Rw5!2$A(|jSc`zd4sc@brv|ATa(xm;2M`IK~A_?B}jcv1Zyb&_Wo zUK&yv-VdJF*WsV?W@JmEake9(q0X1Obx0_=4;kgjcFQo0oXLra1gUCAqq6zAflWP= zw3+;+7)rU6{Dc(do@eRu7hD=<;?O8}`X+koc6hg7Z;rAV=R}eFU*0KY0=r(*Bu-D9XgFtHR<4 zk?BB>N^G*aP=%OZeBW459v;P-aw=JfT``o>!0Fgw>!xzzCedyKU2Y6?1!W!edQdF0 zH$CYC16LA@gfrsmfoSa!O}&SY5CT6MHpwL#5oRaPl0A;S&PnV^79G>L;PXh|BmZ?> zaV@|EIJ=Tgg#p^QCQFk-JBJ*_?PFD=(p{^(x6r|`R#^6EamSzC_0DGYhwOy31?bC&}JyaB}9&?`M&MpIuy zB2r6pPR4?s&wblOM@H{KtpqG$yerO$LVp)ql(IHF$xzc=*Z7ATPaK<|VC_U7cR%%( zU>;KhNQ`z(N2Msu_Kf*X*q2s;lk3k6Up5T^2*g&`Z>pmzK?sa}m#t6Q45^WDTW`oW z2X2xtlZrw_*LvXVh&u_KNUlTGA+Osik3}UUu1z{j=7T~zDs%$B8?)ZFqW`MsYkecN zbj-S}iPS0PEz&`Tdz~z=gCDfOZ|H8P#c}3h7}kUs)328Ogo*$rz>j?G<~aLQjT-rIFa{X2v}$cINb-`L+HOJdKY zMn`B&yjDizIVBrc6t|!C8NJfu1>3OSQlFw<=vH^k>0p`1MOBaK;vFN*Fnv(^OiLlJ z;o+{IM)oRee9t)3vS+3K3jbRsZ-vV;e9uW|2`_^h=U_-f=Ww&5-?&eScGfME0`Nm| z=eTz%a?ov`6rvLGxKH-9{t2D&niFJIX5^T#hDl<(o>;qpTn;{qU8zjeuYk(76XReH! z1Q29Z-M_1?p)0sZ*j@+UwhZx_vy+Eo?6Fzewl&la7of?U)|h+@*Sp?Vj!U9X!d4mn z>Uh!iQO~D;$-JKai4&+VPJ9 zZH`r;g%Nv`Ud8A^LQip>vwu6##JQb#lalB6IQ|9J6Bpp2&Ma|3J6(01C=vW9Oo&?R zm_Jmj+TmS**bxK`8%M$&PiVI?iZcqr>QvP&k=YG5%X}_{?m##qKcs=#Mfz~IZ1IbzUA^7=>hX3*j>aFw^J8w zEyr(5u?Y4=w+Y56|tfM5-mjmfj3 zjZHo=Y9sWW{-78y-y2w;@HzKWiVnJKu(~H%y(yT19f7>E&9_X4k8*tJA*S0Y?HH-& z4f^0EF;|%%Ff+V&d}iF~2rC{iP3ttaXh+K^?2Ov@B&8QUQlP`JOrAHdoDAMMov13fwUAjcor-$$sM+_y9^hs90I4Zq@_ptBL`1OA(66Ym)=>&Fu4T%?k=he&NnIu8 zx47!?^C-3Fq4#fmc*JW*C<-UO|I1MW7>anq03p?ir5Jqxqk?6L77zFQx*2E~W-L*;vv4Y#```$Cc!^r4füaâ- -ì®ØwCY Œè—¡J,ƒFsÏÁ­Í®ZÕx<>ô_"q-³£µ )²‹ Ÿ¡*Ƭså ÷ Ps‹Õv‘æµ_åÃc•Ûã„íÓg‹Î²rG$R 埗Yµ \ No newline at end of file diff --git a/agc_2-X/trunk/app_conference/2.wav b/agc_2-X/trunk/app_conference/2.wav deleted file mode 100644 index c3e9edd97f771d36d77ca1a4cd0958b628209a3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4018 zcmWNRS6GvW0zk9=Y{-HPLJ|lGAqkMM#aTrhwRKk9RuAMmaaUT=I*L`R zIB`^5xENst5)wuN2>}9u?7eTl^LD=Td=}20G2;#n1X?n+Ab-PmJL8BT5D5GqpRquo zLz6)u2nhe5`DX3TwLkw?y$r{*i_%?mdO$ul(|ZH89r)JpdAq$+1e(Ne$W+JpUFAao zTRSWXx@HtmwrezqDXG+~N=kv{R$rX)JXi;rXxgBDs2`4qNH=F(A@mFvcGV8Q1ucYe z?T>U}({Yj@10~MFME1{ z(@KJkauYN9RoojK;7<&!#V0Vqkq7nT8&X>#gQ`G*&kiD_6P0fOogb4m{IRh z%S7<9IFG21e!x`TyjFVB!j61E5Q2P;XsCo)DX1b9>$f&A+r~M6j>@CnhkbJY0l7yP zax9qH+7Gn{WNKdv9n74DGJ4*E^2u8mi-40VeJxk{60Bk0PN>IN-PGVpd^|ZXe4zWE z`mfc;QIUdEJU+(cz(Ouf69_7(W zGLP_2!>1V_qo0SCBaXQbs&^@u*ppe4b7myzKzQBdff{c$km_yIPVTk)syNo1W1Io+ z_o}SEH?C}WTHvGJJ;(*O^VVdCnB_K6hpLj2vrsP()Hsnz)7x}A~?;zPHacr9R9AAScbwH5XLtSf}i zO-adC(tb7H>DoHDAh;FS;<_|IHO#|)FLGwUNcZ$M*$yos2th>#_K%*hyvK<}>QpDj z(YL>4ye1+1F(M8!!}^(PA+b7nCLa%*(luXlR&yJAnxscga$~$?BA9=cjSj@fPS*SS z=b=`|#7DCH?|oQ&e?m`8w)1Jrs`?bY1NR}WnY1a`qv#W ziWW-Wk%SAcQ3hL=3`+n5wmh)iJnFwle=b6?11?S*wK>o56`D^pKsKlwz(H=7pc#*HOP!@sF|_x!?Fiow=QRt)C$d zLT6Z&22+@y@Iz)fYnSa_+cNnh>ml?t)LHjL%PQ#R1iUz!`q;3ti6>j&*p92gT@R9- znZSK(Oo#f=b*@ho;5e37RTQa}yG zE&;>3&eoQ84*}aa)$!d(iaQvZMVu222|QJNQGZF=Wb`F`wDwQ zj*7E9IJrMKBns33F4uewR1*w!@se|n$9?14*Rxprz&jNl;&RCKdK zzY(dJzdY%#A0sLgYZB+c-gXM>>r`cs^VDO6?}CxuF-#eI4=X2_D6gp1^rfS8tf!QF zAdWW=)e_5~qFjB_+M#jWXo6*_19!QV?VgSek1e< zH;8_36i8F0&Gu?meHx#2F|^;b&9eigh8K;&WXBXv|G~s1ncp&wdhx?Its}5)FsKo# zY*5!jTZERZ#WB_)>kdHcVH3;vFgfWZSLQj1!T+>{!XzLQjLT{c|f zE2DV6Oq3W5dXDUo~TK<{K{G&*-Rc`)o{)_=G0=V$Il4 zBy)=RI`c2vnbs4nH;rg)96=14=#YWZ89w136#S@4vZ?if^)T@sB@QliUjyHbxx>xE z#SDI5_du#}-KRA&PoXuQdEvz9M&<`(R$q1PTKV?iiMYoJ*%3hxFCf6Lp!9*Ys@HX- z?t{QiUU8BoVyJpS=rB=LkHuP`IQs0Z72dzeZeUvZ# zU*RbfbnFkqir_dT&ihlZy(4J0(C=qY7OaL%8vJ`;ndc@T_bK~Nspq=W<7ea~^L`1k zdrNz_INt%Qg1-%~9iW8t9C%JV`<#oa{HLqg&P3?IIP>p@V(7}mx{TNK-%S0|I|{9X zh^a!9JKHQ(a8_cYNKInt=QZx@*y8r!nu;VqH`V$IPKt?7<<$?0t z#}LO@H`u#jqVC+ z71|}N^;s7Z)`mNV`%Og<3B2DL(*^6E?w_7W$k`Ns*lX7QJF+;006Ogvy=@vD?)wp3k4ctqY44#q}ah7JLP5 z4Q|9A_SQrSIA<6lFRIN~CmMK)CC3#;RfoRvp2OgoSIF0GzGivDqY)WtQ{pn}u`u6# z5B@8q8h6cjxcPFE%A%mpNv6?DLk9b1FrQ#Y%`|j3)7o(!ctVp{PXEhKG3k73F{^-; zBjmP%t~3yj|1jf7%ng@K&vht)j}XZSUD4CmiCB_)I+H@7TTW;-rUQ`M5b2nu=Ysx7 zHfAVAEDWfh(XmZm3??C{ZtXDJIi8Y{P85!Z zHg&_Lj-dc_8g^mut{LphrX`C#oPB@Ud5cAgcZ*iyZ=3T+c)k(DoZ!9w*pBnV@lg{qpNsBdUW`=qTOFqXP4Lao zfu3>;HYPcHD7hARt~IN8);q9LQ0nNo{)z6JOhI-l{2LLclzXjz;|Xd@Nq z&o_MAmgj6CrIN2hDQ+!Pz*xeyV$_;fwOeJiz8myov1sIa&j)ZH039pe^p&;A;Yj(h-{11+E`d*-=06qY@vWbDgKXb(l_ko^NC4myON3eS|MXtCJ?6 zc3FvbIdBCt%RR4)Ae}PSOs&b-%%{Uiqa9;!!@Y=CuJx)Bh0lJAm6-F9R|0Aocsz8& z{{p~zc5AxSF5fneECS1_g1_Lu%J@LJZ1A;~cWw7P$6N$7whHS%sH!A}C>fut%Wr(rnc?3{pkkMK7dp9^ zyu^)3ImoFhU!A-wCH$09Li{_l+oMBAu^-3Z0^L`fsYR)G0@cha%0}=>&opFRY;KIw zOO!R&y0k&8k=q=59vbWBLD!QHlG+?bX}DqMFgki_GAHgeq|u%nnv4r!t1R=|a4m4l zh1dmY!MIbP95dPzM!rTqH08?b>%on K2d#)V-v0w3v(Uo; diff --git a/agc_2-X/trunk/app_conference/3.gsm b/agc_2-X/trunk/app_conference/3.gsm deleted file mode 100644 index a41d6679..00000000 --- a/agc_2-X/trunk/app_conference/3.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õ÷;û=PW1W#X õ[r)¢dÑ[K±ä%7® -ÒÕø$þô£c±#2¤ê¡+)U…˜¡BV4F¬£Á›S´½Õ÷C{4[ãHŸnpÞ¥¤ê•·”£âØbªσ`åg¸âÕ÷C?=åãW n(*¹¢EÍn,©¹ÂÆ{Qá–åÁáÎ6¦qÕ÷R·=¹!çÆ®\Ïb#¡V‰)¹«°Ë £À…h~ Õ÷R»=£ š²´Ñ“£¡ç Š\%¢.ÌÐkå‚nÍÌ\–Õ÷R»=åÁ—pzÛÏáµr’ä>šÜ™=£¡$u ÈìÕ÷R»=ÏfîG…ϠȵjÕ&Ïa·ÓyÏà×Õ÷C¿<Ï·+61ゎaÍ×Ï£pôK¦ó¹¢âéçÕ÷;¾ôWCÑlRš¡™ƒLÔÉJ×å$Џ=R£Áf¤‡ª¶Õø%>³ã##xw…b¢ ÉLMäá“Ù}‰ˆÏbj&‡V¤Õøúì¹à¹ê:3 ¥áÔÝk¶ºá+[µ? ¡à®kŠSÕø%vó£A¥bY—ØÍ•9‹‰ë7q·©àÝ‘Øå \ No newline at end of file diff --git a/agc_2-X/trunk/app_conference/3.wav b/agc_2-X/trunk/app_conference/3.wav deleted file mode 100644 index bc37ff5d389bdaf8bb4566cfaaba19a938ba7bb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4046 zcmW-hcUaVg~*~xpT43r^`ZY($E-xI0rc#_&vwNIA)uw zlIl!Iv=Apu#}}dzq`7i8r`hsz9b{OA*0WAU4!9;^%?$6@DS~VZsuncSTzevv!CM?= z>`(sAlyV_vap)5|jGiHa06jbO1GYqZBcn{T$(GohI4UgPSMf^jP{jd#dK3Rs$aqQKhp&|3O2;U=f?M&w8=$j4lQ_%6-Tp`PX1C zBF@K7;E!0kR7;GfFbRDx@mFXUc8lXoj1Wn!vvu^=CGJ8}t@qT(2JEs(njR^hZ2Px? z+%xEV6nw|Av9B1ND0eAmh}aIWZPrLgP=h~q@Lc;7WM@=Q#&!V}nAblUz8_lbQnizt z0+D|ew^A2#9AK$cANYp!9;$2T(o5k(a#cbltpJ{ZouTAK<~U`#MBOJaRq|DogV>5J z58B6D##(RRrc!Bp;4r>~zdCR=x{f@mDC3n_X{w`!VI+%LK~-W>>;`jH!V%#W>pP9T zslwGy`7|ie&cVtA#i`ZeskWkeerJStcGz6_`rs+_f^@p_g?NSCZGs1DahZY7KLVXN z^i#!BWvFPtS=r5WZVcY!`Nv$^JPT$;Y0_8m3c>XsCwuFO#}T$Ew_X6RQyfZK##F+O z!B>Pm)H^_&VV$lR@<>*WX{9g_w!etEhaqyDS2MIfLP^30;`t$dq>_*$iRA9K%~LJc zmB9t<`HU(r8EcHJ9`jH@uqoB=jCW93q&5r!@Ypi$+T`Qna@+s(?$%%27m4wnFF(#h zbHr0Jc1jM|3!2({pZjj(m)VFtXAz40iBcq<>|EAaKYAf3&|loYw>1@3D~2=lg1f-x z!A0n)u$Nd(o1&o$TA?7NF65{nspBEOg8T~FZJexEKql$C_{FpinB+D`7-(Ca8?`1) z2UsCmD$gS(qT_=L1tVAeze( zjf)d|Y}2*3n*YXTkYD3oTL5I6fRI)z`QAQkoZ2Px9t<4|Uhd~0mn3(UJ0-K6tJ?@e z(g0#$-q7-nE$}gUt#Y!+2psC24Mc?mdlI^4HgTZ^3Ss&_-eG9f=yrd5xC6nOnhbw~ zuVio{gBgKLhcih-5e&%^-TE zH+b=mx2hT)0P$I8X=G0}%BADRP7r-(-=ulaun?6*0KsWa33`#+mwZ{W*ukuCZ5!); zOW2D+L;DfA_=}7~Qj(Ktn$kbrZwgAZcA60=UG|IePcZ|0-PL8if-m;1>h+i~5S6db z*d~|>6%LJettQlCyIOh1Ss+(VN-?tM!DF0%gp8x^hUCWg+ElPpa%Ak=h-*l-=Q`~) z;}c+x_PVA4&Gng<80R7=E+(p?Z;by`e8zEK>u9)zlvCpIf7@>%T;9ag zds4iUVl=dGbf*vi#5_0!-Yha_R7tad87)ZzxBZf!<)ive6X=mr#&4Dopv&DpTV8OD zx1&3``6{qRW=<~`OoZPI(>>M1tyoFRdc$sKyHt@}$gV(CKyO$lbv;~KpRYaYyd*w6 zW>JI$HF;YY51F;V4sDYfbq4YCB_&}Zv?x?8dCt>0`_wI(R^S!ucjg4&RP-hF@t6UT z$hlT?zupI_BbF1~U5Op z)DSe4&L9rPofBA&&Lb(JRl@7eBbwFvLfQ)JbTApU%F*E&``&|{Soj+KXj_4N~4k6~{J(e7hIo1k8SJAJPF9eB`m zqSxv*;GbIOm=^}={|3`!XNTmc44)_!**r8ITSw?}f7*V{ z@RcK2`YOfG-HX&aLPDNWNvNYCU-Q(?5w(o%p!K7d+*cyMWzL1j`b%nyoyLD5yF|=F zAv|7a;cWxmnm%=fb0TX3XJWtsG>3d7=AzgDBx_gb&w!I6^GF1w2R_M&O6-yqf)4$- zrX9!v(t!W((d$qSuOm&V7zV#-%IcDO@@Am8oj&X+d2!YqaTqQ-3gXlUR4HpOW zimA#S(pp40xC-77_MNx9Q*3->`yl=)b+h0Wdd4;waFX%{`=zN_W3$c` z)g-u>2x>t8qI59sAa27Z)oj~M-k7KoayS+r_!lpiR}Sm7|Ejq5-&nu$nD}O-ikKQz zC9Z)gwG~>vb1bc!+KQ>+x3tWJ^JJ8Rn{>#{C*_VNVyI50jzagt{bR(N6e*_D9Vwdl;jVk>vBktEtSmKV@s-e|3)xD&Pub zd)P}L6*|U@PKFg#Fx`00WJ2~4Xr7@VDbUL6Pya1y8$xes>{fdo;xE{-F1KTh@U`-& zVkVksP8j_;a1QR-K)mUw?TtvRTq%8u_J1%S*9bn(+m3(q`>YQ|?i8-zYmDXi5&WWL69E@@;f>p6Pf&|i1bn#tWS?+a&Qok4j5mS8-xRJTO6-xk1p z%$XHffV>Z%8_krmkW8IJ+wD+9l#p}K&*4^D_PFPYQY5cFztIY937-{^V(A6MoQSmE zs5{7^rd=JiE@OxtlJ_Z{(E?Y-x6wz@)g8DGS-4k$<3B!a{le}NZd9t}IP9N(rE^C} zzi(^zZsRxB0@0kbUePKn!P4o=Cx7ie-GXYqu=oW2aTT0p*l+N(@Ue^-?3B?|x8G90 z6UID`$iU9{FR_QXcI248tZvkTu-*#~hUk&?Vcjx~cn)$~m#Rs%ucn!4(>yh>k6Jpm zS`H%b^&$02U<3J1$T`P3a11j$#UGW8E^RDn$wuFY<+yS`oN;FJ#%2^pBk1|o!rpD( z1$c(-Rp(}Vm0-29TCp7a*nQtJ17Cp4?4Qu|)cQgAEWK1pa$On@brlgiJeS&M>TRRZ z!j;K4`Bj+Dc{8LUveWfv<5|@YqeuDPxcQ7XSf6_p4Po2S-G;2X+ZF>mNcMr4fYO3b ziZVpU(VuiPRYA6B#%%U>+?U8jQcCP1*+z7)euHkG!$t8Bm%!gbPiO&2JEG2`V~pO$ zB&eJy^ZzwsagO6urx9bwn838B%jgOWxd}|`G1wpTF=ckN3L|#?GK33A417E!ZNaR3 zVT|%;d7^9Hpbeykedil*K2`4=O%(Q}UKhz+8*O<35M_gVm+5!)XQKxG_;H==wXRH* zNy%p}aGf#c*AarW8LTh!SCs(r1xFZ zM((;_gs<_QXv@{2BP0A{NvZq-mlWI`mO#&Omo%oRz8l%b?T9U*f5hZoJhO=V8}_9k zvMz2kmenlYK==~99jp=eh_kR!-AmO%>%WoPncMvP;1V)r3@D$0ePtl%*EvA)r-Yxt z3*bijgru|4h1m0kGtEBeFTxJ*hT#>Ces*rUF{Z%fY1v{HxyysQ95l1u=HvYzIe|t* diff --git a/agc_2-X/trunk/app_conference/4.gsm b/agc_2-X/trunk/app_conference/4.gsm deleted file mode 100644 index d2bae3f8..00000000 --- a/agc_2-X/trunk/app_conference/4.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õ8‚®ýPRáW¸é\-Ѹ£¬eŒ•lñìG'„XVÔÔùbúýî¤Õ,‹µbÓ*V èÂÔrK"“bTÕJ¤°Ôú5~³ÕaÈ‹fÅ9áZÚÉTŽÈ¥`Í•ááI”ŒZ^Õ8‚nýYäÃZ2!QÄhzã˜äk¥Ì*Š·‘ƒ›"xSÕ8‚nô“£ªâ漓‚Ƹ®‘ÃÓ*Ž‹"“‚fsŒãÔùSzó‘CdÖƒHÝΡµQTëÎÁºmqÓÂZ•£sÔùbû=iB -ª‘·V“bc« #“meTQ¢ÅJeÔùS;4‘¡Š²ŽUQ¡\ÔÆH'k‚ JéXž»á+ ˜ÊÓÕ8‚2¼U"àê #ÒçÃØ9еkÃÚ:'œQ„ "‘IÔø‚.ü‘S”Ìc§"7ÊоÏRërŒâ“Á%ÚœÎÄÔúD~óÕV΢Ée’¢ VãÒÁ¸Õqräã!±·EÔùK¾üáÁ¡i}9EiÁšë™UEã¡Lyª¥ê“áXz«9#Õ3âáõ—È­°ržQ¨ Y”ÍsÌq[‘HܘaM­òí2 \ No newline at end of file diff --git a/agc_2-X/trunk/app_conference/4.wav b/agc_2-X/trunk/app_conference/4.wav deleted file mode 100644 index 05f1adf82f2799a28bc85b85eee27935ab5975da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3990 zcmWNSXsYmF%T+Twwpy*#R%^9Z z+P%tVsjXaXohsmkqTm4vawrIL$_?*+&$s9Ie1D4P&zW-?4+1SO`f&EA+xMgrK_C$L zKi*9NfeuXvf#N{%|Cx;&_H5YvU-f%zGiyshGkbL$-%vKR%W(*j2=5FO*uHhwV777= zWUa(4GbA;)wnAJ*iDKTvloOCayI~v|mBFt@xz_Krz}PJ84*n5gI%St7Dxcea)258C zO35V$K{>u7Q43}z-WM_t=5-#?HzMcfN+fJXp6hERu_u3=kE|sa;hzT{2XfG4#(RmX zsJ(BV^t)aPWFTvwSd=^?&^T1CyXVov{)J9Vi0w%KUqnI{CnE*6rQiDYq|z4pnkD6R zCZ3MejVT?KF*^M7&@J=vp)^-JnUjAgcQ-~c)F7?tT06m^wx(_-+=*PCxB&`bN6?iM z|MZ{iI%26va0{OZX$gYSQpLXBe>{(|F9~~~OZ?2pGu(XUQu4NmIo%bq>$-AmdEO); zKsoLFUXyJ|52OP2IEN=;e0pRrEtX|XSs%((LL2M*v*1~oALk5`YJAz&s4D_q2D{>m z8m14g3yw0TiSBX_fTyXaHm~X9#f~u)DFawVfa*g*mfTZU5VXnd2iqY^WTwg5JAuZ zx4`)}PRl%+1)>!@r?eF}-!ja=-^pp`&c}sZ$rhg{1nGuM^?WeA+SdCVeZGsn*|6u>3CIG=V9&gMaHNQhnDlvOU39pY*%2F_AGbB(2OK3P z@t=wFk+PG{Bgm$`t*M<0yg=&5lE>VYP=sM)|4eHhcpSlv0j`(snaCcVyIxBP(EMW$k(hfV$r_*v>w+OJ^5Akb2* zw#OjcKmjl9Wyq=R9@yx33UwhahtE0>`%E}3+nqiOsM3m>iaVSA!qji`Zl*+H4VGG~ zF$je(jNP?qhl`v~3GedpxwG)IhNnvZ>VUZ6)LgcM5{td#$qG3Ur_etK&J8v9a7Gu$ z>jfh5Qp!|ob-P|!=QLq=Q_M(8C?Uv4`ly>p+CV`4T7GAci+YoLQH)M}*L|`dHu%g_ z0ce0klEzo#)nwI*y~Twpg6t3rSW7lEM;B50nc0~PA)j$*n_+>=*=nWp!*8hU+x7I7>2 z0lXowGW;4dKs$lI?UZ$STX~~jkamcU=l@8UYW<)3s$LOLBL9N_?qB4x$7*QjIo0%K zo|=xlW|BT0TgdyK2M`yz7n`cacY-Qlpa5euVMH4}mmn&XSZ~ut zup9k_r_A#kxCK=P_Kga9 zAL*t+zUQ_`5NTU{IAwNQlBo_}M>|TK1}6K3;6B1;N)@DPIMi09x*4wE6cx_SD2awN zZR%p{DF_>LF|OD9dcuHgPqCzxBdhcj>A&p+FFYlZA5K38L65F9DZSI7<#DO*AIygx z_pzev+x**ve@!1sQ``O>-%VMZxr>2>TysUeDp4sdv?rrPc>zD_KG1oy&9&oT3 zSIc^ytODKd6E`KP+F~a;Kj#0+TphY)WQ;uW?}U8|n&K!QK~5x)SM$@el)!w=)yAz| zb^i5CF!yJwFiLY?@zue|h@<|6`ak+skH14cFB}paz)vyEZdu-a-n$}UQ{sBeq0s)o zR$v$D3jUJ!pn7HdBhya855lveF4EW-w1=QsGC@Y|Mkhw$-pWWY;Xzt4J>CDTE6^k! z+>P4IqY99eT2I;Vozc(3wXo9YL)&i4_VBu-aCBSuD z30#AJ34iI{Gk8|B*XL*6Dma#7g0AVWlCA3B9yw24OSdB~1uBDoBZZ_e>JNKcS6!!P z{8Hj-$k%mUatx0n4nke zhJrb4WYDUtmG9S0f{i7u_fgn}TAW8FnS{v()YATc#rUj&`RL%RD7Ilz9(!W~5qI>(GEF!}NZo^&dwWauMef zULc`(bc4(;uO9P}rewnTj`>3lML%y3myx@7JrIbla^N@D_Xtyuts#KNoeGd7QZs za$U=lPU^lLUX}4yq+#Ks^9(!mF?SWT1p3DN*2?#;h=0U=!d-@%KNR1zNYUf1WKeU4 z85ck+#%ZojP$xVue9dgqK1eBYC0Xcc+~wOGXmQqU(HRU6n}{iYYkN2Jzg9I|{G&R~aBf zW1g$@T+tUiGtjHKD_x@+49=%5NfzV&4yk-aP=5Rj^c?qgbxYS0+al^gF+TqwZrCX3 z{CdFP@5Zgidq7Kk+oDwB+T_UzWv=+nW|_$dA_N77yeL6!&({8Aj)hRb1(3y=VxI>} zVASMHW|mBpE9N(y96W_g<_fYtAiVS{tS`O$p>Ws=Po`crJR{;uT_!HiD2+6B7fDIl z49G>sJZ20zGqA@$2Fr@CgWniacfVB)Oq@yGRQM=oD-^9=q4-S4i2WNc#Uf&vzO`{v z$Y+^MEYD(VZEADapCrB~7Uq18Tt8B->9IVD)dEYRfJ5xehUc=*XU`@#j0NR3Y3&F* zVGd85aR9Z&`Nmq|N5WRb{pz@?t2AGOZOObZ8fOyR&Fwqob;gsZnw0890(_<~HCT;M z;EsXyCTCZs=4TL%D=fU7{$=olO0B3iOQC`UKe{hW_Zwg;>cOOoup9b~a*1+QU}?Im z;6z3Y^uE4FQ#EdgI{-9=J{~{n;b21S*O{r~@+Nos_bj!z{$ zfENWkq5GKM6U!3TOw@PFofsj`fS&N9qCk92;%ltNhF93z zOA7#^VMNYrj z=9(GzA=K?P7&ndFiaVU1EqsvT@R~c|(yO{mWP}Ax%|SIx{OSECPKmC8?6bzJO&VF` zIa?$7ljDyJsVdtD!?PjjluZN%`0#%(-c9_S_6(q!=d}ISbznls8kYcBs)Vsi9 z0+pg}f){(*Jt9PF%JGbPT+q}m)wN6==Oq>h$}+NnOJn2a@4WM&in#l(YsQN<5$YnB zESN#97?a2wF)Z#ZJ;MXg=8Sg&Ryu z<=ms)0y$hW{5JR~k{n#B7pl>gjQDy%muN59IGWU^=z8JA;D4fpF}(1{fiS$CTuS^V zu(B_u6``Y{Pv^HZrZ@su&1~ZKr9q!@`vqI* zI{zQWla`*49VU&CYljK4UiR2EAIe!hd0tE*GceWux)B^({r}?0_r5OU*#e2y#MCk$IHeIKIoPG`4q)7LiHfck-9VKOHSp zy+8C_K!=(@OazyBLa|KhJM3iYh?}6;*DTkc!A1Ck{B8o=#WsL#r=xdazXhjSr&@He zhsh$rd{%2f-MPJKgEkX5onFYkiEH&uIKK)%M3h2n9YX`ZXthBD%T-XxodUkDu9us% z$3YF$cus-gW4!1xya6gh{vGz>}J8!i7A8z^7f&c&j diff --git a/agc_2-X/trunk/app_conference/5.gsm b/agc_2-X/trunk/app_conference/5.gsm deleted file mode 100644 index 239c7aca..00000000 --- a/agc_2-X/trunk/app_conference/5.gsm +++ /dev/null @@ -1 +0,0 @@ -Õxj·=P3cWc•T qFÜš$·DV•ìD%CHÕxS&‡T»ÕxD?4åAáœ9EŒ©Á'Ú¸½UÁÅ2r [SªyÇqÕxb·<©ÂH×maQb ÅZ%ãB#hS¢H;K)Õxbû=mAâ¹K&²«¡µÊÐ^WW¡›CÈjg“¡¦ú’ŠäÕxbû=§¡óu¹UÁ5q^ƒåŠÓ©ÆÝSÂ;L­fŸÕw’.ýåÂÙPÞS¡ Ó¥ÊÜFär6zœA[´»M­ \ No newline at end of file diff --git a/agc_2-X/trunk/app_conference/5.wav b/agc_2-X/trunk/app_conference/5.wav deleted file mode 100644 index 709a729f361f061537a415c9401ba69f2b70b66e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3990 zcmWNTXIqnp0zk9gY!b2wAtZz_Ll|KdS6#(X_o#b)FoZaXVJGsdKb;$j)}V7_ZNLPDB~2J|!9&-DEZT`mx0 z-DIq^9#FB(2B-*re&U~zFDyr>CqBZ~||P_yhZk=Xl@}8Ns0wYP4U9bGs^h`}xO&Q)zi%qpGP6mCP&BEJgpE(ilvJJiI(9Dyleb2;vMD_ z`L-)#WNPjWbpcdgS`<`2q zAAZ6ksb*Ocn{*j!ydXg z;0^RULWXaWVn@fYekXlJ_65Na0H_*d$Z6gx94i z67o^irU=Vj$Z1rUt5i8v(eC}5UzW?_=XaJm^Ns6iNcPR(iR0V61>SEt3(y77k#+LZ{REKpJ{NDoKfR{8c3~Mo~QkIMEkW8arv?dH33{WX*{9T{JEx=1- zV%Q1~sq0y5`2pbIRlo|3-kz?;OsbMn~->=^?W)lL2;WVx3! zR%x*l)(IC13((sK>cwqJC?b(L7On_1da`g??BleBwySNQx0p=Y$dt6a=(OOF=_eP6 zL;(*>d3|SxrXX8|>$CUKv&LmT-;c%wNf>)TY~JjwCZ9{W6Tc?(uA9-M9jU-YaOP64 z24!v{W^)9JINMkuY3fJ?&&O&q6s&vhqxyW?$A}8pBU9_ZK^=~O$k;EMO;|p%v-9w% z6tX1j5;V)6?Wv;XCQ~?zT=i{X;tIn|%0a$_c0OaY$-%edbxl z&ov z-=yvzTUQ&B@Fa#7jrP!kwUoEqDuPX$CU$mg@B*=?Q>v(cfsZWfgZnXqyOvMVY~?c4B6m(G=A3iHVR0e&T-pnB(Eg*%_qq^)@vN#9S!_R;+rGQ z19uqqXn2S3{6Knpg8nMqn8i!kge=p{A1QP016~J~j%hXbg5i8oRwo;3DQ>&jJk0aM4-iYtU_SvbiptAnGD^M)n6K&dlp_^yf!>rH~@ zDk6uCmd@1!iJnzq{m9F%B&P#+Bko4rA23Mow1!WW$(V^)e-st*k!vdCX87M>={8B% zqYkqT7xQKIblx%FtkGo#Phcug;)1D{>EEK~39~Xw$XC^GCCLh7z)$)IH{UzSy&>!a z@B8T8UT#-?BT}=BbUJBX^j_Fh`%iuVKNYjUOp`ifxBS}@*X7)0Uw6D5T&&#{U?Ev< zu3l$m5pz=~r!K+dC|qLL&^T-ZqmJ;>@AQcAif9}|W!v1gsd>maCvtJ>Y4*n8u=%`u zIl35lYg{9P4^;z0!VlR4^sD2Yy*t#U!D(ot&u%>HKv0xIRAMl6QMyeWJ^BPoWnUwQ z0vA1G+=a+B#C+rNR&o1j*Hhk;jBBhCkIWG5i~t5j zpgH)5q3^5*J#T2U1$xd_m%r`4IMR?sKF#}*$_o7Met-&4<1zPj0?BOIrO@w5+cOIp z(e?}K_14w!ZLr@>M~50r+o{_#YlUUV^8+RA6PgRa#qfjhW6lo$K{_L$Fv4rP-;8cO zX9XhfCCsLs_9Z*V;CsSr;4{^qv|kxSV!G146&)hW$0iJ4mx zlKfvt1#PzsP1tbS2=Wa`4bGx*d1j(pYiY{wSnhcjQy>si4!QSP7eeZByF+QCC%cuJ zUrEJTY`So z{~ey+1)50W$~Y!cEA8gKb$p%VfOwYIn1{0H+`PNP5sd#n)j?l%KS0s1>|uO$y+ ziPj1Ij4flsVo?Xi`7Gi@^fO$MXJ=p&(M9J$V+JdmHOl4qV`;aAQ}FvtMS7>3jojo9 zsx5;zU9sF5xhe6dJVQO4o|_X)tQkl3Ke8`@Cvr*?RfJn34Go&^0l$aS%{zvB2(I&% z;wni>-%7bsV%2V>~Zz! zvJ|GVE}`PN=K%f)@R9SqV+p<`{#1MyT-Tf4aA;7En!)>u^#NvbeFuF)?kB|B{GF3J zWVX%Rxa?5O*Zwq3{g^)Z6QbJ@Kf=?sqv^uROfH42akbSbz6{(8zlHhU{TiH3Xybp* zIp?Kz9cWysmWKxt;@AObmSaxvWY~L5oEhjYlWBZU6Xxc8%AV{zp=9Wb100~`zQ#Tc{k+Y*~q#x+bpXpj0KxMJdt_XXxI zfHVqvQU*f^rf^^Od`6rpp}$u1G$;B8+p}Z7&Ewd$T3*)IH!NRW_B1_v>>yPcwbGI{;QdQ zB;tetg9YzdN>5MO9%FayYkwd{#NYJF621Yna7BPNgPCC!R#bbQ(ZQ7QR`F-KK6Q4e!L#pYF`M;!FX;;dVVw*wC8 zt~Qn7XY2z?HgEwf4OY?pv2VkNwELTQ9jiPqxfhZ!l#}jyTQAImSA{^8wR5`W3)11t zgXwtOUd<%M3o{C_6JBF&&=Y+dqM4#TuF&zkjo8*@-WAS?n1hb;d>rbc9*!PBcMaPb zlVvp6?ZjJxrf{`=re!FYhPmQLjNp4qO?Awla#B;+@STIp`rKv~G6i|t=`%frWOBJ_ z6hkYOi zeP#V;TI)4bno~4IfIz|Y%QXu<5@5Y=m9}fd7WkHbCHqs3YC_(@>ESz$5b6j^1B+c$ zEEH8WKxjDBKM6p@6~^wxtaM&<$6(9CQo+Z4`#YyvnCx{qf<$L%ovL``0(c%^ z23C$4^@WJy#LJ@7^c8w>%Qo3M&uZ!&@(W0|yBql~s*YU~Tq0Z5m_A%V*dQq6n~<5- z5r+|2iuuIxjr>S&zPpJJ{m9SLfy?CuL$AOf>Rt#myUoWiGn3W{&0*A`iAH>Xb!c*= zm!1t<;=T>skC4#!f>mADo9+5@3|;yZ{tg(!_;g|`Yz6X=ovJ8QUV(r~X}KZR74tXJ zs=@VMIrcPszWtd!CG2qG?gR)T(EFj`@ZcHLE3TJmhq}N$a4z*!c(t{x6WKn+x|yTN zw8bp+=V?2Qn;`Xwop$E%kmg79Z$d|AEybhpwI3Zk6Znz%3>9#(-1~^^_(pE657{-| s7#P(MYvO-q6+){VF_1c<2wP#g*NN{r|i761SM diff --git a/agc_2-X/trunk/app_conference/6.gsm b/agc_2-X/trunk/app_conference/6.gsm deleted file mode 100644 index 2a25381f..00000000 --- a/agc_2-X/trunk/app_conference/6.gsm +++ /dev/null @@ -1 +0,0 @@ -Õ÷D;3P×2FêXL¤QÅŽEFÆFFyäD¬šáÖŸÕ÷-~ªã„§(Ñ;Em¦3Úµ<\£Ô¬K—i¹da1s Õø5~êåyjX®W§QŒ¼W™ŠÈÌ䢤øVƒÕø=?4åBÒã2%XW¢jŽfRyUBž]iðí¥Â‰‘ÐÎÕøD=åÂ'¢µ:ÅWB¥ax½ç"tí —)硺,NÁšÕ÷S<ÏÂØÖNH9W„ÙF‰èsã¤*«‘ÅFã·(Î/Õ÷Zûõå¡W¤²XWôlK%aå¡.ÕŒôñ¹Â̩حÖ4¹ê¾åÌ+Mìv_dȗ˱.…Ëñ#µIZAØÿ›Yµ \ No newline at end of file diff --git a/agc_2-X/trunk/app_conference/6.wav b/agc_2-X/trunk/app_conference/6.wav deleted file mode 100644 index 7c32ca3622960600b4a58cd647f297a98a22a74a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4046 zcmWN{d0di*$cl9tF^9g_ql$p zYnHBB>(264L{wA|K~&@rko)2M?e+QZ{rW7NIc-`E832||S^D|<&D;4@003bBHJJwh z`zHbb9EkW&)~(*Y`o@3P{qW~;CdnBp;5cE!B5Bwc)*Siqo~bB9+7IG?ut`R@nFC*j z{LYlx88Rvj6LYgZ&@q<)-#Fv z40p@T@(o6XlQ~gOhK6f*ca_8PqCXKALs6lt(f`JcV$|KD8j+SnD(C-7GC-YSe^f4K zlRs8gQ-5V7fxRLABvI;NhXavUs4J|Sn(np!7@!Ix5-r$&oM5m#q8=+9ifP)V+=`D( zYZbx~3oYY(`|$%Xmu9N8ZTKQfl>JPQ5;5m}XNMzQg=}S3 zp`gU(Z0%Hj2yzIUf|-`m;N%!EeJSmrwx{8qrWlz?^etE`maXShcL>M~4AUI%d?%rjzGjnnmC$vDTdVNDR zVH6^2WUZ#s^GocU+?AZG=8=vy`Ymuh0&O+w!|)p-ZssvkYoA`W)Tlvm(JK3DE0TCE z^|eSJ_Q>_p1-2a00bGxJpF2Q(lA_=pv9TLJwmpRI(N~b>LMi?Sj9(J%l*|47HDFIU zlFt1mVzU2>P;^wPpbfNl*3~>8z)>g1?T#4lI~{sXFJ-Rx_Dd}dDEr@IaEW(GP42;KkEScs9l`9BRHREWU-dQg zsGMt2Y5w5QTuWhOPv(N8ZN3K`#ocw@er$HoWSZ`I!fR>3*JghEayI%I`pFUSmzw1UHD{-7FOaeLGNW$gL>8Xbu0RLkwo!3PC-Cs zw}6<4fPaqSddrY4MIcLm8}-zQv1G#vaKAd=c9=RbKyFHR`cGuPNoL@LPoloI)hqV& zA0?g0DocHdF!r;Dpx`qE(JJWu&O&8h&y9{3yAO5$GLR4+3mUAmHIy9@2FiIY;?!brcVl_woz?~bq&yCA@; zq@ERZv%WB6>(|L=1QpE9lsZ2?P(+^`UqqVM7y7hDRf)CmyQzY}l;HJ9Cbt(j*O6Eo zIXs84E@2s!4WR-TDV>oxSBX^Coar8lF^evfqFg;tfcTKWH}^F!Qb#7dAi}= zTi5KaSgtZd(F&V9+)XsI62_(o}geV`J+jn3CVCI7T2gj>~9Ubj&98U8C~KI*8) z2X5de##9Clvt)y*f)`rZ^*{!5(c+I~mNN3~ zO~ycQ6^8H3@4_mlfyHT8-=}DT>60Si`It0C!hek(M_;O(H){^sW{Yg zg|Ru(6u{pnZh?%>gQO**nAk**y*W<$#>tCRQ;r96AvE=2LQ&K|!-KVo_F(uFXG`St z;3IzlZHM3q?uCk0lcU~8+!8mLJ}yw^@1+2&_d$3&v3|1YHfyZNK)vEU1MMKKqa-;t zNhh@OeP0O&QxK#(_FL}bxJ%fV#z|7Dl8HMkp(JaOc_yd56GcR@heB;1^%!P<_WAft z{tW{h+kLPx{9<5J_hT0j*Pr{0eaafwn{6e6L&3-)ix!WFOr4%3BqMasyF|8k$lpVE z40)zWq`VAH>h~~g7p3!+BNA5x<5OI-g(BQKPS+)G@ zn5UjUK>}+JEo{0_|F`U?@Xh#!m=nk}_i4mddL4$=AF6w$;*egYwhLwfEu%Ytmt-=a zRwgwknl^K8W@tHIdO7C0pc&ijUDjESvdB@aK4^?&Y{@~2Tz-u5f@XJsglcsZ52)N9d4J|C8&fngziqB|Kj6ar z=B_d-f%!sD`b5gZK3{X*;4tbL;T*JU^mj~qQj#bF-Xw=N8_Y!VR?6+bCHEeZJu#2> z+J3F^khIFPh#83dD^w1ZMzI7e`G>wkH_SU#55HvS_1{NJ7~UZdT=x6Z8Drf(JZUg^tPe?7hQydd*{N^ zx$M}V;PczJ)gIEP)9&*WxJEAozsho+G6TQ$qzB(LX#~^f~f>3xJ{MXy4~8(CuYy&l)Cl} zkM~K@Ro?HE8C{GJEakVXV(NRNLMMRcqi(vE_FmSVCm=E_(~QV6jkk{mH6j0WnYAR# zKvZVVw+TOZ|Lt6=o)~zAUhF{+KZK-wc6JO~XXutr)6~P(oG@ z^H#_8m>%&Z+V9Rqj%@S}`~q8n>}$nF#4oA!;vD=tbD?!QScY6S!sFzUW3gx zzcOere~70_=Aq-1zse<6Kjsy<)7CY5n(9eAEBxNOyVcRws9rx|6lo zFt&b%VsZE*BM<*SPee$`3M5qH*Q=^(+WG>xDcpWS6U2di$NHJKG}IuwS~uP#iOP-L zPZ;zbfr*)IbhU$VkwXwI(yAS2{R1W@VpU*1F4#jSD9FvoKVZoc& z1Yd#aliw!5WnO0_4K8hVYHlN{NjHP5NB4u)_^~NPm@8e}hHU+OLN)Dc!0Ot7HO4Dr zc0>4IWVnp{x&v*SLT((ge>0K%OOfrGGe^hG?AQ0Fp zYnEKzvjpu=s}V29&NGZP%U~dK)O5FVm3}Y%P0sto!$Fuf*>C{}!&aM!y;jFW0hq_+ z1*{*tRt`&HE8!o_)WM~|JW+HukGfY^C|4N!kn_Mi8#rC`kU1b2Av>VxUh@X9kNE@l97o z?vJ5MN|{=B^yoeiAY`~S?Hk%N0~FD*^oj_FrOZ46%tGI`Qah1-hw!?LHDUmDZ;(4& z5bi_Njx=;%GwGOu+>Ht6pkYl7>n-JjP_jHL~Ql ld?9)gd4lg-|8fRB@e_sA|F(wR<3OI_@+r~&h)^@*{{hWN-?jh% diff --git a/agc_2-X/trunk/app_conference/64_Makefile b/agc_2-X/trunk/app_conference/64_Makefile deleted file mode 100644 index 531caf54..00000000 --- a/agc_2-X/trunk/app_conference/64_Makefile +++ /dev/null @@ -1,115 +0,0 @@ -# $Id: Makefile,v 1.9 2005/10/27 17:53:35 stevek Exp $ - -# -# Makefile, based on the Asterisk Makefile, Coypright (C) 1999, Mark Spencer -# -# Copyright (C) 2002,2003 Junghanns.NET GmbH -# -# Klaus-Peter Junghanns -# -# This program is free software and may be modified and -# distributed under the terms of the GNU Public License. -# - -.EXPORT_ALL_VARIABLES: - -# -# app_conference defines which can be passed on the command-line -# - -DESTDIR := -INSTALL_MODULES_DIR := /usr/lib/asterisk/modules -INSTALL_CONFIG_DIR := /etc/asterisk - -ASTERISK_INCLUDE_DIR := /usr/include/asterisk - -# turn app_conference debugging on or off ( 0 == OFF, 1 == ON ) -APP_CONFERENCE_DEBUG := 1 - -# 0 = OFF 1 = astdsp 2 = speex -SILDET := 2 - -# -# app_conference objects to build -# - -OBJS = app_conference.o conference.o member.o frame.o cli.o -SHAREDOS = app_conference.so - -# -# standard compile settings -# - -PROC = $(shell uname -m) -INSTALL = install -CC = gcc - -# skip asterisk includes if they are in /usr/include/asterisk -ifneq ($(shell dirname $(ASTERISK_INCLUDE_DIR)), /usr/include) -INCLUDE = -I$(ASTERISK_INCLUDE_DIR) -endif - -LIBS = -ldl -lpthread -lm -DEBUG := -g - -CFLAGS += -pipe -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE - -CFLAGS += $(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) -CFLAGS += -DCRYPTO - -ifeq ($(APP_CONFERENCE_DEBUG), 1) -CFLAGS += -DAPP_CONFERENCE_DEBUG -endif - -# -# additional flag values for silence detection -# - -ifeq ($(SILDET), 2) -OBJS += libspeex/preprocess.o libspeex/misc.o libspeex/smallft.o -CFLAGS += -Ilibspeex -DSILDET=2 -endif - -ifeq ($(SILDET), 1) -CFLAGS += -DSILDET=1 -endif - -OSARCH=$(shell uname -s) -ifeq (${OSARCH},Darwin) -SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace -else -SOLINK=-shared -Xlinker -x -endif - -# -# targets -# - -all: $(SHAREDOS) - -clean: - rm -f *.so *.o $(OBJS) - -app_conference.so : $(OBJS) - $(CC) -shared -Xlinker -x -o $@ $(OBJS) - -vad_test: vad_test.o libspeex/preprocess.o libspeex/misc.o libspeex/smallft.o - $(CC) $(PROFILE) -o $@ $^ -lm - -install: all - if [ ! -d ${DESTDIR}${INSTALL_MODULES_DIR} ]; then \ - $(INSTALL) -m 755 -d ${DESTDIR}${INSTALL_MODULES_DIR} ; \ - fi - for x in $(SHAREDOS); do \ - $(INSTALL) -m 755 $$x ${DESTDIR}$(INSTALL_MODULES_DIR) ; \ - done - cp -f *.gsm /var/lib/asterisk/sounds - cp -f *.wav /var/lib/asterisk/sounds - - -#config: all -# if [ ! -d ${DESTDIR}${INSTALL_CONFIG_DIR} ]; then \ -# $(INSTALL) -m 755 -d ${DESTDIR}${INSTALL_CONFIG_DIR} ; \ -# fi -# $(INSTALL) -m 640 conf.conf ${DESTDIR}${INSTALL_CONFIG_DIR} - diff --git a/agc_2-X/trunk/app_conference/7.gsm b/agc_2-X/trunk/app_conference/7.gsm deleted file mode 100644 index 0260531d..00000000 --- a/agc_2-X/trunk/app_conference/7.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õ8šê½PRá•=:¢^ -àÜr(ÛžfMÑ[àE8‡Á‘Õ8¢®½áƒv†G—(QE!”fÝ…ã ¢­Q[…¢¬O*Ö©Ôúrû<ÓHWSœ€áw“tÖ8ÜÁµDÅÆxí"IGDèÔüL4ŸÔ:RŠÄ«ÁUX¹…¢Éj¸£]‚H䋨êÔûL~ü¹âãrœãA fa¡»áÖ®2·…_Á(º®9FÔù‚·Ü—ã‰áL]ëRQh_¢¹ÃÓÔø‚²³…7#uG©B.Vƒ³i]‚žM†cj…¢E2•šÅÔù[vª…A¥ÑåDy«œ”Âac]ÂÖloŒÛá‚HtR©FÔùzöô‡—ÃæHy­!ÕЦð«AqŽ8¨ã!Q‡ȤÔûc=á¡á6 áB)SdÞ­U9Æáñ"<55ÅÔûc¿=ÕÁŒÛ‰ømábÛÂSc_žÜ©äëáÂH¬UÉDÔù{7=_!1˜Ö¥•!‰S©Ô왩¸ãn:5P!kuÚëæ \ No newline at end of file diff --git a/agc_2-X/trunk/app_conference/7.wav b/agc_2-X/trunk/app_conference/7.wav deleted file mode 100644 index 6cdce5c18b06074dd3b0a8261c857002298e3a5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4072 zcmWNSd0f(m!+_z-eIF_yf+FIH;(?m2W3_czvvpXeX_sxYa;slvEz7O7?n67a%5|^o zuxoFJ9X4w#6>kF%zykyk1(ZYJ%gwvb^WXD%{(n|vE?A%>K_EGESI__U`&}F=1OkEn z$DA+-V>eLHB;Gx`j&vpYhR{J-t%0=`bhE%640E_RpvzNiCOO97Afg0(qG4!Q?mX6=#NKeS zt5|%jalJARUmD*SuOMYl<|*&!;Jz&MS3tBq!CDDd1?$89#I4i{+F24Mm=|$*+ECO9 zZ@EnJsZnb~w$e{iQP2W#$h!#FO4#V7jzFcAW1)l|!51lZYL2Es#P}q$hJ_@>CNS6g zZt9(rJG^eh79ZJ|t^3&}q8G(J2U=~{5{tgvcU7KFQ-MM z_z^#q)GDL|A@z1iLq7-fla2<~qgbv5?g%uV+JVV5Ii-(ei6D%#GhG>->|5D$L3B}Z z7}XT9k9!3--RhpGaZJLaVBi#2J2^1}Jtq>%H&LpzmCgJP+*DWSW+BMKL2s(`gZ4=g z`~z+#;IprBc3{exzti7%*9@F%|6N&*i%Kd?>!+3J=5}81Nwc<7+gJ}s_dN<*vF|hN zIBJ{in6i8b0fHf`QjSL#`Iq&aZ|oj;h*}-JDAq>)e9AeRWt{ROkmVkok!1b|4-EB0 z%E*hxliQ{`_F4KuooRJ3XP~ncYkLomorhtme0-00kK;4g2n7)^(@#^eB!^VN*v|w* zsnh9>@p*0kb`dRGf`q(6`T;-RTx^2^w~$X=55}5Dj)7=~Eddwl_ZRo>Zamq)5+#c3 z6GR8iGaD6UqfXZjj2HgV5oIMoYiKLN?vSn;raJq&mRgR5cBem$TLQb)U)04_OJExq zn}X`$d5-h$$7mhlHH0#DP_{;sg}%rCR#;76uG`#F-tIQOr1RpeY&GT>-L$L!9r9DWP&i0;m~v%@h9bZVI4PkWI^RL^#t`Q*vIq_% zvxnck+>*yWl>UsL3uDWpTjvciU~k#C*=w;;;Mi1&e=E8WC^W7e){oU7-$gN#Hqj60 zftEL|e@re7u1Gw>^TQ-stx9NVh9#h$x&JY5b4=hloFCcakhA?eTQ>ABMq(50q@7@9 zm|k?h>Qh+y2r;x$?0|c^^9B4i*?}#!8v36}k6LWZ3#s*d87x6|y@}R86F9{EDzb|d zZ+~K#WdmTf@EKs{_+7(g*bR;`4h(8HRJZ=t8Zhy9uuvEm>qf{&s{2>#6M*}86XKxr zj-w9QM*oH3h7y#2cEAU3A?7C-)3>nxXRPh=e9AH|CWGv%0Equ9TdjLPDj$P(n$^Ui zucwUk^GTN2<8Zc&)>ti-LKC9&{Kz1VJ#{qSFx`6s3G*MdR0JNL{Iz3k zTazJ+c_ob*G-6p?wsYIZATB^O9k4@S^nRf>r2+iu#TZL&yCm=@bSHb=fiB z8G%?rsD<4%!1_VeBiQli8sRQhwu#*Syv00T6_6jdi~9=k@5J!9*1i*d1sJ!L8Rpt* zi5lLDi2p;-205ZTy=l;Eu>omYSfANA^1}WHmYG-wX(fWIu#6Abia?UMBu7_t%RjGSN8=x<_gNfB44pU8ATJwpq z`9Us$I=UEb7~eW+V)>x`Ks+&{B;)0+lz42nKWz;SU)-Lgn;SZxT+-pHR>_Z?u zxBy`txzYKxT;qQn^M2Z?@I2c`ac<{;ZWTckdVrPzplmN4rx4pPf4l9Y{-Gh`2(?tu z5Pt|;Ftoq1th>(xawQ2l!RgKh&6%+Uu3JbZP;R?uYWC*S;JnxL57t!iZ!Mi#NKkR= zPl+S=$&q!ExymH(Y^s`)1>-n3dp)>jY8xU+m)JXR@DG1wRBC!__2pCu|{yfH=Cw~CofB5{OA&wG{vvU8j<%Gt{8)*j?b z%xm9XTeCZyWMl0QoMlh%^|Zg%UJ6hN!;@=?i`5k!_vJp&MTqY#8>OFX#Q45LfL^u{qQB>< zW)#Ghu+5-Qj1r}&g2;koNn#}VH(j)>K~3}|5OQ%#ecysjkO*oW<086fe4V(UFVWS_ z!(`lz+~+Fl&TQYQxsG`f3TM_KHrT$m*8~0NzkL6_PFZ8PK&awJ3+|ELssC;|*rm27 zbK(*=gdX$)qw%B9>= z0}!Y7XqzTaV#Se)*uA8@k=r6y=jV10XP>Z{3-M``%E5c400asj2IPRxoL}O2Aw(L} zy<9%CBSU?cSeZN_d>imyEA7zritWn4`>Y>{?e1+ht1layg7QpdD7zFsXJzQUl*~w| z$0epUl_`?3yJOGCd?GG4ZyBYUW7EtF9`i1wH*|zoNW7tKX<5~E)du1IoE{!^ z&DS#^=-sN@kC;u3#IN(7b@1VzC@zZGb4vMzgrM=`MTzmLiGj$@Z)T%?(y4SWFG3zoXqV`2%#{t)eX zS(p}wD~eyALJf)@`@EUgdCii_d>{7<%jUnSKVjJJ`UAm%8z0&GXv>&9N+P;$7}V zXqGlgeR`@Ez8#tCR+*1GGl<7H-?1uvX!-e;yrJV5k3f@3VIU`7Nwm_ZRtu?swj5jG z{?+*b@sQkwS#Md{A1~iwt6*?C_TepG4yW- zS<#0+B4|r{#CT&^+!-U0m={v(*d5fHzF^yH_arJ4y&Wu4-%?cDl);STt1)k&=srke zrThS*Bs!kIF<_H5TvK9@d#@qW{PQi*W+i|QdBdAV%`ud;A8Eg9EMPB8e;xN7{E*^P z_qx#>V0J(u@rb|5aS)P0dP&7V_l^up%7&Xz!~B%A`e2a(-JaFC&iFWROJo642z_f} zPJQ9$BP%^ly-+i0!w2EwM4fA%vAcgRV*5JTe_w z8oO9n7CdL7ytSnDrQs-THouwk0fsTC$De^K;J*S3ZOaX2`)}m3NI3Tta6%p9Xfg9Vfv7KGg%*PfJ(de!#>-6148Al$Yins?7(UYTlVnlfAYY8l7`|r| z0b9`xz5wfOa3^+d=n{4|tbQn=^-K9IAxno*F*v{Y(c6v3S4cbpQ zk0XPdhTKxRc^LyEj7vCyl*sFv?n)t$i{X2tUs1C`uKtV#53PfTxZdi8hDqq-(8{DuUn!nU~As7wt_eq@XUJwymZ|L8se?u1VS4by92d)3y?kO37?8@FH@ zC$!nTzbn4$fMG6)6;?po1KnyJcDzEoN8{XGqgxa$=A(fLiQmOdAff%?jc0q?{4aSl zfrNe-yfM-~e#PB^Tn%7t3(OV%k8~0bPP=Me(RHY;RQCg2o4QNz7p7iSFBT6k@sCqy zQBq+(@Rk>X&!SS`17o_Lbwgt4)|jw#dnmzz=v>n_Tepz%DDp0QCp^%cW+HflkxhP> zkv!_NRFa`_SEDzhmJKF19qtkMUq`PtqN6=meP?5yr5y`v zvXkYPW$R33m>(!-P*``b^F3-!U=4`@zLMJ|9r}ksS|KB80>@HDw4Ckha%)2V;uew5 XJKve|ofrfSA+R6T_(p5}Ih_9o9Fpc= diff --git a/agc_2-X/trunk/app_conference/8.gsm b/agc_2-X/trunk/app_conference/8.gsm deleted file mode 100644 index e931896ab9637a44a609d6c40288acf63742874d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 429 zcmV;e0aE_ecw=`xP%`mW9Mw)<4T~d@xZJ2Di429(vEoEzWD*xc)p%3?JcVN;T98DR z%|jO%#Yj3~f-MDYVIqaW^qn=j&eeE&_dQ`@!&x;d#hW5P=~YNnzaga}NBI=JWLDGeya_c=V)zx@< z_dMg_i5St&VqxHe+O43yP)TfaT4VXE=Mh)O7Ga^> zGLjtJse$DOD$%0Vcuccel&OPw<8C)&)p%RF^6{fZ zF__L@g`z&4hQ#@W;#N9RykcJ>wz;w%Y}I&Me>~0NDa5UG?(rfY2cqF=so}P}S`7u| z;+qAAQ!3SXV|zS>0nwV2ROIDh)f_d)N8@3ru&y4Wse#ue6}3gxw92M^VTUBK&Ymk_ X$DTE77g=$vWfnC>dsM88B$3G+CN0|n diff --git a/agc_2-X/trunk/app_conference/8.wav b/agc_2-X/trunk/app_conference/8.wav deleted file mode 100644 index 3ed04b3b11351fd161c39e8a4390f79746826e1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4018 zcmWNTXH=61!-k)XCwmV9gq08ofdC0ptJZ4Wt6H~KtFKnYy>X${s^HhUTer2fu8L?; z>L`v@D;p9LAS4hH0@-^{lCS6fcb)6+bZGghi9rZP}eh0RRB<-#$wP zfNwtq04PBEkE~t2d-d`EENKkSsVZtoG`cShu#C0Q7=jntY$f}UwEpZBX>wm}M|txD z%jksN{J#_X!#S4K-UxgdY{*7epRg8CnZiXma>&c>q8Ga(Za9ePL)5V*zhCVWDkli?(f^_d(k6+!Kt~zFOl+?>4vy_{&Pu*j*j*h=THr zmViQZqm^k1g5|BvylM+uQdFT`BlZIEL`M4yX9uG61`UdKjv4ypA4B6muh#jk=9Z*3QfkbtXBF zOsR8v^jKd#{Aw&}xiTyZGE?3Oe@mI`nA_Uee%$>>;vG&I$rX6(ISh+nt46MArpc)G z?!<(Wmsx@Ej;;^lMYb5>K-^)ZC@?KLlYEx31#(dNy6v_`PQFyMI`25*yn2ef+-^Zk zMGM0xT`ovrQf5XLHlUi>Sk~K)5a*Qf-{A;Wp6*lMTlkS!jYX;F$L6y~34UOB^sAbl zNbuoUs*l6MU-2&VU|?o+YKSzrqwk3i%lfCJirwkDBDyExc(zc-#%mC_0^4FM$qp(# zlB)njM@_kjw@Xg)L{W5Kt=!;hN6)~tgzkHB;J3*D>uVTZL2o*w8cX~}5aQ91^?IDP z(!T{Pj!v~+G%tkj%P7blL-eX{G!)BPVEZy=aU|$A7ul_V)*{dQ=d0(cvZKMwwZ*lG zA(OIod-tf&qqTa{EkH&ryPV%on zl_e{a8Y21KqULyeD=qtF#Wmms3@Ng6J==l>dHpQP! zCkFmOT2gPvZ-HpNMS4 z*!FuJ(9UrIMrK9vfuuUugZ}GUM05!%J^HhQ>+dIXvk0l6Z%s#G%T#M9aZldvE^f@(LRqUb_e$u4mZ(zYBYG=e`2c;cD<9^8K6UII{@T;bU<=N2Mg?YzCbhsVgt!og zM>mBJxz_>(*e4LZ?nl`fV*_=1Q6M)CZtPvq@r(Wx<~8GgSTNKQ{(z4%o*;G)Eo$%R zCu3m3KH+FWiFT7rW#qse7;JQg8x?)eaB!?7mfqLIk!D9%W}V6ZggWGyseRCF_8*9W?t$71=IucDROm^{OAHL(%_aqwhn1BxnSJ+MH zwd(0jU&_;v*K+;2zv5A5&JfAd3O^5lJG`d+*poD3-r6{W?rG!U&RgM!tf!f70?oU@ zc{9d9T@J4v;wp8%scE;153|Z$M?2n%1MVBNCCu~aF~QDAE54IFE#m2WF1~DDnAlg6 z$g_+rlKj`$oh*U@9; z!mp=q$RQGT*3~D=@g5`85_+O)zZ)!1tVo<6f%Me2 z`1LR2PZ!m4*8;Bw(=}8-1K9=~b5fic=zAHbxz9nWoX{Xu{(=+aC^(Z5Wmc=L5TGJN zzK8~@n+i_P-Yc|_%LivP0rCrwq?EVJv*0ctIC2}e20PBp>zykXheKRqX<5=E>jLp| z#pj{X6ayhM`Yu32)g_#!@A7Vx+-&v7zK}E_yNT9!ILqe$VEuI}Z zz_Fi9%v-{X#TIsJE?Go~fq~WL`@Pbk`M4Behj0ih9O!L3IamQ= z;%^d{kCcS)n5~R2uosQ1MM_x{hZd=k? z-(mD3(sv1eN?7XMJWRDSAqDVkPlln?Yl$15|B7AhALf!f z=OE9F6BT);YU<%a4WAA>AzRgUM)wF?%zQ=Y4}Tp(VEnWS#5}F4LpZPsBNLu1u;Jeg z9q9hjupQ1IT!pZ`bt5*-nZmkUL^^`XBqJIjM=i7Cqr^3`sh#x7S#264QQfr8u^l!=`^b|ig z^fmevuHB#7|FGwyN6H#3{WQJ8S^CblX!ye>|sn zYu04IF_5LA`$|z!SdHhMYYDQJ{e8x4@Tz=i!`^`aZbPmq^8jMM`I$K!`4vP4H|j`+ zZ^8e|`b4md{6T%KaY64jXekSy`X}O!=X8*YCSi7X4k}!V_Yo_%z9hgrX)$zM>)jWc zNZUqP2iy&O0S?8rQ1#w=>2lE&=e@ML5-FPzh$=X$ssIL)318r)dMmIM>D_6mBUh#3 z#)&#ReX$^clL>L@@0l-+DB%|a6#aTj95$ByfIk-%k@q%02CC7gIZu-RfIV|r1BX%9 zk>?%n6*^S`d>Oy4Xqft7xVsJA4+E48kh(pV96W+B)A__1j#&~^*S%oMfA!u>df|93 z%N{%tX~BBnOMO53^9b+R<;;WLEuvd3qixHQPZr!x<%d2FZ!?Rc$soo5*noF>N$>e` z?yi_d`lwMl%qFw5+{~phw_{##J90AIZf)xOUYm$Z6<~!U*cD1)YnK|2n9R(ebVTO| zREQAuDCUq!FPl3V~>49C<4oTuR>zdB6bcv-*&DoT}1bnbN(ne zl33*#GkDo-h!udXzHZY4ZxP+ZA7l~yl^vbUJ1nE(B|KOHJFKxe16srcXp`C8ztQ|D z_49(u{B6)(J%$#pt^i+~JdwOHG9&N@Vg}_ccvm;Avs!f%+brZ2*5glV3=)!VEc`Rl zO7NDyETX5Rq>UvO>APC^T@|tM+0=qvv`X71)dH&rA_XD-j}}>|HX)lonAl`{(Q>w3 z=-HEcFDEW;wSUBNHDCdwu`<(a)p*x|gtEf&OdyokIiYQh`*nOiD}^8lobm(6TD&N7TwT>2u-;5Glz6h9L}J~iB;)OTd;;wlJS$KS zOrg~!5TL92<68R$bIEfHx8>#`EgEfKhSLY0Mf~g!I}k8bsxz|?cU*P5VYI9UT%Y|o zI~h0Iw$r#a_#J4Bc#LZ8i|E+&PGL#>F~g>&cM@p0Af=im!fy1H`6nZO!I}fh2ln>9 z@qS=2OTBD?XIAIxuInB)C7%w3?+jdkG*eH-JrCdN&2E<(kqN6xUS;i$omOi5c6;|;$Dv!o3=0gUwDn2)F@OfB$VY9WN8ourfNf7XbD&o9&fs1ECq>NXugAZQ@y<5 zh3seOrt~8$E=uRl_T?f>sHk_Z@5@hyV(z0Kca-WtwNb0w@c3l|wUw9m0J?d>> zc>s<7ByD%X3U874L#y8ANX8V^rAdOu!DWWd2pwSzoiML-<&yfceHm+FmC`>O&BJk& z@3VKNj0Y~;#NIIcD7?ebqvY!Ia4YjK3Dg*F|K;YhsxOg|2a)aIkhf&d;F+=(Ot3gCZw{spN8*q1J3x z8HCmMTYr6n;^CTgN;;*avCFMWGlRq)D{j+bnWN<$9Xj0A_gjB`gQM{&dMcdHq6<>g z^H!OnX5MQLD}$okC2y&e)%Rn6ePg5-%Z*m@V*_H#k-9RiLkMe;MNH*F)nkhcVb%9z zKYfFOb=7UWWNqR{7fsbVgTeH(iv?lNf@HdmmlM_ZQ~xuAqI2q8EOTMwPHaxM#e;*c z)T(zY&x3a!GfAA)_f!8fgM&o6S)T@jqqWnmW^>QNuB2}@+L@vmB9uv0)%Zm|>S03D zhKfkCtpW8_s$}xwf}Yie;Zo(|7n11cHP!e%{;JR6s~fFWd4oYr)PqF1&jGq+XQt}U z!ARsCtYp>rHa@9?p!1rl*bj7iZt+r X>`0?>I5fHd-L3Zfc3dF6ZMNI4W0~m? diff --git a/agc_2-X/trunk/app_conference/9.wav b/agc_2-X/trunk/app_conference/9.wav deleted file mode 100644 index 1439a5954012827576236c3e07e7f2273bc4c8d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4018 zcmWNTXIqm8!$7m{>`j1#5dwq|Ru}=IJk`3eQi@=uTC2rbY^_M0wQfMgibbqiN9(I~ zAdWg(C)O=HKv-dfKtgs1WG8p_+v|Kg*ZBeG^Sp%%Z<8R9<#U(imX_^cQ6Ufr^grfA zK_G`_Lm)5+`9HH^?T)pF|EpdHX2zXOuP5)H_Gt5bSAb*I)G@SvA8mP740qJIwbwpe z>bXD+MqIb4e8my!_`k4^hO3&%ioMiNIdbYw7u?l>drm@FANJ-B9ERre)}|Y<6m`B5 z?U@5yupL#X%|l_+nGLLMQ!e3!k^2w~jfZwRDOGA`d0ED* z{)N%WDXsXuBkNnvC{B>@teJ#z*JHmqh!%9uyrk<|??;d=$^YZs!LHL!Odf}PhuAxP zRC?dIJ^~{MkER>1i!P3hKvog!APg%WeuDLc^Er&r&u=Z6d`o}KE+pnUgS>KL9sayQ z*j+iY87s*6GPwZ$wIW}m@-q+>CdovNQyLA;I!tG&P6-p`UcehfLcDe)AWkw{n3r8A zx-NGV*>*wKZL5^at3wGz)RZ zXnPx6^*4SyV~pQo=_*CX%3JGJz|xl_v`RtjE6 zE6hdWY~{C5B&G!98eW|Z3N)W(4#ub=ogMVu^hoY#&Zp{XTS0Wpu^wus;qEyMw}-m)?L`Or-NbpEOK5< z6FS!MH1G!{7IRJYyi+Hm2HnY&bEw{rC+a49pw-Z8h6cs2ekwPOZzpAp)eFyR%CIHW z^N=@=rI>G{uZCSSZEsHyt@KIb$Z@U6CQE~djE5iy%4;usm)+!08tA)W3 zUzvQmwE#JBEpGxiJ%AHd8TL@pL%)EZ2VH1HWPFfDJF`t9-i@**m&dihc1|5}vd}+3 zE-G>d%~nV34M9!VE4_I@r@e+4Ku+1>Ov%^>3AZ@;p84HRgt^v2Mp{G_A{VqH{|rsU z?N8r71u>ryN zVHQKTDY(aup5f(>FBs-~S0^&EQ>i7&Y4K;%vr&17F!Ln~jr>tcOY{ZHyY^i@zj$~N zSLiz+Bo`j{f?fjvQb}92TF&Urutb(R8#Rf}8f2aul)sW?0)*5@>2J}2k=gyjrpvfv z=uM6pPHs?8;w%P6x4DHOjzlbreG;}i@XEnMHB)f`;>ci^*rbbz&pN^=Ha?yxux$f4 zo<@~HqsB+1KTh87hxJwTuC#TL3kVh$*?l{xiM@^llNU7~9ig^?;&d;oJWwj z*uypbPWMlVpJuJ09@os1lC3$&eZFt>gGLkeK>9BBpVoK6OMSn(%R;}Tq?MBAwrT5IJanI5u1P4FSVf zr#J(Cu~&S+5l?u4SYf^IzDd8HD5d~%LlYpaz=_%KLO$`{1Cclmbr`(SPw9zrArsL2 z_mtwv5@o6jiag}-OpF>Nw3y6&oC^CQQHQv~BcSfaym$WYn@1mEzd$z**Ea7}>S+%X zPK21iSUUnG!>8C*4`dDf3;!+kT>1)ZsG@qD3p#;oF0OXmiVu@!_#*xKws!B(DD)(~ zgb?e_3j7kHjI0VI^yjxt7~Ao zC&(7FO0;-@2n*wZsdq5~4MCIX3k8BL|HvWUx2KNFw}TsFJF{}=2IY^P zvnPfC4dnn7;^+kM(MhcJAff9;$6vNRtW6vbmSH1!CU9jazvj4TkK!fGmZjz7xnD@# z>fQheF=5`R$qd}!NYcI{1|*1%pVfo-{h{v>T4ykFOC*}kHqGc55xM;5xLddiRJHMA z2MO(keNYz+G#Tn6O9jN}x#prlp(+$cLBZ{prhEunJU#gi{D1w6+y6A2r!9%NfQ$l< z1IOrOa;+}1W8csKW>abb_a|7d?z}~Y*aoTAq(}^Q3Y#tP)4$Qkd$cMSVi6AK9_Gg^}{JL31-B;%<93D%MP^VCx{cda2yv zhbQ1N50gF_YwW7i&cU+Dw|$EpALF>}GvT{Tk~UX2-*<|=DmDQ0TYvShBl6+n@`Iv{ z`q)T<;AXu&I1N)lXH3bpw}GFMx_G|=mj~_(2c}%)^}$%^PoNwtindtw#h4flR4*XBhgBFA>#ci92Y8xGEqO41Q7*pbH)iE5E$V)!i1W{V%zm%xXtRXLu z*YzDXl%Z#$%N=Oj05LDY&8#ya+uKC9yoD@91PVrTCL{A`MTmm2bm3;LF&vwvWWKOp zRGhQCM=bV*sOKuJ$W^>&X)VZgLt@bp<1NCE1e1F{xRV^onH{3iENfwl3CQ~R1~ZS`Fo< zkK}$p+RdU8gtFL{d}%J3mGYQb?A>R4?z@ULxw}S_hn{&8k}9&)luD&y=x5Vjb|`X2J}%pXlxJ6o$)!1O5f>c*4Q3L}0#z(pIHzXAm>?M4WTP>u0++pn5>{ z*u8NE@=R({h7DCCSv-(pabx>{+g6dImv$?O!I;wCZ7C7YK?q{@&=2@yz(d$p+9|(y zu)g!8DJAx5W@D($_(I8Zih<>>V#R9>K-`>>lf2E3?vLxoI}D`l*mq8;yEeFsqa>}A z*_!gDG~y91C+u(U273eWk~ji34ift>dM+k5XVy}f+M4kv_7A{ew^oyGyicpl$YZaz zYCBu{C7zIw6-2nF)ccmkXFWucM$%g*RnJ1BQYz^Z=Wf##C=PqX{>gB;WF`QnCT0X< z2FH6P`Su)iwqIqqU{}&Z((Z-t)djUJ8QKYNh%iy+ds*I_6lB=<{*nQGyKXum+L_iI z{K~R<(&@X5Two)Px)u9~2L7s)F9Sygi-rx(SGYXbX|u+?C0vx0L@kj`G%t`o!99sF z1R34C-R*=0L35pd^eq*A<#KV`()W_(lYgkoJUf9ywjtRe!_trqSuoBH`yZmyLwe6c z@-pN~N1q=b4&fA{FAp7TwkVedpXJ8WK7bxaBZf(MYB|)maHs*oW;*rN9eYMxP)2Awb{y;ttYw^vIuZ!(qqH?o^+qmCzCg{hJ+Q<9 zK^T`29H7f;2o8QAc^?EA6^`lLY&73(o@{cPnZKkFXw`B`D||c`b2B2EpmTj4$P133 ziyfsRZ|7XFkWs zHCVxLeM`J5lZuSd5>s4wUq4w(#+c`IGX`>CK|B@jEJmuCsT=p>5OJpd@k{2S$er1> zQLhZkyUWM^gj&d(VPm$Pudx?Wa*X;A8!Y{`u;%kZ0M!@oG>pd`wa0$D`gmswTrBU&N_+Yw_CQ^R2(B zR*_o6$(Zj!68sJQCt9sBU-(sT4diIjbfOvcw_&AOfDpi!=r#=>F>Yt#XOytMHh$9w zRVbiv+;R6U(-j2Be$UlHNquMAx()TACs?0j?>iNc_d$4Ko9=7j`VleiPP#rp1vRJ= zr&3|ru*}IV<4eHjvAAqe=q}aUE>KZ`93+tf(RLT=zYSq!f#scNI%@5FRvCK+W|#f8 zuZ1W^rK%gc7b#u^AJ6)hv)esuT%`+v>R{WZ8&z)tvUov;m+*g*OC3(lVf-B$3zqL( zggy~fOP_7zv@h!UC4k}H - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/agc_2-X/trunk/app_conference/Makefile b/agc_2-X/trunk/app_conference/Makefile deleted file mode 100644 index d8b54a44..00000000 --- a/agc_2-X/trunk/app_conference/Makefile +++ /dev/null @@ -1,121 +0,0 @@ -# $Id: Makefile,v 1.9 2005/10/27 17:53:35 stevek Exp $ - -# -# Makefile, based on the Asterisk Makefile, Coypright (C) 1999, Mark Spencer -# -# Copyright (C) 2002,2003 Junghanns.NET GmbH -# -# Klaus-Peter Junghanns -# -# This program is free software and may be modified and -# distributed under the terms of the GNU Public License. -# - -.EXPORT_ALL_VARIABLES: - -# -# app_conference defines which can be passed on the command-line -# - -INSTALL_PREFIX := /usr -INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules - -ASTERISK_INCLUDE_DIR := $(HOME)/local/asterisk/asterisk/include - -# turn app_conference debugging on or off ( 0 == OFF, 1 == ON ) -APP_CONFERENCE_DEBUG := 1 - -# 0 = OFF 1 = astdsp 2 = speex -SILDET := 2 - -# -# app_conference objects to build -# - -OBJS = app_conference.o conference.o member.o frame.o cli.o -SHAREDOS = app_conference.so - -# -# standard compile settings -# - -PROC = $(shell uname -m) -INSTALL = install -CC = gcc - -INCLUDE = -I$(ASTERISK_INCLUDE_DIR) -LIBS = -ldl -lpthread -lm -DEBUG := -g - -CFLAGS = -pipe -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE -#CFLAGS += -O2 -#CFLAGS += -O3 -march=pentium3 -msse -mfpmath=sse,387 -ffast-math -# PERF: below is 10% faster than -O2 or -O3 alone. -#CFLAGS += -O3 -ffast-math -funroll-loops -# below is another 5% faster or so. -CFLAGS += -O3 -ffast-math -funroll-all-loops -fprefetch-loop-arrays -fsingle-precision-constant - -# this is fun for PPC -#CFLAGS += -mcpu=7450 -faltivec -mabi=altivec -mdynamic-no-pic - -# this is fun for x86 -CFLAGS += -march=pentium3 -msse -mfpmath=sse,387 - - -# adding -msse -mfpmath=sse has little effect. -#CFLAGS += -O3 -msse -mfpmath=sse -#CFLAGS += $(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) -CFLAGS += $(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) -CFLAGS += -DCRYPTO - -ifeq ($(APP_CONFERENCE_DEBUG), 1) -CFLAGS += -DAPP_CONFERENCE_DEBUG -endif - -# -# additional flag values for silence detection -# - -ifeq ($(SILDET), 2) -OBJS += libspeex/preprocess.o libspeex/misc.o libspeex/smallft.o -CFLAGS += -Ilibspeex -DSILDET=2 -endif - -ifeq ($(SILDET), 1) -CFLAGS += -DSILDET=1 -endif - -OSARCH=$(shell uname -s) -ifeq (${OSARCH},Darwin) -SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace -else -SOLINK=-shared -Xlinker -x -endif - -# -# targets -# - -all: $(SHAREDOS) - -clean: - rm -f *.so *.o $(OBJS) - -app_conference.so : $(OBJS) - $(CC) -pg -shared -Xlinker -x -o $@ $(OBJS) - -vad_test: vad_test.o libspeex/preprocess.o libspeex/misc.o libspeex/smallft.o - $(CC) $(PROFILE) -o $@ $^ -lm - -install: all - for x in $(SHAREDOS); do $(INSTALL) -m 755 $$x $(INSTALL_MODULES_DIR) ; done - cp -f *.gsm /var/lib/asterisk/sounds - cp -f *.wav /var/lib/asterisk/sounds - -# /var/horizon/mojo/lib/horizoncmd restart asterisk -# make sure you restart asterisk after make install - -# config: all -# cp conf.conf /etc/asterisk/ - - diff --git a/agc_2-X/trunk/app_conference/README b/agc_2-X/trunk/app_conference/README deleted file mode 100644 index 2a1c5141..00000000 --- a/agc_2-X/trunk/app_conference/README +++ /dev/null @@ -1,170 +0,0 @@ -app_conference is a channel-independent conference application. - -Design goals -It has several design goals which are different than meetme: - - * It does not require a zap channel for timing. - * It is very efficient when used with channels which support DTX (silence - detection/discontinuous transmission). - - * It can do VAD on channels which do not support DTX (although this - is more expensive than just mixing them, but less expensive then - encoding; therefore it might still be a win). - * It presents messages on the Monitor interface for determine which - speakers are active. - - -I believe that people other than myself are using this, but my environment is -pretty rigid, and cases outside of this aren't tested: - - * Some callers come from the PSTN via IAX2 from a box with Zaptel cards, - via uLaw. - * Other callers come from iaxclient based softphones using speex - (was GSM) via IAX2 (with DTX). - * Some conferences have a single SIP channel which listens in GSM. - - -Mixing design - - * Minimize encoding/decoding, minimize mixing. - * Minimize generational loss from trancoding. - * Usual cases are handled very efficiently: - o One speaker: That speaker's frame is sent directly to each - participant which uses the same codec. It is trancoded - _once_ for each additional codec type used by participants. - o Two speakers: Each speaker gets the other speaker's frames. - The two speaker's frames are decoded and mixed, and then - encoded _once_ for each codec type used by participants. - - -License -Naturally, app_conference is GPL. The CVS also includes parts of libspeex, -which is distributed under it's a BSD-style license. - -Getting app_conference -app_conference is available from the 'iaxclient' project on sourceforge: - - * CVS browse: http://iaxclient.cvs.sourceforge.net/iaxclient/app_conference/ - * Project page: http://sourceforge.net/projects/iaxclient/ - - -Compiling app_conference - - * just like any other asterisk application. - * Some makefile fiddling may be necessary - - -Using app_conference -There is no configuration file. Conferences are created on-the-fly. - -Dialplan syntax: Conference(ConferenceName|Flags|Priority[|VADSTART|VADCONTINUE]) - - * ConferenceName: Whatever you want to name the conference - * Flags one of more of the following: - o M: Moderator (presently same as speaker) - o S: Speaker - o L: Listener - o T: "Telephone caller" (just for stats?). - o V: Do VAD on this caller - o D: Use Denoise filter on this caller. - o d: Send manager events when DTMF is received. - o q: Do not play enter or exit sounds. - o i: use inband dtmf broadcast. - o t: use rfc dtmf signal broadcast. - * Priority: Currently ignored; was to be a "speaking priority" so a - higher priority caller could "override" others. - * VADSTART: Optional: "probability" to use to detect start of speech. - * VADCONTINUE: Optional: "probability" to use to detect continuation - of speech. - - -Features / CLI/Manager Commands - - * conference debug [ on | off ] - enable debugging for a conference - - * conference show stats show conference stats - - * conference play sound [mute] - play a sound to a conference member, optionally muting them. - -Manager Events -app_conference generates several detailed manager events so that applications -interfacing with the manager API can monitor conferences: - - * ConferenceState: sent as members begin/end speaking. - Channel: The channel - State: "speaking" or "silent" - - * ConferenceDTMF: sent when conference members send DTMF to the conference - Channel: The channel - Key: The DTMF key send [0-9*#] - - * ConferenceSoundComplete: send when the conference has finished playing - a sound to a user - Channel: The channel - Sound: The first 255 bytes of the file requested in conference play - sound CLI/Mgr command. - - -Benchmarking -It would be nice to have solid benchmarks to present, but a good size -machine should be able to handle many callers when either (a) they are -using DTX, or (b) they are listen-only. It's used often with hundreds of -simultaneous callers. - -Discussion -The iaxclient-devel mailing list is probably as good a place as any to discuss. - - ---- - -app_conference is brought to you by the letter q, and the number e - - -Matt Florell Changes for VD_app_conference tarball version. In order to use this -as seemlessly as possible for VICIDIAL it was necessary to modify the code. This -module can now be used in place of using meetme for VICIDIAL. This is -experimental, please test thoroughly before putting it in production. - -CHANGES MADE FOR VICIDIAL: - -- Default to member type of S instead of L -- Commented out many repetative NOTICEs and ERRORs -- Added entry and exit sounds except for Local/786 and Local/8500998 (VDsilent and DTMFapp) -- Added conf-onlyperson mesage to first conference participant -- Included enter.gsm and leave.gsm files as well as DTMF wav and gsm sounds -- Removed restart from "make install" and added audio file copying -- If no 'd' option is set and DTMF frames are detected, the DTMF audio will be played to the member -- Added 'q' flag to prevent playing of entry/exit sounds -- Added 'i' flag to enable playing of DTMF sounds inband to all members -- Added 't' flag to enable sending of RFC DTMF signals to all members -- Changed delimiter to pipe | from slash / to be more compliant with meetme standards - - -NOTE TO 64-BIT LINUX USERS: -If you have problems with 64-bit Linux please use the included 64_Makefile instead of the default one. - -COMPILE NOTES: - -Some Makefile alterations may be necessary for your system: - -From Alek Barkley: -I am running FC4 with latest updates ( 2.6.16 kernel ) -My CPU is AMD K6 and GCC 4.0.2. - -I edited Makefile in app_conference distribution. -To enter CPU architecture in my case -march=k6 -======================================================== -PROC = k6 -# this is fun for x86 -#CFLAGS += -march=pentium3 -msse -mfpmath=sse,387 -CFLAGS += -march=k6 -=========================================================== - - -VD_app_conference CHANGELOG -- Release 0.4 - First VICIDIAL-centric release -- Release 0.5 - Fixed the dtmf broadcast logic and a star/hash bug - - Added 64-bit makefile thanks to Jon Hood -- Release 0.6 - Added Makefile notes and changed some Makefile flags diff --git a/agc_2-X/trunk/app_conference/VICIDIAL.txt b/agc_2-X/trunk/app_conference/VICIDIAL.txt deleted file mode 100644 index 92011ec2..00000000 --- a/agc_2-X/trunk/app_conference/VICIDIAL.txt +++ /dev/null @@ -1,86 +0,0 @@ -VICIDIAL and app_conference -(1.2 tree) EXPERIMENTAL!!! - -app_conference offers the plusses of being able to do conferencing -without any zaptel hardware or timers as well as doing native codec -streaming, meaning no manditory downsampling to slin like meetme. -These two features alone mean a rather significant performance boost -to companies who only use VOIP for agents and trunks as well as not -requiring the cost of zaptel hardware or the nightmare of getting -ztdummy to work on some systems. - -As of right now, I have a test system fully up and running using -app_conference with VICIDIAL on Asterisk 1.2.8. I have made several -modifications to the app_conference code to make it more of a drop-in -replacement for meetme so that it does not require any changes to the -VICIDIAL codebase. I have added entry and exit sounds(slightly -different from meetme's) as well as "only one in this conference" -message in addition to changing the default member type to speaker(S). -So far I have tested with IAX and SIP channels only and everything -works just like on meetme but I have not done any capacity testing or -tested it in production yet. - -If you want to use app_conference instead of meetme for VICIDIAL then follow these instructions: - -cd /usr/src/asterisk -wget http://www.eflo.net/files/VD_app_conference_0.6.zip -unzip VD_app_conference_0.6.zip -cd app_conference -make clean -make -make install - - -In your extensions.conf file you would replace these lines: -exten => 8600051,1,Meetme,8600051 -exten => 8600052,1,Meetme,8600052 -...continue through 8600100... -exten => 78600051,1,Meetme,8600051|q -exten => 78600052,1,Meetme,8600052|q -...continue through 78600100... -exten => 68600051,1,Meetme,8600051|mq -exten => 68600052,1,Meetme,8600052|mq -...continue through 68600100... - - -with these lines: -exten => 8600051,1,Conference(8600051) -exten => 8600052,1,Conference(8600052) -...continue through 8600100... -exten => 78600051,1,Conference(8600051|q) -exten => 78600052,1,Conference(8600052|q) -...continue through 78600100... -exten => 68600051,1,Conference(8600051|Lq) -exten => 68600052,1,Conference(8600052|Lq) -...continue through 68600100... - -NOTES: -Here are the possible feature flags for this version of app_conference: - o M: Moderator (presently same as speaker) [default] - o S: Speaker - o L: Listener - o T: "Telephone caller" (just for stats?). - o V: Do VAD on this caller - o D: Use Denoise filter on this caller. - o d: Send manager events when DTMF is received. - o q: Do not play enter or exit sounds. - o i: use inband dtmf broadcast. - o t: use rfc dtmf signal broadcast. - -COMPILE NOTES: - -Some Makefile alterations may be necessary for your system: - -From Alek Barkley: -I am running FC4 with latest updates ( 2.6.16 kernel ) -My CPU is AMD K6 and GCC 4.0.2. - -I edited Makefile in app_conference distribution. -To enter CPU architecture in my case -march=k6 -======================================================== -PROC = k6 -# this is fun for x86 -#CFLAGS += -march=pentium3 -msse -mfpmath=sse,387 -CFLAGS += -march=k6 -=========================================================== - diff --git a/agc_2-X/trunk/app_conference/app_conference.c b/agc_2-X/trunk/app_conference/app_conference.c deleted file mode 100644 index 9be6c3a3..00000000 --- a/agc_2-X/trunk/app_conference/app_conference.c +++ /dev/null @@ -1,146 +0,0 @@ - -// $Id: app_conference.c,v 1.22 2005/10/26 21:02:07 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#include "app_conference.h" -#include "common.h" - -/* - -a conference has n + 1 threads, where n is the number of -members and 1 is a conference thread which sends audio -back to the members. - -each member thread reads frames from the channel and -add's them to the member's frame queue. - -the conference thread reads frames from each speaking members -queue, mixes them, and then re-queues them for the member thread -to send back to the user. - -*/ - -// -// app_conference text descriptions -// - -static char *tdesc = "Channel Independent Conference Application" ; -static char *app = "Conference" ; -static char *synopsis = "Channel Independent Conference" ; -static char *descrip = " Conference(): returns 0\n" -"if the user exits with the '#' key, or -1 if the user hangs up.\n" ; - -// -// functions defined in asterisk/module.h -// - -STANDARD_LOCAL_USER ; -LOCAL_USER_DECL; - -int unload_module( void ) -{ - ast_log( LOG_NOTICE, "unloading app_conference module\n" ) ; - - STANDARD_HANGUP_LOCALUSERS ; // defined in asterisk/module.h - - // register conference cli functions - unregister_conference_cli() ; - - return ast_unregister_application( app ) ; -} - -int load_module( void ) -{ - ast_log( LOG_NOTICE, "loading app_conference module [ $Revision: 1.22 $ ]\n" ) ; - - // intialize conference - init_conference() ; - - // register conference cli functions - register_conference_cli() ; - - return ast_register_application( app, app_conference_main, synopsis, descrip ) ; -} - -char *description( void ) -{ - return tdesc ; -} - -int usecount( void ) -{ - int res; - STANDARD_USECOUNT( res ) ; // defined in asterisk/module.h - return res; -} - -char *key() -{ - return ASTERISK_GPL_KEY ; -} - -// -// main app_conference function -// - -int app_conference_main( struct ast_channel* chan, void* data ) -{ - int res = 0 ; - struct localuser *u ; - - // defined in asterisk/module.h - LOCAL_USER_ADD( u ) ; - - // call member thread function - res = member_exec( chan, data ) ; - - // defined in asterisk/module.h - LOCAL_USER_REMOVE( u ) ; - - return res ; -} - -// -// utility functions -// - -// now returns milliseconds -long usecdiff( struct timeval* timeA, struct timeval* timeB ) -{ - long a_secs = timeA->tv_sec - timeB->tv_sec ; - long b_secs = (long)( timeA->tv_usec / 1000 ) - (long)( timeB->tv_usec / 1000 ) ; - long u_secs = ( a_secs * 1000 ) + b_secs ; - return u_secs ; -} - -// increment a timeval by ms milliseconds -void add_milliseconds( struct timeval* tv, long ms ) -{ - // add the microseconds to the microseconds field - tv->tv_usec += ( ms * 1000 ) ; - - // calculate the number of seconds to increment - long s = ( tv->tv_usec / 1000000 ) ; - - // adjust the microsends field - if ( s > 0 ) tv->tv_usec -= ( s * 1000000 ) ; - - // increment the seconds field - tv->tv_sec += s ; - - return ; -} diff --git a/agc_2-X/trunk/app_conference/app_conference.h b/agc_2-X/trunk/app_conference/app_conference.h deleted file mode 100644 index 695a65a9..00000000 --- a/agc_2-X/trunk/app_conference/app_conference.h +++ /dev/null @@ -1,200 +0,0 @@ - -// $Id: app_conference.h,v 1.11 2005/12/16 22:31:58 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#ifndef _ASTERISK_CONF_H -#define _ASTERISK_CONF_H - -#include - -/* asterisk includes */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* standard includes */ -#include -#include -#include -#include - -#include - -#if (SILDET == 2) -#include "libspeex/speex_preprocess.h" -#endif - -// -// app_conference defines -// - -// debug logging level - -// LOG_NOTICE for debugging, LOG_DEBUG for production -#ifdef APP_CONFERENCE_DEBUG -#define AST_CONF_DEBUG LOG_NOTICE -#else -#define AST_CONF_DEBUG LOG_DEBUG -#endif - -// -// feature defines -// - -// number of times the last non-silent frame should be -// repeated after silence starts -//#define AST_CONF_CACHE_LAST_FRAME 1 - -// -// debug defines -// - -#define DEBUG_USE_TIMELOG - -#define DEBUG_FRAME_TIMESTAMPS - -// #define DEBUG_OUTPUT_PCM - -// -// !!! THESE CONSTANTS SHOULD BE CLEANED UP AND CLARIFIED !!! -// - -// -// sample information for AST_FORMAT_SLINEAR format -// - -#define AST_CONF_SAMPLE_RATE 8000 -#define AST_CONF_SAMPLE_SIZE 16 -#define AST_CONF_FRAME_INTERVAL 20 - -// -// so, since we cycle approximately every 20ms, -// we can compute the following values: -// -// 160 samples per 20 ms frame -or- -// ( 8000 samples-per-second * ( 20 ms / 1000 ms-per-second ) ) = 160 samples -// -// 320 bytes ( 2560 bits ) of data 20 ms frame -or- -// ( 160 samples * 16 bits-per-sample / 8 bits-per-byte ) = 320 bytes -// - -// 160 samples 16-bit signed linear -#define AST_CONF_BLOCK_SAMPLES 160 - -// 2 bytes per sample ( i.e. 16-bit ) -#define AST_CONF_BYTES_PER_SAMPLE 2 - -// 320 bytes for each 160 sample frame of 16-bit audio -#define AST_CONF_FRAME_DATA_SIZE 320 - -// 1000 ms-per-second / 20 ms-per-frame = 50 frames-per-second -#define AST_CONF_FRAMES_PER_SECOND ( 1000 / AST_CONF_FRAME_INTERVAL ) - - -// -// buffer and queue values -// - -// account for friendly offset when allocating buffer for frame -#define AST_CONF_BUFFER_SIZE ( AST_CONF_FRAME_DATA_SIZE + AST_FRIENDLY_OFFSET ) - -// maximum number of frames queued per member -#define AST_CONF_MAX_QUEUE 100 - -// minimum number of frames queued per member -#define AST_CONF_MIN_QUEUE 0 - -// number of queued frames before we start dropping -#define AST_CONF_QUEUE_DROP_THRESHOLD 4 - -// number of milliseconds between frame drops -#define AST_CONF_QUEUE_DROP_TIME_LIMIT 750 - -// -// timer and sleep values -// - -// milliseconds we're willing to wait for a channel -// event before we check for outgoing frames -#define AST_CONF_WAITFOR_LATENCY 40 - -// milliseconds to sleep before trying to process frames -#define AST_CONF_CONFERENCE_SLEEP 40 - -// milliseconds to wait between state notification updates -#define AST_CONF_NOTIFICATION_SLEEP 500 - -// -// warning threshold values -// - -// number of frames behind before warning -#define AST_CONF_OUTGOING_FRAMES_WARN 50 - -// number of milliseconds off AST_CONF_FRAME_INTERVAL before warning -#define AST_CONF_INTERVAL_WARNING 1000 - -// -// silence detection values -// - -// toggle silence detection -#define ENABLE_SILENCE_DETECTION 1 - -// silence threshold -#define AST_CONF_SILENCE_THRESHOLD 128 - -// speech tail (delay before dropping silent frames, in ms. -// #define AST_CONF_SPEECH_TAIL 180 - -// number of frames to ignore speex_preprocess() after speech detected -#define AST_CONF_SKIP_SPEEX_PREPROCESS 20 - -// our speex probability values -#define AST_CONF_PROB_START 0.05 -#define AST_CONF_PROB_CONTINUE 0.02 - -// -// format translation values -// - -// AST_FORMAT_MAX_AUDIO is 1 << 15, so we support 0..15 -#define AC_SUPPORTED_FORMATS 16 -#define AC_SLINEAR_INDEX 6 - -// -// app_conference functions -// - -// main module function -int app_conference_main( struct ast_channel* chan, void* data ) ; - -// utility functions -long usecdiff( struct timeval* timeA, struct timeval* timeB ) ; -void add_milliseconds( struct timeval* tv, long ms ) ; - -#endif - - diff --git a/agc_2-X/trunk/app_conference/cli.c b/agc_2-X/trunk/app_conference/cli.c deleted file mode 100644 index d5797034..00000000 --- a/agc_2-X/trunk/app_conference/cli.c +++ /dev/null @@ -1,332 +0,0 @@ - -// $Id: cli.c,v 1.6 2005/12/21 21:34:50 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#include "cli.h" - -// -// debug functions -// - -static char conference_debug_usage[] = - "usage: conference debug [ on | off ]\n" - " enable debugging for a conference\n" -; - -static struct ast_cli_entry cli_debug = { - { "conference", "debug", NULL }, - conference_debug, - "enable debugging for a conference", - conference_debug_usage -} ; - - -int conference_debug( int fd, int argc, char *argv[] ) -{ - if ( argc < 3 ) - return RESULT_SHOWUSAGE ; - - // get the conference name - const char* name = argv[2] ; - - // get the new state - int state = 0 ; - - if ( argc == 3 ) - { - // no state specified, so toggle it - state = -1 ; - } - else - { - if ( strncasecmp( name, "YES", 4 ) == 0 ) - state = 1 ; - else if ( strncasecmp( name, "NO", 3 ) == 0 ) - state = 0 ; - else - return RESULT_SHOWUSAGE ; - } - - int new_state = set_conference_debugging( name, state ) ; - - if ( new_state == 1 ) - { - ast_cli( fd, "enabled conference debugging, name => %s, new_state => %d\n", - name, new_state ) ; - } - else if ( new_state == 0 ) - { - ast_cli( fd, "disabled conference debugging, name => %s, new_state => %d\n", - name, new_state ) ; - } - else - { - // error setting state - ast_cli( fd, "\nunable to set debugging state, name => %s\n\n", name ) ; - } - - return RESULT_SUCCESS ; -} - -// -// stats functions -// - -static char conference_show_stats_usage[] = - "usage: conference show stats\n" - " display stats for active conferences.\n" -; - -static struct ast_cli_entry cli_show_stats = { - { "conference", "show", "stats", NULL }, - conference_show_stats, - "show conference stats", - conference_show_stats_usage -} ; - -int conference_show_stats( int fd, int argc, char *argv[] ) -{ - if ( argc < 3 ) - return RESULT_SHOWUSAGE ; - - // get count of active conferences - int count = get_conference_count() ; - - ast_cli( fd, "\n\nCONFERENCE STATS, ACTIVE( %d )\n\n", count ) ; - - // if zero, go no further - if ( count <= 0 ) - return RESULT_SUCCESS ; - - // - // get the conference stats - // - - // array of stats structs - ast_conference_stats stats[ count ] ; - - // get stats structs - count = get_conference_stats( stats, count ) ; - - // make sure we were able to fetch some - if ( count <= 0 ) - { - ast_cli( fd, "!!! error fetching conference stats, available => %d !!!\n", count ) ; - return RESULT_SUCCESS ; - } - - // - // output the conference stats - // - - // output header - ast_cli( fd, "%-20.20s %-40.40s %-40.40s\n", "Name", "Connection Type", "Member Type" ) ; - ast_cli( fd, "%-20.20s %-40.40s %-40.40s\n", "----", "---------------", "-----------" ) ; - - ast_conference_stats* s = NULL ; - - char ct[64] ; - char mt[64] ; - - int i; - for ( i = 0 ; i < count ; ++i ) - { - s = &(stats[i]) ; - - // format connection type - snprintf( ct, 40, "phone( %d ), iax( %d ), sip( %d )", - s->phone, s->iaxclient, s->sip ) ; - - // format memeber type - snprintf( mt, 40, "moderators( %d ), listeners( %d )", - s->moderators, s->listeners ) ; - - // output this conferences stats - ast_cli( fd, "%-20.20s %-40.40s %-40.40s\n", (char*)( &(s->name) ), ct, mt ) ; - } - - ast_cli( fd, "\n" ) ; - - // - // drill down to specific stats - // - - if ( argc == 4 ) - { - // show stats for a particular conference - conference_show_stats_name( fd, argv[3] ) ; - } - - return RESULT_SUCCESS ; -} - -int conference_show_stats_name( int fd, const char* name ) -{ - // not implemented yet - return RESULT_SUCCESS ; -} - -// -// play sound -// - -static char conference_play_sound_usage[] = - "usage: conference play sound [mute]\n" - " play sound to conference member .\n" - " mute the channel if 'mute' is present.\n" -; - -static struct ast_cli_entry cli_play_sound = { - { "conference", "play", "sound", NULL }, - conference_play_sound, - "play a sound to a conference member", - conference_play_sound_usage -} ; - -int conference_play_sound( int fd, int argc, char *argv[] ) -{ - char *channel, *file; - int mute = 0; - struct ast_conf_member *member; - struct ast_conf_soundq *newsound; - struct ast_conf_soundq **q; - - if ( argc < 5 ) - return RESULT_SHOWUSAGE ; - - channel = argv[3]; - file = argv[4]; - - if(argc > 5 && !strcmp(argv[5], "mute")) - mute = 1; - - - member = find_member(channel, 1); - if(!member) { - ast_cli(fd, "Member %s not found\n", channel); - return RESULT_FAILURE; - } - - newsound = calloc(1,sizeof(struct ast_conf_soundq)); - newsound->stream = ast_openstream(member->chan, file, NULL); - if(!newsound->stream) { - ast_cli(fd, "Sound %s not found\n", file); - free(newsound); - ast_mutex_unlock(&member->lock); - return RESULT_FAILURE; - } - member->chan->stream = NULL; - - newsound->muted = mute; - ast_copy_string(newsound->name, file, sizeof(newsound->name)); - - // append sound to the end of the list. - for(q=&member->soundq; *q; q = &((*q)->next)) ;; - - *q = newsound; - - ast_mutex_unlock(&member->lock); - - ast_cli( fd, "Playing sound %s to member %s %s\n", - file, channel, mute ? "with mute" : ""); - - - return RESULT_SUCCESS ; -} - -// -// stop sounds -// - -static char conference_stop_sounds_usage[] = - "usage: conference stop sounds \n" - " stop sounds for conference member .\n" -; - -static struct ast_cli_entry cli_stop_sounds = { - { "conference", "stop", "sounds", NULL }, - conference_stop_sounds, - "stop sounds for a conference member", - conference_stop_sounds_usage -} ; - -int conference_stop_sounds( int fd, int argc, char *argv[] ) -{ - char *channel; - struct ast_conf_member *member; - struct ast_conf_soundq *sound; - struct ast_conf_soundq *next; - - if ( argc < 4 ) - return RESULT_SHOWUSAGE ; - - channel = argv[3]; - - member = find_member(channel, 1); - if(!member) { - ast_cli(fd, "Member %s not found\n", channel); - return RESULT_FAILURE; - } - - - - // clear all sounds - sound = member->soundq; - member->soundq = NULL; - - while(sound) { - next = sound->next; - ast_closestream(sound->stream); - free(sound); - sound = next; - } - - // reset write format, since we're done playing the sound - if ( ast_set_write_format( member->chan, member->write_format ) < 0 ) - { - ast_log( LOG_ERROR, "unable to set write format to %d\n", - member->write_format ) ; - } - - ast_mutex_unlock(&member->lock); - - ast_cli( fd, "Stopped sounds to member %s\n", channel); - - - return RESULT_SUCCESS ; -} - - -// -// cli initialization function -// - -void register_conference_cli( void ) -{ - ast_cli_register( &cli_debug ) ; - ast_cli_register( &cli_show_stats ) ; - ast_cli_register( &cli_play_sound ) ; - ast_cli_register( &cli_stop_sounds ) ; -} - -void unregister_conference_cli( void ) -{ - ast_cli_unregister( &cli_debug ) ; - ast_cli_unregister( &cli_show_stats ) ; - ast_cli_unregister( &cli_play_sound ) ; - ast_cli_unregister( &cli_stop_sounds ) ; -} diff --git a/agc_2-X/trunk/app_conference/cli.h b/agc_2-X/trunk/app_conference/cli.h deleted file mode 100644 index 735b284d..00000000 --- a/agc_2-X/trunk/app_conference/cli.h +++ /dev/null @@ -1,47 +0,0 @@ - -// $Id: cli.h,v 1.3 2005/10/26 21:02:07 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#ifndef _APP_CONF_CLI_H -#define _APP_CONF_CLI_H - -// -// includes -// - -#include "app_conference.h" -#include "common.h" - -// -// function declarations -// - -int conference_show_stats( int fd, int argc, char *argv[] ) ; -int conference_show_stats_name( int fd, const char* name ) ; - - -int conference_debug( int fd, int argc, char *argv[] ) ; -int conference_no_debug( int fd, int argc, char *argv[] ) ; - -int conference_play_sound( int fd, int argc, char *argv[] ) ; -int conference_stop_sounds( int fd, int argc, char *argv[] ) ; - -void register_conference_cli( void ) ; -void unregister_conference_cli( void ) ; - - -#endif diff --git a/agc_2-X/trunk/app_conference/common.h b/agc_2-X/trunk/app_conference/common.h deleted file mode 100644 index a8015462..00000000 --- a/agc_2-X/trunk/app_conference/common.h +++ /dev/null @@ -1,50 +0,0 @@ - -// $Id: common.h,v 1.3 2005/10/26 21:02:07 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#ifndef _APP_CONF_COMMON_H -#define _APP_CONF_COMMON_H - -// typedef includes -#include "conf_frame.h" - -// function includesee -#include "conference.h" -#include "member.h" -#include "frame.h" -#include "cli.h" - - -/* Utility functions */ - -/* LOG the time taken to execute a function (like lock acquisition */ -#if 1 -#define TIMELOG(func,min,message) \ - do { \ - struct timeval t1, t2; \ - int diff; \ - gettimeofday(&t1,NULL); \ - func; \ - gettimeofday(&t2,NULL); \ - if((diff = usecdiff(&t2, &t1)) > min) \ - ast_log( AST_CONF_DEBUG, "TimeLog: %s: %d ms\n", message, diff); \ - } while (0) -#else -#define TIMELOG(func,min,message) func -#endif - -#endif diff --git a/agc_2-X/trunk/app_conference/conf_frame.h b/agc_2-X/trunk/app_conference/conf_frame.h deleted file mode 100644 index 24cac7f9..00000000 --- a/agc_2-X/trunk/app_conference/conf_frame.h +++ /dev/null @@ -1,61 +0,0 @@ - -// $Id: conf_frame.h,v 1.3 2005/10/26 21:02:07 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#ifndef _APP_CONF_STRUCTS_H -#define _APP_CONF_STRUCTS_H - -// -// includes -// - -#include "app_conference.h" -#include "common.h" - -// -// struct declarations -// - -typedef struct conf_frame -{ - // frame audio data - struct ast_frame* fr ; - - // array of converted versions for listeners - struct ast_frame* converted[ AC_SUPPORTED_FORMATS ] ; - - // pointer to the frame's owner - struct ast_conf_member* member ; // who sent this frame - - // frame meta data -// struct timeval timestamp ; -// unsigned long cycleid ; -// int priority ; - - // linked-list pointers - struct conf_frame* next ; - struct conf_frame* prev ; - - // should this frame be preserved - short static_frame ; - - // pointer to mixing buffer - char* mixed_buffer ; -} conf_frame ; - - -#endif diff --git a/agc_2-X/trunk/app_conference/conference.c b/agc_2-X/trunk/app_conference/conference.c deleted file mode 100644 index 4bdb64ca..00000000 --- a/agc_2-X/trunk/app_conference/conference.c +++ /dev/null @@ -1,1410 +0,0 @@ - -// $Id: conference.c,v 1.7 2005/10/27 17:53:35 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#include "conference.h" -#include "regex.h" - -// -// static variables -// - -// single-linked list of current conferences -static struct ast_conference *conflist = NULL ; - -// mutex for synchronizing access to conflist -AST_MUTEX_DEFINE_STATIC(conflist_lock); -//static ast_mutex_t conflist_lock = AST_MUTEX_INITIALIZER ; - -// mutex for synchronizing calls to start_conference() and remove_conf() -AST_MUTEX_DEFINE_STATIC(start_stop_conf_lock); -//static ast_mutex_t start_stop_conf_lock = AST_MUTEX_INITIALIZER ; - -static int conference_count = 0 ; - -// -// main conference function -// - -void conference_exec( struct ast_conference *conf ) -{ - - struct ast_conf_member *member, *temp_member , *membertest; - struct conf_frame *cfr, *spoken_frames, *send_frames ; - - // count number of speakers, number of listeners - int speaker_count ; - int listener_count ; - - ast_log( AST_CONF_DEBUG, "[ $Revision: 1.7 $ ] entered conference_exec, name => %s\n", conf->name ) ; - - // timer timestamps - struct timeval base, curr, notify ; - gettimeofday( &base, NULL ) ; - gettimeofday( ¬ify, NULL ) ; - - // holds differences of curr and base - long time_diff = 0 ; - long time_sleep = 0 ; - - int since_last_slept = 0 ; - - // - // variables for checking thread frequency - // - - // count to AST_CONF_FRAMES_PER_SECOND - int tf_count = 0 ; - long tf_diff = 0 ; - float tf_frequency = 0.0 ; - - struct timeval tf_base, tf_curr ; - gettimeofday( &tf_base, NULL ) ; - - // - // main conference thread loop - // - - - while ( 42 == 42 ) - { - // update the current timestamp - gettimeofday( &curr, NULL ) ; - - // calculate difference in timestamps - time_diff = usecdiff( &curr, &base ) ; - - // calculate time we should sleep - time_sleep = AST_CONF_FRAME_INTERVAL - time_diff ; - - if ( time_sleep > 0 ) - { - // sleep for sleep_time ( as milliseconds ) - usleep( time_sleep * 1000 ) ; - - // reset since last slept counter - since_last_slept = 0 ; - - continue ; - } - else - { - // long sleep warning - if ( - since_last_slept == 0 - && time_diff > AST_CONF_CONFERENCE_SLEEP * 2 - ) - { - ast_log( - AST_CONF_DEBUG, - "long scheduling delay, time_diff => %ld, AST_CONF_FRAME_INTERVAL => %d\n", - time_diff, AST_CONF_FRAME_INTERVAL - ) ; - } - - // increment times since last slept - ++since_last_slept ; - - // sleep every other time - if ( since_last_slept % 2 ) - usleep( 0 ) ; - } - - // adjust the timer base ( it will be used later to timestamp outgoing frames ) - add_milliseconds( &base, AST_CONF_FRAME_INTERVAL ) ; - - // - // check thread frequency - // - - if ( ++tf_count >= AST_CONF_FRAMES_PER_SECOND ) - { - // update current timestamp - gettimeofday( &tf_curr, NULL ) ; - - // compute timestamp difference - tf_diff = usecdiff( &tf_curr, &tf_base ) ; - - // compute sampling frequency - tf_frequency = ( float )( tf_diff ) / ( float )( tf_count ) ; - - if ( - ( tf_frequency <= ( float )( AST_CONF_FRAME_INTERVAL - 1 ) ) - || ( tf_frequency >= ( float )( AST_CONF_FRAME_INTERVAL + 1 ) ) - ) - { - ast_log( - LOG_WARNING, - "processed frame frequency variation, name => %s, tf_count => %d, tf_diff => %ld, tf_frequency => %2.4f\n", - conf->name, tf_count, tf_diff, tf_frequency - ) ; - } - - // reset values - tf_base = tf_curr ; - tf_count = 0 ; - } - - //-----------------// - // INCOMING FRAMES // - //-----------------// - - // ast_log( AST_CONF_DEBUG, "PROCESSING FRAMES, conference => %s, step => %d, ms => %ld\n", - // conf->name, step, ( base.tv_usec / 20000 ) ) ; - - // acquire conference mutex - TIMELOG(ast_mutex_lock( &conf->lock ),1,"conf thread conf lock"); - - // update the current delivery time - conf->delivery_time = base ; - - // - // loop through the list of members - // ( conf->memberlist is a single-linked list ) - // - - // ast_log( AST_CONF_DEBUG, "begin processing incoming audio, name => %s\n", conf->name ) ; - - // reset speaker and listener count - speaker_count = 0 ; - listener_count = 0 ; - - // get list of conference members - member = conf->memberlist ; - - // reset pointer lists - spoken_frames = NULL ; - - // loop over member list to retrieve queued frames - while ( member != NULL ) - { - // acquire member mutex - TIMELOG(ast_mutex_lock( &member->lock ),1,"conf thread member lock") ; - - // check for dead members - if ( member->remove_flag == 1 ) - { - // leave message for other members of the conference - membertest = conf->memberlist ; - - int silent_exit = 0 ; - if (member->quiet_entry_exit == -1) - { - silent_exit = 1 ; - } - - while (membertest != NULL) - { - if (silent_exit < 1) - { - if(!strcmp(membertest->channel_name, member->channel_name)) - { - ast_log( LOG_ERROR, "skipping leave message on %s\n", membertest->channel_name ) ; - } - else - { - if (!basic_play_sound ( membertest->channel_name, "leave" )) - { - ast_log( LOG_ERROR, "playing conference leave message FAILED on %s\n", membertest->channel_name ) ; - } - } - } - else - { - ast_log( LOG_NOTICE, "skipping all entry messages on %s\n", membertest->channel_name ) ; - } - membertest = membertest->next; - } - - - ast_log( LOG_NOTICE, "found member slated for removal, channel => %s\n", member->channel_name ) ; - temp_member = member->next ; - remove_member( member, conf ) ; - member = temp_member ; - continue ; - } - - // get speaking member's audio frames, - if ( member->type == 'L' ) - { - // listeners never have frames - cfr = NULL ; - } - else - { - // tell member the number of frames we're going to need ( used to help dropping algorithm ) - member->inFramesNeeded = ( time_diff / AST_CONF_FRAME_INTERVAL ) - 1 ; - -// !!! TESTING !!! -if ( - conf->debug_flag == 1 - && member->inFramesNeeded > 0 -) -{ - ast_log( AST_CONF_DEBUG, "channel => %s, inFramesNeeded => %d, inFramesCount => %d\n", - member->channel_name, member->inFramesNeeded, member->inFramesCount ) ; -} - - // non-listener member should have frames, - // unless silence detection dropped them - cfr = get_incoming_frame( member ) ; - } - - // handle retrieved frames - if ( cfr == NULL ) - { - // this member is listen-only, or has not spoken - // ast_log( AST_CONF_DEBUG, "silent member, channel => %s\n", member->channel_name ) ; - -// !!! TESTING !!! -#if 0 -if ( member->speaking_state == 1 ) -{ - ast_log( AST_CONF_DEBUG, "member has stopped speaking, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount ) ; -} -#endif -if ( conf->debug_flag == 1 ) -{ - ast_log( AST_CONF_DEBUG, "member is silent, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount ) ; -} - - // mark member as silent - member->speaking_state = 0 ; - - // count the listeners - ++listener_count ; - } - else if ( cfr->fr == NULL ) - { - ast_log( AST_CONF_DEBUG, "got incoming conf_frame with null ast_frame\n" ) ; - -// !!! TESTING !!! -#if 0 -if ( member->speaking_state == 1 ) -{ - ast_log( AST_CONF_DEBUG, "member has stopped speaking, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount ) ; -} -#endif -if ( conf->debug_flag == 1 ) -{ - ast_log( AST_CONF_DEBUG, "member is silent, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount ) ; -} - - // mark member as silent - member->speaking_state = 0 ; - - // count the listeners - ++listener_count ; - } - else - { - // this speaking member has spoken - // ast_log( AST_CONF_DEBUG, "speaking member, channel => %s\n", member->channel_name ) ; - - // append the frame to the list of spoken frames - if ( spoken_frames != NULL ) - { - // add new frame to end of list - cfr->next = spoken_frames ; - spoken_frames->prev = cfr ; - } - - // point the list at the new frame - spoken_frames = cfr ; - -// !!! TESTING !!! -#if 0 -if ( member->speaking_state == 0 ) -{ - ast_log( AST_CONF_DEBUG, "member has started speaking, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount ) ; -} -#endif -if ( conf->debug_flag == 1 ) -{ - ast_log( AST_CONF_DEBUG, "member is speaking, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount ) ; -} - - // mark member as speaker - member->speaking_state = 1 ; - member->speaking_state_notify = 1 ; - - // count the speakers - ++speaker_count ; - } - - // release member mutex - ast_mutex_unlock( &member->lock ) ; - - // adjust our pointer to the next inline - member = member->next ; - } - - // - // break, if we have no more members - // - - if ( conf->membercount == 0 ) - { - ast_log( LOG_NOTICE, "removing conference, count => %d, name => %s\n", conf->membercount, conf->name ) ; - remove_conf( conf ) ; // stop the conference - break ; // break from main processing loop - } - - // ast_log( AST_CONF_DEBUG, "finished processing incoming audio, name => %s\n", conf->name ) ; - - - //---------------// - // MIXING FRAMES // - //---------------// - - // mix frames and get batch of outgoing frames - send_frames = mix_frames( spoken_frames, speaker_count, listener_count ) ; - - // accounting: if there are frames, count them as one incoming frame - if ( send_frames != NULL ) - { - // set delivery timestamp - // set_conf_frame_delivery( send_frames, base ) ; - - // ast_log( AST_CONF_DEBUG, "base => %ld.%ld %d\n", base.tv_sec, base.tv_usec, ( int )( base.tv_usec / 1000 ) ) ; - - conf->stats.frames_in++ ; - } - - //-----------------// - // OUTGOING FRAMES // - //-----------------// - - - // - // queue send frames - // - - // ast_log( AST_CONF_DEBUG, "begin queueing outgoing audio, name => %s\n", conf->name ) ; - - // - // loop over member list to queue outgoing frames - // - for ( member = conf->memberlist ; member != NULL ; member = member->next ) - { - // skip members that are not ready - if ( member->ready_for_outgoing == 0 ) - continue ; - - if ( member->speaking_state == 0 ) - { - // queue listener frame - queue_frame_for_listener( conf, member, send_frames ) ; - } - else - { - // queue speaker frame - queue_frame_for_speaker( conf, member, send_frames ) ; - } - } - - // ast_log( AST_CONF_DEBUG, "end queueing outgoing audio, name => %s\n", conf->name ) ; - - //---------// - // CLEANUP // - //---------// - - // clean up send frames - while ( send_frames != NULL ) - { - // accouting: count all frames and mixed frames - if ( send_frames->member == NULL ) - conf->stats.frames_out++ ; - else - conf->stats.frames_mixed++ ; - - // delete the frame - send_frames = delete_conf_frame( send_frames ) ; - } - - // - // notify the manager of state changes every 500 milliseconds - // - - if ( ( usecdiff( &curr, ¬ify ) / AST_CONF_NOTIFICATION_SLEEP ) >= 1 ) - { - // send the notifications - send_state_change_notifications( conf->memberlist ) ; - - // increment the notification timer base - add_milliseconds( ¬ify, AST_CONF_NOTIFICATION_SLEEP ) ; - } - - // release conference mutex - ast_mutex_unlock( &conf->lock ) ; - - // !!! TESTING !!! - // usleep( 1 ) ; - } - // end while ( 42 == 42 ) - - // - // exit the conference thread - // - - ast_log( AST_CONF_DEBUG, "exit conference_exec\n" ) ; - - // exit the thread - pthread_exit( NULL ) ; - - return ; -} - -// -// manange conference functions -// - -// called by app_conference.c:load_module() -void init_conference( void ) -{ - ast_mutex_init( &start_stop_conf_lock ) ; - ast_mutex_init( &conflist_lock ) ; -} - -struct ast_conference* start_conference( struct ast_conf_member* member ) -{ - // check input - if ( member == NULL ) - { - ast_log( LOG_WARNING, "unable to handle null member\n" ) ; - return NULL ; - } - - struct ast_conference* conf = NULL ; - - // acquire mutex - ast_mutex_lock( &start_stop_conf_lock ) ; - - // look for an existing conference - ast_log( AST_CONF_DEBUG, "attempting to find requested conference\n" ) ; - conf = find_conf( member->id ) ; - - // unable to find an existing conference, try to create one - if ( conf == NULL ) - { - // create a new conference - ast_log( AST_CONF_DEBUG, "attempting to create requested conference\n" ) ; - - // create the new conference with one member - conf = create_conf( member->id, member ) ; - - // return an error if create_conf() failed - if ( conf == NULL ) - { - ast_log( LOG_ERROR, "unable to find or create requested conference\n" ) ; - ast_mutex_unlock( &start_stop_conf_lock ) ; // release mutex - return NULL ; - } - } - else - { - // - // existing conference found, add new member to the conference - // - // once we call add_member(), this thread - // is responsible for calling delete_member() - // - add_member( member, conf ) ; - - } - - // release mutex - ast_mutex_unlock( &start_stop_conf_lock ) ; - - return conf ; -} - - -struct ast_conference* find_conf( const char* name ) -{ - // no conferences exist - if ( conflist == NULL ) - { - ast_log( AST_CONF_DEBUG, "conflist has not yet been initialized, name => %s\n", name ) ; - return NULL ; - } - - // acquire mutex - ast_mutex_lock( &conflist_lock ) ; - - struct ast_conference *conf = conflist ; - - // loop through conf list - while ( conf != NULL ) - { - if ( strncasecmp( (char*)&(conf->name), name, 80 ) == 0 ) - { - // found conf name match - ast_log( AST_CONF_DEBUG, "found conference in conflist, name => %s\n", name ) ; - break ; - } - - conf = conf->next ; - } - - // release mutex - ast_mutex_unlock( &conflist_lock ) ; - - if ( conf == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to find conference in conflist, name => %s\n", name ) ; - } - - return conf ; -} - -struct ast_conference* create_conf( char* name, struct ast_conf_member* member ) -{ - ast_log( AST_CONF_DEBUG, "entered create_conf, name => %s\n", name ) ; - - // - // allocate memory for conference - // - - struct ast_conference *conf = malloc( sizeof( struct ast_conference ) ) ; - - if ( conf == NULL ) - { - ast_log( LOG_ERROR, "unable to malloc ast_conference\n" ) ; - return NULL ; - } - - // - // initialize conference - // - - conf->next = NULL ; - conf->memberlist = NULL ; - - conf->membercount = 0 ; - conf->conference_thread = -1 ; - - conf->debug_flag = 0 ; - - // zero stats - memset( &conf->stats, 0x0, sizeof( ast_conference_stats ) ) ; - - // record start time - gettimeofday( &conf->stats.time_entered, NULL ) ; - - // copy name to conference - strncpy( (char*)&(conf->name), name, sizeof(conf->name) - 1 ) ; - strncpy( (char*)&(conf->stats.name), name, sizeof(conf->name) - 1 ) ; - - // initialize mutexes - ast_mutex_init( &conf->lock ) ; - - // build translation paths - - int c; - for ( c = 0 ; c < AC_SUPPORTED_FORMATS ; ++c ) - { - if ( c == AC_SLINEAR_INDEX ) - conf->from_slinear_paths[ c ] = NULL; - else - conf->from_slinear_paths[ c ] =ast_translator_build_path( 1 << c, AST_FORMAT_SLINEAR); - } - - // add the initial member - add_member( member, conf ) ; - - // - // prepend new conference to conflist - // - - // acquire mutex - ast_mutex_lock( &conflist_lock ) ; - - conf->next = conflist ; - conflist = conf ; - - ast_log( AST_CONF_DEBUG, "added new conference to conflist, name => %s\n", name ) ; - - // - // spawn thread for new conference, using conference_exec( conf ) - // - - // acquire conference mutexes - ast_mutex_lock( &conf->lock ) ; - - if ( pthread_create( &conf->conference_thread, NULL, (void*)conference_exec, conf ) == 0 ) - { - // detach the thread so it doesn't leak - pthread_detach( conf->conference_thread ) ; - - // release conference mutexes - ast_mutex_unlock( &conf->lock ) ; - - ast_log( AST_CONF_DEBUG, "started conference thread for conference, name => %s\n", conf->name ) ; - } - else - { - ast_log( LOG_ERROR, "unable to start conference thread for conference %s\n", conf->name ) ; - - conf->conference_thread = -1 ; - - // release conference mutexes - ast_mutex_unlock( &conf->lock ) ; - - // clean up conference - free( conf ) ; - conf = NULL ; - } - - // count new conference - if ( conf != NULL ) - ++conference_count ; - - // release mutex - ast_mutex_unlock( &conflist_lock ) ; - - return conf ; -} - -void remove_conf( struct ast_conference *conf ) -{ - // ast_log( AST_CONF_DEBUG, "attempting to remove conference, name => %s\n", conf->name ) ; - - struct ast_conference *conf_current = conflist ; - struct ast_conference *conf_temp = NULL ; - - // acquire mutex - ast_mutex_lock( &start_stop_conf_lock ) ; - - // acquire mutex - ast_mutex_lock( &conflist_lock ) ; - - // loop through list of conferences - while ( conf_current != NULL ) - { - // if conf_current point to the passed conf, - if ( conf_current == conf ) - { - if ( conf_temp == NULL ) - { - // this is the first conf in the list, so we just point - // conflist past the current conf to the next - conflist = conf_current->next ; - } - else - { - // this is not the first conf in the list, so we need to - // point the preceeding conf to the next conf in the list - conf_temp->next = conf_current->next ; - } - - // - // do some frame clean up - // - int c; - for ( c = 0 ; c < AC_SUPPORTED_FORMATS ; ++c ) - { - // free the translation paths - if ( conf_current->from_slinear_paths[ c ] != NULL ) - { - ast_translator_free_path( conf_current->from_slinear_paths[ c ] ) ; - conf_current->from_slinear_paths[ c ] = NULL ; - } - } - - // calculate time in conference - struct timeval time_exited ; - gettimeofday( &time_exited, NULL ) ; - - // total time converted to seconds - long tt = ( usecdiff( &time_exited, &conf_current->stats.time_entered ) / 1000 ) ; - - // report accounting information - ast_log( LOG_NOTICE, "conference accounting, fi => %ld, fo => %ld, fm => %ld, tt => %ld\n", - conf_current->stats.frames_in, conf_current->stats.frames_out, conf_current->stats.frames_mixed, tt ) ; - - ast_log( AST_CONF_DEBUG, "removed conference, name => %s\n", conf_current->name ) ; - - ast_mutex_unlock( &conf_current->lock ) ; - - free( conf_current ) ; - conf_current = NULL ; - - break ; - } - - // save a refence to the soon to be previous conf - conf_temp = conf_current ; - - // move conf_current to the next in the list - conf_current = conf_current->next ; - } - - // count new conference - --conference_count ; - - // release mutex - ast_mutex_unlock( &conflist_lock ) ; - - // release mutex - ast_mutex_unlock( &start_stop_conf_lock ) ; - - return ; -} - -// -// member-related functions -// - -void add_member( struct ast_conf_member *member, struct ast_conference *conf ) -{ - if ( conf == NULL ) - { - ast_log( LOG_ERROR, "unable to add member to NULL conference\n" ) ; - return ; - } - - // acquire the conference lock - ast_mutex_lock( &conf->lock ) ; - - member->next = conf->memberlist ; // next is now list - conf->memberlist = member ; // member is now at head of list - - // update conference stats - count_member( member, conf, 1 ) ; - - ast_log( AST_CONF_DEBUG, "member added to conference, name => %s\n", conf->name ) ; - - // release the conference lock - ast_mutex_unlock( &conf->lock ) ; - - return ; -} - -int remove_member( struct ast_conf_member* member, struct ast_conference* conf ) -{ - // check for member - if ( member == NULL ) - { - ast_log( LOG_WARNING, "unable to remove NULL member\n" ) ; - return -1 ; - } - - // check for conference - if ( conf == NULL ) - { - ast_log( LOG_WARNING, "unable to remove member from NULL conference\n" ) ; - return -1 ; - } - - // - // loop through the member list looking - // for the requested member - // - - struct ast_conf_member *member_list = conf->memberlist ; - struct ast_conf_member *member_temp = NULL ; - - int count = -1 ; // default return code - - while ( member_list != NULL ) - { - if ( member_list == member ) - { - // - // log some accounting information - // - - // calculate time in conference - struct timeval time_exited ; - gettimeofday( &time_exited, NULL ) ; - long tt = ( usecdiff( &time_exited, &member->time_entered ) / 1000 ) ; // convert to seconds - - ast_log( - LOG_NOTICE, - "member accounting, channel => %s, te => %ld, fi => %ld, fid => %ld, fo => %ld, fod => %ld, tt => %ld\n", - member->channel_name, - member->time_entered.tv_sec, member->frames_in, member->frames_in_dropped, - member->frames_out, member->frames_out_dropped, tt - ) ; - - // - // if this is the first member in the linked-list, - // skip over the first member in the list, else - // - // point the previous 'next' to the current 'next', - // thus skipping the current member in the list - // - if ( member_temp == NULL ) - conf->memberlist = member->next ; - else - member_temp->next = member->next ; - - // update conference stats - count = count_member( member, conf, 0 ) ; - - // delete the member - delete_member( member ) ; - - ast_log( AST_CONF_DEBUG, "removed member from conference, name => %s, remaining => %d\n", conf->name, conf->membercount ) ; - - break ; - } - - // save a pointer to the current member, - // and then point to the next member in the list - member_temp = member_list ; - member_list = member_list->next ; - } - - // return -1 on error, or the number of members - // remaining if the requested member was deleted - return count ; -} - -int count_member( struct ast_conf_member* member, struct ast_conference* conf, short add_member ) -{ - if ( member == NULL || conf == NULL ) - { - ast_log( LOG_WARNING, "unable to count member\n" ) ; - return -1 ; - } - - short delta = ( add_member == 1 ) ? 1 : -1 ; - - // member type - if ( memberIsModerator( member ) == 1 ) - { - conf->stats.moderators += delta ; - } - else - { - // count non-moderators as listeners - conf->stats.listeners += delta ; - } - - // connection type - if ( memberIsPhoneClient( member ) == 1 ) - { - conf->stats.phone += delta ; - } - else if ( memberIsIaxClient( member ) == 1 ) - { - conf->stats.iaxclient += delta ; - } - else if ( memberIsSIPClient( member ) == 1 ) - { - conf->stats.sip += delta ; - } - - // increment member count - conf->membercount += delta ; - - return conf->membercount ; -} - -// -// queue incoming frame functions -// - -int queue_frame_for_speaker( - struct ast_conference* conf, - struct ast_conf_member* member, - conf_frame* frame -) -{ - // - // check inputs - // - - if ( conf == NULL ) - { - ast_log( LOG_WARNING, "unable to queue speaker frame with null conference\n" ) ; - return -1 ; - } - - if ( member == NULL ) - { - ast_log( LOG_WARNING, "unable to queue speaker frame with null member\n" ) ; - return -1 ; - } - - // - // loop over spoken frames looking for member's appropriate match - // - - short found_flag = 0 ; - struct ast_frame* qf ; - - for ( ; frame != NULL ; frame = frame->next ) - { - if ( frame->member != member ) - continue ; - - if ( frame->fr == NULL ) - { - ast_log( LOG_WARNING, "unable to queue speaker frame with null data\n" ) ; - continue ; - } - - // - // convert and queue frame - // - - // short-cut pointer to the ast_frame - qf = frame->fr ; - - // acquire member lock - TIMELOG(ast_mutex_lock( &member->lock ),1,"queue_frame_for_speaker: memberlock") ; - - if ( qf->subclass == member->write_format ) - { - // frame is already in correct format, so just queue it - queue_outgoing_frame( member, qf, conf->delivery_time ) ; - } - else - { - // - // convert frame to member's write format - // ( calling ast_frdup() to make sure the translator's copy sticks around ) - // - qf = convert_frame_from_slinear( member->from_slinear, ast_frdup( qf ) ) ; - - if ( qf != NULL ) - { - // queue frame - queue_outgoing_frame( member, qf, conf->delivery_time ) ; - - // free frame ( the translator's copy ) - ast_frfree( qf ) ; - } - else - { - ast_log( LOG_WARNING, "unable to translate outgoing speaker frame, channel => %s\n", member->channel_name ) ; - } - } - - // release member lock - ast_mutex_unlock( &member->lock ) ; - - // set found flag - found_flag = 1 ; - - // we found the frame, skip to the next member - break ; - } - - // queue a silent frame - if ( found_flag == 0 ) - queue_silent_frame( conf, member ) ; - - return 0 ; -} - -int queue_frame_for_listener( - struct ast_conference* conf, - struct ast_conf_member* member, - conf_frame* frame -) -{ - // - // check inputs - // - - if ( conf == NULL ) - { - ast_log( LOG_WARNING, "unable to queue listener frame with null conference\n" ) ; - return -1 ; - } - - if ( member == NULL ) - { - ast_log( LOG_WARNING, "unable to queue listener frame with null member\n" ) ; - return -1 ; - } - - // - // loop over spoken frames looking for member's appropriate match - // - - short found_flag = 0 ; - struct ast_frame* qf ; - - for ( ; frame != NULL ; frame = frame->next ) - { - // we're looking for a null or matching member - if ( frame->member != NULL && frame->member != member ) - continue ; - - if ( frame->fr == NULL ) - { - ast_log( LOG_WARNING, "unknown error queueing frame for listener, frame->fr == NULL\n" ) ; - continue ; - } - - // acquire member lock - TIMELOG(ast_mutex_lock( &member->lock ),1,"queue_frame_for_listener") ; - - // first, try for a pre-converted frame - qf = frame->converted[ member->write_format_index ] ; - - /* - if ( qf != NULL && (member->smooth_size_out > 0)) { - if (qf->datalen != member->smooth_size_out ) { -//ast_log (AST_CONF_DEBUG, "ignoring and freeing previously stored frame, with datalen=>%d != smooth_size_out=>%d\n",qf->datalen,member->smooth_size_out); - ast_frfree( qf ) ; - qf = NULL ; - } - } - */ - - // convert ( and store ) the frame - if ( qf == NULL ) - { - // make a copy of the slinear version of the frame - qf = ast_frdup( frame->fr ) ; - - if ( qf == NULL ) - { - ast_log( LOG_WARNING, "unable to duplicate frame\n" ) ; - continue ; - } - - // convert using the conference's translation path - qf = convert_frame_from_slinear( conf->from_slinear_paths[ member->write_format_index ], qf ) ; - if ( qf == NULL ) - ast_log( LOG_WARNING, "unable to translate frame for listener, channel => %s , member->write_format => %d , member->write_format_index %d , qf->frametype -> %d , qf->subclass -> %d, qf->datalen=> %d, qf->samples =>%d\n", member->channel_name , member->write_format, member->write_format_index, qf->frametype, qf->subclass , qf->datalen, qf->samples) ; - - // store the converted frame - // ( the frame will be free'd next time through the loop ) - frame->converted[ member->write_format_index ] = qf ; -//ast_log (AST_CONF_DEBUG, "storing converted frame into index=>%d, qf->frametype=>%d, qf->subclass=%d, qf->datalen=%d \n",member->write_format_index, qf->frametype, qf->subclass, qf->datalen); - } - - if ( qf != NULL ) - { - // duplicate the frame before queue'ing it - // ( since this member doesn't own this _shared_ frame ) - // qf = ast_frdup( qf ) ; - - if ( queue_outgoing_frame( member, qf, conf->delivery_time ) != 0 ) - { - // free the new frame if it couldn't be queue'd - ast_frfree( qf ) ; - qf = NULL ; - } - } - else - { - ast_log( LOG_WARNING, "unable to translate outgoing listener frame, channel => %s\n", member->channel_name ) ; - } - - // release member lock - ast_mutex_unlock( &member->lock ) ; - - // set found flag - found_flag = 1 ; - - // break from for loop - break ; - } - - // queue a silent frame - if ( found_flag == 0 ) - queue_silent_frame( conf, member ) ; - - return 0 ; -} - -int queue_silent_frame( - struct ast_conference* conf, - struct ast_conf_member* member -) -{ -#ifdef APP_CONFERENCE_DEBUG - // - // check inputs - // - - if ( conf == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to queue silent frame for null conference\n" ) ; - return -1 ; - } - - if ( member == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to queue silent frame for null member\n" ) ; - return -1 ; - } -#endif // APP_CONFERENCE_DEBUG - - // - // initialize static variables - // - - static conf_frame* silent_frame = NULL ; - static struct ast_frame* qf = NULL ; - - if ( silent_frame == NULL ) - { - if ( ( silent_frame = get_silent_frame() ) == NULL ) - { - ast_log( LOG_WARNING, "unable to initialize static silent frame\n" ) ; - return -1 ; - } - } - - // acquire member lock - TIMELOG(ast_mutex_lock( &member->lock ),1,"queue_silent_frame") ; - - // get the appropriate silent frame - qf = silent_frame->converted[ member->write_format_index ] ; - - if ( qf == NULL ) - { - // - // we need to do this to avoid echo on the speaker's line. - // translators seem to be single-purpose, i.e. they - // can't be used simultaneously for multiple audio streams - // - - struct ast_trans_pvt* trans = ast_translator_build_path( member->write_format, AST_FORMAT_SLINEAR ) ; - - if ( trans != NULL ) - { - // attempt ( five times ) to get a silent frame - // to make sure we provice the translator with enough data - int c; - for ( c = 0 ; c < 5 ; ++c ) - { - // translate the frame - qf = ast_translate( trans, silent_frame->fr, 0 ) ; - - // break if we get a frame - if ( qf != NULL ) break ; - } - - if ( qf != NULL ) - { - // isolate the frame so we can keep it around after trans is free'd - qf = ast_frisolate( qf ) ; - - // cache the new, isolated frame - silent_frame->converted[ member->write_format_index ] = qf ; - } - - ast_translator_free_path( trans ) ; - } - } - - // - // queue the frame, if it's not null, - // otherwise there was an error - // - if ( qf != NULL ) - { - queue_outgoing_frame( member, qf, conf->delivery_time ) ; - } - else - { - ast_log( LOG_ERROR, "unable to translate outgoing silent frame, channel => %s\n", member->channel_name ) ; - } - - // release member lock - ast_mutex_unlock( &member->lock ) ; - - return 0 ; -} - -// -// get conference stats -// - -// -// returns: -1 => error, 0 => debugging off, 1 => debugging on -// state: on => 1, off => 0, toggle => -1 -// -int set_conference_debugging( const char* name, int state ) -{ - if ( name == NULL ) - return -1 ; - - // acquire mutex - ast_mutex_lock( &conflist_lock ) ; - - struct ast_conference *conf = conflist ; - int new_state = -1 ; - - // loop through conf list - while ( conf != NULL ) - { - if ( strncasecmp( (const char*)&(conf->name), name, 80 ) == 0 ) - { - // lock conference - // ast_mutex_lock( &(conf->lock) ) ; - - // toggle or set the state - if ( state == -1 ) - conf->debug_flag = ( conf->debug_flag == 0 ) ? 1 : 0 ; - else - conf->debug_flag = ( state == 0 ) ? 0 : 1 ; - - new_state = conf->debug_flag ; - - // unlock conference - // ast_mutex_unlock( &(conf->lock) ) ; - - break ; - } - - conf = conf->next ; - } - - // release mutex - ast_mutex_unlock( &conflist_lock ) ; - - return new_state ; -} - -int get_conference_count( void ) -{ - return conference_count ; -} - -int get_conference_stats( ast_conference_stats* stats, int requested ) -{ - // no conferences exist - if ( conflist == NULL ) - { - ast_log( AST_CONF_DEBUG, "conflist has not yet been initialize\n" ) ; - return 0 ; - } - - // acquire mutex - ast_mutex_lock( &conflist_lock ) ; - - // compare the number of requested to the number of available conferences - requested = ( get_conference_count() < requested ) ? get_conference_count() : requested ; - - // - // loop through conf list - // - - struct ast_conference* conf = conflist ; - int count = 0 ; - - while ( count <= requested && conf != NULL ) - { - // copy stats struct to array - stats[ count ] = conf->stats ; - - conf = conf->next ; - ++count ; - } - - // release mutex - ast_mutex_unlock( &conflist_lock ) ; - - return count ; -} - -int get_conference_stats_by_name( ast_conference_stats* stats, const char* name ) -{ - // no conferences exist - if ( conflist == NULL ) - { - ast_log( AST_CONF_DEBUG, "conflist has not yet been initialized, name => %s\n", name ) ; - return 0 ; - } - - // make sure stats is null - stats = NULL ; - - // acquire mutex - ast_mutex_lock( &conflist_lock ) ; - - struct ast_conference *conf = conflist ; - - // loop through conf list - while ( conf != NULL ) - { - if ( strncasecmp( (const char*)&(conf->name), name, 80 ) == 0 ) - { - // copy stats for found conference - *stats = conf->stats ; - break ; - } - - conf = conf->next ; - } - - // release mutex - ast_mutex_unlock( &conflist_lock ) ; - - return ( stats == NULL ) ? 0 : 1 ; -} - -struct ast_conf_member *find_member ( char *chan, int lock) -{ - struct ast_conf_member *found = NULL; - struct ast_conf_member *member; - struct ast_conference *conf; - - - - ast_mutex_lock( &conflist_lock ) ; - - conf = conflist; - - // loop through conf list - while ( conf != NULL && !found ) - { - // lock conference - ast_mutex_lock( &conf->lock ); - - member = conf->memberlist ; - - while (member != NULL) - { - if(!strcmp(member->channel_name, chan)) { - found = member; - if(lock) - ast_mutex_lock(&member->lock); - break; - } - member = member->next; - } - - // unlock conference - ast_mutex_unlock( &conf->lock ); - - conf = conf->next ; - } - - // release mutex - ast_mutex_unlock( &conflist_lock ) ; - - return found; -} - diff --git a/agc_2-X/trunk/app_conference/conference.h b/agc_2-X/trunk/app_conference/conference.h deleted file mode 100644 index 08c1018f..00000000 --- a/agc_2-X/trunk/app_conference/conference.h +++ /dev/null @@ -1,121 +0,0 @@ - -// $Id: conference.h,v 1.6 2005/10/26 21:02:07 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#ifndef _APP_CONF_CONFERENCE_H -#define _APP_CONF_CONFERENCE_H - -// -// includes -// - -#include "app_conference.h" -#include "common.h" - -// -// struct declarations -// - -typedef struct ast_conference_stats -{ - // conference name ( copied for ease of use ) - char name[128] ; - - // type of connection - unsigned short phone ; - unsigned short iaxclient ; - unsigned short sip ; - - // type of users - unsigned short moderators ; - unsigned short listeners ; - - // accounting data - unsigned long frames_in ; - unsigned long frames_out ; - unsigned long frames_mixed ; - - struct timeval time_entered ; - -} ast_conference_stats ; - - -struct ast_conference -{ - // conference name - char name[128] ; - - // single-linked list of members in conference - struct ast_conf_member* memberlist ; - int membercount ; - - // conference thread id - pthread_t conference_thread ; - - // conference data mutex - ast_mutex_t lock ; - - // pointer to next conference in single-linked list - struct ast_conference* next ; - - // pointer to translation paths - struct ast_trans_pvt* from_slinear_paths[ AC_SUPPORTED_FORMATS ] ; - - // conference stats - ast_conference_stats stats ; - - // keep track of current delivery time - struct timeval delivery_time ; - - // 1 => on, 0 => off - short debug_flag ; -} ; - -// -// function declarations -// - -struct ast_conference* start_conference( struct ast_conf_member* member ) ; - -void conference_exec( struct ast_conference* conf ) ; - -struct ast_conference* find_conf( const char* name ) ; -struct ast_conference* create_conf( char* name, struct ast_conf_member* member ) ; -void remove_conf( struct ast_conference* conf ) ; - -// find a particular member, locking if requested. -struct ast_conf_member *find_member ( char *chan, int lock) ; - - -int queue_frame_for_listener( struct ast_conference* conf, struct ast_conf_member* member, conf_frame* frame ) ; -int queue_frame_for_speaker( struct ast_conference* conf, struct ast_conf_member* member, conf_frame* frame ) ; -int queue_silent_frame( struct ast_conference* conf, struct ast_conf_member* member ) ; - -void add_member( struct ast_conf_member* member, struct ast_conference* conf ) ; -int remove_member( struct ast_conf_member* member, struct ast_conference* conf ) ; -int count_member( struct ast_conf_member* member, struct ast_conference* conf, short add_member ) ; - -// called by app_confernce.c:load_module() -void init_conference( void ) ; - -int get_conference_count( void ) ; -int get_conference_stats( ast_conference_stats* stats, int requested ) ; -int get_conference_stats_by_name( ast_conference_stats* stats, const char* name ) ; - -int set_conference_debugging( const char* name, int state ) ; - -#endif diff --git a/agc_2-X/trunk/app_conference/enter.gsm b/agc_2-X/trunk/app_conference/enter.gsm deleted file mode 100644 index aa4dafb6bc2c83c6927c27d67a3e2754660aa39d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 231 zcmcaA+Y>Jx5Y*3A%DJ1^uc)7vGJo?J3Lvs5tDcLMX8rj(!- zN5!M|rVE_6%=u)w@11hC{_oiTm&_kOjVx)(w*9xe - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#include "frame.h" - -conf_frame* mix_frames( conf_frame* frames_in, int speaker_count, int listener_count ) -{ - if ( frames_in == NULL ) - return NULL ; - - conf_frame* frames_out = NULL ; - - if ( speaker_count > 1 ) - { - if ( speaker_count == 2 && listener_count == 0 ) - { - // optimize here also? - frames_out = mix_multiple_speakers( frames_in, speaker_count, listener_count ) ; - } - else - { - // mix spoken frames for sending - // ( note: this call also releases us from free'ing spoken_frames ) - frames_out = mix_multiple_speakers( frames_in, speaker_count, listener_count ) ; - } - } - else if ( speaker_count == 1 ) - { - // pass-through frames - frames_out = mix_single_speaker( frames_in ) ; - } - else - { - // no frames to send, leave frames_out null - } - - return frames_out ; -} - -conf_frame* mix_single_speaker( conf_frame* frames_in ) -{ -#ifdef APP_CONFERENCE_DEBUG - // ast_log( AST_CONF_DEBUG, "returning single spoken frame\n" ) ; - - // - // check input - // - - if ( frames_in == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to mix single spoken frame with null frame\n" ) ; - return NULL ; - } - - if ( frames_in->fr == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to mix single spoken frame with null data\n" ) ; - return NULL ; - } - - if ( frames_in->member == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to mix single spoken frame with null member\n" ) ; - return NULL ; - } -#endif // APP_CONFERENCE_DEBUG - - // - // 'mix' the frame - // - - // copy orignal frame to converted array so listeners don't need to re-encode it - frames_in->converted[ frames_in->member->read_format_index ] = ast_frdup( frames_in->fr ) ; - - // convert frame to slinear, if we have a path - frames_in->fr = convert_frame_to_slinear( - frames_in->member->to_slinear, - frames_in->fr - ) ; - - // set the frame's member to null ( i.e. all listeners ) - frames_in->member = NULL ; - - return frames_in ; -} - -// { - // - // a little optimization for testing only: - // when two speakers ( of the same type ) and no listeners - // are in a conference, we just swamp the frame's member pointers - // -/* - if ( - listeners == 0 - && speakers == 2 - && cf_spokenFrames->member->read_format == cf_spokenFrames->next->member->write_format - && cf_spokenFrames->member->write_format == cf_spokenFrames->next->member->read_format - ) - { - struct ast_conf_member* m = NULL ; - m = cf_spokenFrames->member ; - cf_spokenFrames->member = cf_spokenFrames->next->member ; - cf_spokenFrames->next->member = m ; - return cf_spokenFrames ; - } -*/ -// } - -void set_conf_frame_delivery( conf_frame* frame, struct timeval time ) -{ - for ( ; frame != NULL ; frame = frame->next ) - { - if ( frame->fr != NULL ) - { - // copy passed timeval to frame's delivery timeval - frame->fr->delivery = time ; - } - } - - return ; -} - -conf_frame* mix_multiple_speakers( - conf_frame* frames_in, - int speakers, - int listeners -) -{ -#ifdef APP_CONFERENCE_DEBUG - // - // check input - // - - // no frames to mix - if ( ( frames_in == NULL ) || ( frames_in->fr == NULL ) ) - { - ast_log( AST_CONF_DEBUG, "passed spoken frame list was NULL\n" ) ; - return NULL ; - } - - // if less than two speakers, then no frames to mix - if ( speakers < 2 ) - { - ast_log( AST_CONF_DEBUG, "mix_multiple_speakers() called with less than two speakers\n" ) ; - return NULL ; - } -#endif // APP_CONFERENCE_DEBUG - - // - // at this point we know that there is more than one frame, - // and that the frames need to be converted to pcm to be mixed - // - // now, if there are only two frames and two members, - // we can swap them. ( but we'll get to that later. ) - // - - // - // loop through the spoken frames, making a list of spoken members, - // and converting gsm frames to slinear frames so we can mix them. - // - - // pointer to the spoken frames list - conf_frame* cf_spoken = frames_in ; - - // pointer to the new list of mixed frames - conf_frame* cf_sendFrames = NULL ; - - while ( cf_spoken != NULL ) - { - // - // while we're looping through the spoken frames, we'll - // convert the frame to a format suitable for mixing - // - // if the frame fails to convert, drop it and treat - // the speaking member like a listener by not adding - // them to the cf_sendFrames list - // - - if ( cf_spoken->member == NULL ) - { - ast_log( LOG_WARNING, "unable to determine frame member\n" ) ; - } - else - { - // ast_log( AST_CONF_DEBUG, "converting frame to slinear, channel => %s\n", cf_spoken->member->channel_name ) ; - cf_spoken->fr = convert_frame_to_slinear( - cf_spoken->member->to_slinear, - cf_spoken->fr - ) ; - - if ( cf_spoken->fr == NULL ) - { - ast_log( LOG_WARNING, "unable to convert frame to slinear\n" ) ; - } - else - { - // create new conf frame with last frame as 'next' - cf_sendFrames = create_conf_frame( cf_spoken->member, cf_sendFrames, NULL ) ; - } - } - - // point to the next spoken frame - cf_spoken = cf_spoken->next ; - } - - // if necessary, add a frame with a null member pointer. - // this frame will hold the audio mixed for all listeners - if ( listeners > 0 ) - { - cf_sendFrames = create_conf_frame( NULL, cf_sendFrames, NULL ) ; - } - - // - // mix the audio - // - - // convenience pointer that skips over the friendly offset - char* cp_listenerData ; - - // pointer to the send frames list - conf_frame* cf_send = NULL ; - - for ( cf_send = cf_sendFrames ; cf_send != NULL ; cf_send = cf_send->next ) - { - // allocate a mix buffer which fill large enough memory to - // hold a frame, and reset it's memory so we don't get noise - char* cp_listenerBuffer = malloc( AST_CONF_BUFFER_SIZE ) ; - memset( cp_listenerBuffer, 0x0, AST_CONF_BUFFER_SIZE ) ; - - // point past the friendly offset right to the data - cp_listenerData = cp_listenerBuffer + AST_FRIENDLY_OFFSET ; - - // reset the spoken list pointer - cf_spoken = frames_in ; - - // really mix the audio - for ( ; cf_spoken != NULL ; cf_spoken = cf_spoken->next ) - { - // - // if the members are equal, and they - // are not null, do not mix them. - // - if ( - ( cf_send->member == cf_spoken->member ) - && ( cf_send->member != NULL ) - ) - { - // don't mix this frame - } - else if ( cf_spoken->fr == NULL ) - { - ast_log( LOG_WARNING, "unable to mix conf_frame with null ast_frame\n" ) ; - } - else - { - // mix the new frame in with the existing buffer - mix_slinear_frames( cp_listenerData, (char*)( cf_spoken->fr->data ), cf_spoken->fr->samples ) ; - } - } - - // copy a pointer to the frame data to the conf_frame - cf_send->mixed_buffer = cp_listenerData ; - } - - // - // copy the mixed buffer to a new frame - // - - // reset the send list pointer - cf_send = cf_sendFrames ; - - while ( cf_send != NULL ) - { - cf_send->fr = create_slinear_frame( cf_send->mixed_buffer ) ; - cf_send = cf_send->next ; - } - - // - // clean up the spoken frames we were passed - // ( caller will only be responsible for free'ing returns frames ) - // - - // reset the spoken list pointer - cf_spoken = frames_in ; - - while ( cf_spoken != NULL ) - { - // delete the frame - cf_spoken = delete_conf_frame( cf_spoken ) ; - } - - // return the list of frames for sending - return cf_sendFrames ; -} - - -struct ast_frame* convert_frame_to_slinear( struct ast_trans_pvt* trans, struct ast_frame* fr ) -{ - // check for null frame - if ( fr == NULL ) - { - ast_log( LOG_ERROR, "unable to translate null frame to slinear\n" ) ; - return NULL ; - } - - // we don't need to duplicate this frame since - // the normal translation would free it anyway, so - // we'll just pretend we free'd and malloc'd a new one. - if ( fr->subclass == AST_FORMAT_SLINEAR ) - return fr ; - - // check for null translator ( after we've checked that we need to translate ) - if ( trans == NULL ) - { -// ast_log( LOG_ERROR, "unable to translate frame with null translation path\n" ) ; - return fr ; - } - - // return the converted frame - return convert_frame( trans, fr ) ; -} - -struct ast_frame* convert_frame_from_slinear( struct ast_trans_pvt* trans, struct ast_frame* fr ) -{ - // check for null translator ( after we've checked that we need to translate ) - if ( trans == NULL ) - { -// ast_log( LOG_ERROR, "unable to translate frame with null translation path\n" ) ; - return fr ; - } - - // check for null frame - if ( fr == NULL ) - { - ast_log( LOG_ERROR, "unable to translate null slinear frame\n" ) ; - return NULL ; - } - - // if the frame is not slinear, return an error - if ( fr->subclass != AST_FORMAT_SLINEAR ) - { - ast_log( LOG_ERROR, "unable to translate non-slinear frame\n" ) ; - return NULL ; - } - - // return the converted frame - return convert_frame( trans, fr ) ; -} - -struct ast_frame* convert_frame( struct ast_trans_pvt* trans, struct ast_frame* fr ) -{ - if ( trans == NULL ) - { - ast_log( LOG_WARNING, "unable to convert frame with null translator\n" ) ; - return NULL ; - } - - if ( fr == NULL ) - { - ast_log( LOG_WARNING, "unable to convert null frame\n" ) ; - return NULL ; - } - - // convert the frame - struct ast_frame* translated_frame = ast_translate( trans, fr, 1 ) ; - - // check for errors - if ( translated_frame == NULL ) - { - ast_log( LOG_ERROR, "unable to translate frame\n" ) ; - return NULL ; - } - - // return the translated frame - return translated_frame ; -} - -conf_frame* delete_conf_frame( conf_frame* cf ) -{ - // check for null frames - if ( cf == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to delete null conf frame\n" ) ; - return NULL ; - } - - // check for frame marked as static - if ( cf->static_frame == 1 ) - return NULL ; - - if ( cf->fr != NULL ) - { - ast_frfree( cf->fr ) ; - cf->fr = NULL ; - } - - // make sure converted frames are set to null - int c; - for ( c = 0 ; c < AC_SUPPORTED_FORMATS ; ++c ) - { - if ( cf->converted[ c ] != NULL ) - { - ast_frfree( cf->converted[ c ] ) ; - cf->converted[ c ] = NULL ; - } - } - - // get a pointer to the next frame - // in the list so we can return it - conf_frame* nf = cf->next ; - - free( cf ) ; - cf = NULL ; - - return nf ; -} - -conf_frame* create_conf_frame( struct ast_conf_member* member, conf_frame* next, const struct ast_frame* fr ) -{ - // pointer to list of mixed frames - conf_frame* cf = malloc( sizeof( struct conf_frame ) ) ; - - if ( cf == NULL ) - { - ast_log( LOG_ERROR, "unable to allocate memory for conf frame\n" ) ; - return NULL ; - } - - // - // init with some defaults - // - - // make sure converted frames are set to null -// for ( int c = 0 ; c < AC_SUPPORTED_FORMATS ; ++c ) -// { -// cf->converted[ c ] = NULL ; -// } - - memset( (struct ast_frame*)( cf->converted ), 0x0, ( sizeof( struct ast_frame* ) * AC_SUPPORTED_FORMATS ) ) ; - - cf->member = member ; - // cf->priority = 0 ; - - cf->prev = NULL ; - cf->next = next ; - - cf->static_frame = 0 ; - - // establish relationship to 'next' - if ( next != NULL ) next->prev = cf ; - - // this holds the ast_frame pointer - cf->fr = ( fr == NULL ) ? NULL : ast_frdup( ( struct ast_frame* )( fr ) ) ; - - // this holds the temporu mix buffer - cf->mixed_buffer = NULL ; - - return cf ; -} - -conf_frame* copy_conf_frame( conf_frame* src ) -{ - // - // check inputs - // - - if ( src == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to copy null conf frame\n" ) ; - return NULL ; - } - - // - // copy the frame - // - - struct conf_frame *cfr = NULL ; - - // create a new conf frame - cfr = create_conf_frame( src->member, NULL, src->fr ) ; - - if ( cfr == NULL ) - { - ast_log( AST_CONF_DEBUG, "unable to create new conf frame for copy\n" ) ; - return NULL ; - } - - return cfr ; -} - -// -// slinear frame functions -// - -struct ast_frame* create_slinear_frame( char* data ) -{ - struct ast_frame* f ; - - f = calloc( 1, sizeof( struct ast_frame ) ) ; - if ( f == NULL ) - { - ast_log( LOG_ERROR, "unable to allocate memory for slinear frame\n" ) ; - return NULL ; - } - - f->frametype = AST_FRAME_VOICE ; - f->subclass = AST_FORMAT_SLINEAR ; - f->samples = AST_CONF_BLOCK_SAMPLES ; - f->offset = AST_FRIENDLY_OFFSET ; - f->mallocd = AST_MALLOCD_HDR | AST_MALLOCD_DATA ; - - f->datalen = AST_CONF_FRAME_DATA_SIZE ; - f->data = data ; - - f->src = NULL ; - - return f ; -} - -void mix_slinear_frames( char *dst, const char *src, int samples ) -{ - if ( dst == NULL ) return ; - if ( src == NULL ) return ; - - int i, val ; - - for ( i = 0 ; i < samples ; ++i ) - { - val = ( (short*)dst )[i] + ( (short*)src )[i] ; - - if ( val > 0x7fff ) - { - ( (short*)dst )[i] = 0x7fff - 1 ; - continue ; - } - else if ( val < -0x7fff ) - { - ( (short*)dst )[i] = -0x7fff + 1 ; - continue ; - } - else - { - ( (short*)dst )[i] = val ; - continue ; - } - } - - return ; -} - -// -// silent frame functions -// - -conf_frame* get_silent_frame( void ) -{ - static conf_frame* static_silent_frame = NULL ; - - // we'll let this leak until the application terminates - if ( static_silent_frame == NULL ) - { - // ast_log( AST_CONF_DEBUG, "creating cached silent frame\n" ) ; - struct ast_frame* fr = get_silent_slinear_frame() ; - - static_silent_frame = create_conf_frame( NULL, NULL, fr ) ; - - if ( static_silent_frame == NULL ) - { - ast_log( LOG_WARNING, "unable to create cached silent frame\n" ) ; - return NULL ; - } - - // init the 'converted' slinear silent frame - static_silent_frame->converted[ AC_SLINEAR_INDEX ] = get_silent_slinear_frame() ; - - // mark frame as static so it's not deleted - static_silent_frame->static_frame = 1 ; - } - - return static_silent_frame ; -} - -struct ast_frame* get_silent_slinear_frame( void ) -{ - static struct ast_frame* f = NULL ; - - // we'll let this leak until the application terminates - if ( f == NULL ) - { - char* data = malloc( AST_CONF_BUFFER_SIZE ) ; - memset( data, 0x0, AST_CONF_BUFFER_SIZE ) ; - f = create_slinear_frame( data ) ; - } - - return ast_frdup( f ) ; -} - - diff --git a/agc_2-X/trunk/app_conference/frame.h b/agc_2-X/trunk/app_conference/frame.h deleted file mode 100644 index d5b39613..00000000 --- a/agc_2-X/trunk/app_conference/frame.h +++ /dev/null @@ -1,60 +0,0 @@ - -// $Id: frame.h,v 1.6 2005/10/26 21:02:07 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#ifndef _APP_CONF_FRAME_H -#define _APP_CONF_FRAME_H - -// -// includes -// - -#include "app_conference.h" -#include "common.h" - -// -// function declarations -// - -// mixing -conf_frame* mix_frames( conf_frame* frames_in, int speaker_count, int listener_count ) ; - -conf_frame* mix_multiple_speakers( conf_frame* frames_in, int speakers, int listeners ) ; -conf_frame* mix_single_speaker( conf_frame* frames_in ) ; - -// frame creation and deletion -conf_frame* create_conf_frame( struct ast_conf_member* member, conf_frame* next, const struct ast_frame* fr ) ; -conf_frame* delete_conf_frame( conf_frame* cf ) ; -conf_frame* copy_conf_frame( conf_frame* src ) ; - -// convert frame functions -struct ast_frame* convert_frame_to_slinear( struct ast_trans_pvt* trans, struct ast_frame* fr ) ; -struct ast_frame* convert_frame_from_slinear( struct ast_trans_pvt* trans, struct ast_frame* fr ) ; -struct ast_frame* convert_frame( struct ast_trans_pvt* trans, struct ast_frame* fr ) ; - -// slinear frame functions -struct ast_frame* create_slinear_frame( char* data ) ; -void mix_slinear_frames( char* dst, const char* src, int samples ) ; - -// silent frame functions -conf_frame* get_silent_frame( void ) ; -struct ast_frame* get_silent_slinear_frame( void ) ; - -// set delivery timestamp for frames -void set_conf_frame_delivery( conf_frame* frame, struct timeval time ) ; - -#endif diff --git a/agc_2-X/trunk/app_conference/hash.gsm b/agc_2-X/trunk/app_conference/hash.gsm deleted file mode 100644 index 0d0a8ecf..00000000 --- a/agc_2-X/trunk/app_conference/hash.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õø\}PcÈ£P tÛ†§¬D#E)¤™î#àÑi(*ÕøEÿ3yÂBãF:W£Ì×2›w¢ÓÔWâåÔ¢6èÕøTþéyÁªu–ÃÆW¢I+‘sdWÁ󣩿øy¢®su»Õ÷k¿2yƒ©©áËc„tä9,,WÂÌk|UTWãu#’.1Õøcÿ}yQÒÅã(î é¬d£Úº\2Åï!• ‚£QÕø\?;wÁÃaÔòñW‚nfy¢.–7©FW‚•š©ó)Õ÷{?úYW!àíµQë nµSíB*ÜqU—U¡ºy˜×Õö²³>ÓÇX¦ŸWQŽDâ¿íÇmÈÊ!ï÷ûýö \ No newline at end of file diff --git a/agc_2-X/trunk/app_conference/hash.wav b/agc_2-X/trunk/app_conference/hash.wav deleted file mode 100644 index a079f449e699ac983d00127df782709af3c4b290..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3990 zcmWNSS6Gt=1BLTtPcq1cBoH91K*A7k)rD3?TC3GMs^Vy^T2WhCZNELJ~;Gfb1_j`F+madCt{)ao$Dq=FB-tgg`!vLR9N1V+Ee;%sIm6(I(Bc zcS@Cs)F}Ka#^XI`Y4i6XxA;1=6?!~ATYNw5pTM(rbSKkih?&nG1-62j@Jf;zGB)Vz zwz<*-H}ig`-O?$$UKw{_uahoErh4yVW^itjPmf+`p4X2c{+F{SSs0i<_?h7@q!?KY z?i~LB{zGDY((&-B&JUVfoy>%@X&QWi^@5cLpy3kh@u84&fGf{g%LH|hrnPDsenI?d zve7r>-GJSK*Eyi_Ce=C|CHLcuK{ z&UF3Mn&i~6uk(%~3*3tET0$30IecAq(>f40ntv!}qk+_6*BwB2Mz4ZD@*IP+StZd^ z#v`q_dI!+-?770fA#PPzV+n@PJAyD94wA}yB4~$QlTB=rkCpKP88pfv+euSl=mes~ zJy-XUZ8CFf_5f$A(bZU`e1}R)sAc>ceB<`PEAgcsZXbQ%D56x{Ar8ZO1pEAM1pbxe!pni67pfG{K9xz9M?;2$Nmvb)AKO%<~3h+5%~ z0wORzy3i(t$^f@TF(QTRN)BYIQ7e0HNc0vt^KHUm+O{8P8%_H+i4LhirFx3-n2_ zQtUT@24@ZGRs0r?*d=cfcCLtgm;P(|9^|~yB2!ev2K&O%q8|x#^N}JdVTm%S@twY$ zCKr4~-UjmAn-Ntgw5>xq+km7gCh!HVju&mk3VGyXR)qLnz#BM5TtNl=+j^>`w}J?TF!Q?4NgiR@R4wnZGpcF4S_5gncT1OO-#O-`-oJoqPNZ&4G;%ehfq#W6%h)UNi@UG* z8(6K>xX63T7=HAQaBW|GS1lNuvN!J`Wtr}&?84XqY!FxIZ}a#GjQBO=nIpU=<-le# zDMy_!;CrcgU^x#Z!@RaPmQPWsDe1|$;JWsqmSXUE{5gRJ{lpe_QIJH~T9akqg*%=< zWx`4Nh(;zsYfs=m+bO>j6z&vL0 z<4|k;pJ)&06ljeoCLkC<)(kZKN0!Vyv4m8Q4)6Q%XKBN!u0bZKBA@jX3GX^3iBR!5o#V- z98pAFM?~rAGSJNCR^>0@{$<|XS)lzE0gtx9Dc%h*ID3e;$?k6JmD%BU#SIxxU?KG# z4LZ02-5Ho??FjL>k5e#cRPXXewrNW2vy4deXO5ZX!q7&<8}}n^-grJ;lD#WVVwoku z^sa?B#e)n?cnSC`;s#-(?{VL#@)U43^H??pJxBSi^tk;W(kW6&_%Gjdf}UN5Ua97^ zTr@yplk$qV)i!tEesd=LKcvz9#IYR55fpQ)Y1*5FLT&Q_ZC5&d=EjKqG|7NvgV4p4;c@IQ0>fz0P;$1U^l+VJfu zfwa`tbUwyp{LOqjJQ-f@7##V?HxO4O2FQwm{SEcHe<;5T=1_j})VNO~7?^|h70PSF z#bnL|Pl^B>?)Y7v6I#UZ6BB|(fyu<3^l)IhysPt#_h9P1+^HnG?vkR)-iawh4!NBk zAbM$%g9K=oH2yg_BRVlFHZIFsH_Ua2;a4M@%;Tn0STOz5WTg++Mr^0}D&r^fb%>dc zIsQV-Tj1GR5Rhr)G;4L zF{loOvIvtQ6qgss<#flr3cl&O*Ana2C3!?oqE4GO>R0*c$SiNu=p*+#_AHT-en~5A zIH%G^eUMVZJmCA=z5>#P{vHHW546*8`0RVaqF`S#|D3;?${DS0k|^^DsafA7O$}CQb1X)H4O?yN zH}%0sldDn}Md+Qco5@ZJ&nRfbcH94O_aIcTxn|k`%E9MN%By3Y9?>?RSNCCxVo8K= zeXfv~c!3zPy_Wj>qOf^6qZtn(e<_~#o$-$ml8}=?ZOFkWjw^>I$gfE1#|!y0b3D{X zmL^RyC_oy5e)ArukGekNK0A8!bi*`79p*~vM6M|G{djbMiT)}e(84vP2yy08(LvbZ z?(Vh5M~VT?t4L-L|EJ zS>y4n*ST&U*&LP>^*u(QczY<114#c{>>lD3@T?rE?1h~ZU&*?U2q_72&_yDmaRq)_ zpn@Xj9z&J&zm=>pVz~BPDSNkd_h6LmTf|4uPTMK_WMXaFM_ktU<|a@Ih3BTmB@_UE zTcW{o1SWFCFhlbfq$$-Uo`mts6IxbVMrm8Qd(qh*T{wfNL@^8-rTwFu*~9t!;>X7K zcI_NG4x>`U@9p;x>S0wfD_!r}*GrLrCF8yIQAOJ2+9Q4?>fb=+xG#{v`7UiCu2k9B zz}4?!wPlRcAg+AN=3oqR5jdo&H}8wylFdnsve!3TWk$$D9+P=Id>UjUUq%J|p}vCN zs?aGREf<4t>)#>WZ(Ty9lXAi{d`$c=vCDBiLq9j;hC7-52@P=>&dCEt(<&Ghi2}>) z)fi*ai?|w>yBX6l5}K2;DvW^f>^p`dPdRTM}Ulb+q z^!rAz)tDJ$k9)2S&!;-_ZVRTlnmc>?(j(`oMcB2zb>T-;7xS!7*bV8t;QuK-CTA9* zQny{zsHU_fgE}p z5qSS&Q;EA7$HIUD+97r&B>y_$$LMIiMX}6w70p8)ai0Mnk^@O|skOti8_)IsNVJM3 z^AGqF^{EagEGqJad6!XxqNLN(CWp3l+->c1b9giOWR%U(>L+3ApjY)(ifrdpz9&z} z4CuaTB@WkPFEJmZioK(NmMS8}j;-%l*nbLtIX5=_c!<+iu5Jz%;FXc%&Wn(rVjuBK zAsf2s%_VjZ|DgCJIbiulPw7B-1aRD6_75I3!N3xCdC@$vh0N92SqnQQF-i}q$5 z;P5RA8vpEhiFlYC;;xB=t@i?@Xjt%(mZ&a*{wvJMBBG%3BW?d$MKl)s3|#N2hSx^B zkrg^a2hP+MYs){(8y(A)Wse9Dn5fdoG?0d>=Pqa6w3oELk;cPhnPlNYc$@B>J`hSn ztOG5k=Fp$o9%Ra?iPO8`2Lns1qeM9 z`;M|NxXh2i!O00;n|!Z)I%H|)Xto4XKk$v5>HM0&#_je2{?lYmTom?*>TnZwB$-{5 hyO&erc%uH=Iv2hHsIyMA#Sj*!{T83(&`M}s{|AvU%eepm diff --git a/agc_2-X/trunk/app_conference/leave.gsm b/agc_2-X/trunk/app_conference/leave.gsm deleted file mode 100644 index 7b3bef01cdd6ec1fae606fe109e20001869805d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 330 zcmV-Q0k!_zHH_&6Pzhk`#bOFk&ZOE7G-XlCfb9xcEptw`_G)`w+BkF4QC*K;BlfE- zUu(6}EmaV*t=Cf#;>xz|NE)r8-q`w!86)oOH0Dlk740oQGji_nP^){Jlcrvo3^c@2 zrcT%SlHnBOiyjIRG)t*V#Dj|z)vatw#V@TKS!%uKa_hL)d9u}+S!&~?(YU_5NxIx_ zR?v~Cq~0ip4wq?&B24BH*7@SuTB}M*s1QnOXz8RRaoFRfCq>`4jb~9y=%SllAJ%s2 zqHL`zpH_F@TzzUwzV*jt;HWCzOaO&qsx*rR8j{vA>s{V|tOAl~#_NlzG72@!WMfJu zY?500RLD%dey-ovF5F?(c_~}wvuW>F$w}tg;@x?uPj<353ySC?1dY&|)@ -#include -#include - -#ifndef RELEASE -void print_vec(float *vec, int len, char *name) -{ - int i; - printf ("%s ", name); - for (i=0;i>24; - ret += (i>>8)&0x0000ff00; - ret += (i<<8)&0x00ff0000; - ret += (i<<24); -#endif - return ret; -} - -unsigned int le_int(unsigned int i) -{ - unsigned int ret=i; -#ifdef WORDS_BIGENDIAN - ret = i>>24; - ret += (i>>8)&0x0000ff00; - ret += (i<<8)&0x00ff0000; - ret += (i<<24); -#endif - return ret; -} - -unsigned short be_short(unsigned short s) -{ - unsigned short ret=s; -#ifndef WORDS_BIGENDIAN - ret = s>>8; - ret += s<<8; -#endif - return ret; -} - -unsigned short le_short(unsigned short s) -{ - unsigned short ret=s; -#ifdef WORDS_BIGENDIAN - ret = s>>8; - ret += s<<8; -#endif - return ret; -} - -void *speex_alloc (int size) -{ - return calloc(size,1); -} - -void *speex_realloc (void *ptr, int size) -{ - return realloc(ptr, size); -} - -void speex_free (void *ptr) -{ - free(ptr); -} - -void *speex_move (void *dest, void *src, int n) -{ - return memmove(dest,src,n); -} - -void speex_error(char *str) -{ - fprintf (stderr, "Fatal error: %s\n", str); - exit(1); -} - -void speex_warning(char *str) -{ - fprintf (stderr, "warning: %s\n", str); -} - -void speex_warning_int(char *str, int val) -{ - fprintf (stderr, "warning: %s %d\n", str, val); -} - -void speex_rand_vec(float std, spx_sig_t *data, int len) -{ - int i; - for (i=0;i> (shift)) -#define SHR(a,shift) ((a) >> (shift)) -#define SHL(a,shift) ((a) << (shift)) - -/* result fits in 16 bits */ -#define MULT16_16_16(a,b) (((short)(a))*(b)) - -#define MULT16_16(a,b) (((signed int)(a))*(b)) -#define MULT16_32_Q13(a,b) (((a)*((b)>>13)) + ((a)*((signed int)((b)&0x00001fff))>>13)) -#define MULT16_32_Q14(a,b) (((a)*((b)>>14)) + ((a)*((signed int)((b)&0x00003fff))>>14)) -#define MULT16_32_Q15(a,b) (((a)*((b)>>15)) + ((a)*((signed int)((b)&0x00007fff))>>15)) - -#define MULT16_16_Q13(a,b) (((signed int)(a))*(b)>>13) -#define MULT16_16_Q14(a,b) (((signed int)(a))*(b)>>14) -#define MULT16_16_Q15(a,b) (((signed int)(a))*(b)>>15) - -#define MULT16_16_P14(a,b) ((8192+((signed int)(a))*(b))>>14) - - -#define DIV32_16(a,b) (((signed int)(a))/(b)) - -#else - -typedef float spx_mem_t; -typedef float spx_coef_t; -typedef float spx_lsp_t; -typedef float spx_sig_t; -typedef float spx_word16_t; -typedef float spx_word32_t; - -#define LPC_SCALING 1. -#define SIG_SCALING 1. -#define LSP_SCALING 1. - -#define LPC_SHIFT 0 -#define SIG_SHIFT 0 - -#define PSHR(a,shift) (a) -#define SHR(a,shift) (a) -#define SHL(a,shift) (a) -#define MULT16_16_16(a,b) ((a)*(b)) -#define MULT16_16(a,b) ((a)*(b)) - -#define MULT16_32_Q13(a,b) ((a)*(b)) -#define MULT16_32_Q14(a,b) ((a)*(b)) -#define MULT16_32_Q15(a,b) ((a)*(b)) - -#define MULT16_16_Q13(a,b) ((a)*(b)) -#define MULT16_16_Q14(a,b) ((a)*(b)) -#define MULT16_16_Q15(a,b) ((a)*(b)) - - -#endif - -#ifndef RELEASE -void print_vec(float *vec, int len, char *name); -#endif - -unsigned int be_int(unsigned int i); -unsigned int le_int(unsigned int i); - - -unsigned short be_short(unsigned short s); -unsigned short le_short(unsigned short s); - -/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */ -void *speex_alloc (int size); - -/** Speex wrapper for realloc. To do your own dynamic allocation, all you need to do is replace this function, speex_alloc and speex_free */ -void *speex_realloc (void *ptr, int size); - -/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_alloc */ -void speex_free (void *ptr); - -/** Speex wrapper for mem_move */ -void *speex_move (void *dest, void *src, int n); - -void speex_error(char *str); - -void speex_warning(char *str); - -void speex_warning_int(char *str, int val); - -void speex_rand_vec(float std, spx_sig_t *data, int len); - -float speex_rand(float std); - -void _speex_putc(int ch, void *file); - -#endif diff --git a/agc_2-X/trunk/app_conference/libspeex/preprocess.c b/agc_2-X/trunk/app_conference/libspeex/preprocess.c deleted file mode 100644 index 4e8a5470..00000000 --- a/agc_2-X/trunk/app_conference/libspeex/preprocess.c +++ /dev/null @@ -1,1136 +0,0 @@ -/* Copyright (C) 2003 Epic Games - Written by Jean-Marc Valin - - File: preprocess.c - Preprocessor with denoising based on the algorithm by Ephraim and Malah - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include "speex_preprocess.h" -#include "misc.h" -#include "smallft.h" - -#define max(a,b) ((a) > (b) ? (a) : (b)) -#define min(a,b) ((a) < (b) ? (a) : (b)) - -/* use single-precision math funcs. (1.3% perf improvement). */ -#if 1 -#define exp(a) expf(a) -#define sqrt(a) sqrtf(a) -#define floor(a) floorf(a) -#define log(a) logf(a) -#endif - - - -#ifndef M_PI -#define M_PI 3.14159263 -#endif - -#define SQRT_M_PI_2 0.88623 -#define LOUDNESS_EXP 2.5 - -#define NB_BANDS 8 - -#define ZMIN .1 -#define ZMAX .316 -#define ZMIN_1 10 -#define LOG_MIN_MAX_1 0.86859 - -static void conj_window(float *w, int len) -{ - int i; - for (i=0;i9.5) - return 1+.12/x; - - integer = floor(x); - frac = x-integer; - ind = (int)integer; - - return ((1-frac)*table[ind] + frac*table[ind+1])/sqrt(x+.0001); -} - -SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate) -{ - int i; - int N, N3, N4; - - SpeexPreprocessState *st = (SpeexPreprocessState *)speex_alloc(sizeof(SpeexPreprocessState)); - st->frame_size = frame_size; - - /* Round ps_size down to the nearest power of two */ -#if 0 - i=1; - st->ps_size = st->frame_size; - while(1) - { - if (st->ps_size & ~i) - { - st->ps_size &= ~i; - i<<=1; - } else { - break; - } - } - - - if (st->ps_size < 3*st->frame_size/4) - st->ps_size = st->ps_size * 3 / 2; -#else - st->ps_size = st->frame_size; -#endif - - N = st->ps_size; - N3 = 2*N - st->frame_size; - N4 = st->frame_size - N3; - - st->sampling_rate = sampling_rate; - st->denoise_enabled = 1; - st->agc_enabled = 0; - st->agc_level = 8000; - st->vad_enabled = 0; - - st->speech_prob_start = SPEEX_PROB_START ; - st->speech_prob_continue = SPEEX_PROB_CONTINUE ; - - st->frame = (float*)speex_alloc(2*N*sizeof(float)); - st->ps = (float*)speex_alloc(N*sizeof(float)); - st->gain2 = (float*)speex_alloc(N*sizeof(float)); - st->window = (float*)speex_alloc(2*N*sizeof(float)); - st->noise = (float*)speex_alloc(N*sizeof(float)); - st->old_ps = (float*)speex_alloc(N*sizeof(float)); - st->gain = (float*)speex_alloc(N*sizeof(float)); - st->prior = (float*)speex_alloc(N*sizeof(float)); - st->post = (float*)speex_alloc(N*sizeof(float)); - st->loudness_weight = (float*)speex_alloc(N*sizeof(float)); - st->inbuf = (float*)speex_alloc(N3*sizeof(float)); - st->outbuf = (float*)speex_alloc(N3*sizeof(float)); - st->echo_noise = (float*)speex_alloc(N*sizeof(float)); - - st->S = (float*)speex_alloc(N*sizeof(float)); - st->Smin = (float*)speex_alloc(N*sizeof(float)); - st->Stmp = (float*)speex_alloc(N*sizeof(float)); - st->update_prob = (float*)speex_alloc(N*sizeof(float)); - - st->zeta = (float*)speex_alloc(N*sizeof(float)); - st->Zpeak = 0; - st->Zlast = 0; - - st->noise_bands = (float*)speex_alloc(NB_BANDS*sizeof(float)); - st->noise_bands2 = (float*)speex_alloc(NB_BANDS*sizeof(float)); - st->speech_bands = (float*)speex_alloc(NB_BANDS*sizeof(float)); - st->speech_bands2 = (float*)speex_alloc(NB_BANDS*sizeof(float)); - st->noise_bandsN = st->speech_bandsN = 1; - - conj_window(st->window, 2*N3); - for (i=2*N3;i<2*st->ps_size;i++) - st->window[i]=1; - - if (N4>0) - { - for (i=N3-1;i>=0;i--) - { - st->window[i+N3+N4]=st->window[i+N3]; - st->window[i+N3]=1; - } - } - for (i=0;inoise[i]=1e4; - st->old_ps[i]=1e4; - st->gain[i]=1; - st->post[i]=1; - st->prior[i]=1; - } - - for (i=0;iinbuf[i]=0; - st->outbuf[i]=0; - } - - for (i=0;iloudness_weight[i] = .35-.35*ff/16000+.73*exp(-.5*(ff-3800)*(ff-3800)/9e5); - if (st->loudness_weight[i]<.01) - st->loudness_weight[i]=.01; - st->loudness_weight[i] *= st->loudness_weight[i]; - } - - st->speech_prob = 0; - st->last_speech = 1000; - st->loudness = pow(6000,LOUDNESS_EXP); - st->loudness2 = 6000; - st->nb_loudness_adapt = 0; - - st->fft_lookup = (struct drft_lookup*)speex_alloc(sizeof(struct drft_lookup)); - drft_init(st->fft_lookup,2*N); - - st->nb_adapt=0; - st->consec_noise=0; - st->nb_preprocess=0; - return st; -} - -void speex_preprocess_state_destroy(SpeexPreprocessState *st) -{ - speex_free(st->frame); - speex_free(st->ps); - speex_free(st->gain2); - speex_free(st->window); - speex_free(st->noise); - speex_free(st->old_ps); - speex_free(st->gain); - speex_free(st->prior); - speex_free(st->post); - speex_free(st->loudness_weight); - speex_free(st->echo_noise); - - speex_free(st->S); - speex_free(st->Smin); - speex_free(st->Stmp); - speex_free(st->update_prob); - - speex_free(st->noise_bands); - speex_free(st->noise_bands2); - speex_free(st->speech_bands); - speex_free(st->speech_bands2); - - speex_free(st->inbuf); - speex_free(st->outbuf); - - drft_clear(st->fft_lookup); - speex_free(st->fft_lookup); - - speex_free(st); -} - -static void update_noise(SpeexPreprocessState *st, float *ps, float *echo) -{ - int i; - float beta; - st->nb_adapt++; - beta=1.0/st->nb_adapt; - if (beta < .05) - beta=.05; - - if (!echo) - { - for (i=0;ips_size;i++) - st->noise[i] = (1-beta)*st->noise[i] + beta*ps[i]; - } else { - for (i=0;ips_size;i++) - st->noise[i] = (1-beta)*st->noise[i] + beta*max(0,ps[i]-echo[i]); -#if 0 - for (i=0;ips_size;i++) - st->noise[i] = 0; -#endif - } -} - -static int speex_compute_vad(SpeexPreprocessState *st, float *ps, float mean_prior, float mean_post) -{ - int i, is_speech=0; - int N = st->ps_size; - float scale=.5/N; - - /* FIXME: Clean this up a bit */ - { - float bands[NB_BANDS]; - int j; - float p0, p1; - float tot_loudness=0; - float x = sqrt(mean_post); - - for (i=5;ips[i] * st->loudness_weight[i]; - } - - for (i=0;ispeech_prob + .01*(1-st->speech_prob); - p1 *= .01*st->speech_prob + .99*(1-st->speech_prob); - - st->speech_prob = p0/(p1+p0); - */ - - if (st->noise_bandsN < 50 || st->speech_bandsN < 50) - { - if (mean_post > 5) - { - float adapt = 1./st->speech_bandsN++; - if (adapt<.005) - adapt = .005; - for (i=0;ispeech_bands[i] = (1-adapt)*st->speech_bands[i] + adapt*bands[i]; - /*st->speech_bands2[i] = (1-adapt)*st->speech_bands2[i] + adapt*bands[i]*bands[i];*/ - st->speech_bands2[i] = (1-adapt)*st->speech_bands2[i] + adapt*(bands[i]-st->speech_bands[i])*(bands[i]-st->speech_bands[i]); - } - } else { - float adapt = 1./st->noise_bandsN++; - if (adapt<.005) - adapt = .005; - for (i=0;inoise_bands[i] = (1-adapt)*st->noise_bands[i] + adapt*bands[i]; - /*st->noise_bands2[i] = (1-adapt)*st->noise_bands2[i] + adapt*bands[i]*bands[i];*/ - st->noise_bands2[i] = (1-adapt)*st->noise_bands2[i] + adapt*(bands[i]-st->noise_bands[i])*(bands[i]-st->noise_bands[i]); - } - } - } - p0=p1=1; - for (i=0;inoise_bands2[i] - st->noise_bands[i]*st->noise_bands[i]; - speech_var = 1.01*st->speech_bands2[i] - st->speech_bands[i]*st->speech_bands[i];*/ - noise_var = st->noise_bands2[i]; - speech_var = st->speech_bands2[i]; - if (noise_var < .1) - noise_var = .1; - if (speech_var < .1) - speech_var = .1; - - /*speech_var = sqrt(speech_var*noise_var); - noise_var = speech_var;*/ - if (speech_var < .05*speech_var) - noise_var = .05*speech_var; - if (speech_var < .05*noise_var) - speech_var = .05*noise_var; - - if (bands[i] < st->noise_bands[i]) - speech_var = noise_var; - if (bands[i] > st->speech_bands[i]) - noise_var = speech_var; - - speech_mean = st->speech_bands[i]; - noise_mean = st->noise_bands[i]; - if (noise_mean < speech_mean - 5) - noise_mean = speech_mean - 5; - - tmp1 = exp(-.5*(bands[i]-speech_mean)*(bands[i]-speech_mean)/speech_var)/sqrt(2*M_PI*speech_var); - tmp2 = exp(-.5*(bands[i]-noise_mean)*(bands[i]-noise_mean)/noise_var)/sqrt(2*M_PI*noise_var); - /*fprintf (stderr, "%f ", (float)(p0/(.01+p0+p1)));*/ - /*fprintf (stderr, "%f ", (float)(bands[i]));*/ - pr = tmp1/(1e-25+tmp1+tmp2); - /*if (bands[i] < st->noise_bands[i]) - pr=.01; - if (bands[i] > st->speech_bands[i] && pr < .995) - pr=.995;*/ - if (pr>.999) - pr=.999; - if (pr<.001) - pr=.001; - /*fprintf (stderr, "%f ", pr);*/ - p0 *= pr; - p1 *= (1-pr); - } - - p0 = pow(p0,.2); - p1 = pow(p1,.2); - -#if 1 - p0 *= 2; - p0=p0/(p1+p0); - if (st->last_speech>20) - { - float tmp = sqrt(tot_loudness)/st->loudness2; - tmp = 1-exp(-10*tmp); - if (p0>tmp) - p0=tmp; - } - p1=1-p0; -#else - if (sqrt(tot_loudness) < .6*st->loudness2 && p0>15*p1) - p0=15*p1; - if (sqrt(tot_loudness) < .45*st->loudness2 && p0>7*p1) - p0=7*p1; - if (sqrt(tot_loudness) < .3*st->loudness2 && p0>3*p1) - p0=3*p1; - if (sqrt(tot_loudness) < .15*st->loudness2 && p0>p1) - p0=p1; - /*fprintf (stderr, "%f %f ", (float)(sqrt(tot_loudness) /( .25*st->loudness2)), p0/(p1+p0));*/ -#endif - - p0 *= .99*st->speech_prob + .01*(1-st->speech_prob); - p1 *= .01*st->speech_prob + .99*(1-st->speech_prob); - - st->speech_prob = p0/(1e-25+p1+p0); - /*fprintf (stderr, "%f %f %f ", tot_loudness, st->loudness2, st->speech_prob);*/ - - /* decide if frame is speech using speech probability settings */ - -/* if (st->speech_prob> .35 || (st->last_speech < 20 && st->speech_prob>.1)) */ - if ( - st->speech_prob > st->speech_prob_start - || ( st->last_speech < 20 && st->speech_prob > st->speech_prob_continue ) - ) - { - is_speech = 1; - st->last_speech = 0; - } - else - { - st->last_speech++; - if ( st->last_speech < 20 ) - is_speech = 1; - } - - if (st->noise_bandsN > 50 && st->speech_bandsN > 50) - { - if (mean_post > 5) - { - float adapt = 1./st->speech_bandsN++; - if (adapt<.005) - adapt = .005; - for (i=0;ispeech_bands[i] = (1-adapt)*st->speech_bands[i] + adapt*bands[i]; - /*st->speech_bands2[i] = (1-adapt)*st->speech_bands2[i] + adapt*bands[i]*bands[i];*/ - st->speech_bands2[i] = (1-adapt)*st->speech_bands2[i] + adapt*(bands[i]-st->speech_bands[i])*(bands[i]-st->speech_bands[i]); - } - } else { - float adapt = 1./st->noise_bandsN++; - if (adapt<.005) - adapt = .005; - for (i=0;inoise_bands[i] = (1-adapt)*st->noise_bands[i] + adapt*bands[i]; - /*st->noise_bands2[i] = (1-adapt)*st->noise_bands2[i] + adapt*bands[i]*bands[i];*/ - st->noise_bands2[i] = (1-adapt)*st->noise_bands2[i] + adapt*(bands[i]-st->noise_bands[i])*(bands[i]-st->noise_bands[i]); - } - } - } - - - } - - return is_speech; -} - -static void speex_compute_agc(SpeexPreprocessState *st, float mean_prior) -{ - int i; - int N = st->ps_size; - float scale=.5/N; - float agc_gain; - int freq_start, freq_end; - float active_bands = 0; - - freq_start = (int)(300.0*2*N/st->sampling_rate); - freq_end = (int)(2000.0*2*N/st->sampling_rate); - for (i=freq_start;iS[i] > 20*st->Smin[i]+1000) - active_bands+=1; - } - active_bands /= (freq_end-freq_start+1); - - if (active_bands > .2) - { - float loudness=0; - float rate, rate2=.2; - st->nb_loudness_adapt++; - rate=2.0/(1+st->nb_loudness_adapt); - if (rate < .05) - rate = .05; - if (rate < .1 && pow(loudness, LOUDNESS_EXP) > st->loudness) - rate = .1; - if (rate < .2 && pow(loudness, LOUDNESS_EXP) > 3*st->loudness) - rate = .2; - if (rate < .4 && pow(loudness, LOUDNESS_EXP) > 10*st->loudness) - rate = .4; - - for (i=2;ips[i] * st->gain2[i] * st->gain2[i] * st->loudness_weight[i]; - } - loudness=sqrt(loudness); - /*if (loudness < 2*pow(st->loudness, 1.0/LOUDNESS_EXP) && - loudness*2 > pow(st->loudness, 1.0/LOUDNESS_EXP))*/ - st->loudness = (1-rate)*st->loudness + (rate)*pow(loudness, LOUDNESS_EXP); - - st->loudness2 = (1-rate2)*st->loudness2 + rate2*pow(st->loudness, 1.0/LOUDNESS_EXP); - - loudness = pow(st->loudness, 1.0/LOUDNESS_EXP); - - /*fprintf (stderr, "%f %f %f\n", loudness, st->loudness2, rate);*/ - } - - agc_gain = st->agc_level/st->loudness2; - /*fprintf (stderr, "%f %f %f %f\n", active_bands, st->loudness, st->loudness2, agc_gain);*/ - if (agc_gain>200) - agc_gain = 200; - - for (i=0;igain2[i] *= agc_gain; - -} - -static void preprocess_analysis(SpeexPreprocessState *st, short *x) -{ - int i; - int N = st->ps_size; - int N3 = 2*N - st->frame_size; - int N4 = st->frame_size - N3; - float *ps=st->ps; - - /* 'Build' input frame */ - for (i=0;iframe[i]=st->inbuf[i]; - for (i=0;iframe_size;i++) - st->frame[N3+i]=x[i]; - - /* Update inbuf */ - for (i=0;iinbuf[i]=x[N4+i]; - - /* Windowing */ - for (i=0;i<2*N;i++) - st->frame[i] *= st->window[i]; - - /* Perform FFT */ - drft_forward(st->fft_lookup, st->frame); - - /* Power spectrum */ - ps[0]=1; - for (i=1;iframe[2*i-1]*st->frame[2*i-1] + st->frame[2*i]*st->frame[2*i]; - -} - -static void update_noise_prob(SpeexPreprocessState *st) -{ - int i; - int N = st->ps_size; - - for (i=1;iS[i] = 100+ .8*st->S[i] + .05*st->ps[i-1]+.1*st->ps[i]+.05*st->ps[i+1]; - - if (st->nb_preprocess<1) - { - for (i=1;iSmin[i] = st->Stmp[i] = st->S[i]+100; - } - - if (st->nb_preprocess%200==0) - { - for (i=1;iSmin[i] = min(st->Stmp[i], st->S[i]); - st->Stmp[i] = st->S[i]; - } - } else { - for (i=1;iSmin[i] = min(st->Smin[i], st->S[i]); - st->Stmp[i] = min(st->Stmp[i], st->S[i]); - } - } - for (i=1;iupdate_prob[i] *= .2; - if (st->S[i] > 5*st->Smin[i]) - st->update_prob[i] += .8; - /*fprintf (stderr, "%f ", st->S[i]/st->Smin[i]);*/ - /*fprintf (stderr, "%f ", st->update_prob[i]);*/ - } - -} - -inline void ephraim_malah(SpeexPreprocessState *st, int N, float Pframe) -{ - int i; - - /* defactor loop for i=1,1 < i < N-1, and i= N-1 cases */ - /* i=1 case */ - { - float MM; - float theta; - float prior_ratio; - float p, q; - float zeta1; - float P1; - - prior_ratio = st->prior[1]/(1.0001+st->prior[1]); - theta = (1+st->post[1])*prior_ratio; - - zeta1 = st->zeta[1]; - - if (zeta1ZMAX) - P1 = 1; - else - P1 = LOG_MIN_MAX_1 * log(ZMIN_1*zeta1); - - /*P1 = log(zeta1/ZMIN)/log(ZMAX/ZMIN);*/ - - /* FIXME: add global prop (P2) */ - q = 1-Pframe*P1; - if (q>.95) - q=.95; - p=1/(1 + (q/(1-q))*(1+st->prior[1])*exp(-theta)); - - /* Optimal estimator for loudness domain */ - MM = hypergeom_gain(theta); - - st->gain[1] = prior_ratio * MM; - /*Put some (very arbitraty) limit on the gain*/ - if (st->gain[1]>2) - { - st->gain[1]=2; - } - - if (st->denoise_enabled) - { - st->gain2[1]=p*p*st->gain[1]; - } else { - st->gain2[1]=1; - } - } - - for (i=2;i<(N-1);i++) - { - float MM; - float theta; - float prior_ratio; - float p, q; - float zeta1; - float P1; - - - zeta1 = .25*st->zeta[i-1] + .5*st->zeta[i] + .25*st->zeta[i+1]; - - prior_ratio = st->prior[i]/(1.0001+st->prior[i]); - theta = (1+st->post[i])*prior_ratio; - - - - if (zeta1ZMAX) - P1 = 1; - else - P1 = LOG_MIN_MAX_1 * log(ZMIN_1*zeta1); - - /*P1 = log(zeta1/ZMIN)/log(ZMAX/ZMIN);*/ - - - /* FIXME: add global prop (P2) */ - q = 1-Pframe*P1; - if (q>.95) - q=.95; - p=1/(1 + (q/(1-q))*(1+st->prior[i])*exp(-theta)); - - /* Optimal estimator for loudness domain */ - MM = hypergeom_gain(theta); - - st->gain[i] = prior_ratio * MM; - /*Put some (very arbitraty) limit on the gain*/ - if (st->gain[i]>2) - { - st->gain[i]=2; - } - - if (st->denoise_enabled) - { - st->gain2[i]=p*p*st->gain[i]; - } else { - st->gain2[i]=1; - } - } - - /* i = N-1 case */ - { - float MM; - float theta; - float prior_ratio; - float p, q; - float zeta1; - float P1; - - prior_ratio = st->prior[N-1]/(1.0001+st->prior[N-1]); - theta = (1+st->post[N-1])*prior_ratio; - - zeta1 = st->zeta[N-1]; - - if (zeta1ZMAX) - P1 = 1; - else - P1 = LOG_MIN_MAX_1 * log(ZMIN_1*zeta1); - - /*P1 = log(zeta1/ZMIN)/log(ZMAX/ZMIN);*/ - - /* FIXME: add global prop (P2) */ - q = 1-Pframe*P1; - if (q>.95) - q=.95; - p=1/(1 + (q/(1-q))*(1+st->prior[N-1])*exp(-theta)); - - /* Optimal estimator for loudness domain */ - MM = hypergeom_gain(theta); - - st->gain[N-1] = prior_ratio * MM; - /*Put some (very arbitraty) limit on the gain*/ - if (st->gain[N-1]>2) - { - st->gain[N-1]=2; - } - - if (st->denoise_enabled) - { - st->gain2[N-1]=p*p*st->gain[N-1]; - } else { - st->gain2[N-1]=1; - } - } - st->gain2[0]=st->gain[0]=0; - st->gain2[N-1]=st->gain[N-1]=0; -} - - -int speex_preprocess(SpeexPreprocessState *st, short *x, float *echo) -{ - int i; - int is_speech=1; - float mean_post=0; - float mean_prior=0; - int N = st->ps_size; - int N3 = 2*N - st->frame_size; - int N4 = st->frame_size - N3; - float scale=.5/N; - float *ps=st->ps; - float Zframe=0, Pframe; - - preprocess_analysis(st, x); - - update_noise_prob(st); - - st->nb_preprocess++; - - /* Noise estimation always updated for the 20 first times */ - if (st->nb_adapt<10) - { - update_noise(st, ps, echo); - } - - /* Deal with residual echo if provided */ - if (echo) - for (i=1;iecho_noise[i] = (.7*st->echo_noise[i] + .3* echo[i]); - - /* Compute a posteriori SNR */ - for (i=1;ipost[i] = ps[i]/(1+st->noise[i]+st->echo_noise[i]) - 1; - if (st->post[i]>100) - st->post[i]=100; - /*if (st->post[i]<0) - st->post[i]=0;*/ - mean_post+=st->post[i]; - } - mean_post /= N; - if (mean_post<0) - mean_post=0; - - /* Special case for first frame */ - if (st->nb_adapt==1) - for (i=1;iold_ps[i] = ps[i]; - - /* Compute a priori SNR */ - { - /* A priori update rate */ - float gamma; - float min_gamma=0.12; - gamma = 1.0/st->nb_preprocess; - - /*Make update rate smaller when there's no speech*/ -#if 0 - if (mean_post<3.5 && mean_prior < 1) - min_gamma *= (mean_post+.5); - else - min_gamma *= 4.; -#else - min_gamma = .1*fabs(mean_prior - mean_post)*fabs(mean_prior - mean_post); - if (min_gamma>.15) - min_gamma = .15; - if (min_gamma<.02) - min_gamma = .02; -#endif - /*min_gamma = .08;*/ - - /*if (gammaprior[i] = gamma*max(0.0,st->post[i]) + - (1-gamma)*st->gain[i]*st->gain[i]*st->old_ps[i]/(1+st->noise[i]+st->echo_noise[i]); - - if (st->prior[i]>100) - st->prior[i]=100; - - mean_prior+=st->prior[i]; - } - } - mean_prior /= N; - -#if 0 - for (i=0;iprior[i]); - } - fprintf (stderr, "\n"); -#endif - /*fprintf (stderr, "%f %f\n", mean_prior,mean_post);*/ - - if (st->nb_preprocess>=20) - { - int do_update = 0; - float noise_ener=0, sig_ener=0; - /* If SNR is low (both a priori and a posteriori), update the noise estimate*/ - /*if (mean_prior<.23 && mean_post < .5)*/ - if (mean_prior<.23 && mean_post < .5) - do_update = 1; - for (i=1;inoise[i]; - sig_ener += ps[i]; - } - if (noise_ener > 3*sig_ener) - do_update = 1; - /*do_update = 0;*/ - if (do_update) - { - st->consec_noise++; - } else { - st->consec_noise=0; - } - } - - if (st->vad_enabled) - is_speech = speex_compute_vad(st, ps, mean_prior, mean_post); - - - if (st->consec_noise>=3) - { - update_noise(st, st->old_ps, echo); - } else { - for (i=1;iupdate_prob[i]<.5) - st->noise[i] = .90*st->noise[i] + .1*st->ps[i]; - } - } - - for (i=1;izeta[i] = .7*st->zeta[i] + .3*st->prior[i]; - } - - { - int freq_start = (int)(300.0*2*N/st->sampling_rate); - int freq_end = (int)(2000.0*2*N/st->sampling_rate); - for (i=freq_start;izeta[i]; - } - } - - Zframe /= N; - if (Zframe 1.5*st->Zlast) - { - Pframe = 1; - st->Zpeak = Zframe; - if (st->Zpeak > 10) - st->Zpeak = 10; - if (st->Zpeak < 1) - st->Zpeak = 1; - } else { - if (Zframe < st->Zpeak*ZMIN) - { - Pframe = 0; - } else if (Zframe > st->Zpeak*ZMAX) - { - Pframe = 1; - } else { - Pframe = log(Zframe/(st->Zpeak*ZMIN)) / log(ZMAX/ZMIN); - } - } - } - st->Zlast = Zframe; - - /*fprintf (stderr, "%f\n", Pframe);*/ - /* Compute gain according to the Ephraim-Malah algorithm */ - ephraim_malah(st,N,Pframe); - - if (st->agc_enabled) - speex_compute_agc(st, mean_prior); - -#if 0 - if (!is_speech) - { - for (i=0;igain2[i] = 0; - } -#if 0 - else { - for (i=0;igain2[i] = 1; - } -#endif -#endif - - /* PERF: 14% when only vad is enabled [7.0 vs 8.2 sec] */ - if(st->agc_enabled || st->denoise_enabled) { - /* Apply computed gain */ - for (i=1;iframe[2*i-1] *= st->gain2[i]; - st->frame[2*i] *= st->gain2[i]; - } - - /* Get rid of the DC and very low frequencies */ - st->frame[0]=0; - st->frame[1]=0; - st->frame[2]=0; - /* Nyquist frequency is mostly useless too */ - st->frame[2*N-1]=0; - - /* Inverse FFT with 1/N scaling */ - drft_backward(st->fft_lookup, st->frame); - - for (i=0;i<2*N;i++) - st->frame[i] *= scale; - - { - float max_sample=0; - for (i=0;i<2*N;i++) - if (fabs(st->frame[i])>max_sample) - max_sample = fabs(st->frame[i]); - if (max_sample>28000) - { - float damp = 28000./max_sample; - for (i=0;i<2*N;i++) - st->frame[i] *= damp; - } - } - - for (i=0;i<2*N;i++) - st->frame[i] *= st->window[i]; - - /* Perform overlap and add */ - for (i=0;ioutbuf[i] + st->frame[i]; - for (i=0;iframe[N3+i]; - - /* Update outbuf */ - for (i=0;ioutbuf[i] = st->frame[st->frame_size+i]; - } - - /* Save old power spectrum */ - for (i=1;iold_ps[i] = ps[i]; - - return is_speech; -} - -void speex_preprocess_estimate_update(SpeexPreprocessState *st, short *x, float *noise) -{ - int i; - int N = st->ps_size; - int N3 = 2*N - st->frame_size; - - float *ps=st->ps; - - preprocess_analysis(st, x); - - update_noise_prob(st); - - st->nb_preprocess++; - - for (i=1;iupdate_prob[i]<.5) - st->noise[i] = .90*st->noise[i] + .1*ps[i]; - } - - for (i=0;ioutbuf[i] = x[st->frame_size-N3+i]*st->window[st->frame_size+i]; - - /* Save old power spectrum */ - for (i=1;iold_ps[i] = ps[i]; - -} - - -int speex_preprocess_ctl(SpeexPreprocessState *state, int request, void *ptr) -{ - SpeexPreprocessState *st; - st=(SpeexPreprocessState*)state; - switch(request) - { - case SPEEX_PREPROCESS_SET_DENOISE: - st->denoise_enabled = (*(int*)ptr); - break; - case SPEEX_PREPROCESS_GET_DENOISE: - (*(int*)ptr) = st->denoise_enabled; - break; - - case SPEEX_PREPROCESS_SET_AGC: - st->agc_enabled = (*(int*)ptr); - break; - case SPEEX_PREPROCESS_GET_AGC: - (*(int*)ptr) = st->agc_enabled; - break; - - case SPEEX_PREPROCESS_SET_AGC_LEVEL: - st->agc_level = (*(float*)ptr); - if (st->agc_level<1) - st->agc_level=1; - if (st->agc_level>32768) - st->agc_level=32768; - break; - case SPEEX_PREPROCESS_GET_AGC_LEVEL: - (*(float*)ptr) = st->agc_level; - break; - - case SPEEX_PREPROCESS_SET_VAD: - st->vad_enabled = (*(int*)ptr); - break; - case SPEEX_PREPROCESS_GET_VAD: - (*(int*)ptr) = st->vad_enabled; - break; - - case SPEEX_PREPROCESS_SET_PROB_START: - st->speech_prob_start = (*(float*)ptr) ; - if ( st->speech_prob_start > 1 ) - st->speech_prob_start = st->speech_prob_start / 100 ; - if ( st->speech_prob_start > 1 || st->speech_prob_start < 0 ) - st->speech_prob_start = SPEEX_PROB_START ; - break ; - case SPEEX_PREPROCESS_GET_PROB_START: - (*(float*)ptr) = st->speech_prob_start ; - break ; - - case SPEEX_PREPROCESS_SET_PROB_CONTINUE: - st->speech_prob_continue = (*(float*)ptr) ; - if ( st->speech_prob_continue > 1 ) - st->speech_prob_continue = st->speech_prob_continue / 100 ; - if ( st->speech_prob_continue > 1 || st->speech_prob_continue < 0 ) - st->speech_prob_continue = SPEEX_PROB_CONTINUE ; - break ; - break ; - case SPEEX_PREPROCESS_GET_PROB_CONTINUE: - (*(float*)ptr) = st->speech_prob_continue ; - break ; - - default: - speex_warning_int("Unknown speex_preprocess_ctl request: ", request); - return -1; - } - return 0; -} diff --git a/agc_2-X/trunk/app_conference/libspeex/qc_20060323.zip b/agc_2-X/trunk/app_conference/libspeex/qc_20060323.zip deleted file mode 100644 index a2a4d3b316f7d34e2988aebb4149b77067a4f04a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22409 zcmV)ZK&!t{O9KQH000080OnzLG*0Ncpw1rv01iq302Tlh0C8hqK~7FsFfm^;FfcYS zGcq$Sba-@CR0#kBpw}Wqnb#sjRd@sd00000g`Me%(EnsX`14vWik_w zbMx^u_z$8v)hC|GuI<)EI+Sv04%5&PQvRoS(_eH%c{I0@> z<@haJ?hFq=x)6ZOjn$dXq}3`n#wR+-CIKMWs{r!k`T&IgOJ6jr4)@V-j`gAH{k|28 z_MJXfjDRbs4i(wP{BOPoU@qKmX}{`TWb{&tG0&y|Ge?Ui1%-&#$8X^84dgQT*%d{o(hguMfW6 z`bUL}e*19Y2G6Ns=6gHj@?kI4j*GEBdxM;Z~NL;;=(v;()b4QWkZw zEJbmLd^sR-yO^6d!*M8O(>#~RCvCILC;9YN>^L>Fd3PM^x@;O`#=bqS zH{Lld#is2Vl&9zqrMSgU70a&Jl?{qyS$JpiG{b3FWpjLW8BZfmlU%tJcgcU1q%(2Y zY$lH862`s&WGpM3#-{8Vq-*)fo74$l)v9cG7$R*};-+rf4wqL~pO8x^rREkDnTDgu zmBDSxa6dW&-ekZGqfxms_o(1}5)#nwEhMF~_X)c#aWciRKU58Z(MGhz_P%XbVtGIo zqks`zJQJQi&crHWRJa_Q$N(BLv8l^=Idg~N<_{$VfCTAUR03bZzLs#o6LV0o6puc%(fJR8vcC{*yvG?dTeMsFsODF}t-Brs&+eKJm zXerXv171_D5MKTUu~z5E=p5+ck;T){bUI&0mtiKuW%8==v<5Lb_k zY1c?)e>?zOHGUglJ+m{7HDpwZ>Xr`mni++LHXDQ)UDgEK?#pI%^8Ti%YqZof6#`uc zD2vJo>9X#MW^wXJU$k{)d~OrOlG`+SOIc|Reo~tht;WrSkd4m4Oi&&r8od7uhRu3oba|hLYw4nHY(uhaR6Am zI$X;R*n-w0CE#sUA({%^pLfz!`*s(BO(9pAv@Uh{UwXxc@GT8eBg@(Srze8u^dp4b z6-Yl+@xE5b44yTczgOLEFnH(}yWk?2X0ll~ynao}c zGWUmvaa;C1PGX5VX+IS{%Ty+AfVC^slvsA+ucRl3q9GY$7>Ugjp8-)_CQ&J&P|%I@ z%ovB3r|?Z?X#ipz)v$dR#}?oY3gQ=Kg^~nTDNz<^HC+>1-n89FLaWPkXn~<#oi-+b zt29|Wj!AChY6PuW{ytA{x^l&0S$4-y9+{Mhx)8e-Jgo?sv8mRZ8nF(jp)HQYW$1A( zQUJ7Ef`~)X;&u?^Y!q6LTFmrPnx?`ncz;{rJEQ3Ve~bnnkqZ6h9%WRaYIr9BHxg@z z8~i+}-KA(#P)1NhWDM$PHjFU|nA}O#g(|_gM|}>Woa4iNyl0 z4l06ha4w0`v+ah+f5pxc{r*~tRaY@NYN!NIVixSO*e$whwMHaGQ^tB(bjKzp2+qWM zV3tZihI9n_T$oyU zV7{VK4mT};K9%_uOGCnzD=qatAh*b< zxfbM-?_|&52cX&Z8ywGWxvO|2o=vC`Drg?!O9e^1FOGE|!pKz)Y7GHlk-G!6CWXam zg;q$V4q`C5C6|~PL3~MKQYFF%U<5p=TsGC#??1F3f+*H9Fdi*7)pFZ*C#VgO{wRzc z?!hY_i*-=`F=>E!nlv8=h4h(aOXLjSDeQPjE96YQx|kHHGy({STRP%KI#KKo0>Pfz zZhL6&8-G`j<~l`bnpqT()X^{jVRMElEVCTc2%>c6Wb*lw88Bwm(ydrm^$Bc+EzwaI zBX#;nm^NK`SMG^EHJA*(Y=$e$b!t>DZOB@j0$>Fs1yUp@m7O7Oq?*@RD<@TSizMAu z#fJVwbtrv`LKSyZrw#IV9fG;9mYWJZciVf5&Y2(*YjdZ-S0YVF@DKD(@awqA95a|A{%lfL4qVe z0+2UwnAsdj<%}eL3*@fq)>T89UblO)6_kKL8ZS5O3Cp?#wf4=<=Q)wYBqp=UCBsP| zCQy2O|0H$JCbJ6ArOA9(z9cDx%_kxW8(%MOJD)-~P!S)ZB3`wJ4cc`9d`A;jM0uB^ z*U0<|%|I$05;dJyJhY<5(M`6)bbOjIxK5W@8xA=B8$j@kJ##Y#r_Z05!Cc>5n zMYF&O8yx~oicdO^9$}PHqy;k)Ei>Zl*jK+e~NQPKwBqc;M10b2t($xGgITj~oClc`l6#*jTz#{8D8YWe@1W#hB zDw<8yeqeLkasXHeIRGp;LFmcf05(xBOVN?RqUQ`8m(Dqk*B7-a?keiu;($v5n}ldV zP}{P@xd@ccYAwp2qzjmvGDViute|*(5oxXsb%YCopom5WE*eY@%qF#njLKrIiT$3i5;$D^gs-Jg6f&o*{o^A|o=uoyl@a6CBO# zg^e|kc@Hc2Id;MJ1U;y&q7Ax7!uHjw4A6F$(W+WWT*fde_zAfCOsFWh9moWFIMm zWMy}j*R>7U&!ureola9mXFp>7yFd=sp|X*rOF%v{F$YE3wS7sS9M=|%otvseuMDO= zwGNa=o}#WyXg|PwfL_AC@PF0(6vgS0QElD3+vz_)zC4{lZvEor%kN*mKD_+GUx!75-0Eq@8a0YWPg-&$ z2h@ml3zSb4o$4J*iSh%T5`D1scL!vm4k|STE0oU0=3~jz=usN*HZXXI#>T(6NRETB~jnF<(==4@SlBv*)I6`ce*W=)m`1{X3`8?cr%MO)T} z-Dt+w0mqvU;hPi!FZ6A{Xgd&DljI=P)vhT|f`=5!=L3(^UwSvFcd^_={-$ZX8FU1Q zXEXS;iZz4;#trZy=j53i`;gX6ZfaW`HZ`qKu-kgogDrKGq-jbOjYARJq7FvwJua-e zfwbR-VsaLZFa?>*97sw!Q2yNDgcK16Wx_r=nff?;OwM zZdryIAV|e}IF?=S6>dH8DH@_B-ydX9B58!7U-PuI59)dn#B~j!+9u60}P|@P=vVIxsMyoTY$~) z)21t;MqHJ5Ao*V6OVf6;K>|S+-519#virWGV#gN-uOPoQcA&K?^g#utt*CwGY$rGJ zG_Ek^?L10)E52A2ICruGRB0~ivS~kZz_KZ6494=YVC&GJC=*E2!3V@a&_z%Zgp$-+ z&s6Ye90)b=T{4HWSkwifKNzyr`dHS2j#sg!>BP}O?1dmH=)aJl%A~^tf#Ww41T=Dv z3T7Q1aNq0GP-^P%l))$lvOyz@-4eOFL$-uoygPRL&8ZK0L7OS%;aZ8#j10)-7071b zP)2bkK3lpY{~jg&J}-*j9-e=B0IEH_{QC0cUuXO(2#$NszDSyI60hffem+0{>+$L7 z90aK)XX6y!q7!H4;-hdDs546`7|hY>)nsG(Hlx4LboWqStD*_^JwO0L5L}5l$|g{( z${K$!{Jua2OLSUfD6m6c`i{nrGkiGh4Ei>+rIL+G#U>Mwzo%ghE?^*&5qE2uaesNrGOB@fU zg0#=~MUPSrc0m|;G>1~$m8?=Qhg|Gf@eAluGw|Zk!Grd zx`7>R+NLZn>jmg>!;%9^8|92(cdZAX2Ma*9I(}q48BH1H2q*Z9OAd2Rm&?;1o(vaW zg7F5N=dy`38hCzT1Q3J*w1t*|Z#F?WNN^aHXSvJmXb1;E27avrb)0y#U~}`-@!Bj# z&#g}ssE``yp;Bz_PlCuvT~Xd~Mi^vr*m?mivJ^RTn0py=wImO}d6s?$&)g3gV`wn6 z3i`H2{YbD-vBalB27W5HcAJA~EPXE|ft` z=}eJ3#yvwe!A0G+yJ(*TVz0r_ITz+t#d+!A26dYKFtHgIsiw+{o3uZk_4HMJ z$KG7_dwkZXB7FGmv1q=L%0=|K#2RN47eY{%0ADbBApKyc2Nx2G$4Y39+{`&kHW@7+ zC@ClGb}(tH1v`MFrPJ16vACb8ead=^CJpWzH$u1t<qiM2f4rYEJne zj!{>Z>fIIHbVUPYe)DbraA1(c+Fh~W4#s`K?ObKNNgS#r8KzB|M3xRg0il1{yJzM4l~#JE=$D3}gn45?%?}ya(78!PjCij(LY*XjC&bLm5MFNY02s z%B2g=@Dx!-29A>Nx!VOo5YKMkqt(e=f#J7H@Th?L%MD3exDHTvZ)ne?nof8$?{i#; zcE}BMgnZ8aLL$Tw);qNY}anX4^aJc7_2eqycMI0bI2iSW@_p z2C}9!-)0PI#Ffk^#kVMm2wZAnN21!&V7n;RxT$PCBz zT>hnlf=T2|Vp{XV%iw4yKtKe2nFlxH>se4->2j>Y1xvG3~=K+`sd^t0UOZ)lYRmotCB$D6` z&NF`rBO}1PcUkc@+ZFeIk&U1qoJ`kcOPn0$^$>R=>~V#Jau1FO)_CJ+`|fLH|(T#r#@~-1)NB;1ov;iN3%D-*Kw&Y z<^DoO-agl1ZT=rJlGbv;Q5&~RxoU%Q2>To*i}TnZQ%=DU2^Wj}OVI%IFgHR%fcb(5 zl9}ps&X3^RgONuxovSS&>Iqj|+VAi!xqY)b0yWEcBcXFFN)!gCTR}&0gI2Ro3@C*Q zL4!?6gt*T>+v3MtKr=G;uDT0(dDE3Wkzg-kVnTp@V`pJ10^a9SZo}(TsiCcNeJ~Jp zT$0Y`=6Hx8`=Q2-rMV3Ii@*n*x!8gF6sG|s!G-`}VG}AKHDNThGHwt?sUJ|&I0(!6 zbQr5__1>IXw2K8*KF}IUQm3LXcQ}bIM!*@?hC38t9!{c{8o*-)s+nBbQ+!~zrJssoNt^gT@Q$ipv^go!~lB$D;?&|S(g!_{R#FJ;oE z^F|$c&uGfkioq`hB;imBibL@~$6@SEBeSlz96-knz1(p_ zkE|}aB!yMhr3qR$iZ-qZ&K$)Ev)%inh?NnyMA9S``>I^EyXFum4h!T>&nu1J%b+S; zo&h1Qt$pq_p`F^f@jpTsA?1wCa`Cd4VRotv8pnNjOAGq0!) zK~Pls4XTKk5NJ7{n#g1>J+FZxnb{>O<7~l$Ug8q?EN@d5E79HvcJZ+08|4vo{hq%# zJZ=eX#6kgBX|h4r4;i8yU+QJyP29}=j21_d=|1TlAfpN!EZw##``&k*kkK^G>bly5m%O!>T08o!Flr*`h*;pJ}+FDUHh;h*^X^A~UovHN-X@bo11PY*wz z@iXT?{`ULJub&5yGf4zFDCd~9C}~HZ!Ew5o%$ofir~P;f8R=RLZa-8Rs1^rh_Z5g@ z13D5LAS$P4GYG39IDbxHbZ+Q-3}B0XlhYDXE{j9EnVZS~!-=5tbP-?pl4QdXx&ZoD z{gANB7BYTdr(srxZ|(5~!Ogg36(Rw|DHS}+Xba9C$#++Zh9S&AIPfXlxe6C^nZ9s( zRfDg_soBLM3pJD&Bm)FIdV%Cpm58p-Ox%`(eclTIdcvjSH))y%u5)2fE$uw7hXp} zL-vQNBTI;JfWXFu*66n5a_F{mMNocoIKnGrPJC02$fj%ImiFS0_u=?ZF1!_p>ljiC zjugXtQ-DcGo&zus3S#Z=?>N-uHW9gDirkIeCrQJ5Yy`k1@p+q2{&+Kwa9_mk)0L-& z8zNjlP^o~hD7t9<_y$VL4==Ts%pt@aq&`s1gUo`;Ci$>%6KMTWhF8V6&Cj!5qiIyl2+84iMH zww(}-{4Th>O}{y+4u$2pnGv!o~lRA zG$ER`{IWbiq3h=Fk^@m(yTXiRY_q%L}KSFVdbdI4NH%7VUA!&Fgo5fYtQ zI&?>C^{nEO@7^m`#qdN{S-v*3+>y9A zyWn~b>69xQ2hej#Y{yAFY0{{lC7*l@Yy7APtwncin$xaaF$`|tHY5wt#-jZk%LO>UUteR@Oyjy``^zme+t~e&G{eaSFjf-P0@T1t1o{%e?@jb z{_^Yj=a=)>*LXYJxXmoz)#vm#{pG!%<-;YXXrj#)^~lPTZn|xB+m-=mkruQ!J!v$u zq%Ok~&<&4+HdDX4p~o9{Z%x=Ya^RAB_(LJIjSt(I4oc0gvE!#k^m1m6{qj_|rbu+$ zU%Wlm)v=E)X%)otVErQ-NuE;Z!J(KXDv!?)`R7t(TFn>D$jbsJnf1JH%l)2jD~tuQ z?2qg65Chn6+OnxW#zWu~flKO0PMcna52zun47Unx%#4`}8JT)BJEi-F-_B2P*He>TS~V|eHEO^+vT$F+NAX0hd-xOT`_E(nDACL=i5F*71-SN4ai z&b*M}z?zToNhsiqqY|qj#G(mFJ1_}(Y7NM@n_Z&RqnB(m&zJ$Ph~n|-Z|9d+)}gpL zzdVb@`30Cu*Q@yF`QO8e9RI8insX|AP-uG)q}&ilp;@VwXK0Gi<7w~PpA7MKCGiha zsf)v=YxjU~uCwm=+#T3TL2@YWL!KN?QHy0(g=rqTuZzYCE+CsnJaW((|zJdS%7626habsUrNkd66F<&w;Fg7qV zGBYl8cyv`%2>=76*CIrq*CIq!cmx0d0001ueO-6j$hPhK{S`IFdA*&ZlB%TAqX5~+ z2#GC$-OkG$B%xz=9O#Sf&dDD7@psNDVZapj?Q_QN?j#*5RqJEUwdPt3n)|Hkx^X?t zn=Y0{sQFm5^Cr*dU03CIVz`(N@}|tHQ8&vvnFLADB{E5pAV^c$;V%_x6B?z1Ae50z z(k=)C)BW*B7yS_ie*|$SgHWYG(%lxrBEWybe>eYUSYLI6yql^nn|0H!`d@?kewgQ7 zcirUI*PRZexGT!Gu0%8Hx~sBo@@klO?XU||jo;O%D2|oc9|A|vD$r4CVjLvs0_i(M zczg&G?hjGn|E_R^a<$p4S6x?ZmcN&q4!@z8Zg;EAR%HL+hs*7g$Tr_skE^F{n009o zsI-e@prSx0y1xvW#IcN`I0|vfsKb4E&S8$vk))@W!INB_a$^=)UVtbH;C(%j^#0&9nI&KYfQsF;bc?#MNuO zNucaqs4xyytdmHlO5>+tAm?|XPwzq<8;8IFo?d>eyY9zo_Y=<_#(@&s<>`67>E?fSiAnIuT81euB#wM@@?in=(6Vpu_{q-?!p{pp%E0IDd_F7$s2zlf;Fon8ta2CCTwYq9}QLB?weykxjeqF0V#-f$I(*AnvlVTFmXO zjI*+x=h>*6v|XG8I);zLiPmrzYoRf2A_z>P3`{mn6NWF(G1SR@gl~`0&a+{`KX98( za2=w|7NcyQS2zhC>@I8Wis7WI?(tuzX#h9EpIs{adG^KutA^dc{oub{5c`ghoZN(Y zdxV?3X=+4^;W(Sk5S?Tq194N2afZB|+fY8r$}(%Mo9HlvuS%sP;zQiWEgka=8u2@V znRJ2jxQPiaMvFdfO%Oj3AbIu8h%b_)krr((qzrA~=(<_m%xz+;n=Va4e7+8%B$isn zp^N3A!lwt3Nn(ww>SXA<5py}G@J8lY(~e=KZM_&4c_(9p&vM?1DQw2xNB(C%NAjKK z_@m-a4+Bl2B&A!~XORh=6&D3RGB}vmGEC$*(4&Ns*UdFz$26N{&3y+Sh{QCzuX1aj zgS;$}V()Mco7fWk#ySo)lUwS-R|G%7Qy{&DG?Xq#edo~cn@3XvOz`uvGH+p`5pA@| zOZ*LC3%TqX@g2v!&hV3n7D#QeF-T+1I5hHyjI>lR-8765Hni^$7hdFG9OZKJ6#;v& z+y2^g_}yeE?q9xsUAi=1?EYDAR`w#`5OJ3xEbA~%5|>PHB!qGNg)A33q~SS3;?M9E zk6_ILkPBYW4HnHL?+_YAp20z;ixM}42f|%cL;MI{q#on;5wJSkf2@@XoWm+uLxeX% za1RX<8(+lZDY558Dt8WE#b&$X9~OCSvsr!n&0i$im%sknKK^jGamV~NSbq8axZT*; zA#D_uNKTOswDpuIk?iN9w(kRuU&L+rn zVhFPZ1g*R3wlk>?VVj6w$YaQ-&Nfq|I5;ZK5CVrWzn|MhdXmy24-6izH{XCW2CLn} z_URe%0zkO>B!&;muRRRCTJCJZDKy zOhcbQF2)Q1@xmt9MOA-BTne?w#W0)B7%oJF;M~o|bzT*JcG>3+sY}Lq1wbeG$|0H? z#4mgvycu`zOVz53vocWSzHw`LwG|q%0J&`?Y|cJXP9b$$7!=l z%(8a4$V#}4LqI`Jm=2sM23dpu&+Pel7o7n|z!_r177LU4ct*!MjZK2Lv}xe%e8I^r zsdEd)XN~KMPL$0M=W9HPks>RzY28yxv8al<;JJ!vA#MQ(;PUoVq)a#!fB_7}oeH4^ zHVm%@Voamh7hH63iC*sAdYUzWq8%e@Qv-Me2DjA!E+GMeMDVN#JcQGI0z|rpA>n31 z*z#*4)}ba~#f)mp* z{6@a}&kEF{-9F;q#bCAk`rr~{0M9bo09Ao#se}2%v>+f5d~TpU4<%2KTM(UJ5YZxu z-r@!bsYWKir-*Bq&m6(XqLq0*&4-K988Q-J2zNt%j0`-hXBWWGNd0jH+6nrF+w`0y ze9zr!$kPI;xohgS=+m{@8RCrqUF*txTGx&9di*NQXG#(6n1bA4V7mdc zLShWA3SNJ1H&UNmOYoYeozItGI&cwy*{aPeWZ%TVVw#3=*qZMpM>2#%<+N6U%t0Vt70 z;K$k-u!H*6f>mgI850Le{iNq$Fy(zUf^Uy=9I8RQ0JarcTR!?p+%t1@>b4X)l zJ?ry?0S{-M0Gu_6Ip(C`#bKP10-Zx`jf8rsT+t)UX@1SpUOTJD4StCZ!O}s-=s;yY z$f~+>#0UP%8V##>QoBS&8k7=u<3f~{K2nSWe85JB`LJN^sza;??~!C**9d4?Z?Q;K z*V&*cz!G^85^$!d9n9eZYWlBT_L}PVGei zgM*vFmSZ?dfu+ALs(ID9*8GH|S5y(9W*mwkcKsX7duW*Bt#Fv<8AJ1;GDHteF zQ(jCL;Ks0GfJ<`XB!IijN}O^ro#xFI9%a;Bm0hHOYCG5?;+kY-XkTiL@JPsiDFYXx z+j$&O7ZY;-D$V-q!|L%7nWtR-dIFY}a5{k>U4C1M(GLC$Uh?$M`tfmPuSMejU?m~Q zxY9ax&;S_-5iOO-0`iihsMOCpj?m>0#xVp^8FWZpff!{-G`8woH=tzqdDGgf-YNB zqXJhmLk?{5FC9KuvH*?{f)w{^s(1v+moNZP0a1YGG>Hc$RmUjF778+3NE+00WV|2& z4az?WX^gd1!hIM9Vt#uIppe@a0$)#QuD~F;MOVd%j4{fgB*n9MIs=-&_T8fAX!T{g zTRtF|t(-|pg~&cyJ;GwQ)?BZEo5b|@YWK9a6-iqG#Z2+H6I+4vrX+3N1e}~al#0(v zC|Plnjk|7=XALodR7T*Esv)pI&7yn`dh)-SgFzbqh-?=pYbITF1H(W@VZ_IYOd1FK zAcw;Qh%6zT!|=V%50ysm8Ss_u-V6pbU{{ETNyu2(g7h@cM)jR-SS)6Y`O43uYBPX{fl()?SZ*h67SVbqBB zj&z^_D(LOU#$I4(@OnZ?8M`c?!<5AhqXA)bVw6AJrRn?pT+j^@@(;ikn3K`gcFrzE1{c8FYc67o4RDFnf;Pc^ zo!CE+t-!U5ayDKxuB#Ly-~-A7xF*^aITTEnMPmFFYm+K(N|YxQ(Q7S8{-eh7vDbM0mBqNepZ8bsS{|NPEO5aZV&EgvjU?C?6~Yu8BVmB2VR%py4*5=B%c9q8k{7l@ zJg%D-4y_X;Wq5g2=Ee2c=ApYWAQZ2t9b2!F4E>6j4q!Dh$JM|jk+fKQn)B<3-sL>D zr;^=S^8m%FT3ZdAX7>)U*>*5+G<;U0G zcSHeQ5srxnHX0e0i6=SYNuGbst(Dl0OWS)3avq4WN?CMKCuOHNg)1xL&B{{Aj|gCs zSGM1V&S_cO2^1fvq7u{LFdHFiSin}+tzgNV^>o*hw$<5)NLq#JsO^XN0XEDu?WtJfF!4t` zt0+hLRb7D$ccTR(Cvp$4v0yC8+qTE`@ZY6XB1%X^r3>Y_&O=3EUs0< z8aNifS&Cf1k!%@fF+?tQrDF;hG;#@06RzU5;S@#;xWMG_Re4@I#^)=4d_TO+w6?D^ zuS;Yaa4&%C2}>2@qH%P*%vx~^uH3rHJ_QV{9VIbP?VXs!`DnAAl}R6EZa8)dp_QQl>X33yuHl}y-`jC5pl??Ch$FrS2^m{mcKj(~je z#9Gc;=lcXaWABl#fEtzs8*5MAiH$)#1Q0bf-h+i~Jf=Z8WU^sRL+7VkxQiR~c zBB(loj<6)jz^eU8`J{7ufgjERlUPL`)r)Jk@FN*Ij1QhXa+J)r$?l4(wU?CvMs(GX zc8;tRMPSLPii6i29oa5wirm0s`C_m6Fh#yBC(BYKbf zH99aI0^V6Ju8Ssvhh+;VnM&BdOKcH8iNYf=r{MBw!WxjT6C;iC+s!^BOzK6;KY7+p zvIc%CHR#Wsy%s7}+Bxp2uBQ%VPYZl1Qy@}Hg8Zl=SKpxZkURqsAb6+V%BVCSBB{aZ zpVjX1HzMETaOa%bL0xdpBTsK>^6sN z1)V?7Nxxf09@ub{5JveJ2jXu8@KDY_+o;D*2pkE3oYG58`J$1E5IgQG3eHZDn1CD7 zMDle!SMnj~FY84{8Z^5HeFvsjg5Z)p!+BxZG8uHam=56mR)7g$0Y{6H)F8CzqqKyS z8R1S?_wiJrfQT>AvFhYTtWafG<6aWs_t`x`MW@Q@eA}&TP)3|*bO4&% z$i@@RbYDxSf+SR|5|W=OFPs8zxCp1J9!*und|}J?lrvE?><%=?fo8?To~X07)0b6n zX8|vzGjR}y6943&cSKSWfx^Z}+A{VQG{VzvRPy$v{=H=3xXac*R+}dlBE_A>zCWKt z``mT6%g0B=8k-l{c|%@IbPQZ~q`6ag9r!ghH8MDl_@NBn1OL-Q0unR!RqBepT|*^e z*2@9xjZBK_x_#Aa+MEbv5O*{g#C_G*DvhmY;5;D1|ksVe%ecaEE~9UN!kh0M_<$ zr#t+qMFSSuOo1lu?bWpTJ?^EkiCM{5v${$9WK3 zm4By=csNn0J_>GCfh&3iC!*h`-fFi=MF$3j1WLZ)YtEo|8Y$D8;m7L zEsOUBw9{_kd7q&LWUI&zse&Yz09~H4_KKuq;ebO&27m4pE{iMe<2x1AtSCqH69eMv z{rESHD0${4IUqhhtjvdF_RB*Un|+Uaf`9>aoAY8ywSz4~@|G1a1%b2br5E^J@h>tq zh$^XV$$5@p-ec`kt8>4j-eFYNR$~qrD(3fP-dI9vImeitj&2GTk|L5bniI~;z0zH4 z>m{s_CaG6nj>ky-k8wo2>UO*!Jj*D=>6K^rjYC%ry|0^IPt6~qCNc`iae8}D&QpO; z(hHiiFn+hOV)YiR)RVY$RZ+5SS%9E-5wTG&>c$?=lF^>(P`*?4mvak<1plRA zhnl4{O?nk4d8*UL0OY3Lx?p%(0qbM^;XHV+>jk`e-g7?u$)lq&i6JsC>nm9`9OqUd zA4(|k8MlWbPaG%U=|d+%pVot-?8_LOJz&X3 z<4IhjlI8MHQu1b4sma~l`?aC?Hj+^nhnzTU0>`fI%*E>_~ssouUXpRM%Zzknp2 z3jDhpQvh&fEsh~0aOfVKm#PB<+8Fj3Ub>Fcnr-}!;obnBEk?v@ROZWcFOnHj4_(dc zUMv&_6bmVhm=^VE2e!(TC|RyFUP-(T%|(q&uhq$#y0k>p4%)RG^h00~daQ97j?qN)bLQ7Ndp^B<=lRjhU)b7{u@Gg=G?@qr*QZ|uZIj`(85cX@{pMwJSi zg-zAVHOaxKzAaqi-;O}QERh)F$n?TH&Yh{$DO{yj501!ud^0jVPsn&424CF5HB%9F z2-hS$^kw#u%X%&-#2E4QTx>B>M5zisStUtdO}EHiGTNkWKG7pp2~U{1O!b-d{#gI) zx^FML<>r|HH550?pQ|TfHTun`Z!9n^pPrV_&yJ=u;Ifip1+wNqdVu8EUN?!la49FH zi&T0_7YG|v>(5y0n*fr4HHb+upWnL-oz0Okom3x*ID)^hj~wehvRUv*9*Pqtz(n4# zf2x&F^m#J+oDs#&$64JaVJfQH_2xtb+{q9;?A;~}V_>!bmv6|7yS=oG)Eq>V8be=Y zHacx&pSz9I%Vgy+14;%J(1Ab%`_o3VSvIVTsdE+yAMFf293~OErjL^qgdh_tGWhum z2k>d^4pibM17yvQs`z2dB0hi-=(v+G)qh$>>NKIsO1?p_QZ3yzFcl|2R~+mK3D?et zzH}6PD8X#%MTVQWSq$n9@Is6h6_W`;W2n3R$UxtQL!d;eM{ZF;{}_t0Hk)_hA+crR zXTda*i3cT@MvY7WhNpc$-#>PM`ZT}?r9Aoo|O8N;7FfC&R)kfNp zNuNGH3QxFI5TCFJivV8!v)pi`rhP;{*^pz0S_~gvmXFJw7%n%zw;R!XgMqpqa&MD{ zlziB3TR-f?dNgtzECiIs5Mgol$f=WM2v42ELS1Kvs{5)}awA-K)H#w(^mC#J zx5Q!rIR=Z4K1c@4ebRdK)M$ozn>Ey6mbY+JAS?m6LsoN1Jgw~%Lc%l~AGfV>ICctb zC+93~GVC86L|$TdZc1cUeF&Dws4LQ0rDU7Hjq)ne)J5Ffdq#Xr!=RG{Ff13 zuEqBQiFP*QrsfPwNCOjhMLVpkwlA@c@_ADib4N5om^(-%RW7OPhVB`j0@VUm(Z@F- z`%}cx={!bwredoy3rO+54S?`H$0D!t5mJBYg6Cd)W2YiHszRk$qSy`YTe7j8MPZdD z;h25=YM6&Z$ai~Mw)&9GZExmi7T z-M_aRPQK%*?x;nY~@iE>zTx!AYA>Dc0(ycF1ai2-}x(SQA8Is`gbqkp7tB z1`52LxfsUrP=?%_V3BI*JA?6i_~8ss4-_MH-IteV)}51pS~9pzJ}UY|Xw`jqJjXcW z1Vk^0(#QZBxH>qj1TV%pMy(KTj-lG&Bx&%z56y^xikVIQ*DNMcH)Z8^_7Ju!+}Am2 z){>M2c7?cWXICw9j@Z`bOcStLe4_U_x{;IkFV6&A#mi<*rP9|QPq_jfB3chEy6@RZC{=ry2tIa_>M@P-PV<><5-oqA#6kF;y^_2*)rvTN#Mlz zk@lWR1-{1Cv1j)koM|?nkMldq@l^n5pC0e$$w!2LG3)BjVV+fju*2Tqg5h`TSxZpXTVhm&V_>v;JsWE!$N?T`_W0( z#sgRr#mj-$bk!-#2$J(>x>nd6K6hy)F9_R?E1{zipQu^1Ey)dlvJp)^fLDn! zD;kR-vfX1ps!g|!DHbq@aR~b=?cayNjdmQdd2U;N=kIgc2bFJIO4H@;x47BjEL#p} z0w;>mcK7vR^+XS9SQp5C>~IJ>I#15PUI|PjF@3o_j%^h-pr$H{kH@rioMliH(7(Uw z5F}kfK)OqijwOYa6r?)^iG`(>T)MlFR6r3}x_e0xL_~TQTtd2Yk-YxyeRF62|2t<+ zy?M@@ne*a1bLR7;lCcU~#mkPkUEJMxbpM!l=}=2bOn!0zcTVWYJTlY5Pq4z(UQC;` zRe97wVLS~xPoAY5ETbOMW3ipFq3#aa4HwP zkEOmR-5~uqOM%B&rOiWsh|Q?QzB<6}$d5p-OI0Mza5!Cgxs3ndG{hMszLH*JV99#? zH^NZfg)&i#^wdqt?{%(OOO%;cRLdPadlt&!m#i0P_8>1a7OmP|rzR=xb>eRI!&-Kr zkfiV}`11YL#KbS;F2GsXjvwb$Qs_RKbHkx-m5lU{^T9C6K&U4(xgrRd@KXjT=KJIx zWLbB*r|>(*&ykJlI3!Uwnl}h9tbJ)@eK2KL|Lnq-)T1}pf||sFbzZQ~y-PNMVkp_$ zDEH#n_UxpT(RIYj~4iSJ<)@;)W{14!U`Z6kw*<)DVfxM={K) zE5S_Arn9;L(b5l9p*&~JTh+NeLQ1;Fk;G(;)>&cdc5lcDR>dx# z(NyUasDFe7ks8(Rr|~(7{MAfbrZJd*v1HFBA`ne=)rM&NOGU2o}b!-QTuqsiPj8=M62q`b6W-%xnY04`~K`!sJf z|DB>~B}{yp;v=4j0bwm_CxHG8IQ|s4KlglagTP`{me!1`fhtoxZ~I!0wB%+(M~90$ zW^W6C1$m9|+8g+MTuPsN^oaEp#av@)oH;qRt-cf=foUfiA!;Nfz%bWR92EF2&m7T-V5D`V)r}Yq)@isE5dG zoTOpHGc7=VEhh&4y*54-pEv4&tEYE7J!(M1YPCMAJ7aA0&ZcQotF(M2`s}ThB7$nB z3+S$X{2qMZB}TLLQhPykG;vHPjsk(~<)`;`*?L|UqDf3I>^NM=|JH!QU#T1RqA`#L zjog~GR!F<$LVcZ8(BxpUHJ(deR#sWXQ~LWX8=lLZ0l`-tQtGZn$Bp$`J7c(`zBb{< zPV5bQd}nXhmIT(|~_RfJ$ySyQhpwbU-o1r(1Fr zl{9CQt*6qJy8#M)BoQxI-Mpd$hhF5Bt--9Qne+QaTMS>z<+T-kyommkdjsvjIfYcA zZ*v$1j%D%vAFCM_6z}0zcrAU0XWKz2Up+l)3*A|0^hl!|tVKhhJKLnRbD-|hcNHsj zPDIwXAO^E{Wl)b!t(&U&Lzrm03KYICj*><&DUVW^J zpT97WoUWW$!$T{bL;$f@|potD=)uq z)W_p{?@of~uz9=ZXc7qkjqF09P!uFs+v{0W{safm&XUL@Cgh!C_nkt>Bg;?fWw6Yq zQ2ir6CUySdwWGd%*uQee=JRr3M-$U&*Tp()`eTt4VQ?$;7Cf~pY0IAno@XyJGE6bq zVj-pN+YFAHY7+eXMyOfCju$CQ$ys}X+y3NSvPmL z>i2TJra{4SAzo4%*N4S1JJpQ-3j&+#I3+du7Nmd=@`F-L<5|Sj0Rq5twhq|o^VMth zLxKyOpu4y1PQkE8)%1U|#f%;a5Fnh_i{JPxE|Kwdyd&^S!CF!g3f*ZdZ*-?Z_9T2@ z*um%ULb4qbXWTq}2{kk@+7iF@SW&{uJtbGmy4BV2h+{tSaH1Y=59ITbuH=mDO`lAj zZZNPoWC%El-afPxU1}rPr^zHRAdg|e$Bdw9{#q(525;qTqJComkVK7GNfyz+jRz?8 z=zbH?Ywt%VLXKB!H>M^pUhq!tZ`_>z`wC{RUE3rW+#;0KQwKcQ;HR9BgYpU_+Jf5c z`E>LN=}bQ&EIpNq0S{Mk#*7vVEI}s8i|RpF+a>f+E+0G#c`z-wzrlIe%|~LAM$NBy zf)3}Jy`I3;h!LleeYm(Q09u`K@gdwideH<}_6D1;K^VNDPFWH@_q=s5=(31G!#6%f zG0SmVcDP;?DoSn zc)a_U0SA93N`aHRnjEWvC+}@T^_$%%Jc{WYg%0BVEZ)5Mz0^n@iyp5Pb#I)vwh*vzte(#6Y#S`-CTrw=@N2tQy^#+AKJsh3=Asu`htxiD$0^iQ>Hhp_98QPtIDNh)#w(n4e zWTq}zaI`RAh98p_37SO7h<|gPD4wQ=fWW&>!woWmk;SulT;t1^4ST@4wp4}IzG4`> zrd@@U(!dBFhnyHqoVYf9?Y|@>Y1eEOg1+RJ_z#<|`+cr|A=%WV~b#XWo%8f1{ z9SRqQ396(r*feTsF)0Btf@&JyU5zgOW>XxpcvkAATOUcLd)Cw2DmW&aV*sRUVR_21 z+PV`7+O?~m-dsUbbSHq;5LnVz>$(|bKVJ9#op+nP@mDpyYzD}CtH5%d&F_(apscD^ ztta7CU0SekPJEW^pzl5HYcY#lN@VDw5zAhQYx-4VIHplp z4#zY)((!+4&ccpao#HycLS!_qybk0iI$@Ci{+Fc1^c$1kqD?bT!T#BnTf{M2tqr$; z**umwzNk_*M)T^^8Wqe204qs2v&N#4c@C|iMn8LJPyQ7o?6-EwrmADMCi9e~J))V^ zMr)|SH|LerY%EpzBhv`2=_r-w@=@zvG%`uEr)u>hysk_c6FWc^{SXmb zf938x46U8bUa)+I%|Cr&l{Y3Vs;9`mFU;!^$}3%SStN;jl;C9tEfl+ybyGg@OO;+{ zJY?|jyPVu5Jz)O*B})FYgY^M!Sd>y&$*C+~^SnUDagThZ1bHL@Qqe_RxSO=xZ?`4E z&FsACg9RQqQfeVI05tS!H7p=T@SQb}b~kF3Y|y+`{C%I%mvBd3 zZ|2RKVN6*e`$p^Dz|rFB#u>^_Dx2ZLjsrITMDi?*oU@RNNRCG$9_T!cw0u<~xO}Dy zUyZUGp|g{OTWojpqJG(=b~3Nnt;fFsTOeswbtYjnGIS8&Pr7>xV67=E*bL}47kb-r z+h`uTAx9b}Lz^Jb*T9*7cPD@aDwvfNF#*Hc4{{k9b$D1e?Xr7ym_}+5WmH|s{l+V+ z;40_|l}g*Pj~jQ63R8lqw&Belvit0=K*TX7grlqw`Mh=e-<7^8NN0}}AE_|>3DTq& z8Z#$5%rH)X4aYIMG#DFW^GjZ9c68hZwgoeT2*ivh%k4c=wK3zUJlv#d>$d`8A z$&bjI3C)>4I+8KQUv3vhbO>#FKVp6tYvHue=rATs(|~$W2sC;%K&`{J&rc5-@_H2e zu-M;ytWhyNyZU#o^NyBX%bU%ObMUnRbU>(iV4HCy^^b1@A=NUdY_qA zu-sChA*BmEc_7sGl?7A|*^E*gR&Q7k6`E+Snx%J^jA~^8MvnO@4HPuKhfCegfe1m< zWBj%{LeO+fgF;_tBMCnZ`y6@uYZI*%`NUp_V3Q<8M`*-67GTCeRxKXr8J3JIh}30!B$?!)Sa*xB&{p7)0;RtR@qVuBf||e{kA1?- zvJdK0=9U%=E|Phi+F*Wv|F`jP>p^GiykR0svEAkA)s^?o4EOZK^z&4!3g05MHWy{h4>k+7E#s!JZY!s+o;W)_d39@culCwpehpF_ zq@Tne-@!?~qjq6P0%+qxnaI1{$2Bp zpD|q4I!#}ZI2n2O9E%Ym^ato7WQE_*E$Z+`b>vrFiA060QM1#pF|aLzXSxkSJ0d`K z!)J=e`{#}zAf__xk+-f&#wA)FaS(x>{jl_fwa1<8^TaxBhDU0HHPMWARKZlagvKYF zckqA77<$D!`oiUJV?{8&W{Q$E8~}6OM;)G%lrZleI#l7NJ$iJ%S5>A;eZDoc5bsW) zaAMr?qLWwG^NgFcO?^ zBR4fOIw}2>v|T0x{RB{T|7Up~-v!Sa>lQE9vEVJ<*m=2J40qW4j1gfoOZ3HODkr*e zM+5FQyxlP=qz22S!)ozz$C>YpOs%BN)ZXq zZw_KqXIZZ*+sADnOTeP=UgGhRJu4lm=O6muRGC&6=dLquG16pJW{pG~%d|WLa4bEM znZUHI_FDd|t=fBO6%GjCrIAm4>Z?b3N@NAU1xVJqz??#(v_ak$pdJ<}Nz?X6QJ16*~P_7Zmdhzph)lGLLR8M5Q`MFG=f*x=EUIPZ6qfNfD zdum5q^64w@xMG;+bHT0TVZ0N&m|bFK6_iES;#t?m;r#VpYNl}H%Rh~>)Yg%?%ae#@ zELab^z&*V8T58HiC2XyCtV>gQhi2EzY*!*+WF zFIJbe(KuOC(nj=_zteVdoyd)<$Cvb%p0`n3q=1leQg^0H6!E)Ysxju z84+T28}q6>i)2S2n0pap?eKQk^+2ispuLR!JuWcsXp1au>hsbU+jLg*M#UI7uiDg} zaW*21w67`=O}y>C5j%F3dK~x|tm0vLnm9wcQa5VmU;0wPNY6hr@?hdRuE>i-kWqD! zAjxqVt3n_fud?}QeeXQ_Is$fkEdIOQ)d=xV5a^zT9_kN)vMZ+Cx~sKRV>xE|ff%zU zEAL63Uj{w3hov@|cOOW{pOpOBE(n*F^XtK+#GNg3yNm0ETn~qxoUfEi*`4p~RrEfk zIIf;MSNV+a{E+JLhwH9 zGoP-&8fuh2d!I4^ck1;4=nhBX+dkFbf^AzbY(!s -#include "smallft.h" -#include "misc.h" - -static void drfti1(int n, float *wa, int *ifac){ - static int ntryh[4] = { 4,2,3,5 }; - static float tpi = 6.28318530717958648f; - float arg,argh,argld,fi; - int ntry=0,i,j=-1; - int k1, l1, l2, ib; - int ld, ii, ip, is, nq, nr; - int ido, ipm, nfm1; - int nl=n; - int nf=0; - - L101: - j++; - if (j < 4) - ntry=ntryh[j]; - else - ntry+=2; - - L104: - nq=nl/ntry; - nr=nl-ntry*nq; - if (nr!=0) goto L101; - - nf++; - ifac[nf+1]=ntry; - nl=nq; - if(ntry!=2)goto L107; - if(nf==1)goto L107; - - for (i=1;i>1; - ipp2=ip; - idp2=ido; - nbd=(ido-1)>>1; - t0=l1*ido; - t10=ip*ido; - - if(ido==1)goto L119; - for(ik=0;ikl1){ - for(j=1;j>1; - ipp2=ip; - ipph=(ip+1)>>1; - if(idol1)goto L139; - - is= -ido-1; - t1=0; - for(j=1;jn==1)return; - drftf1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache); -} - -void drft_backward(struct drft_lookup *l,float *data){ - if (l->n==1)return; - drftb1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache); -} - -void drft_init(struct drft_lookup *l,int n) -{ - l->n=n; - l->trigcache=(float*)speex_alloc(3*n*sizeof(*l->trigcache)); - l->splitcache=(int*)speex_alloc(32*sizeof(*l->splitcache)); - fdrffti(n, l->trigcache, l->splitcache); -} - -void drft_clear(struct drft_lookup *l) -{ - if(l) - { - if(l->trigcache) - speex_free(l->trigcache); - if(l->splitcache) - speex_free(l->splitcache); - } -} diff --git a/agc_2-X/trunk/app_conference/libspeex/smallft.h b/agc_2-X/trunk/app_conference/libspeex/smallft.h deleted file mode 100644 index d44c41b1..00000000 --- a/agc_2-X/trunk/app_conference/libspeex/smallft.h +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * - * * - * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * - * by the XIPHOPHORUS Company http://www.xiph.org/ * - * * - ******************************************************************** - - function: fft transform - last mod: $Id: smallft.h,v 1.2 2004/07/07 13:39:42 stevek Exp $ - - ********************************************************************/ - -#ifndef _V_SMFT_H_ -#define _V_SMFT_H_ - -/*#include "vorbis/codec.h"*/ - -#ifdef __cplusplus -extern "C" { -#endif - -struct drft_lookup{ - int n; - float *trigcache; - int *splitcache; -}; - -extern void drft_forward(struct drft_lookup *l,float *data); -extern void drft_backward(struct drft_lookup *l,float *data); -extern void drft_init(struct drft_lookup *l,int n); -extern void drft_clear(struct drft_lookup *l); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/agc_2-X/trunk/app_conference/libspeex/speex_preprocess.h b/agc_2-X/trunk/app_conference/libspeex/speex_preprocess.h deleted file mode 100644 index 320224ea..00000000 --- a/agc_2-X/trunk/app_conference/libspeex/speex_preprocess.h +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright (C) 2003 Epic Games - Written by Jean-Marc Valin - - File: speex_preprocess.h - - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - - -#ifdef __cplusplus -extern "C" { -#endif - -struct drft_lookup; - -typedef struct SpeexPreprocessState { - int frame_size; /**< Number of samples processed each time */ - int ps_size; /**< Number of points in the power spectrum */ - int sampling_rate; /**< Sampling rate of the input/output */ - - /* parameters */ - int denoise_enabled; - int agc_enabled; - float agc_level; - int vad_enabled; - - // probabilities to check speech_prob against - float speech_prob_start ; - float speech_prob_continue ; - - float *frame; /**< Processing frame (2*ps_size) */ - float *ps; /**< Current power spectrum */ - float *gain2; /**< Adjusted gains */ - float *window; /**< Analysis/Synthesis window */ - float *noise; /**< Noise estimate */ - float *old_ps; /**< Power spectrum for last frame */ - float *gain; /**< Ephraim Malah gain */ - float *prior; /**< A-priori SNR */ - float *post; /**< A-posteriori SNR */ - - float *S; /**< Smoothed power spectrum */ - float *Smin; /**< See Cohen paper */ - float *Stmp; /**< See Cohen paper */ - float *update_prob; /**< Propability of speech presence for noise update */ - - float *zeta; /**< Smoothed a priori SNR */ - float Zpeak; - float Zlast; - - float *loudness_weight; /**< Perceptual loudness curve */ - - float *echo_noise; - - float *noise_bands; - float *noise_bands2; - int noise_bandsN; - float *speech_bands; - float *speech_bands2; - int speech_bandsN; - - float *inbuf; /**< Input buffer (overlapped analysis) */ - float *outbuf; /**< Output buffer (for overlap and add) */ - - float speech_prob; - int last_speech; - float loudness; /**< loudness estimate */ - float loudness2; /**< loudness estimate */ - int nb_adapt; /**< Number of frames used for adaptation so far */ - int nb_loudness_adapt; /**< Number of frames used for loudness adaptation so far */ - int consec_noise; /**< Number of consecutive noise frames */ - int nb_preprocess; /**< Number of frames processed so far */ - struct drft_lookup *fft_lookup; /**< Lookup table for the FFT */ - -} SpeexPreprocessState; - -/** Creates a new preprocessing state */ -SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate); - -/** Destroys a denoising state */ -void speex_preprocess_state_destroy(SpeexPreprocessState *st); - -/** Preprocess a frame */ -int speex_preprocess(SpeexPreprocessState *st, short *x, float *noise); - -/** Preprocess a frame */ -void speex_preprocess_estimate_update(SpeexPreprocessState *st, short *x, float *noise); - -/** Used like the ioctl function to control the preprocessor parameters */ -int speex_preprocess_ctl(SpeexPreprocessState *st, int request, void *ptr); - -#define SPEEX_PROB_START 0.35 -#define SPEEX_PROB_CONTINUE 0.1 - -#define SPEEX_PREPROCESS_SET_DENOISE 0 -#define SPEEX_PREPROCESS_GET_DENOISE 1 - -#define SPEEX_PREPROCESS_SET_AGC 2 -#define SPEEX_PREPROCESS_GET_AGC 3 - -#define SPEEX_PREPROCESS_SET_VAD 4 -#define SPEEX_PREPROCESS_GET_VAD 5 - -#define SPEEX_PREPROCESS_SET_AGC_LEVEL 6 -#define SPEEX_PREPROCESS_GET_AGC_LEVEL 7 - -#define SPEEX_PREPROCESS_SET_PROB_START 8 -#define SPEEX_PREPROCESS_GET_PROB_START 9 - -#define SPEEX_PREPROCESS_SET_PROB_CONTINUE 10 -#define SPEEX_PREPROCESS_GET_PROB_CONTINUE 11 - -#ifdef __cplusplus -} -#endif diff --git a/agc_2-X/trunk/app_conference/member.c b/agc_2-X/trunk/app_conference/member.c deleted file mode 100644 index 30f6ccc8..00000000 --- a/agc_2-X/trunk/app_conference/member.c +++ /dev/null @@ -1,1946 +0,0 @@ - -// $Id: member.c,v 1.9-1 2006/06/01 16:10:10 mflorell Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003, 2004 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#include "member.h" -#include "regex.h" - - - -// process an incoming frame. Returns 0 normally, 1 if hangup was received. -static int process_incoming(struct ast_conference *conf, struct ast_conf_member *member, struct ast_frame *f) -{ - - int silent_frame = 0; - - if ( - f->frametype == AST_FRAME_DTMF - && member->send_dtmf - ) - { // send the DTMF event to the MGR interface.. - manager_event( - EVENT_FLAG_CALL, - "ConferenceDTMF", - "Channel: %s\r\n" - "Key: %c\r\n", - member->channel_name, - f->subclass - ) ; - - ast_frfree(f); - f = NULL; - } - else if ( member->type == 'L' ) - { - // this is a listen-only user, ignore the frame - ast_frfree( f ) ; - f = NULL ; - } - else if ( ( f->frametype == AST_FRAME_VOICE ) || (f->frametype == AST_FRAME_DTMF) ) -// else if ( f->frametype == AST_FRAME_VOICE ) - { - // accounting: count the incoming frame - member->frames_in++ ; - - if (f->frametype == AST_FRAME_DTMF) - { - if ( (member->inband_dtmf == -1) || (member->rfc_dtmf == -1) ) - { - char *digit = "X" ; - char *dtmfRFC = "X" ; - int conf_count ; - struct ast_conf_member *membertest; - - if (f->subclass == 35) { digit = "hash" ; dtmfRFC = "#" ; } - if (f->subclass == 42) { digit = "star" ; dtmfRFC = "*" ; } - if (f->subclass == 48) { digit = "0" ; dtmfRFC = "0" ; } - if (f->subclass == 49) { digit = "1" ; dtmfRFC = "1" ; } - if (f->subclass == 50) { digit = "2" ; dtmfRFC = "2" ; } - if (f->subclass == 51) { digit = "3" ; dtmfRFC = "3" ; } - if (f->subclass == 52) { digit = "4" ; dtmfRFC = "4" ; } - if (f->subclass == 53) { digit = "5" ; dtmfRFC = "5" ; } - if (f->subclass == 54) { digit = "6" ; dtmfRFC = "6" ; } - if (f->subclass == 55) { digit = "7" ; dtmfRFC = "7" ; } - if (f->subclass == 56) { digit = "8" ; dtmfRFC = "8" ; } - if (f->subclass == 57) { digit = "9" ; dtmfRFC = "9" ; } - - ast_log( LOG_NOTICE, "DTMF debug frame output to voice %d - %s\n", f->subclass, digit ) ; - - int res = 0 ; - int dtmf_invalid = 0 ; - regex_t re; - - if(regcomp(&re, digit, REG_EXTENDED|REG_NOSUB) != 0) { dtmf_invalid = 0; } - dtmf_invalid = regexec(&re, "0123456789*#abcdABCDstarhash", (size_t)0, NULL, 0); - regfree(&re); - ast_log( LOG_NOTICE, "Regex debug %d - %s - %s\n", dtmf_invalid, member->channel_name, digit) ; - - // play DTMF for other members of the conference - membertest = conf->memberlist ; - conf_count = conf->membercount ; - - // ast_log( LOG_NOTICE, "2 DTMF debug frame output to voice, conf count %d\n", conf_count) ; - - while (membertest != NULL) - { - - if( (!strcmp(membertest->channel_name, member->channel_name)) || ( digit == "X" ) ) - { - ast_log( LOG_ERROR, "skipping playing DTMF tone on %s\n", membertest->channel_name ) ; - } - else - { - - if (member->inband_dtmf == -1) - { - if (!basic_play_sound ( membertest->channel_name, digit )) - { - ast_log( LOG_ERROR, "playing DTMF tone FAILED on %s\n", membertest->channel_name ) ; - } - } - - if (member->rfc_dtmf == -1) - { - ast_log( LOG_NOTICE, "START sending DTMF signal on %s\n", membertest->channel_name ) ; - - if(dtmf_invalid > 0) - { - ast_log(LOG_WARNING, "Illegal DTMF character '%s' in string. (0-9*#aAbBcCdD allowed)\n", digit); - } - else - { - - res = ast_dtmf_stream(membertest->chan,NULL,digit,250); - if (res) - { - ast_log( LOG_NOTICE, "DTMF signal %s on %s sent\n", digit, membertest->channel_name ) ; - } - } - } - } - membertest = membertest->next; - } - } - - - } - - -#ifdef DEBUG_OUTPUT_PCM - // !!! TESTING !!! - if ( member->incoming_fh != NULL ) - { - fwrite( f->data, f->datalen, 1, member->incoming_fh ) ; - fflush( member->incoming_fh ) ; - } -#endif - -#if ( SILDET == 2 ) - // - // make sure we have a valid dsp and frame type - // - if ( - member->dsp != NULL - && f->subclass == AST_FORMAT_SLINEAR - && f->datalen == AST_CONF_FRAME_DATA_SIZE - ) - { - // send the frame to the preprocessor -#ifdef DEBUG_USE_TIMELOG - int spx_ret; - TIMELOG(spx_ret = speex_preprocess( member->dsp, f->data, NULL ), 3, "speex_preprocess"); - if ( spx_ret == 0 ) -#else - if ( speex_preprocess( member->dsp, f->data, NULL ) == 0 ) -#endif - { - // - // we ignore the preprocessor's outcome if we've seen voice frames - // in within the last AST_CONF_SKIP_SPEEX_PREPROCESS frames - // - if ( member->ignore_speex_count > 0 ) - { - // ast_log( AST_CONF_DEBUG, "ignore_speex_count => %d\n", member->ignore_speex_count ) ; - - // skip speex_preprocess(), and decrement counter - --member->ignore_speex_count ; - } - else - { - // set silent_frame flag - silent_frame = 1 ; - } - } - else - { - // voice detected, reset skip count - member->ignore_speex_count = AST_CONF_SKIP_SPEEX_PREPROCESS ; - } - } -#endif - - // used to debug drop off in received frames - // struct timeval tv ; - // gettimeofday( &tv, NULL ) ; - - if ( silent_frame == 1 ) - { - // ignore silent frames - // ast_log( AST_CONF_DEBUG, "RECEIVED SILENT FRAME, channel => %s, frames_in => %ld, s => %ld, ms => %ld\n", - // member->channel_name, member->frames_in, tv.tv_sec, tv.tv_usec ) ; - } - else - { - // queue a non-silent frame for mixing - - // ast_log( AST_CONF_DEBUG, "RECEIVED VOICE FRAME, channel => %s, frames_in => %ld, s => %ld, ms => %ld\n", - // member->channel_name, member->frames_in, tv.tv_sec, tv.tv_usec ) ; - - // acquire member lock - ast_mutex_lock( &member->lock ) ; - - // - // queue up the voice frame so the conference - // thread can mix them before sending - // - - // struct ast_frame* af = ast_frdup( f ) ; - - // if ( queue_incoming_frame( member, af ) != 0 ) - if ( queue_incoming_frame( member, f ) != 0 ) - { - // free the duplicated frame, if we can't queue it - // ast_log( LOG_NOTICE, "dropped incoming frame, channel => %s\n", chan->name ) ; - // ast_frfree( af ) ; - // af = NULL ; - } - else - { - // everything is going ok - } - - // release member mutex - ast_mutex_unlock( &member->lock ) ; - } - - // free the original frame - ast_frfree( f ) ; - f = NULL ; - } - else if ( - f->frametype == AST_FRAME_CONTROL - && f->subclass == AST_CONTROL_HANGUP - ) - { - // hangup received - - // free the frame - ast_frfree( f ) ; - f = NULL ; - - // break out of the while ( 42 == 42 ) - return 1 ; - } - else - { - // undesirables - ast_frfree( f ) ; - f = NULL ; - } - return 0; -} - -// get the next frame from the soundq; must be called with member locked. -static struct ast_frame *get_next_soundframe(struct ast_conf_member *member, struct ast_frame - *exampleframe) { - struct ast_frame *f; - -again: - f=ast_readframe(member->soundq->stream); - - if(!f) { // we're done with this sound; remove it from the queue, and try again - struct ast_conf_soundq *toboot = member->soundq; - - ast_closestream(toboot->stream); - member->soundq = toboot->next; - - //ast_log( LOG_WARNING, "finished playing a sound, next = %x\n", member->soundq); - // notify applications via mgr interface that this sound has been played - manager_event( - EVENT_FLAG_CALL, - "ConferenceSoundComplete", - "Channel: %s\r\n" - "Sound: %s\r\n", - member->channel_name, - toboot->name - ); - - free(toboot); - if(member->soundq) goto again; - - // if we get here, we've gotten to the end of the queue; reset write format - if ( ast_set_write_format( member->chan, member->write_format ) < 0 ) - { - ast_log( LOG_ERROR, "unable to set write format to %d\n", - member->write_format ) ; - } - } else { - // copy delivery from exampleframe - f->delivery = exampleframe->delivery; - } - - return f; -} - -// process outgoing frames for the channel, playing either normal conference audio, -// or requested sounds -static int process_outgoing(struct ast_conf_member *member) -{ - conf_frame* cf ; // frame read from the output queue - struct ast_frame *f; - struct ast_frame *realframe = NULL; - - for(;;) - { - // acquire member mutex and grab a frame. - ast_mutex_lock( &member->lock ) ; - cf = get_outgoing_frame( member ) ; - - // if there's no frames exit the loop. - if(!cf){ - ast_mutex_unlock( &member->lock ) ; - break; - } - - f = cf->fr; - - // if we're playing sounds, we can just replace the frame with the - // next sound frame, and send it instead - if(member->soundq) { - realframe = f; - f = get_next_soundframe(member, f); - if(!f) { // if we didn't get anything, just revert to "normal" - f = realframe; - realframe = NULL; - } - } - - ast_mutex_unlock(&member->lock); - -#ifdef DEBUG_FRAME_TIMESTAMPS - // !!! TESTING !!! - int delivery_diff = usecdiff( &f->delivery, &member->lastsent_timeval ) ; - if ( ( delivery_diff != AST_CONF_FRAME_INTERVAL ) && - ( delivery_diff != 2 * AST_CONF_FRAME_INTERVAL ) && - ( delivery_diff != 3 * AST_CONF_FRAME_INTERVAL ) ) - { - ast_log( AST_CONF_DEBUG, "unanticipated delivery time, delivery_diff => %d, delivery.tv_usec => %ld\n", - delivery_diff, f->delivery.tv_usec ) ; - } - - // !!! TESTING !!! - if ( - f->delivery.tv_sec < member->lastsent_timeval.tv_sec - || ( - f->delivery.tv_sec == member->lastsent_timeval.tv_sec - && f->delivery.tv_usec <= member->lastsent_timeval.tv_usec - ) - ) - { - ast_log( LOG_WARNING, "queued frame timestamped in the past, %ld.%ld <= %ld.%ld\n", - f->delivery.tv_sec, f->delivery.tv_usec, - member->lastsent_timeval.tv_sec, member->lastsent_timeval.tv_usec ) ; - } - member->lastsent_timeval = f->delivery ; -#endif - -//#ifdef DEBUG_USE_TIMELOG -// TIMELOG( ast_write( member->chan, f ), 10, "member: ast_write"); -//#else - // send the voice frame - if ( ast_write( member->chan, f ) == 0 ) - { - // struct timeval tv ; - // gettimeofday( &tv, NULL ) ; - // ast_log( AST_CONF_DEBUG, "SENT VOICE FRAME, channel => %s, frames_out => %ld, s => %ld, ms => %ld\n", - // member->channel_name, member->frames_out, tv.tv_sec, tv.tv_usec ) ; - } - else - { - // log 'dropped' outgoing frame - ast_log( LOG_ERROR, "unable to write voice frame to channel, channel => %s\n", member->channel_name ) ; - - // accounting: count dropped outgoing frames - member->frames_out_dropped++ ; - } -//#endif - - // clean up frame - delete_conf_frame( cf ) ; - } - return 0; -} - -// -// main member thread function -// - -int member_exec( struct ast_channel* chan, void* data ) -{ -// struct timeval start, end ; -// gettimeofday( &start, NULL ) ; - - struct ast_conference *conf ; - struct ast_conf_member *member, *membertest; - - struct ast_frame *f ; // frame received from ast_read() - - int left = 0 ; - int res; - - ast_log( AST_CONF_DEBUG, "[ $Revision: 1.9 $ ] begin processing member thread, channel => %s\n", chan->name ) ; - - // - // If the call has not yet been answered, answer the call - // Note: asterisk apps seem to check _state, but it seems like it's safe - // to just call ast_answer. It will just do nothing if it is up. - // it will also return -1 if the channel is a zombie, or has hung up. - // - - res = ast_answer( chan ) ; - if ( res ) - { - ast_log( LOG_ERROR, "unable to answer call\n" ) ; - return -1 ; - } - - // - // create a new member for the conference - // - -// ast_log( AST_CONF_DEBUG, "creating new member, id => %s, flags => %s, p => %s\n", -// id, flags, priority ) ; - - member = create_member( chan, (const char*)( data ) ) ; // flags, atoi( priority ) ) ; - - // unable to create member, return an error - if ( member == NULL ) - { - ast_log( LOG_ERROR, "unable to create member\n" ) ; - return -1 ; - } - - // - // setup asterisk read/write formats - // - - ast_log( AST_CONF_DEBUG, "CHANNEL INFO, CHANNEL => %s, DNID => %s, CALLER_ID => %s, ANI => %s\n", - chan->name, chan->cid.cid_dnid, chan->cid.cid_num, chan->cid.cid_ani ) ; - - ast_log( AST_CONF_DEBUG, "CHANNEL CODECS, CHANNEL => %s, NATIVE => %d, READ => %d, WRITE => %d\n", - chan->name, chan->nativeformats, member->read_format, member->write_format ) ; - - if ( ast_set_read_format( chan, member->read_format ) < 0 ) - { - ast_log( LOG_ERROR, "unable to set read format to signed linear\n" ) ; - delete_member( member ) ; - return -1 ; - } - - // for right now, we'll send everything as slinear - if ( ast_set_write_format( chan, member->write_format ) < 0 ) // AST_FORMAT_SLINEAR, chan->nativeformats - { - ast_log( LOG_ERROR, "unable to set write format to signed linear\n" ) ; - delete_member( member ) ; - return -1 ; - } - - // - // setup a conference for the new member - // - - conf = start_conference( member ) ; - - if ( conf == NULL ) - { - ast_log( LOG_ERROR, "unable to setup member conference\n" ) ; - delete_member( member) ; - return -1 ; - } - -#ifdef DEBUG_OUTPUT_PCM - // !!! TESTING !!! - char* incoming_fn = malloc( 512 ) ; - snprintf( incoming_fn, 512, "/tmp/ac_%s_%ld.gsm", chan->dnid, fr_base.tv_usec ) ; - - // !!! TESTING !!! - member->incoming_fh = ( member->read_format == 2 ) - ? fopen( member->incoming_fn, "wb" ) - : NULL - ; - - // !!! TESTING !!! - if ( member->incoming_fh == NULL ) - { - ast_log( AST_CONF_DEBUG, "incoming_fh is null, incoming_fn => %s\n", incoming_fn ) ; - } - else - { - ast_log( AST_CONF_DEBUG, "incoming_fh is not null, incoming_fn => %s\n", incoming_fn ) ; - } - - // !!! TESTING !!! - free( incoming_fn ) ; -#endif - - // - // process loop for new member ( this runs in it's own thread - // - - ast_log( AST_CONF_DEBUG, "begin member event loop, channel => %s\n", chan->name ) ; - - // timer timestamps - struct timeval base, curr ; - gettimeofday( &base, NULL ) ; - - - - // tell conference_exec we're ready for frames - member->ready_for_outgoing = 1 ; - - int conf_count = 0 ; - int silent_entry = 0 ; - - // entry message for other members of the conference - membertest = conf->memberlist ; - conf_count = conf->membercount ; - - ast_log( LOG_NOTICE, "Conference Members: %d\n", conf_count ) ; - - if (member->quiet_entry_exit == -1) - { - silent_entry = 1 ; - } - ast_log( LOG_NOTICE, "Quiet debug %d - %d\n", member->quiet_entry_exit, silent_entry ) ; - - while (membertest != NULL) - { - if (silent_entry < 1) - { - if( (!strcmp(membertest->channel_name, member->channel_name)) && (conf_count < 2) ) - { - ast_log( LOG_NOTICE, "skipping entry message on %s\n", membertest->channel_name ) ; - - if (!basic_play_sound ( member->channel_name, "conf-onlyperson" )) - { - ast_log( LOG_ERROR, "playing conference welcome message FAILED\n" ) ; - } - } - else - { - if (!basic_play_sound ( membertest->channel_name, "enter" )) - { - ast_log( LOG_ERROR, "playing conference entry message FAILED on %s\n", membertest->channel_name ) ; - } - } - } - else - { - ast_log( LOG_NOTICE, "skipping all entry messages on %s\n", membertest->channel_name ) ; - } - - membertest = membertest->next; - } - - - - while ( 42 == 42 ) - { - // make sure we have a channel to process - if ( chan == NULL ) - { - ast_log( LOG_NOTICE, "member channel has closed\n" ) ; - break ; - } - - //-----------------// - // INCOMING FRAMES // - //-----------------// - - // wait for an event on this channel - left = ast_waitfor( chan, AST_CONF_WAITFOR_LATENCY ) ; - - // ast_log( AST_CONF_DEBUG, "received event on channel, name => %s, rest => %d\n", chan->name, rest ) ; - - if ( left < 0 ) - { - // an error occured - ast_log( - LOG_NOTICE, - "an error occured waiting for a frame, channel => %s, error => %d\n", - chan->name, left - ) ; - } - else if ( left == 0 ) - { - // no frame has arrived yet - // ast_log( LOG_NOTICE, "no frame available from channel, channel => %s\n", chan->name ) ; - } - else if ( left > 0 ) - { - // a frame has come in before the latency timeout - // was reached, so we process the frame - - f = ast_read( chan ) ; - - if ( f == NULL ) - { - ast_log( LOG_NOTICE, "unable to read from channel, channel => %s\n", chan->name ) ; - break ; - } - - // actually process the frame: break if we got hangup. - if(process_incoming(conf, member, f)) break; - - } - - //-----------------// - // OUTGOING FRAMES // - //-----------------// - - // update the current timestamps - gettimeofday( &curr, NULL ) ; - - process_outgoing(member); - - - // back to process incoming frames - continue ; - } - - ast_log( AST_CONF_DEBUG, "end member event loop, time_entered => %ld\n", member->time_entered.tv_sec ) ; - - // - // clean up - // - -#ifdef DEBUG_OUTPUT_PCM - // !!! TESTING !!! - if ( member->incoming_fh != NULL ) - fclose( member->incoming_fh ) ; -#endif - - if ( member != NULL ) member->remove_flag = 1 ; - -// gettimeofday( &end, NULL ) ; -// int expected_frames = ( int )( floor( (double)( usecdiff( &end, &start ) / AST_CONF_FRAME_INTERVAL ) ) ) ; -// ast_log( AST_CONF_DEBUG, "expected_frames => %d\n", expected_frames ) ; - - return -1 ; -} - -// basic sound playing function -int basic_play_sound ( char *channel, char *file ) -{ -// char *channel, *file; - struct ast_conf_member *play_member; - struct ast_conf_soundq *newsound; - struct ast_conf_soundq **q; - - play_member = find_member(channel, 1); - if(!play_member) { - ast_log( LOG_ERROR, "Member %s not found\n", channel) ; - return 0; - } - - newsound = calloc(1,sizeof(struct ast_conf_soundq)); - newsound->stream = ast_openstream(play_member->chan, file, NULL); - if(!newsound->stream) { - free(newsound); - ast_mutex_unlock(&play_member->lock); - ast_log( LOG_ERROR, "sound file not found\n" ) ; - } - play_member->chan->stream = NULL; - - ast_copy_string(newsound->name, file, sizeof(newsound->name)); - - // append sound to the end of the list. - for(q=&play_member->soundq; *q; q = &((*q)->next)) ;; - - *q = newsound; - - ast_mutex_unlock(&play_member->lock); - - ast_log( LOG_NOTICE, "playing conference message %s\n", file ) ; - return 1; -} - -// -// manange member functions -// - -struct ast_conf_member* create_member( struct ast_channel *chan, const char* data ) -{ - // - // check input - // - - if ( chan == NULL ) - { - ast_log( LOG_ERROR, "unable to create member with null channel\n" ) ; - return NULL ; - } - - if ( chan->name == NULL ) - { - ast_log( LOG_ERROR, "unable to create member with null channel name\n" ) ; - return NULL ; - } - - // - // allocate memory for new conference member - // - - struct ast_conf_member *member = calloc( 1, sizeof( struct ast_conf_member ) ) ; - - if ( member == NULL ) - { - ast_log( LOG_ERROR, "unable to malloc ast_conf_member\n" ) ; - return NULL ; - } - - // initialize mutex - ast_mutex_init( &member->lock ) ; - - // - // initialize member with passed data values - // - - char argstr[80] ; - char *stringp, *token ; - - // copy the passed data - strncpy( argstr, data, sizeof(argstr) - 1 ) ; - - // point to the copied data - stringp = argstr ; - - ast_log( AST_CONF_DEBUG, "attempting to parse passed params, stringp => %s\n", stringp ) ; - - // parse the id - if ( ( token = strsep( &stringp, "|" ) ) != NULL ) - { - member->id = malloc( strlen( token ) + 1 ) ; - strcpy( member->id, token ) ; - } - else - { - ast_log( LOG_ERROR, "unable to parse member id\n" ) ; - free( member ) ; - return NULL ; - } - - // parse the flags - if ( ( token = strsep( &stringp, "|" ) ) != NULL ) - { - member->flags = malloc( strlen( token ) + 1 ) ; - strcpy( member->flags, token ) ; - } - else - { - // make member->flags something - member->flags = malloc( sizeof( char ) ) ; - memset( member->flags, 0x0, sizeof( char ) ) ; - } - - // parse the priority - member->priority = ( token = strsep( &stringp, "|" ) ) != NULL - ? atoi( token ) - : 0 - ; - - // parse the vad_prob_start - member->vad_prob_start = ( token = strsep( &stringp, "|" ) ) != NULL - ? atof( token ) - : AST_CONF_PROB_START - ; - - // parse the vad_prob_continue - member->vad_prob_continue = ( token = strsep( &stringp, "|" ) ) != NULL - ? atof( token ) - : AST_CONF_PROB_CONTINUE - ; - - // parse the expected frame size, in samples. ?? - - - // debugging - ast_log( - AST_CONF_DEBUG, - "parsed data params, id => %s, flags => %s, priority => %d, vad_prob_start => %f, vad_prob_continue => %f\n", - member->id, member->flags, member->priority, member->vad_prob_start, member->vad_prob_continue - ) ; - - // - // initialize member with default values - // - - // keep pointer to member's channel - member->chan = chan ; - - // copy the channel name - member->channel_name = malloc( strlen( chan->name ) + 1 ) ; - strcpy( member->channel_name, chan->name ) ; - - // ( default can be overridden by passed flags ) -// member->type = 'L' ; - member->type = 'S' ; - - // ready flag - member->ready_for_outgoing = 0 ; - - // incoming frame queue - member->inFrames = NULL ; - member->inFramesTail = NULL ; - member->inFramesCount = 0 ; - - // last frame caching - member->inFramesRepeatLast = 0 ; - member->inFramesLast = NULL ; - member->okayToCacheLast = 0 ; - - // outgoing frame queue - member->outFrames = NULL ; - member->outFramesTail = NULL ; - member->outFramesCount = 0 ; - - member->outPacker = NULL; - - // ( not currently used ) - // member->samplesperframe = AST_CONF_BLOCK_SAMPLES ; - - // used for determining need to mix frames - // and for management interface notification - member->speaking_state_prev = 0 ; - member->speaking_state_notify = 0 ; - member->speaking_state = 0 ; - - // linked-list pointer - member->next = NULL ; - - // account data - member->frames_in = 0 ; - member->frames_in_dropped = 0 ; - member->frames_out = 0 ; - member->frames_out_dropped = 0 ; - - // for counting sequentially dropped frames - member->sequential_drops = 0 ; - member->since_dropped = 0 ; - - // flags - member->remove_flag = 0 ; - - // record start time - gettimeofday( &member->time_entered, NULL ) ; - - // init dropped frame timestamps - gettimeofday( &member->last_in_dropped, NULL ) ; - gettimeofday( &member->last_out_dropped, NULL ) ; - - // - // parse passed flags - // - - // silence detection flags w/ defaults - int vad_flag = 0 ; - int denoise_flag = 0 ; - int agc_flag = 0 ; - - // is this member using the telephone? - int via_telephone = 0 ; - - // temp pointer to flags string - // char* flags = member->flags ; - char* flags = member->flags ; - int i; - for ( i = 0 ; i < strlen( flags ) ; ++i ) - { - // allowed flags are M, L, S, V, D, A - switch ( flags[i] ) - { - // call via telephone - case 'T': - via_telephone = 1 ; - break ; - - // member types ( last flag wins ) - case 'M': - member->type = 'M' ; - break ; - case 'L': - member->type = 'L' ; - break ; - case 'S': - member->type = 'S' ; - break ; - - // speex preprocessing options - case 'V': - vad_flag = 1 ; - break ; - case 'D': - denoise_flag = 1 ; - break ; - case 'A': - agc_flag = 1 ; - break ; - - // additional features - case 'd': // Send DTMF manager events.. - member->send_dtmf = 1; - break; - case 'q': // Quiet entry and exit from conference - member->quiet_entry_exit = 1; - break; - case 'i': // use Inband DTMF broadcast - member->inband_dtmf = 1; - break; - case 't': // use RFC DTMF broadcast - member->rfc_dtmf = 1; - break; - - default: - ast_log( LOG_WARNING, "received invalid flag, chan => %s, flag => %c\n", - chan->name, flags[i] ) ; - break ; - } - } - - // set the dsp to null so silence detection is disabled by default - member->dsp = NULL ; - -#if ( SILDET == 2 ) - // - // configure silence detection and preprocessing - // if the user is coming in via the telephone, - // and is not listen-only - // - if ( - via_telephone == 1 - && member->type != 'L' - ) - { - // create a speex preprocessor - member->dsp = speex_preprocess_state_init( AST_CONF_BLOCK_SAMPLES, AST_CONF_SAMPLE_RATE ) ; - - if ( member->dsp == NULL ) - { - ast_log( LOG_WARNING, "unable to initialize member dsp, channel => %s\n", chan->name ) ; - } - else - { - ast_log( LOG_NOTICE, "member dsp initialized, channel => %s, v => %d, d => %d, a => %d\n", - chan->name, vad_flag, denoise_flag, agc_flag ) ; - - // set speex preprocessor options - speex_preprocess_ctl( member->dsp, SPEEX_PREPROCESS_SET_VAD, &vad_flag ) ; - speex_preprocess_ctl( member->dsp, SPEEX_PREPROCESS_SET_DENOISE, &denoise_flag ) ; - speex_preprocess_ctl( member->dsp, SPEEX_PREPROCESS_SET_AGC, &agc_flag ) ; - - speex_preprocess_ctl( member->dsp, SPEEX_PREPROCESS_SET_PROB_START, &member->vad_prob_start ) ; - speex_preprocess_ctl( member->dsp, SPEEX_PREPROCESS_SET_PROB_CONTINUE, &member->vad_prob_continue ) ; - - ast_log( AST_CONF_DEBUG, "speech_prob_start => %f, speech_prob_continue => %f\n", - member->dsp->speech_prob_start, member->dsp->speech_prob_continue ) ; - } - } -#endif - - // - // set connection type - // - - if ( via_telephone == 1 ) - { - member->connection_type = 'T' ; - } - else if ( strncmp( member->channel_name, "SIP", 3 ) == 0 ) - { - member->connection_type = 'S' ; - } - else // default to iax - { - member->connection_type = 'X' ; - } - - // - // read, write, and translation options - // - - // set member's audio formats, taking dsp preprocessing into account - // ( chan->nativeformats, AST_FORMAT_SLINEAR, AST_FORMAT_ULAW, AST_FORMAT_GSM ) - member->read_format = ( member->dsp == NULL ) ? chan->nativeformats : AST_FORMAT_SLINEAR ; - member->write_format = chan->nativeformats ; - - // translation paths ( ast_translator_build_path() returns null if formats match ) - member->to_slinear = ast_translator_build_path( AST_FORMAT_SLINEAR, member->read_format ) ; - member->from_slinear = ast_translator_build_path( member->write_format, AST_FORMAT_SLINEAR ) ; - - //ast_log( AST_CONF_DEBUG, "AST_FORMAT_SLINEAR => %d\n", AST_FORMAT_SLINEAR ) ; - - // index for converted_frames array - { - int format, index; - index=-1; - format = member->write_format; - while( format > 0){ - index++; - format = format >> 1; - } - member->write_format_index= index; - //ast_log( AST_CONF_DEBUG, "converted write_format [%d] to index[%d]\n", member->write_format, index ); - - index=-1; - format = member->read_format; - while( format > 0){ - index++; - format = format >> 1; - } - member->read_format_index=index; - //ast_log( AST_CONF_DEBUG, "converted read_format [%d] to index[%d]\n", member->read_format, index ); - } - - // smoother defaults. - member->smooth_multiple =1; - member->smooth_size_in = -1; - member->smooth_size_out = -1; - member->inSmoother= NULL; - member->outPacker= NULL; - - switch (member->read_format){ - /* these assumptions may be incorrect */ - case AST_FORMAT_ULAW: - case AST_FORMAT_ALAW: - /* - member->smooth_size_in = 160; //bytes - member->smooth_size_out = 160; //samples - */ - break; - case AST_FORMAT_GSM: - /* - member->smooth_size_in = 33; //bytes - member->smooth_size_out = 160;//samples - */ - break; - case AST_FORMAT_SPEEX: - /* this assumptions are wrong - member->smooth_multiple = 2 ; // for testing, force to dual frame - member->smooth_size_in = 39; // bytes - member->smooth_size_out = 160; // samples - */ - break; - case AST_FORMAT_SLINEAR: - /* - member->smooth_size_in = 320; //bytes - member->smooth_size_out = 160; //samples - */ - break; - default: - member->inSmoother = NULL; //don't use smoother for this type. - //ast_log( AST_CONF_DEBUG, "smoother is NULL for member->read_format => %d\n", member->read_format); - } - if (member->smooth_size_in > 0){ - member->inSmoother = ast_smoother_new(member->smooth_size_in); - //ast_log( AST_CONF_DEBUG, "created smoother(%d) for %d\n", member->smooth_size_in , member->read_format); - } - - - // - // finish up - // - - ast_log( AST_CONF_DEBUG, "created member, type => %c, priority => %d, readformat => %d\n", - member->type, member->priority, chan->readformat ) ; - - return member ; -} - -struct ast_conf_member* delete_member( struct ast_conf_member* member ) -{ - // !!! NO RETURN TEST !!! - // do { sleep(1) ; } while (1) ; - - // !!! CRASH TEST !!! - // *((int *)0) = 0; - - if ( member == NULL ) - { - ast_log( LOG_WARNING, "unable to the delete null member\n" ) ; - return NULL ; - } - - // - // clean up member flags - // - - if ( member->flags != NULL ) - { - // !!! DEBUGING !!! - ast_log( AST_CONF_DEBUG, "freeing member flags, name => %s\n", - member->channel_name ) ; - free( member->flags ) ; - } - - // - // delete the members frames - // - - conf_frame* cf ; - - // !!! DEBUGING !!! - ast_log( AST_CONF_DEBUG, "deleting member input frames, name => %s\n", - member->channel_name ) ; - - // incoming frames - cf = member->inFrames ; - - while ( cf != NULL ) - { - cf = delete_conf_frame( cf ) ; - } - if (member->inSmoother != NULL) - ast_smoother_free(member->inSmoother); - - // !!! DEBUGING !!! - ast_log( AST_CONF_DEBUG, "deleting member output frames, name => %s\n", - member->channel_name ) ; - - // outgoing frames - cf = member->outFrames ; - - while ( cf != NULL ) - { - cf = delete_conf_frame( cf ) ; - } - - if (member->outPacker != NULL) - ast_packer_free(member->outPacker); - - -#if ( SILDET == 2 ) - if ( member->dsp != NULL ) - { - // !!! DEBUGING !!! - ast_log( AST_CONF_DEBUG, "destroying member preprocessor, name => %s\n", - member->channel_name ) ; - speex_preprocess_state_destroy( member->dsp ) ; - } -#endif - - // !!! DEBUGING !!! - ast_log( AST_CONF_DEBUG, "freeing member translator paths, name => %s\n", - member->channel_name ) ; - - // free the mixing translators - ast_translator_free_path( member->to_slinear ) ; - ast_translator_free_path( member->from_slinear ) ; - - // get a pointer to the next - // member so we can return it - struct ast_conf_member* nm = member->next ; - - // !!! DEBUGING !!! - ast_log( AST_CONF_DEBUG, "freeing member channel name, name => %s\n", - member->channel_name ) ; - - // free the member's copy for the channel name - free( member->channel_name ) ; - - // !!! DEBUGING !!! - ast_log( AST_CONF_DEBUG, "freeing member\n" ) ; - - // free the member's memory - free( member ) ; - member = NULL ; - - return nm ; -} - -// -// incoming frame functions -// - -conf_frame* get_incoming_frame( struct ast_conf_member *member ) -{ - // - // sanity checks - // - - if ( member == NULL ) - { - ast_log( LOG_WARNING, "unable to get frame from null member\n" ) ; - return NULL ; - } - - // - // repeat last frame a couple times to smooth transition - // - -#ifdef AST_CONF_CACHE_LAST_FRAME - if ( member->inFramesCount == 0 ) - { - // nothing to do if there's no cached frame - if ( member->inFramesLast == NULL ) - return NULL ; - - // turn off 'okay to cache' flag - member->okayToCacheLast = 0 ; - - if ( member->inFramesRepeatLast >= AST_CONF_CACHE_LAST_FRAME ) - { - // already used this frame AST_CONF_CACHE_LAST_FRAME times - - // reset repeat count - member->inFramesRepeatLast = 0 ; - - // clear the cached frame - delete_conf_frame( member->inFramesLast ) ; - member->inFramesLast = NULL ; - - // return null - return NULL ; - } - else - { - ast_log( AST_CONF_DEBUG, "repeating cached frame, channel => %s, inFramesRepeatLast => %d\n", - member->channel_name, member->inFramesRepeatLast ) ; - - // increment counter - member->inFramesRepeatLast++ ; - - // return a copy of the cached frame - return copy_conf_frame( member->inFramesLast ) ; - } - } - else if ( member->okayToCacheLast == 0 && member->inFramesCount >= 3 ) - { - ast_log( AST_CONF_DEBUG, "enabling cached frame, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount ) ; - - // turn on 'okay to cache' flag - member->okayToCacheLast = 1 ; - } -#else - if ( member->inFramesCount == 0 ) - return NULL ; -#endif // AST_CONF_CACHE_LAST_FRAME - - // - // return the next frame in the queue - // - - conf_frame* cfr = NULL ; - - // get first frame in line - cfr = member->inFramesTail ; - - // if it's the only frame, reset the queue, - // else, move the second frame to the front - if ( member->inFramesTail == member->inFrames ) - { - member->inFramesTail = NULL ; - member->inFrames = NULL ; - } - else - { - // move the pointer to the next frame - member->inFramesTail = member->inFramesTail->prev ; - - // reset it's 'next' pointer - if ( member->inFramesTail != NULL ) - member->inFramesTail->next = NULL ; - } - - // separate the conf frame from the list - cfr->next = NULL ; - cfr->prev = NULL ; - - // decriment frame count - member->inFramesCount-- ; - -#ifdef AST_CONF_CACHE_LAST_FRAME - // copy frame if queue is now empty - if ( - member->inFramesCount == 0 - && member->okayToCacheLast == 1 - ) - { - // reset repeat count - member->inFramesRepeatLast = 0 ; - - // clear cached frame - if ( member->inFramesLast != NULL ) - { - delete_conf_frame( member->inFramesLast ) ; - member->inFramesLast = NULL ; - } - - // cache new frame - member->inFramesLast = copy_conf_frame( cfr ) ; - } -#endif // AST_CONF_CACHE_LAST_FRAME - - return cfr ; -} - -int queue_incoming_frame( struct ast_conf_member* member, struct ast_frame* fr ) -{ - // - // sanity checks - // - - // check on frame - if ( fr == NULL ) - { - ast_log( LOG_ERROR, "unable to queue null frame\n" ) ; - return -1 ; - } - - // check on member - if ( member == NULL ) - { - ast_log( LOG_ERROR, "unable to queue frame for null member\n" ) ; - return -1 ; - } - - // - // drop a frame if we've filled half the buffer - // ( no more than once per AST_CONF_QUEUE_DROP_TIME_LIMIT ms ) - // - - - /* -ast_log( - AST_CONF_DEBUG, - "queue frame on channel => %s, fr->subclass => %d, fr->datalen => %d, fr->samples => %d\n", - member->channel_name, fr->subclass, fr->datalen, fr->samples -) ; -*/ - - - if ( member->inFramesCount > member->inFramesNeeded ) - { - if ( member->inFramesCount > AST_CONF_QUEUE_DROP_THRESHOLD ) - { - struct timeval curr ; - gettimeofday( &curr, NULL ) ; - - // time since last dropped frame - long diff = usecdiff( &curr, &member->last_in_dropped ) ; - - // number of milliseconds which must pass between frame drops - // ( 15 frames => -100ms, 10 frames => 400ms, 5 frames => 900ms, 0 frames => 1400ms, etc. ) - long time_limit = 1000 - ( ( member->inFramesCount - AST_CONF_QUEUE_DROP_THRESHOLD ) * 100 ) ; - - if ( diff >= time_limit ) - { - // count sequential drops - member->sequential_drops++ ; - - // ast_log( - // AST_CONF_DEBUG, - // "dropping frame from input buffer, channel => %s, incoming => %d, outgoing => %d\n", - // member->channel_name, member->inFramesCount, member->outFramesCount - // ) ; - - // accounting: count dropped incoming frames - member->frames_in_dropped++ ; - - // reset frames since dropped - member->since_dropped = 0 ; - - // delete the frame - delete_conf_frame( get_incoming_frame( member ) ) ; - - gettimeofday( &member->last_in_dropped, NULL ) ; - } - else - { -/* - ast_log( - AST_CONF_DEBUG, - "input buffer larger than drop threshold, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount - ) ; -*/ - } - } - } - - // - // if we have to drop frames, we'll drop new frames - // because it's easier ( and doesn't matter much anyway ). - // - - if ( member->inFramesCount >= AST_CONF_MAX_QUEUE ) - { - // count sequential drops - member->sequential_drops++ ; - - ast_log( - AST_CONF_DEBUG, - "unable to queue incoming frame, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount - ) ; - - // accounting: count dropped incoming frames - member->frames_in_dropped++ ; - - // reset frames since dropped - member->since_dropped = 0 ; - - return -1 ; - } - - // reset sequential drops - member->sequential_drops = 0 ; - - // increment frames since dropped - member->since_dropped++ ; - - // - // create new conf frame from passed data frame - // - - // ( member->inFrames may be null at this point ) - if (member->inSmoother == NULL ){ - conf_frame* cfr = create_conf_frame( member, member->inFrames, fr ) ; - if ( cfr == NULL ) - { - ast_log( LOG_ERROR, "unable to malloc conf_frame\n" ) ; - return -1 ; - } - - // - // add new frame to speaking members incoming frame queue - // ( i.e. save this frame data, so we can distribute it in conference_exec later ) - // - - if ( member->inFrames == NULL ) { - member->inFramesTail = cfr ; - } - member->inFrames = cfr ; - member->inFramesCount++ ; - } else { - //feed frame(fr) into the smoother - - // smoother tmp frame - struct ast_frame *sfr; - int multiple = 1; - int i=0; - - if ( (member->smooth_size_in > 0 ) && (member->smooth_size_in * member->smooth_multiple != fr->datalen) ) - { - //ast_log(AST_CONF_DEBUG,"resetting smooth_size_in. old size=> %d, multiple =>%d, datalen=> %d\n", member->smooth_size_in, member->smooth_multiple, fr->datalen ); - if ( fr->datalen % member->smooth_multiple != 0) { - // if datalen not divisible by smooth_multiple, assume we're just getting normal encoding. - // ast_log(AST_CONF_DEBUG,"smooth_multiple does not divide datalen. changing smooth size from %d to %d, multiple => 1\n", member->smooth_size_in, fr->datalen); - member->smooth_size_in = fr->datalen; - member->smooth_multiple = 1; - } else { - // assume a fixed multiple, so divide into datalen. - int newsmooth = fr->datalen / member->smooth_multiple ; - // ast_log(AST_CONF_DEBUG,"datalen is divisible by smooth_multiple, changing smooth size from %d to %d\n", member->smooth_size_in, newsmooth); - member->smooth_size_in = newsmooth; - } - - //free input smoother. - if (member->inSmoother != NULL) - ast_smoother_free(member->inSmoother); - - //make new input smoother. - member->inSmoother = ast_smoother_new(member->smooth_size_in); - } - - ast_smoother_feed( member->inSmoother, fr ); -//ast_log (AST_CONF_DEBUG, "SMOOTH:Feeding frame into inSmoother, timestamp => %ld.%ld\n", fr->delivery.tv_sec, fr->delivery.tv_usec); - - if ( multiple > 1 ) - fr->samples /= multiple; - - // read smoothed version of frames, add to queue - while( ( sfr = ast_smoother_read( member->inSmoother ) ) ){ - - ++i; -//ast_log( AST_CONF_DEBUG , "\treading new frame [%d] from smoother, inFramesCount[%d], \n\tsfr->frametype -> %d , sfr->subclass -> %d , sfr->datalen => %d sfr->samples => %d\n", i , member->inFramesCount , sfr->frametype, sfr->subclass, sfr->datalen, sfr->samples); -//ast_log (AST_CONF_DEBUG, "SMOOTH:Reading frame from inSmoother, i=>%d, timestamp => %ld.%ld\n",i, sfr->delivery.tv_sec, sfr->delivery.tv_usec); - conf_frame* cfr = create_conf_frame( member, member->inFrames, sfr ) ; - if ( cfr == NULL ) - { - ast_log( LOG_ERROR, "unable to malloc conf_frame\n" ) ; - return -1 ; - } - - // - // add new frame to speaking members incoming frame queue - // ( i.e. save this frame data, so we can distribute it in conference_exec later ) - // - - if ( member->inFrames == NULL ) { - member->inFramesTail = cfr ; - } - member->inFrames = cfr ; - member->inFramesCount++ ; - } - } - - return 0 ; -} - -// -// outgoing frame functions -// - -conf_frame* get_outgoing_frame( struct ast_conf_member *member ) -{ - if ( member == NULL ) - { - ast_log( LOG_WARNING, "unable to get frame from null member\n" ) ; - return NULL ; - } - - conf_frame* cfr ; - - // ast_log( AST_CONF_DEBUG, "getting member frames, count => %d\n", member->outFramesCount ) ; - - if ( member->outFramesCount > AST_CONF_MIN_QUEUE ) - { - cfr = member->outFramesTail ; - - // if it's the only frame, reset the queu, - // else, move the second frame to the front - if ( member->outFramesTail == member->outFrames ) - { - member->outFrames = NULL ; - member->outFramesTail = NULL ; - } - else - { - // move the pointer to the next frame - member->outFramesTail = member->outFramesTail->prev ; - - // reset it's 'next' pointer - if ( member->outFramesTail != NULL ) - member->outFramesTail->next = NULL ; - } - - // separate the conf frame from the list - cfr->next = NULL ; - cfr->prev = NULL ; - - // decriment frame count - member->outFramesCount-- ; - - return cfr ; - } - - return NULL ; -} - -int __queue_outgoing_frame( struct ast_conf_member* member, const struct ast_frame* fr, struct timeval delivery ) -{ - // accounting: count the number of outgoing frames for this member - member->frames_out++ ; - -/* - // - // drop a frame if we've filled half the buffer - // - - if ( member->outFramesCount > AST_CONF_QUEUE_DROP_THRESHOLD ) - { - struct timeval curr ; - gettimeofday( &curr, NULL ) ; - - long diff = usecdiff( &curr, &member->last_out_dropped ) ; - - if ( diff >= AST_CONF_QUEUE_DROP_TIME_LIMIT ) - { - ast_log( - AST_CONF_DEBUG, - "dropping frame from output buffer, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount - ) ; - - // accounting: count dropped outgoing frames - member->frames_out_dropped++ ; - - // delete the frame - delete_conf_frame( get_outgoing_frame( member ) ) ; - - gettimeofday( &member->last_out_dropped, NULL ) ; - } - } -*/ - - // - // we have to drop frames, so we'll drop new frames - // because it's easier ( and doesn't matter much anyway ). - // - if ( member->outFramesCount >= AST_CONF_MAX_QUEUE ) - { - ast_log( - AST_CONF_DEBUG, - "unable to queue outgoing frame, channel => %s, incoming => %d, outgoing => %d\n", - member->channel_name, member->inFramesCount, member->outFramesCount - ) ; - - // accounting: count dropped outgoing frames - member->frames_out_dropped++ ; - - return -1 ; - } - - // - // create new conf frame from passed data frame - // - - conf_frame* cfr = create_conf_frame( member, member->outFrames, fr ) ; - - if ( cfr == NULL ) - { - ast_log( LOG_ERROR, "unable to create new conf frame\n" ) ; - - // accounting: count dropped outgoing frames - member->frames_out_dropped++ ; - - return -1 ; - } - - // set delivery timestamp - cfr->fr->delivery = delivery ; - - // - // add new frame to speaking members incoming frame queue - // ( i.e. save this frame data, so we can distribute it in conference_exec later ) - // - - if ( member->outFrames == NULL ) { - member->outFramesTail = cfr ; - } - member->outFrames = cfr ; - member->outFramesCount++ ; - - // return success - return 0 ; -} - -int queue_outgoing_frame( struct ast_conf_member* member, const struct ast_frame* fr, struct timeval delivery ) -{ - // check on frame - if ( fr == NULL ) - { - ast_log( LOG_ERROR, "unable to queue null frame\n" ) ; - return -1 ; - } - - // check on member - if ( member == NULL ) - { - ast_log( LOG_ERROR, "unable to queue frame for null member\n" ) ; - return -1 ; - } - - - if ( ( member->outPacker == NULL ) && ( member->smooth_multiple > 1 ) && ( member->smooth_size_out > 0 ) ){ - //ast_log (AST_CONF_DEBUG, "creating outPacker with size => %d \n\t( multiple => %d ) * ( size => %d )\n", member->smooth_multiple * member-> smooth_size_out, member->smooth_multiple , member->smooth_size_out); - member->outPacker = ast_packer_new( member->smooth_multiple * member->smooth_size_out); - } - - if (member->outPacker == NULL ){ - return __queue_outgoing_frame( member, fr, delivery ) ; - } - else - { - struct ast_frame *sfr; - int exitval = 0; -//ast_log (AST_CONF_DEBUG, "sending fr into outPacker, datalen=>%d, samples=>%d\n",fr->datalen, fr->samples); - ast_packer_feed( member->outPacker , fr ); - while( (sfr = ast_packer_read( member->outPacker ) ) ) - { -//ast_log (AST_CONF_DEBUG, "read sfr from outPacker, datalen=>%d, samples=>%d\n",sfr->datalen, sfr->samples); - if ( __queue_outgoing_frame( member, sfr, delivery ) == -1 ) { - exitval = -1; - } - } - return exitval; - } -} - -// -// manager functions -// - -void send_state_change_notifications( struct ast_conf_member* member ) -{ - // ast_log( AST_CONF_DEBUG, "sending state change notification\n" ) ; - - // loop through list of members, sending state changes - while ( member != NULL ) - { - // has the state changed since last time through this loop? - if ( member->speaking_state_notify != member->speaking_state_prev ) - { - manager_event( - EVENT_FLAG_CALL, - "ConferenceState", - "Channel: %s\r\n" - "State: %s\r\n", - member->channel_name, - ( ( member->speaking_state_notify == 1 ) ? "speaking" : "silent" ) - ) ; -#if 0 - ast_log( AST_CONF_DEBUG, "member state changed, channel => %s, state => %d, incoming => %d, outgoing => %d\n", - member->channel_name, member->speaking_state_notify, member->inFramesCount, member->outFramesCount ) ; -#endif - - // remember current state - member->speaking_state_prev = member->speaking_state_notify ; - - // we do not reset the speaking_state_notify flag here - } - - // reset notification flag so that - member->speaking_state_notify = 0 ; - - // move the pointer to the next member - member = member->next ; - } - - return ; -} - -// -// meta-info accessors functions -// - -short memberIsPhoneClient( struct ast_conf_member* member ) -{ - if ( member == NULL ) - return 0 ; - - return ( member->connection_type == 'T' ) ? 1 : 0 ; -} - -short memberIsIaxClient( struct ast_conf_member* member ) -{ - if ( member == NULL ) - return 0 ; - - return ( member->connection_type == 'X' ) ? 1 : 0 ; -} - -short memberIsSIPClient( struct ast_conf_member* member ) -{ - if ( member == NULL ) - return 0 ; - - return ( member->connection_type == 'S' ) ? 1 : 0 ; -} - -short memberIsModerator( struct ast_conf_member* member ) -{ - if ( member == NULL ) - return 0 ; - - return ( member->type == 'M' ) ? 1 : 0 ; -} - -short memberIsListener( struct ast_conf_member* member ) -{ - if ( member == NULL ) - return 0 ; - - return ( member->type == 'L' ) ? 1 : 0 ; -} - - -// -// ast_packer, adapted from ast_smoother -// pack multiple frames together into one packet on the wire. -// - -#define PACKER_SIZE 8000 -#define PACKER_QUEUE 10 // store at most 10 complete packets in the queue - -struct ast_packer { - int framesize; // number of frames per packet on the wire. - int size; - int packet_index; - int format; - int readdata; - int optimizablestream; - int flags; - float samplesperbyte; - struct ast_frame f; - struct timeval delivery; - char data[PACKER_SIZE]; - char framedata[PACKER_SIZE + AST_FRIENDLY_OFFSET]; - int samples; - int sample_queue[PACKER_QUEUE]; - int len_queue[PACKER_QUEUE]; - struct ast_frame *opt; - int len; -}; - -void ast_packer_reset(struct ast_packer *s, int framesize) -{ - memset(s, 0, sizeof(struct ast_packer)); - s->framesize = framesize; - s->packet_index=0; - s->len=0; -} - -struct ast_packer *ast_packer_new(int framesize) -{ - struct ast_packer *s; - if (framesize < 1) - return NULL; - s = malloc(sizeof(struct ast_packer)); - if (s) - ast_packer_reset(s, framesize); - return s; -} - -int ast_packer_get_flags(struct ast_packer *s) -{ - return s->flags; -} - -void ast_packer_set_flags(struct ast_packer *s, int flags) -{ - s->flags = flags; -} - -int ast_packer_feed(struct ast_packer *s, const struct ast_frame *f) -{ - if (f->frametype != AST_FRAME_VOICE) { - ast_log(LOG_WARNING, "Huh? Can't pack a non-voice frame!\n"); - return -1; - } - if (!s->format) { - s->format = f->subclass; - s->samples=0; - } else if (s->format != f->subclass) { - ast_log(LOG_WARNING, "Packer was working on %d format frames, now trying to feed %d?\n", s->format, f->subclass); - return -1; - } - if (s->len + f->datalen > PACKER_SIZE) { - ast_log(LOG_WARNING, "Out of packer space\n"); - return -1; - } - if (s->packet_index >= PACKER_QUEUE ){ - ast_log(LOG_WARNING, "Out of packer queue space\n"); - return -1; - } - - memcpy(s->data + s->len, f->data, f->datalen); - /* If either side is empty, reset the delivery time */ - if (!s->len || (!f->delivery.tv_sec && !f->delivery.tv_usec) || - (!s->delivery.tv_sec && !s->delivery.tv_usec)) - s->delivery = f->delivery; - s->len += f->datalen; -//packer stuff - s->len_queue[s->packet_index] += f->datalen; - s->sample_queue[s->packet_index] += f->samples; - s->samples += f->samples; - - if (s->samples > s->framesize ) - ++s->packet_index; - - return 0; -} - -struct ast_frame *ast_packer_read(struct ast_packer *s) -{ - struct ast_frame *opt; - int len; - /* IF we have an optimization frame, send it */ - if (s->opt) { - opt = s->opt; - s->opt = NULL; - return opt; - } - - /* Make sure we have enough data */ - if (s->samples < s->framesize ){ - return NULL; - } - len = s->len_queue[0]; - if (len > s->len) - len = s->len; - /* Make frame */ - s->f.frametype = AST_FRAME_VOICE; - s->f.subclass = s->format; - s->f.data = s->framedata + AST_FRIENDLY_OFFSET; - s->f.offset = AST_FRIENDLY_OFFSET; - s->f.datalen = len; - s->f.samples = s->sample_queue[0]; - s->f.delivery = s->delivery; - /* Fill Data */ - memcpy(s->f.data, s->data, len); - s->len -= len; - /* Move remaining data to the front if applicable */ - if (s->len) { - /* In principle this should all be fine because if we are sending - G.729 VAD, the next timestamp will take over anyawy */ - memmove(s->data, s->data + len, s->len); - if (s->delivery.tv_sec || s->delivery.tv_usec) { - /* If we have delivery time, increment it, otherwise, leave it at 0 */ - s->delivery.tv_sec += s->sample_queue[0] / 8000.0; - s->delivery.tv_usec += (((int)(s->sample_queue[0])) % 8000) * 125; - if (s->delivery.tv_usec > 1000000) { - s->delivery.tv_usec -= 1000000; - s->delivery.tv_sec += 1; - } - } - } - int j; - s->samples -= s->sample_queue[0]; - if( s->packet_index > 0 ){ - for (j=0; jpacket_index -1 ; j++){ - s->len_queue[j]=s->len_queue[j+1]; - s->sample_queue[j]=s->sample_queue[j+1]; - } - s->len_queue[s->packet_index]=0; - s->sample_queue[s->packet_index]=0; - s->packet_index--; - } else { - s->len_queue[0]=0; - s->sample_queue[0]=0; - } - - - /* Return frame */ - return &s->f; -} - -void ast_packer_free(struct ast_packer *s) -{ - free(s); -} diff --git a/agc_2-X/trunk/app_conference/member.h b/agc_2-X/trunk/app_conference/member.h deleted file mode 100644 index 3a1fa4bf..00000000 --- a/agc_2-X/trunk/app_conference/member.h +++ /dev/null @@ -1,212 +0,0 @@ - -// $Id: member.h,v 1.7 2005/11/02 22:42:42 stevek Exp $ - -/* - * app_conference - * - * A channel independent conference application for Asterisk - * - * Copyright (C) 2002, 2003 Junghanns.NET GmbH - * Copyright (C) 2003-2005 HorizonLive.com, Inc. - * - * Klaus-Peter Junghanns - * Steve Kann - * - * This program may be modified and distributed under the - * terms of the GNU Public License. - * - */ - -#ifndef _APP_CONF_MEMBER_H -#define _APP_CONF_MEMBER_H - -// -// includes -// - -#include "app_conference.h" -#include "common.h" -#include "asterisk/app.h" - - -// -// struct declarations -// - -struct ast_conf_soundq -{ - char name[256]; - struct ast_filestream *stream; // the stream - int muted; // should incoming audio be muted while we play? - struct ast_conf_soundq *next; -}; - -struct ast_conf_member -{ - ast_mutex_t lock ; // member data mutex - - struct ast_channel* chan ; // member's channel - char* channel_name ; // member's channel name - - // values passed to create_member () via *data - int priority ; // highest priority gets the channel - char* flags ; // raw member-type flags - char type ; // L = ListenOnly, M = Moderator, S = Standard (Listen/Talk) - char* id ; // member id - - // determine by flags and channel name - char connection_type ; // T = telephone, X = iaxclient, S = sip - - // vad voice probability thresholds - float vad_prob_start ; - float vad_prob_continue ; - - // ready flag - short ready_for_outgoing ; - - // input frame queue - conf_frame* inFrames ; - conf_frame* inFramesTail ; - unsigned int inFramesCount ; - - // input/output smoother - struct ast_smoother *inSmoother; - struct ast_packer *outPacker; - int smooth_size_in; - int smooth_size_out; - int smooth_multiple; - - // frames needed by conference_exec - unsigned int inFramesNeeded ; - - // used when caching last frame - conf_frame* inFramesLast ; - unsigned int inFramesRepeatLast ; - unsigned short okayToCacheLast ; - - // output frame queue - conf_frame* outFrames ; - conf_frame* outFramesTail ; - unsigned int outFramesCount ; - - // time we last dropped a frame - struct timeval last_in_dropped ; - struct timeval last_out_dropped ; - - // ( not currently used ) - // int samplesperframe ; - - // used for determining need to mix frames - // and for management interface notification - short speaking_state_prev ; - short speaking_state_notify ; - short speaking_state ; - - // pointer to next member in single-linked list - struct ast_conf_member* next ; - - // accounting values - unsigned long frames_in ; - unsigned long frames_in_dropped ; - unsigned long frames_out ; - unsigned long frames_out_dropped ; - - // for counting sequentially dropped frames - unsigned int sequential_drops ; - unsigned long since_dropped ; - - // start time - struct timeval time_entered ; - struct timeval lastsent_timeval ; - - // flag indicating we should remove this member - short remove_flag ; - -#if ( SILDET == 2 ) - // pointer to speex preprocessor dsp - SpeexPreprocessState *dsp ; - // number of frames to ignore speex_preprocess() - int ignore_speex_count; -#else - // placeholder when preprocessing is not enabled - void* dsp ; -#endif - - // audio format this member is using - int write_format ; - int read_format ; - - int write_format_index ; - int read_format_index ; - - // member frame translators - struct ast_trans_pvt* to_slinear ; - struct ast_trans_pvt* from_slinear ; - - // For playing sounds - struct ast_conf_soundq *soundq; - -#ifdef DEBUG_OUTPUT_PCM - FILE *incoming_fh; -#endif - - int send_dtmf:1; - int quiet_entry_exit:1; - int inband_dtmf:1; - int rfc_dtmf:1; -} ; - -struct conf_member -{ - struct ast_conf_member* realmember ; - struct conf_member* next ; -} ; - -// -// function declarations -// - -int member_exec( struct ast_channel* chan, void* data ) ; - -int basic_play_sound ( char *channel, char *file ) ; - -struct ast_conf_member* create_member( struct ast_channel* chan, const char* data ) ; -struct ast_conf_member* delete_member( struct ast_conf_member* member ) ; - -// incoming queue -int queue_incoming_frame( struct ast_conf_member* member, struct ast_frame* fr ) ; -conf_frame* get_incoming_frame( struct ast_conf_member* member ) ; - -// outgoing queue -int queue_outgoing_frame( struct ast_conf_member* member, const struct ast_frame* fr, struct timeval delivery ) ; -int __queue_outgoing_frame( struct ast_conf_member* member, const struct ast_frame* fr, struct timeval delivery ) ; -conf_frame* get_outgoing_frame( struct ast_conf_member* member ) ; - -void send_state_change_notifications( struct ast_conf_member* member ) ; - -// -// meta-info accessors functions -// - -short memberIsPhoneClient( struct ast_conf_member* member ) ; -short memberIsIaxClient( struct ast_conf_member* member ) ; -short memberIsSIPClient( struct ast_conf_member* member ) ; - -short memberIsModerator( struct ast_conf_member* member ) ; -short memberIsListener( struct ast_conf_member* member ) ; - -// -// packer functions -// - -struct ast_packer; - -extern struct ast_packer *ast_packer_new(int bytes); -extern void ast_packer_set_flags(struct ast_packer *packer, int flags); -extern int ast_packer_get_flags(struct ast_packer *packer); -extern void ast_packer_free(struct ast_packer *s); -extern void ast_packer_reset(struct ast_packer *s, int bytes); -extern int ast_packer_feed(struct ast_packer *s, const struct ast_frame *f); -extern struct ast_frame *ast_packer_read(struct ast_packer *s); - -#endif diff --git a/agc_2-X/trunk/app_conference/star.gsm b/agc_2-X/trunk/app_conference/star.gsm deleted file mode 100644 index 5ec8908e..00000000 --- a/agc_2-X/trunk/app_conference/star.gsm +++ /dev/null @@ -1,2 +0,0 @@ -Õ:“nôPSaÌtÖªj*PÕR6ÛžD IÁ‰àDCtbëÕnK$|2Z~bE+M?ENEuwWI zIBKg^)G83d3SlP%LIw#*$WCtd*Yo~-&Ut=3=e*1E=FJNv0l=!6g>$#<+8;py008#i zW-tNZ*faou1OGu_>!$siCWrvg=vx?-nY}%-%D%0;rOT)5BE?1ArXBaW^-`nIs|3q@ zDDxeCtw$SpD1u5+8%_#u2o2_K%yH)Fcm9aC6;qCM2Oh;^?m(x9| zsYY5tIGmIdkMcXNdMc_>r^2t0&fUi&jI97n;Q_B>E|hIbi2%7%no&M16nz|zzu zcH(%cuQCQGK}vnwy@A8-c_A&48;OtYcWYG3EmHl zAXg`JaXaZ%s#Uy(j%(K05oc2y!$8LZ312eZLig(?GcXe8az_W8i(i1&o2QNr%Zq$z z%vp&K7;h$Kv@LIYWyoMkvg%_7-P+z?+J7Ev!mnWM4+W7G`pG)L(Tek%SZo+YRdhh1OU6Q?iNs0Rs{RwZ>zJXljAHGZEyTm+LG*sZ; zgwFMQEXG|x_uFWS*@`vpL!mno)WLU5J37|3KG$szb!Jt?TL5%_c-sc~ zx474=$xI*0qW^ci#&!!)38uQ9ngSj5evQG>K!h_-{EskRV-NJt5GB3=d-~rsUKCZM zcO+m^CXvr*diqz&+C6--k&HzC0jdA11>wqJ-8!61t@GgOICEkGu_uRT^3wYkBV>tB zv(^VSXbf#3-Idlaf~H2lq0VsH)vdbM?qt*k_}})kmO`L1;K$$zY^LUH_chT5?-9-f z_usH7`cl55rEEeF5|oZ%mwT;}%>$6G3bUN5@JD!kwsy}R3=hq4NX9-ZD9*V-?zp$1 zYU>t32|r|<8FV}AePRR>9Q?>nk>WAzC|l$j>=c7rRcHPIei1drE3`D)L2MfXpz_^I zhjY6N)JAe=>PYemY^%ur`CR{6@APn3j+7!W3%UkKATw9epqn8#9*Lfq>K)?RXtfV$$1ZT1o_5+ zv>x!*lhT4-`OTS_*{2+Q=hU)D+>gw8=Jd9Id5biKLC4Z(#B71T9saeiKvRMCP*;#j zeGhGDR|^=9ak^fN&s6r>{b=Q}rD1QN;_fuQQh9{>Q)XET3zI8O;A@7af-j=Zv2Ww2 z8?j@fh8Wl`3=THi_QGC@T1Z<&J?eWUZRqwW>j-mFLQ`z`F-c+L!=9(Winx90d+9Vo zeczs;eCR7OK(E4PI#1ia_6?(D2$tot^0+o1G(@mtGKf=^5BX<>v)#q9!`X`?c*eW! zj`mRf1XU0d8~W0VS3gxX*d1UsO6-1UUF*sB-%T&}KWw)O+f zxvDj^1L-g00zt{h+8(0n7Wf_AM>!97T00;sVigAMZPkKfnKlvSD-N4^-QChVpZ}#C zPC;=`q^6x^uakg-eCokqk#>9fY!F*S`@k>y_~(>$rm&k)YjKJ_UQYYVdZfC@Af zxTeogSu9(LLD5f`zxjR{c*y@=x}8v*eky$#v1Vj|7tkNz3uiryJxsZ6{?9g^>$!^U z1h2VJ_EOkIQfJ@?#M?1%-+cLF^wRjK5^ella(kA zh7%9EYs>-8mqK`PqPichOCaB9dJl@t7E6&rPZJHAp3Ikzfh&%8GpVCPFWRq zCGsvZMGeV*Gc84y^V{(JsDj6C2G;V=6QN$%h}b50O9t(Nn<=ZvtdF-j^SW~Ygh zH{c)1-ga$~;$cJdy^MY6bGH9kjGj)^44B&VN!@7X;R&n-5l7$^;sL%~g7GUzWpI6z z$FgI*ZQbWwwGmMKU(_#b;j%x+KD)MK4H%l&XqS6$`kxNi2$D4A1JGy{@?gxt)W_6j z)nr~$M}cjEwL7ySvK0EYuc42|0tva?X+d zIC$7_oO&!}Z_FWBLGS9usS+*zcq%gO0uip9*L77AG4jI5sx6d-=x#ofhM4D}% zW|`?n>=3hwX+zcxhqk2;;nCU2ewhihcS-gTvau`ojW1dj@PLQMx| zn0~e70CQ3Myn75fZHH?TRn1DKAuLj1P3IT-$WVP&T|5JDb^q2}FD<~6;wLy&II8CQ zaGX{Mi}y!jI$SHEMesgCGhu`Kr2K?E=-9Dk?YZ|qkOWy zCu}0~V~oIiXP{CbRPk}B@KnY>@Ft_j80m3=X}~sf&_uk`N>)TnqR+EW>%HCy)4J)2 znU@o%AWQlVH+?Os!(NIjjbr#{YI`KD>N&uD{|W3fPcXy=a{Nyb9(%tSdm_G~y-i${ zfQtW&4iR5#Eb6}oUQ89C-qO0Wd+vvu1A$yZ=F{gRZqYFmXnUgVXgjm!vXTEbi7(hf| z4d(WdC(=Auez-8XFf7tMtDW1@p^*e*vgGm4VT!@y9X5F{W+rn+h#1T>o!9SoiIL0T z<+cL-R)|5|#>6n*IF1ZdbS_uF4eZG{kerN;8T{0EMKl{_id7{nB1KFr8HygWd!`V) z_)~xp!g-5vB*HkbV?0iBQp3TYiTf-5ksp8fR#QgrM;JTdMrM0ZiLRpaT~Cj76OA4D zo|5UxnW#5)`@EprlWS@;p=RNIvaS)RoCgmnH!VL z;C69g`>1p#YA#bAHW!m@x~zjib_50a87eXCv)lYuh5sy4cSs z);1#gafr*Yi<7?zxTPnEKg!m+XoMkR6yg>%?7EJw@ZSc1tqUIEj<3Pq;9QSiMlg&X zY2Mtu(Yr40Q`UvBUc*#DvGAU0EU=Dshbnhp)!j5Scv`?)z-J5B^vt)O`aaC+KV9b( zUg+aEr$yywVOftX;4o!91K_PXj9A_ zO|}OzE++~ja-5)$#XG7v7Ffb1r${g~$yjTpqze(ntd6*ebDD}YV#{~%O7Na5#?)u) z!ZZXAF+{%VVYA?@d;#HL>WQ=p!p33$rrABuePJ=8lzh6w$QF4=*p5^}J$Vaw$f0&D zLE`cG$O6Mxqi59P;MS;`_!iP$CA=lGtJDdL`7wJzgxZYj@)sP`?+;+I1&m~0kG4ej zrz;F~4KA{Q=JTFN%Cyi$#F>T%J)AzZ?P0`Frh#1yo$OfJY*w}gY)t(%)&j1Ts|HSu zL&z7D`Gh;ZJ@(U{4Hy~rhU>a&hKyvzQc>|!SX(^Ny=!h}Gy2nd@bg9@S|h~) zuvtuEl-9r4^1Hg*^b!`2y6HV-;n;peIp|`>O!(O7K-b0544g2jCha~MkO55(x|A+h z^pdpK!9Q87gZm^IwpoPx0R@f8^5YE)qa%y zA)Cq0wSVYpYd@+%P)5oePU&c5wT6Ti(?l*dR!mHUgNq4QKDv=)H`vNTmIJTEo3UWR538NDU zDZ;u-q($hOgoEk-1kP6`H|KVKh89LqGeluB+wkBHQGwZl&!ffqy>fYMFy9Ic1J!LU zQXWuIfz0r-xGrj#uDPwMCK(G?oSxXXs<=eVefwo`L9jcl_bR*lz;S6P X*EOaLjpJq~uTBvVb5x3+h0^~6Ae{?P diff --git a/agc_2-X/trunk/astguiclient_web/AST_inboundEXTstats.php b/agc_2-X/trunk/astguiclient_web/AST_inboundEXTstats.php deleted file mode 100644 index 28c5b20d..00000000 --- a/agc_2-X/trunk/astguiclient_web/AST_inboundEXTstats.php +++ /dev/null @@ -1,400 +0,0 @@ - LICENSE: GPLv2 -# -# CHANGES -# 60421-1450 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60620-1322 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$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 > 6;"; - if ($DB) {echo "|$stmt|\n";} - $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)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - - -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); -if (!isset($query_date)) {$query_date = $NOW_DATE;} -if (!isset($server_ip)) {$server_ip = '10.10.11.20';} - -$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='" . mysql_real_escape_string($server_ip) . "';"; -$rslt=mysql_query($stmt, $link); -if ($DB) {echo "$stmt\n";} -$inbound_to_print = mysql_num_rows($rslt); -$i=0; -while ($i < $inbound_to_print) - { - $row=mysql_fetch_row($rslt); - $inbound[$i] =$row[0]; - $fullnum[$i] =$row[1]; - $inbname[$i] =$row[2]; - $i++; - } -?> - - - - - -\n"; -#echo"\n"; -echo "ASTERISK: Inbound Calls Stats\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n\n"; - -echo "
    \n\n";
    -
    -
    -if (!$group)
    -{
    -echo "\n\n";
    -echo "PLEASE SELECT A NUMBER AND DATE ABOVE AND CLICK SUBMIT\n";
    -}
    -
    -else
    -{
    -
    -
    -echo "ASTERISK: Inbound Calls Stats                      $NOW_TIME\n";
    -
    -echo "\n";
    -echo "---------- TOTALS\n";
    -
    -$extenSQL = "and extension='" . mysql_real_escape_string($group) . "'";
    -if (eregi("\*",$group))
    -	{$extenSQL = "and extension LIKE \"%$group\"";}
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$TOTALcalls =	sprintf("%10s", $row[0]);
    -$average_hold_seconds = ($row[1] / $row[0]);
    -$average_hold_seconds = round($average_hold_seconds, 0);
    -$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -
    -echo "Total Calls That came into this number:       $TOTALcalls\n";
    -echo "Average Call Length(seconds) for all Calls:   $average_hold_seconds\n";
    -
    -echo "\n";
    -echo "---------- DROPS\n";
    -
    -$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -
    -$DROPcalls =	sprintf("%10s", $row[0]);
    -$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
    -$DROPpercent = round($DROPpercent, 0);
    -
    -if ($row[0])
    -	{
    -	$average_hold_seconds = ($row[1] / $row[0]);
    -	$average_hold_seconds = round($average_hold_seconds, 0);
    -	$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
    -	}
    -else {$DROPpercent=0;   $average_hold_seconds=0;}
    -echo "Total DROP Calls:   (less than 10 seconds)    $DROPcalls  $DROPpercent%\n";
    -echo "Average Call Length(seconds) for DROP Calls:  $average_hold_seconds\n";
    -
    -
    -##############################
    -#########  CALLS STATS
    -
    -echo "\n";
    -echo "---------- CALL LISTINGS\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -echo "| CALLERID             | CALLERIDNAME         | LENGTH | DATE TIME           |\n";
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -$stmt="select number_dialed,caller_code,length_in_sec,start_time from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " 00:00:01' and start_time <= '" . mysql_real_escape_string($query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$users_to_print = mysql_num_rows($rslt);
    -$i=0;
    -while ($i < $users_to_print)
    -	{
    -	$row=mysql_fetch_row($rslt);
    -
    -	$CID =			sprintf("%-20s", $row[0]);
    -	$CIDname =		sprintf("%-20s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
    -	$datetime =		sprintf("%-19s", $row[3]);
    -	$USERavgTALK =	$row[2];
    -
    -	$USERavgTALK_M = ($USERavgTALK / 60);
    -	$USERavgTALK_M = round($USERavgTALK_M, 2);
    -	$USERavgTALK_M_int = intval("$USERavgTALK_M");
    -	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
    -	$USERavgTALK_S = ($USERavgTALK_S * 60);
    -	$USERavgTALK_S = round($USERavgTALK_S, 0);
    -	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
    -	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
    -	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
    -
    -	echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
    -
    -	$i++;
    -	}
    -
    -echo "+----------------------+----------------------+--------+---------------------+\n";
    -
    -##############################
    -#########  TIME STATS
    -
    -if ($output == 'FULL')
    -	{
    -
    -	echo "\n";
    -	echo "---------- TIME STATS\n";
    -
    -	echo "\n";
    -
    -	$hi_hour_count=0;
    -	$last_full_record=0;
    -	$i=0;
    -	$h=0;
    -	while ($i <= 96)
    -		{
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:00:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:14:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:15:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:29:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:30:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:44:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL ;";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$hour_count[$i] = $row[0];
    -		if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
    -		if ($hour_count[$i] > 0) {$last_full_record = $i;}
    -		$stmt="select count(*) from call_log where start_time >= '" . mysql_real_escape_string($query_date) . " $h:45:00' and start_time <= '" . mysql_real_escape_string($query_date) . " $h:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' $extenSQL and (length_in_sec <= 10 or length_in_sec is null);";
    -		$rslt=mysql_query($stmt, $link);
    -		if ($DB) {echo "$stmt\n";}
    -		$row=mysql_fetch_row($rslt);
    -		$drop_count[$i] = $row[0];
    -		$i++;
    -		$h++;
    -		}
    -
    -	$hour_multiplier = (100 / $hi_hour_count);
    -	#$hour_multiplier = round($hour_multiplier, 0);
    -
    -	echo "\n";
    -	echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS\n";
    -
    -	$k=1;
    -	$Mk=0;
    -	$call_scale = '0';
    -	while ($k <= 102) 
    -		{
    -		if ($Mk >= 5) 
    -			{
    -			$Mk=0;
    -			$scale_num=($k / $hour_multiplier);
    -			$scale_num = round($scale_num, 0);
    -			$LENscale_num = (strlen($scale_num));
    -			$k = ($k + $LENscale_num);
    -			$call_scale .= "$scale_num";
    -			}
    -		else
    -			{
    -			$call_scale .= " ";
    -			$k++;   $Mk++;
    -			}
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -	#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP                                  | DROPS | TOTAL |\n";
    -	echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -	$ZZ = '00';
    -	$i=0;
    -	$h=4;
    -	$hour= -1;
    -	$no_lines_yet=1;
    -
    -	while ($i <= 96)
    -		{
    -		$char_counter=0;
    -		$time = '      ';
    -		if ($h >= 4) 
    -			{
    -			$hour++;
    -			$h=0;
    -			if ($hour < 10) {$hour = "0$hour";}
    -			$time = "+$hour$ZZ+";
    -			}
    -		if ($h == 1) {$time = "   15 ";}
    -		if ($h == 2) {$time = "   30 ";}
    -		if ($h == 3) {$time = "   45 ";}
    -		$Ghour_count = $hour_count[$i];
    -		if ($Ghour_count < 1) 
    -			{
    -			if ( ($no_lines_yet) or ($i > $last_full_record) )
    -				{
    -				$do_nothing=1;
    -				}
    -			else
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				echo "|$time|";
    -				$k=0;   while ($k <= 102) {echo " ";   $k++;}
    -				echo "| $hour_count[$i] |\n";
    -				}
    -			}
    -		else
    -			{
    -			$no_lines_yet=0;
    -			$Xhour_count = ($Ghour_count * $hour_multiplier);
    -			$Yhour_count = (99 - $Xhour_count);
    -
    -			$Gdrop_count = $drop_count[$i];
    -			if ($Gdrop_count < 1) 
    -				{
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "*X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 101) {echo " ";   $char_counter++;}
    -				echo "| 0     | $hour_count[$i] |\n";
    -
    -				}
    -			else
    -				{
    -				$Xdrop_count = ($Gdrop_count * $hour_multiplier);
    -
    -			#	if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
    -
    -				$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
    -
    -				$hour_count[$i] =	sprintf("%-5s", $hour_count[$i]);
    -				$drop_count[$i] =	sprintf("%-5s", $drop_count[$i]);
    -
    -				echo "|$time|";
    -				$k=0;   while ($k <= $Xdrop_count) {echo ">";   $k++;   $char_counter++;}
    -				echo "D";   $char_counter++;
    -				$k=0;   while ($k <= $XXhour_count) {echo "*";   $k++;   $char_counter++;}
    -				echo "X";   $char_counter++;
    -				$k=0;   while ($k <= $Yhour_count) {echo " ";   $k++;   $char_counter++;}
    -					while ($char_counter <= 102) {echo " ";   $char_counter++;}
    -				echo "| $drop_count[$i] | $hour_count[$i] |\n";
    -				}
    -			}
    -		
    -		
    -		$i++;
    -		$h++;
    -		}
    -
    -
    -	echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
    -
    -
    -	}
    -
    -
    -
    -
    -}
    -
    -
    -
    -?>
    -
    - - \ No newline at end of file diff --git a/agc_2-X/trunk/astguiclient_web/admin.php b/agc_2-X/trunk/astguiclient_web/admin.php deleted file mode 100644 index 75f407c7..00000000 --- a/agc_2-X/trunk/astguiclient_web/admin.php +++ /dev/null @@ -1,1824 +0,0 @@ - LICENSE: GPLv2 -# -# AST GUI database administration -# -# CHANGES -# 50913-1118 - Added outbound_cid for web-client calls -# 50926-1356 - Modified to allow for language translation -# 50926-1613 - Added WeBRooTWritablE write controls -# 51128-1254 - Modified to allow PHP global vars off -# 51208-2120 - Added option to login with vicidial_user login if allowed -# 51213-1650 - Added option to delete phones if allowed by vicidial_users -# 60421-1430 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60427-1137 - Fixed phone search bug -# 60620-1243 - Added variable filtering to eliminate SQL injection attack threat -# - -$version = '1.1.12'; -$build = '60620-1243'; - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} - elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} - elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} -if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} - elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} -if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} - elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} -if (isset($_GET["login"])) {$login=$_GET["login"];} - elseif (isset($_POST["login"])) {$login=$_POST["login"];} -if (isset($_GET["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} - elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} -if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} - elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} -if (isset($_GET["company"])) {$company=$_GET["company"];} - elseif (isset($_POST["company"])) {$company=$_POST["company"];} -if (isset($_GET["picture"])) {$picture=$_GET["picture"];} - elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];} -if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} - elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} -if (isset($_GET["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} - elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} -if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} - elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} -if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} - elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} -if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} - elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} -if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} - elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} -if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} - elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} -if (isset($_GET["park_on_extension"])) {$park_on_extension=$_GET["park_on_extension"];} - elseif (isset($_POST["park_on_extension"])) {$park_on_extension=$_POST["park_on_extension"];} -if (isset($_GET["conf_on_extension"])) {$conf_on_extension=$_GET["conf_on_extension"];} - elseif (isset($_POST["conf_on_extension"])) {$conf_on_extension=$_POST["conf_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"];} - elseif (isset($_POST["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];} -if (isset($_GET["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"];} - elseif (isset($_POST["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];} -if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} - elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} -if (isset($_GET["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} - elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} -if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} - elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} -if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} - elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} -if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["dtmf_send_extension"])) {$dtmf_send_extension=$_GET["dtmf_send_extension"];} - elseif (isset($_POST["dtmf_send_extension"])) {$dtmf_send_extension=$_POST["dtmf_send_extension"];} -if (isset($_GET["call_out_number_group"])) {$call_out_number_group=$_GET["call_out_number_group"];} - elseif (isset($_POST["call_out_number_group"])) {$call_out_number_group=$_POST["call_out_number_group"];} -if (isset($_GET["client_browser"])) {$client_browser=$_GET["client_browser"];} - elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} -if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} - elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} -if (isset($_GET["local_web_callerID_URL"])) {$local_web_callerID_URL=$_GET["local_web_callerID_URL"];} - elseif (isset($_POST["local_web_callerID_URL"])) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];} -if (isset($_GET["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"];} - elseif (isset($_POST["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];} -if (isset($_GET["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"];} - elseif (isset($_POST["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];} -if (isset($_GET["user_switching_enabled"])) {$user_switching_enabled=$_GET["user_switching_enabled"];} - elseif (isset($_POST["user_switching_enabled"])) {$user_switching_enabled=$_POST["user_switching_enabled"];} -if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} - elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} -if (isset($_GET["admin_hangup_enabled"])) {$admin_hangup_enabled=$_GET["admin_hangup_enabled"];} - elseif (isset($_POST["admin_hangup_enabled"])) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];} -if (isset($_GET["admin_hijack_enabled"])) {$admin_hijack_enabled=$_GET["admin_hijack_enabled"];} - elseif (isset($_POST["admin_hijack_enabled"])) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];} -if (isset($_GET["admin_monitor_enabled"])) {$admin_monitor_enabled=$_GET["admin_monitor_enabled"];} - elseif (isset($_POST["admin_monitor_enabled"])) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];} -if (isset($_GET["call_parking_enabled"])) {$call_parking_enabled=$_GET["call_parking_enabled"];} - elseif (isset($_POST["call_parking_enabled"])) {$call_parking_enabled=$_POST["call_parking_enabled"];} -if (isset($_GET["updater_check_enabled"])) {$updater_check_enabled=$_GET["updater_check_enabled"];} - elseif (isset($_POST["updater_check_enabled"])) {$updater_check_enabled=$_POST["updater_check_enabled"];} -if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} - elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} -if (isset($_GET["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"];} - elseif (isset($_POST["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];} -if (isset($_GET["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"];} - elseif (isset($_POST["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];} -if (isset($_GET["voicemail_button_enabled"])) {$voicemail_button_enabled=$_GET["voicemail_button_enabled"];} - elseif (isset($_POST["voicemail_button_enabled"])) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];} -if (isset($_GET["enable_fast_refresh"])) {$enable_fast_refresh=$_GET["enable_fast_refresh"];} - elseif (isset($_POST["enable_fast_refresh"])) {$enable_fast_refresh=$_POST["enable_fast_refresh"];} -if (isset($_GET["fast_refresh_rate"])) {$fast_refresh_rate=$_GET["fast_refresh_rate"];} - elseif (isset($_POST["fast_refresh_rate"])) {$fast_refresh_rate=$_POST["fast_refresh_rate"];} -if (isset($_GET["enable_persistant_mysql"])) {$enable_persistant_mysql=$_GET["enable_persistant_mysql"];} - elseif (isset($_POST["enable_persistant_mysql"])) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];} -if (isset($_GET["auto_dial_next_number"])) {$auto_dial_next_number=$_GET["auto_dial_next_number"];} - elseif (isset($_POST["auto_dial_next_number"])) {$auto_dial_next_number=$_POST["auto_dial_next_number"];} -if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} - elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} - elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} -if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} - elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} -if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} - elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} -if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];} - elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];} -if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];} - elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];} -if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} - elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} -if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} - elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} -if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} - elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} -if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];} - elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];} -if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];} - elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];} - elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} -if (isset($_GET["old_server_ip"])) {$old_server_ip=$_GET["old_server_ip"];} - elseif (isset($_POST["old_server_ip"])) {$old_server_ip=$_POST["old_server_ip"];} -if (isset($_GET["old_server_id"])) {$old_server_id=$_GET["old_server_id"];} - elseif (isset($_POST["old_server_id"])) {$old_server_id=$_POST["old_server_id"];} -if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} - elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} -if (isset($_GET["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} - elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} -if (isset($_GET["max_vicidial_trunks"])) {$max_vicidial_trunks=$_GET["max_vicidial_trunks"];} - elseif (isset($_POST["max_vicidial_trunks"])) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];} -if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];} - elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];} -if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];} - elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];} -if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} - elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} -if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];} - elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];} -if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];} - elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];} -if (isset($_GET["answer_transfer_agent"])) {$answer_transfer_agent=$_GET["answer_transfer_agent"];} - elseif (isset($_POST["answer_transfer_agent"])) {$answer_transfer_agent=$_POST["answer_transfer_agent"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -if (isset($_GET["old_conf_exten"])) {$old_conf_exten=$_GET["old_conf_exten"];} - elseif (isset($_POST["old_conf_exten"])) {$old_conf_exten=$_POST["old_conf_exten"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} - -##### BEGIN VARIABLE FILTERING FOR SECURITY ##### - -### DIGITS and Dots -$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); -$server_ip = ereg_replace("[^\.0-9]","",$server_ip); -$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); -$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); - -### Y or N ONLY ### -$active = ereg_replace("[^NY]","",$active); - -### DIGITS ONLY ### -$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); -$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); -$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); -$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); -$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); -$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); -$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); -$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); -$recording_exten = ereg_replace("[^0-9]","",$recording_exten); -$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); -$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); -$DBX_port = ereg_replace("[^0-9]","",$DBX_port); -$DBY_port = ereg_replace("[^0-9]","",$DBY_port); -$telnet_port = ereg_replace("[^0-9]","",$telnet_port); -$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); -$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); -$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); -$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); -$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); -$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); -$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); -$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); -$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); -$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); -$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); -$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); -$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); -$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); -$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); -$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); -$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); -$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); -$ADD = ereg_replace("[^0-9]","",$ADD); - -### ALPHA-NUMERIC and underscore and dash and slash and at and dot -$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); -$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); -$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); -$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); -$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); -$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); -$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); -$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); -$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); - -### ALPHA-NUMERIC (and underscore and dash) -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); -$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); -$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); -$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); -$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); -$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); -$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); -$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); -$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); -$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); -$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); -$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); -$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); -$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); -$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); -$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); -$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); -$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); -$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); -$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); -$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); -$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); -$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); -$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); - -### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores -$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); -$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); -$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); -$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); -$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); -$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); - -### VARIABLES TO BE mysql_real_escape_string ### -# $VICIDIAL_web_URL = -# $local_web_callerID_URL = - -##### END VARIABLE FILTERING FOR SECURITY ##### - -if ($force_logout) -{ - if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -if (!isset($ADD)) {$ADD=0;} - -$STARTtime = date("U"); -$STARTdate = date("Y-m-d H:i:s"); - -if ($ADD==1) {$process = 'ADD NEW PHONE';} -if ($ADD==11) {$process = 'ADD NEW SERVER';} -if ($ADD==111) {$process = 'ADD NEW CONFERENCE';} -if ($ADD==2) {$process = 'ADDING NEW PHONE';} -if ($ADD==21) {$process = 'ADDING NEW SERVER';} -if ($ADD==211) {$process = 'ADDING NEW CONFERENCE';} -if ($ADD==3) {$process = 'MODIFY PHONE';} -if ($ADD==31) {$process = 'MODIFY SERVER';} -if ($ADD==311) {$process = 'MODIFY CONFERENCE';} -if ($ADD==4) {$process = 'MODIFYING PHONE';} -if ($ADD==41) {$process = 'MODIFYING SERVER';} -if ($ADD==411) {$process = 'MODIFYING CONFERENCE';} -if ($ADD==5) {$process = 'DELETE PHONE';} -if ($ADD==6) {$process = 'DELETE PHONE';} -if ($ADD==55) {$process = 'SEARCH PHONES';} -if ($ADD==66) {$process = 'SEARCH PHONES RESULTS';} -if ($ADD==0) {$process = 'PHONE LIST';} -if ($ADD==10) {$process = 'SERVER LIST';} -if ($ADD==100) {$process = 'CONFERENCE LIST';} -if ($ADD==99999) {$process = 'HELP';} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if ($auth<1) - { - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > '6' and ast_admin_access='1';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname =$row[3]; - $LOGdelete_phones =$row[17]; - } - } - -if ($WeBRooTWritablE > 0) - {$fp = fopen ("./project_auth_entries.txt", "a");} -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - echo "|$stmt|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - if (strlen($LOGfullname) < 1) - { - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - } - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - - ##### get server listing for dynamic pulldown - $stmt="SELECT server_ip,server_description from servers order by server_ip"; - $rsltx=mysql_query($stmt, $link); - $servers_to_print = mysql_num_rows($rsltx); - $servers_list=''; - - $o=0; - while ($servers_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $servers_list .= "\n"; - $o++; - } - - } - else - { - if ($WeBRooTWritablE > 0) - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - } - -header ("Content-type: text/html; charset=utf-8"); - -$NWB = "   \"HELP\""; -###################### -# ADD=99999 display the HELP SCREENS -###################### - -if ($ADD==99999) -{ -echo "\n"; -echo "\n"; -echo "ASTERISK ADMIN: Administration - $process \n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "
    ASTERISK ADMIN: HELP


    \n"; - -?> -PHONES TABLE

    - -
    -Phone extension - This field is where you put the phones name as it appears to Asterisk not including the protocol or slash at the beginning. For Example: for the SIP phone SIP/test101 the Phone extension would be test101. Also, for IAX2 phones make sure you use the full phones name: IAX2/IAXphone1@IAXphone1 would be IAXphone1@IAXphone1. For Zap phones make sure you put the full channel: Zap/25-1 would be 25-1. Another note, make sure you set the Protocol below correctly for your type of phone. - -
    -
    -
    -Dialplan number - This field is for the number you dial to have the phone ring. This number is defined in the extensions.conf file of your Asterisk server - -
    -
    -
    -Voicemail Box - This field is for the voicemail box that the messages go to for the user of this phone. We use this to check for voicemail messages and for the user to be able to use the VOICEMAIL button on astGUIclient app. - -
    -
    -
    -Outbound CallerID - This field is where you would enter the callerID number that you would like to appear on outbound calls placed form the astguiclient web-client. This does not work on RBS, non-PRI, T1/E1s. - -
    -
    -
    -Phone IP address - This field is for the phone's IP address if it is a VOIP phone. This is an optional field - -
    -
    -
    -Computer IP address - This field is for the user's computer IP address. This is an optional field - -
    -
    -
    -Server IP - This menu is where you select which server the phone is active on. - -
    -
    -
    -Login - The login used for the phone user to login to the client applications. - -
    -
    -
    -Password - The password used for the phone user to login to the client applications. - -
    -
    -
    -Status - The status of the phone in the system, ACTIVE and ADMIN allow for GUI clients to work. ADMIN allows access to this administrative web site. All other statuses do not allow GUI or Admin web access. - -
    -
    -
    -Active Account - Whether the phone is active to put it in the list in the GUI client. - -
    -
    -
    -Phone Type - Purely for administrative notes. - -
    -
    -
    -Full Name - Used by the GUIclient in the list of active phones. - -
    -
    -
    -Company - Purely for administrative notes. - -
    -
    -
    -Picture - Not yet Implemented. - -
    -
    -
    -New Messages - Number of new voicemail messages for this phone on the Asterisk server. - -
    -
    -
    -Old Messages - Number of old voicemail messages for this phone on the Asterisk server. - -
    -
    -
    -Client Protocol - The protocol that the phone uses to connect to the Asterisk server: SIP, IAX2, Zap . Also, there is EXTERNAL for remote dial numbers or speed dial numbers that you want to list as phones. - -
    -
    -
    -Local GMT - The difference from Greenwich Mean time, or ZULU time where the phone is located. DO NOT ADJUST FOR DAYLIGHT SAVINGS TIME. This is used by the VICIDIAL campaign to accurately display the time and customer time. - -
    -
    -
    -Manager Login - This is the login that the GUI clients for this phone will use to access the Database where the server data resides. - -
    -
    -
    -Manager Secret - This is the password that the GUI clients for this phone will use to access the Database where the server data resides. - -
    -
    -
    -VICIDIAL Default User - This is to place a default value in the VICIDIAL user field whenever this phone user opens the astVICIDIAL client app. Leave blank for no user. - -
    -
    -
    -VICIDIAL Default Pass - This is to place a default value in the VICIDIAL password field whenever this phone user opens the astVICIDIAL client app. Leave blank for no pass. - -
    -
    -
    -VICIDIAL Default Campaign - This is to place a default value in the VICIDIAL campaign field whenever this phone user opens the astVICIDIAL client app. Leave blank for no campaign. - -
    -
    -
    -Park Exten - This is the default Parking extension for the client apps. Verify that a different one works before you change this. - -
    -
    -
    -Conf Exten - This is the default Conference park extension for the client apps. Verify that a different one works before you change this. - -
    -
    -
    -VICIDIAL Park Exten - This is the default Parking extension for VICIDIAL client app. Verify that a different one works before you change this. - -
    -
    -
    -VICIDIAL Park File - This is the default VICIDIAL park extension file name for the client apps. Verify that a different one works before you change this. limited to 10 characters. - -
    -
    -
    -Monitor Prefix - This is the dialplan prefix for monitoring of Zap channels automatically within the astGUIclient app. Only change according to the extensions.conf ZapBarge extensions records. - -
    -
    -
    -Recording Exten - This is the dialplan extension for the recording extension that is used to drop into meetme conferences to record them. It usually lasts upto one hour if not stopped. verify with extensions.conf file before changing. - -
    -
    -
    -VMAIL Main Exten - This is the dialplan extension going to check your voicemail. verify with extensions.conf file before changing. - -
    -
    -
    -VMAIL Dump Exten - This is the dialplan prefix used to send calls directly to a user's voicemail from a live call in the astGUIclient app. verify with extensions.conf file before changing. - -
    -
    -
    -Exten Context - This is the dialplan context that this phone primarily uses. It is assumed that all numbers dialed by the client apps are using this context so it is a good idea to make sure this is the most wide context possible. verify with extensions.conf file before changing. - -
    -
    -
    -DTMF send Channel - This is the channel string used to send DTMF sounds into meetme conferences from the client apps. Verify the exten and context with the extensions.conf file. - -
    -
    -
    -Outbound Call Group - This is the channel group that outbound calls from this phone are placed out of. There are a couple routines in the client apps that use this. For Zap channels you want to use something like Zap/g2 , for IAX2 trunks you would want to use the full IAX prefix like IAX2/VICItest1:secret@10.10.10.15:4569. Verify the trunks with the extensions.conf file, it is usually what you have defined as the TRUNK global variable at the top of the file. - -
    -
    -
    -Browser Location - This is applicable to only UNIX/LINUX clients, the absolute path to Mozilla or Firefox browser on the machine. verify this by launching it manually. - -
    -
    -
    -Install Directory - This is the place where the astGUIclient and astVICIDIAL scripts are located on your machine. For Win32 it should be something like C:\AST_VICI and for UNIX it should be something like /usr/local/perl_TK. verify this manually. - -
    -
    -
    -CallerID URL - This is the web address of the page used to do custom callerID lookups. default testing address is: http://astguiclient.sf.net/test_callerid_output.php - -
    -
    -
    -VICIDIAL Default URL - This is the web address of the page used to do custom VICIDIAL Web Form queries. default testing address is: http://astguiclient.sf.net/test_VICIDIAL_output.php - -
    -
    -
    -Call Logging - This is set to true if the call_log.agi file is in place in the extensions.conf file for all outbound and hangup 'h' extensions to log all calls. This should always be 1 because it is manditory for many astGUIclient and VICIDIAL features to work properly. - -
    -
    -
    -User Switching - Set to true to allow user to switch to another user account. NOTE: If user switches they can initiate recording on the new user's phone conversation - -
    -
    -
    -Conferencing - Set to true to allow user to start conference calls with upto six external lines. - -
    -
    -
    -Admin Hangup - Set to true to allow user to be able to hangup any line at will through astGUIclient. Good idea only to enable this for Admin users. - -
    -
    -
    -Admin Hijack - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers. - -
    -
    -
    -Admin Monitor - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers and as a training tool. - -
    -
    -
    -Call Park - Set to true to allow user to be able to park calls on astGUIclient hold to be picked up by any other astGUIclient user on the system. Calls stay on hold for upto a half hour then hangup. Usually enabled for all. - -
    -
    -
    -Updater Check - Set to true to display a popup warning that the updater time has not changed in 20 seconds. Useful for Admin users. - -
    -
    -
    -AF Logging - Set to true to log many actions of astGUIclient usage to a text file on the user's computer. - -
    -
    -
    -Queue Enabled - Set to true to have client apps use the Asterisk Central Queue system. Required for VICIDIAL and recommended for all users. - -
    -
    -
    -CallerID Popup - Set to true to allow for numbers defined in the extensions.conf file to send CallerID popup screens to astGUIclient users. - -
    -
    -
    -VMail Button - Set to true to display the VOICEMAIL button and the messages count display on astGUIclient. - -
    -
    -
    -Fast Refresh - Set to true to enable a new rate of refresh of call information for the astGUIclient. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. - -
    -
    -
    -Fast Refresh Rate - in milliseconds. Only used if Fast Refresh is enabled. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. - -
    -
    -
    -Persistant MySQL - If enabled the astGUIclient connection will remain connected instead of connecting every second. Useful if you have a fast refresh rate set. It will increase the number of connections on your MySQL machine. - -
    -
    -
    -Auto Dial Next Number - If enabled the VICIDIAL client will dial the next number on the list automatically upon disposition of a call unless they selected to "Stop Dialing" on the disposition screen. - -
    -
    -
    -Stop Rec after each call - If enabled the VICIDIAL client will stop whatever recording is going on after each call has been dispositioned. Useful if you are doing a lot of recording or you are using a web form to trigger recording. - -
    -
    -
    -DBX Server - The MySQL database server that this user should be connecting to. - -
    -
    -
    -DBX Database - The MySQL database that this user should be connecting to. Default is asterisk. - -
    -
    -
    -DBX User - The MySQL user login that this user should be using when connecting. Default is cron. - -
    -
    -
    -DBX Pass - The MySQL user password that this user should be using when connecting. Default is 1234. - -
    -
    -
    -DBX Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. - -
    -
    -
    -DBY Server - The MySQL database server that this user should be connecting to. Secondary server, not used currently. - -
    -
    -
    -DBY Database - The MySQL database that this user should be connecting to. Default is asterisk. Secondary server, not used currently. - -
    -
    -
    -DBY User - The MySQL user login that this user should be using when connecting. Default is cron. Secondary server, not used currently. - -
    -
    -
    -DBY Pass - The MySQL user password that this user should be using when connecting. Default is 1234. Secondary server, not used currently. - -
    -
    -
    -DBY Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. Secondary server, not used currently. - - -



    - -SERVERS TABLE

    -
    -
    -Server ID - This field is where you put the Asterisk servers name, doesnt have to be an official domain sub, just a nickname to identify the server to Admin users. - -
    -
    -
    -Server Description - The field where you use a small phrase to describe the Asterisk server. - -
    -
    -
    -Server IP Address - The field where you put the Network IP address of the Asterisk server. - -
    -
    -
    -Active - Set whether the Asterisk server is active or inactive. - -
    -
    -
    -Asterisk Version - Set the version of Asterisk that you have installed on this server. Examples: '1.2', '1.0.8', '1.0.7', 'CVS_HEAD', 'REALLY OLD', etc... This is used because versions 1.0.8 and 1.0.9 have a different method of dealing with Local/ channels, a bug that has been fixed in CVS v1.0, and need to be treated differently when handling their Local/ channels. Also, current CVS_HEAD and the 1.2 release tree uses different manager and command output so it must be treated differently as well. - -
    -
    -
    -Max VICIDIAL Trunks - This field will determine the maximum number of lines that the VICIDIAL auto-dialer will attempt to call on this server. If you want to dedicate two full PRI T1s to VICIDIALing on a server then you would set this to 46. Default is 96. - -
    -
    -
    -Telnet Host - This is the address or name of the Asterisk server and is how the manager applications connect to it from where they are running. If they are running on the Asterisk server, then the default of 'localhost' is fine. - -
    -
    -
    -Telnet Port - This is the port of the Asterisk server Manager connection and is how the manager applications connect to it from where they are running. The default of '5038' is fine for a standard install. - -
    -
    -
    -Manager User - The username or login used to connect genericly to the Asterisk server manager. Default is 'cron' - -
    -
    -
    -Manager Secret - The secret or password used to connect genericly to the Asterisk server manager. Default is '1234' - -
    -
    -
    -Manager Update User - The username or login used to connect to the Asterisk server manager optimized for the Update scripts. Default is 'updatecron' and assumes the same secret as the generic user. - -
    -
    -
    -Manager Listen User - The username or login used to connect to the Asterisk server manager optimized for scripts that only listen for output. Default is 'listencron' and assumes the same secret as the generic user. - -
    -
    -
    -Manager Send User - The username or login used to connect to the Asterisk server manager optimized for scripts that only send Actions to the manager. Default is 'sendcron' and assumes the same secret as the generic user. - -
    -
    -
    -Server GMT offset - The difference in hours from GMT time not adjusted for Daylight-Savings-Time of the server. Default is '-5' - -
    -
    -
    -VMail Dump Exten - The extension prefix used on this server to send calls directly through agc to a specific voicemail box. Default is '85026666666666' - -
    -
    -
    -VICIDIAL AD extension - The default extension if none is present in the campaign to send calls to for VICIDIAL auto dialing. Default is '8365' - -
    -
    -
    -Default Context - The default dialplan context used for scripts that operate for this server. Default is 'default' - - -



    - -CONFERENCES TABLE

    -
    -
    -Conference Number - This field is where you put the meetme conference dialpna number. It is also recommended that the meetme number in meetme.conf matches this number for each entry. This is for the conferences in astGUIclient and is used for leave-3way-call functionality in VICIDIAL. - -
    -
    -
    -Server IP - The menu where you select the Asterisk server that this conference will be on. - - - - - - -







    -







    -THE END -
    - - - -ASTERISK ADMIN: Administration - <? echo $process ?> - - - -
    - - - - - - -
      ASTERISK ADMIN - Logout  
      LIST ALL PHONES | ADD A NEW PHONE | SEARCH FOR A PHONE | ADD A SERVER | LIST ALL SERVERS
      SHOW ALL CONFERENCES | ADD A NEW CONFERENCE
    -"; - -echo "
    ADD A NEW PHONE
    \n"; -echo "\n"; -echo "
    \n"; - -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    \n"; - -} - - -###################### -# ADD=11 display the ADD NEW SERVERS FORM SCREEN -###################### - -if ($ADD==11) -{ -echo ""; - -echo "
    ADD A NEW SERVER\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    \n"; - -} - - -###################### -# ADD=111 display the ADD NEW CONFERENCES FORM SCREEN -###################### - -if ($ADD==111) -{ -echo ""; - -echo "
    ADD A NEW CONFERENCE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference Number: (digits only)$NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    \n"; - -} - - -###################### -# ADD=2 adds the new phone to the system -###################### - -if ($ADD==2) -{ - echo ""; - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    PHONE NOT ADDED - there is already a Phone in the system with this extension/server\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    PHONE NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    PHONE ADDED\n"; - - $stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=3; -} - -###################### -# ADD=21 adds the new server to the system -###################### - -if ($ADD==21) -{ - echo ""; - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    SERVER NOT ADDED - there is already a server in the system with this ID\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    SERVER NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    SERVER ADDED\n"; - - $stmt="INSERT INTO servers (server_id,server_description,server_ip,active,asterisk_version) values('$server_id','$server_description','$server_ip','$active','$asterisk_version');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31; -} - - -###################### -# ADD=211 adds the new conference to the system -###################### - -if ($ADD==211) -{ - echo ""; - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
    CONFERENCE NOT ADDED - there is already a conference in the system with this ID and server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
    CONFERENCE ADDED\n"; - - $stmt="INSERT INTO conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=100; -} - - -###################################################################################################### -###################################################################################################### -####### 5 series, delete records confirmation -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=5 confirmation before deletion of phone -###################### - -if ($ADD==5) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGdelete_phones < 1) ) - { - echo "
    PHONE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    Server IP be at least 7 characters in length\n"; - } - else - { - echo "
    PHONE DELETION CONFIRMATION: $extension - $server_ip\n"; - echo "

    Click here to delete phone $extension - $server_ip


    \n"; - } - -$ADD='3'; # go to phone modification below -} - - - - -###################################################################################################### -###################################################################################################### -####### 6 series, delete records -###################################################################################################### -###################################################################################################### - - -###################### -# ADD=6 delete phone record -###################### - -if ($ADD==6) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGdelete_phones < 1) ) - { - echo "
    PHONE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
    Extension be at least 2 characters in length\n"; - echo "
    Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from phones where extension='$extension' and server_ip='$server_ip' limit 1;"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING PHONE!!!|$PHP_AUTH_USER|$ip|extension='$extension'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
    PHONE DELETION COMPLETED: $extension - $server_ip\n"; - echo "

    \n"; - } - -$ADD='0'; # go to phone list -} - - - - - - -###################### -# ADD=3 modify phone info in the system -###################### - -if ($ADD==3) -{ - echo ""; - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A PHONE RECORD: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    New Messages: $row[14]$NWB#phones-messages$NWE
    Old Messages: $row[15]$NWB#phones-old_messages$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL Default User: $NWB#phones-login_user$NWE
    VICIDIAL Default Pass: $NWB#phones-login_pass$NWE
    VICIDIAL Default Campaign: $NWB#phones-login_campaign$NWE
    Park Exten: $NWB#phones-park_on_extension$NWE
    Conf Exten: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL Park File: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Monitor Prefix: $NWB#phones-monitor_prefix$NWE
    Recording Exten: $NWB#phones-recording_exten$NWE
    VMailMain Exten: $NWB#phones-voicemail_exten$NWE
    VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
    Exten Context: $NWB#phones-ext_context$NWE
    DTMFSend Channel: $NWB#phones-dtmf_send_extension$NWE
    Outbound Call Group: $NWB#phones-call_out_number_group$NWE
    Browser Location: $NWB#phones-client_browser$NWE
    Install Directory: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL Default URL: $NWB#phones-VICIDIAL_web_URL$NWE
    Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
    User Switching: $NWB#phones-user_switching_enabled$NWE
    Conferencing: $NWB#phones-conferencing_enabled$NWE
    Admin Hangup: $NWB#phones-admin_hangup_enabled$NWE
    Admin Hijack: $NWB#phones-admin_hijack_enabled$NWE
    Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
    Call Park: $NWB#phones-call_parking_enabled$NWE
    Updater Check: $NWB#phones-updater_check_enabled$NWE
    AF Logging: $NWB#phones-AFLogging_enabled$NWE
    Queue Enabled: $NWB#phones-QUEUE_ACTION_enabled$NWE
    CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
    VMail Button: $NWB#phones-voicemail_button_enabled$NWE
    Fast Refresh: $NWB#phones-enable_fast_refresh$NWE
    Fast Refresh Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Auto Dial Next Number: $NWB#phones-auto_dial_next_number$NWE
    Stop Rec after each call: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Server: (Primary DB Server)$NWB#phones-DBX_server$NWE
    DBX Database: (Primary Server Database)$NWB#phones-DBX_database$NWE
    DBX User: (Primary DB Login)$NWB#phones-DBX_user$NWE
    DBX Pass: (Primary DB Secret)$NWB#phones-DBX_pass$NWE
    DBX Port: (Primary DB Port)$NWB#phones-DBX_port$NWE
    DBY Server: (Secondary DB Server)$NWB#phones-DBY_server$NWE
    DBY Database: (Secondary Server Database)$NWB#phones-DBY_database$NWE
    DBY User: (Secondary DB Login)$NWB#phones-DBY_user$NWE
    DBY Pass: (Secondary DB Secret)$NWB#phones-DBY_pass$NWE
    DBY Port: (Secondary DB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Click here for phone stats\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    DELETE THIS PHONE\n"; - } - -} - - -###################### -# ADD=31 modify server info in the system -###################### - -if ($ADD==31) -{ - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A SERVER RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    Max VICIDIAL Trunks: $NWB#servers-max_vicidial_trunks$NWE
    Telnet Host: $NWB#servers-telnet_host$NWE
    Telnet Port: $NWB#servers-telnet_port$NWE
    Manager User: $NWB#servers-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#servers-ASTmgrSECRET$NWE
    Manager Update User: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Manager Listen User: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Manager Send User: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#servers-local_gmt$NWE
    VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
    VICIDIAL AD extension: $NWB#servers-answer_transfer_agent$NWE
    Default Context: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    PHONES WITHIN THIS SERVER:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    EXTENSIONNAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This server has $active_lists active phones and $inactive_lists inactive phones

    \n"; -echo "
    \n"; -} - - -###################### -# ADD=311 modify conference info in the system -###################### - -if ($ADD==311) -{ - echo ""; - - $stmt="SELECT * from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A CONFERENCE RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference: $NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    Current Extension:
    \n"; - -echo "
    \n"; - -} - - - -###################### -# ADD=4 submit phone modifications to the system -###################### - -if ($ADD==4) -{ - echo ""; - - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) - {echo "
    PHONE NOT MODIFIED - there is already a Phone in the system with this extension/server\n";} - else - { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
    PHONE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    PHONE MODIFIED: $extension\n"; - - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid' where extension='$old_extension' and server_ip='$old_server_ip';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A PHONE RECORD: $row[1]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Phone extension: $NWB#phones-extension$NWE
    Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE
    Server IP: $NWB#phones-server_ip$NWE
    Login: $NWB#phones-login$NWE
    Password: $NWB#phones-pass$NWE
    Status: $NWB#phones-status$NWE
    Active Account: $NWB#phones-active$NWE
    Phone Type: $NWB#phones-phone_type$NWE
    Full Name: $NWB#phones-fullname$NWE
    Company: $NWB#phones-company$NWE
    Picture: $NWB#phones-picture$NWE
    New Messages: $row[14]$NWB#phones-messages$NWE
    Old Messages: $row[15]$NWB#phones-old_messages$NWE
    Client Protocol: $NWB#phones-protocol$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
    Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#phones-ASTmgrSECRET$NWE
    VICIDIAL Default User: $NWB#phones-login_user$NWE
    VICIDIAL Default Pass: $NWB#phones-login_pass$NWE
    VICIDIAL Default Campaign: $NWB#phones-login_campaign$NWE
    Park Exten: $NWB#phones-park_on_extension$NWE
    Conf Exten: $NWB#phones-conf_on_extension$NWE
    VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
    VICIDIAL Park File: $NWB#phones-VICIDIAL_park_on_filename$NWE
    Monitor Prefix: $NWB#phones-monitor_prefix$NWE
    Recording Exten: $NWB#phones-recording_exten$NWE
    VMailMain Exten: $NWB#phones-voicemail_exten$NWE
    VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
    Exten Context: $NWB#phones-ext_context$NWE
    DTMFSend Channel: $NWB#phones-dtmf_send_extension$NWE
    Outbound Call Group: $NWB#phones-call_out_number_group$NWE
    Browser Location: $NWB#phones-client_browser$NWE
    Install Directory: $NWB#phones-install_directory$NWE
    CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
    VICIDIAL Default URL: $NWB#phones-VICIDIAL_web_URL$NWE
    Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
    User Switching: $NWB#phones-user_switching_enabled$NWE
    Conferencing: $NWB#phones-conferencing_enabled$NWE
    Admin Hangup: $NWB#phones-admin_hangup_enabled$NWE
    Admin Hijack: $NWB#phones-admin_hijack_enabled$NWE
    Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
    Call Park: $NWB#phones-call_parking_enabled$NWE
    Updater Check: $NWB#phones-updater_check_enabled$NWE
    AF Logging: $NWB#phones-AFLogging_enabled$NWE
    Queue Enabled: $NWB#phones-QUEUE_ACTION_enabled$NWE
    CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
    VMail Button: $NWB#phones-voicemail_button_enabled$NWE
    Fast Refresh: $NWB#phones-enable_fast_refresh$NWE
    Fast Refresh Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
    Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
    Auto Dial Next Number: $NWB#phones-auto_dial_next_number$NWE
    Stop Rec after each call: $NWB#phones-VDstop_rec_after_each_call$NWE
    DBX Server: (Primary DB Server)$NWB#phones-DBX_server$NWE
    DBX Database: (Primary Server Database)$NWB#phones-DBX_database$NWE
    DBX User: (Primary DB Login)$NWB#phones-DBX_user$NWE
    DBX Pass: (Primary DB Secret)$NWB#phones-DBX_pass$NWE
    DBX Port: (Primary DB Port)$NWB#phones-DBX_port$NWE
    DBY Server: (Secondary DB Server)$NWB#phones-DBY_server$NWE
    DBY Database: (Secondary Server Database)$NWB#phones-DBY_database$NWE
    DBY User: (Secondary DB Login)$NWB#phones-DBY_user$NWE
    DBY Pass: (Secondary DB Secret)$NWB#phones-DBY_pass$NWE
    DBY Port: (Secondary DB Port)$NWB#phones-DBY_port$NWE
    \n"; - -echo "

    Click here for phone stats\n"; - -if ($LOGdelete_phones > 0) - { - echo "

    DELETE THIS PHONE\n"; - } - -} - -###################### -# ADD=41 submit server modifications to the system -###################### - -if ($ADD==41) -{ - echo ""; - - $stmt="SELECT count(*) from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_id != $old_server_id) ) - {echo "
    SERVER NOT MODIFIED - there is already a server in the system with this server_id\n";} - else - { - $stmt="SELECT count(*) from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ($server_ip != $old_server_ip) ) - {echo "
    SERVER NOT MODIFIED - there is already a server in the system with this server_ip\n";} - else - { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) - {echo "
    SERVER NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    SERVER MODIFIED: $server_ip\n"; - - $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } - - $stmt="SELECT * from servers where server_id='$server_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A SERVER RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Server ID: $NWB#servers-server_id$NWE
    Server Description: $NWB#servers-server_description$NWE
    Server IP Address: $NWB#servers-server_ip$NWE
    Active: $NWB#servers-active$NWE
    Asterisk Version: $NWB#servers-asterisk_version$NWE
    Max VICIDIAL Trunks: $NWB#servers-max_vicidial_trunks$NWE
    Telnet Host: $NWB#servers-telnet_host$NWE
    Telnet Port: $NWB#servers-telnet_port$NWE
    Manager User: $NWB#servers-ASTmgrUSERNAME$NWE
    Manager Secret: $NWB#servers-ASTmgrSECRET$NWE
    Manager Update User: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
    Manager Listen User: $NWB#servers-ASTmgrUSERNAMElisten$NWE
    Manager Send User: $NWB#servers-ASTmgrUSERNAMEsend$NWE
    Local GMT: (Do NOT Adjust for DST)$NWB#servers-local_gmt$NWE
    VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
    VICIDIAL AD extension: $NWB#servers-answer_transfer_agent$NWE
    Default Context: $NWB#servers-ext_context$NWE
    \n"; - -echo "
    \n"; -echo "
    PHONES WITHIN THIS SERVER:
    \n"; -echo "\n"; -echo "\n"; - - $active_lists = 0; - $inactive_lists = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_lists++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - - } - -echo "
    EXTENSIONNAMEACTIVE
    $rowx[0]$rowx[2]$rowx[1]

    \n"; -echo "
    \n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); -echo "This server has $active_lists active phones and $inactive_lists inactive phones

    \n"; -echo "
    \n"; - -} - -###################### -# ADD=411 submit conference modifications to the system -###################### - -if ($ADD==411) -{ - echo ""; - - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) - {echo "
    CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
    CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
    CONFERENCE MODIFIED: $conf_exten\n"; - - $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } - - $stmt="SELECT * from conferences where conf_exten='$conf_exten';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - -echo "
    MODIFY A CONFERENCE RECORD: $row[0]\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    Conference: $NWB#conferences-conf_exten$NWE
    Server IP: $NWB#conferences-server_ip$NWE
    Current Extension:
    \n"; - -echo "
    \n"; - -} - - - - - - - -###################### -# ADD=55 search form -###################### - -if ($ADD==55) -{ -echo ""; - -echo "
    SEARCH FOR A PHONE\n"; -echo "\n"; -echo "
    \n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
    extension:
    Full Name:
    Phone type:
    \n"; - -} - -###################### -# ADD=66 phone search results -###################### - -if ($ADD==66) -{ - echo ""; - - $SQL = ''; - if ($extension) {$SQL .= "extension LIKE \"%$extension%\" and";} - if ($fullname) {$SQL .= "fullname LIKE \"%$fullname%\" and";} - if ($phone_type) {$SQL .= "phone_type LIKE \"%$phone_type%\" and";} - $SQL = eregi_replace(" and$", "", $SQL); - if (strlen($SQL)>5) {$SQL = "where $SQL";} - - $stmt="SELECT * from phones $SQL order by extension,server_ip;"; -# echo "\n|$stmt|\n"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    SEARCH RESULTS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
    \n"; - -} - - - -###################### -# ADD=0 display all active phones -###################### -if ($ADD==0) -{ - echo ""; - - $stmt="SELECT * from phones order by extension,server_ip"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    PHONE LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
    \n"; -} - -###################### -# ADD=10 display all servers -###################### -if ($ADD==10) -{ - echo ""; - - $stmt="SELECT * from servers order by server_id"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    SERVER LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0]$row[1] $row[2] $row[4] $row[3]  MODIFY
    \n"; -} - - -###################### -# ADD=100 display all conferences -###################### -if ($ADD==100) -{ - echo ""; - - $stmt="SELECT * from conferences order by conf_exten"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
    CONFERENCE LISTINGS:\n"; -echo "
    \n"; - - $o=0; - while ($phones_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; - } - -echo "
    $row[0] $row[1] $row[2]$row[4]  MODIFY
    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds"; -echo "             VERSION: $version"; -echo "             BUILD: $build
    \n"; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/astguiclient_web/dbconnect.php b/agc_2-X/trunk/astguiclient_web/dbconnect.php deleted file mode 100644 index f1998407..00000000 --- a/agc_2-X/trunk/astguiclient_web/dbconnect.php +++ /dev/null @@ -1,14 +0,0 @@ - LICENSE: GPLv2 -# - -$link=mysql_connect("localhost", "cron", "1234"); -mysql_select_db("asterisk"); - -#$WeBServeRRooT = '/home/www/htdocs'; -$WeBServeRRooT = '/usr/local/apache2/htdocs'; -$WeBRooTWritablE = '1'; - -?> \ No newline at end of file diff --git a/agc_2-X/trunk/astguiclient_web/help.gif b/agc_2-X/trunk/astguiclient_web/help.gif deleted file mode 100644 index 5575d7c8761954a943a67f99265cc408edfeca37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmV@K zrlzK7XlVcc{(zdZkfy!h=k1@f#?ad1KW2>Z^Y)^mqV4VLXlQ0|jj7+?-?g=~@9*#a z|NoMak9c=?>FMXq%*)5e#og%my1BWCh=?#*gAYJ&zrMYsqoV%*{r~>|{{H^||Nj6p zX13G(A^8LW002J#EC2ui02BZe000L6z@KnPEE=r$6g+ktoje(cAZZc{4nh|!Jvux)X@@=m zC21-y7sABGX&Z<(B|AJC&(S}$JRWB|DXBdgJUkNs!9S#?9v(X*xM}G+D<}p+2b5_V z8b~1O;i1q87Yz;w5oDsk4s-&2^x#n-!huJTe#ntg$k2xm+8(U%L!-zT3@08O+Yv#+ i0XJ}rR3Wh7fCU;Dx+Ew$Wrh+7CQhJ)nL_kP5CA(E_TC-< diff --git a/agc_2-X/trunk/astguiclient_web/inbound_popup.php b/agc_2-X/trunk/astguiclient_web/inbound_popup.php deleted file mode 100644 index 6f451656..00000000 --- a/agc_2-X/trunk/astguiclient_web/inbound_popup.php +++ /dev/null @@ -1,228 +0,0 @@ - LICENSE: GPLv2 -### -# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system. -# -# changes: -# 60620-1329 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} - elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} -if (isset($_GET["phone"])) {$phone=$_GET["phone"];} - elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} -if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} - elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} -if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} - elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} -if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} - elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} - elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} -if (isset($_GET["DB"])) {$DB=$_GET["DB"];} - elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} -if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} - elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} -if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} - elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} -if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} - elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} - elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["channel"])) {$channel=$_GET["channel"];} - elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} -if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} - elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} -if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} - elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} -if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} - elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} -if (isset($_GET["address1"])) {$address1=$_GET["address1"];} - elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} -if (isset($_GET["address2"])) {$address2=$_GET["address2"];} - elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} -if (isset($_GET["address3"])) {$address3=$_GET["address3"];} - elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} -if (isset($_GET["city"])) {$city=$_GET["city"];} - elseif (isset($_POST["city"])) {$city=$_POST["city"];} -if (isset($_GET["state"])) {$state=$_GET["state"];} - elseif (isset($_POST["state"])) {$state=$_POST["state"];} -if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} - elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} -if (isset($_GET["province"])) {$province=$_GET["province"];} - elseif (isset($_POST["province"])) {$province=$_POST["province"];} -if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} - elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} -if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} - elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} -if (isset($_GET["email"])) {$email=$_GET["email"];} - elseif (isset($_POST["email"])) {$email=$_POST["email"];} -if (isset($_GET["security"])) {$security=$_GET["security"];} - elseif (isset($_POST["security"])) {$security=$_POST["security"];} -if (isset($_GET["comments"])) {$comments=$_GET["comments"];} - elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} -if (isset($_GET["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; -$FILE_datetime = $STARTtime; - -$ext_context = 'demo'; -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK REMOTE INBOUND: Popup - - -
    - - 0) -{ - - $stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='" . mysql_real_escape_string($parked_time) . "' and channel='" . mysql_real_escape_string($channel) . "' LIMIT 1"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER"; - - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: " . mysql_real_escape_string($channel) . "','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for channel $channel       $NOW_TIME\n

    \n"; - - - $url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&'; - $Suser = 'username='; - $Spass = '&passwd='; - $Sphone = '&phone='; - - $newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone"; - if ( ($phone == 'unknown') or (strlen($phone)<9) ) - {$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";} - - echo "Look up this customer in Customer Service System\n

    \n"; - - echo "Close this window\n

    \n"; -} -else -{ - echo "Redirect command FAILED for channel $channel       $NOW_TIME\n

    \n"; - echo "Close this window\n

    \n"; -} - - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/astguiclient_web/phone_stats.php b/agc_2-X/trunk/astguiclient_web/phone_stats.php deleted file mode 100644 index e1ff62d0..00000000 --- a/agc_2-X/trunk/astguiclient_web/phone_stats.php +++ /dev/null @@ -1,244 +0,0 @@ - LICENSE: GPLv2 -# -# -# changes: -# 60620-1333 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["group"])) {$group=$_GET["group"];} - elseif (isset($_POST["group"])) {$group=$_POST["group"];} -if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} - elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} -if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} - elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} -if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} - elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$admin_page = './admin.php'; - -if (!isset($begin_date)) {$begin_date = $TODAY;} -if (!isset($end_date)) {$end_date = $TODAY;} - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $row[0]; - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - -?> - - -ASTERISK ADMIN: Phone Stats - - -
    -
    - - - - - - -\n"; -echo "
      ASTERISK ADMIN: Administration  
      LIST ALL PHONES | ADD A NEW PHONE | SEARCH FOR A PHONE | ADD A SERVER | LIST ALL SERVERS
      SHOW ALL CONFERENCES | ADD A NEW CONFERENCE
      \n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo " to \n"; -echo "  \n"; -echo "\n"; - - -echo "           $user - $full_name\n"; - -echo "
    \n"; - - - $stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='" . mysql_real_escape_string($extension) . "' and server_ip='" . mysql_real_escape_string($server_ip) . "' and start_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and start_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' group by channel_group order by channel_group"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - -echo "
    \n"; - -echo "CALL TIME AND CHANNELS:\n"; - -echo "
    \n"; -echo "\n"; - - $total_calls=0; - $o=0; - while ($statuses_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - $call_seconds = $row[2]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} - - echo ""; - echo "\n"; - echo "\n"; - $total_calls = ($total_calls + $row[0]); - - $call_seconds=0; - $o++; - } - - $stmt="SELECT sum(length_in_sec) from call_log where extension='" . mysql_real_escape_string($extension) . "' and server_ip='" . mysql_real_escape_string($server_ip) . "' and start_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and start_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59'"; - $rslt=mysql_query($stmt, $link); - $counts_to_print = mysql_num_rows($rslt); - $row=mysql_fetch_row($rslt); - $call_seconds = $row[0]; - $call_hours = ($call_seconds / 3600); - $call_hours = round($call_hours, 2); - $call_hours_int = intval("$call_hours"); - $call_minutes = ($call_hours - $call_hours_int); - $call_minutes = ($call_minutes * 60); - $call_minutes_int = round($call_minutes, 0); - if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} -# echo "|$stmt|\n"; - -echo "\n"; -echo "
    CHANNEL GROUP COUNT HOURS:MINUTES
    $row[1] $row[0] $call_hours_int:$call_minutes_int
    TOTAL CALLS $total_calls $call_hours_int:$call_minutes_int
    \n"; -echo "

    \n"; - -echo "
    \n"; - -echo "LAST 1000 CALLS FOR DATE RANGE:\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='" . mysql_real_escape_string($extension) . "' and server_ip='" . mysql_real_escape_string($server_ip) . "' and start_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and start_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' LIMIT 1000"; - $rslt=mysql_query($stmt, $link); - $events_to_print = mysql_num_rows($rslt); -# echo "|$stmt|\n"; - - $total_calls=0; - $o=0; - $event_start_seconds=''; - $event_stop_seconds=''; - while ($events_to_print > $o) { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - - - $call_seconds=0; - $o++; - } - - -echo "
    NUMBER CHANNEL GROUP DATE LENGTH(MIN.)
    $row[0] $row[1] $row[2] $row[3]
    \n"; - - -$ENDtime = date("U"); - -$RUNtime = ($ENDtime - $STARTtime); - -echo "\n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - -
    - - - - - - - - - diff --git a/agc_2-X/trunk/astguiclient_web/remote_inbound.php b/agc_2-X/trunk/astguiclient_web/remote_inbound.php deleted file mode 100644 index 605fe83a..00000000 --- a/agc_2-X/trunk/astguiclient_web/remote_inbound.php +++ /dev/null @@ -1,169 +0,0 @@ - LICENSE: GPLv2 -### -# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available) -# -# changes: -# 60620-1343 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} -$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - -$STARTtime = date("U"); -$TODAY = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$popup_page = './inbound_popup.php'; - - $stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$fp = fopen ("./project_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($PHP_AUTH_USER); - $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - ##### get server listing for dynamic pulldown - $stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; - if ($DB) {echo "$stmt\n";} - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $fullname = $rowx[0]; - $dialplan_number = $rowx[1]; - $user_server_ip = $rowx[2]; - if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";} - } - else - { - fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); - fclose($fp); - } - } - - echo"\n"; - echo"ASTERISK REMOTE INBOUND: Main\n"; - echo"\n"; - echo"\n"; - echo"\n"; - -?> - - -
    - -
    \n"; - -echo "Click on the channel below that you would like to have directed to your phone

    \n"; - -echo "
    \n";
    -echo "CHANNEL    SERVER        CHANNEL_GROUP   EXTENSION    PARKED_BY            PARKED_TIME        \n";
    -echo "----------------------------------------------------------------------------------------------\n";
    -
    -
    -
    -
    -
    -$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
    -$rslt=mysql_query($stmt, $link);
    -if ($DB) {echo "$stmt\n";}
    -$row=mysql_fetch_row($rslt);
    -$parked_count = $row[0];
    -	if ($parked_count > 0)
    -	{
    -	$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
    -	$rslt=mysql_query($stmt, $link);
    -	if ($DB) {echo "$stmt\n";}
    -	$parked_to_print = mysql_num_rows($rslt);
    -	$i=0;
    -	while ($i < $parked_to_print)
    -		{
    -		$row=mysql_fetch_row($rslt);
    -		$channel =			sprintf("%-11s", $row[0]);
    -		$server =			sprintf("%-14s", $row[1]);
    -		$channel_group =	sprintf("%-16s", $row[2]);
    -		$extension =		sprintf("%-13s", $row[3]);
    -		$parked_by =		sprintf("%-21s", $row[4]);
    -		$parked_time =		sprintf("%-19s", $row[5]);
    -
    -		echo "$channel$server$channel_group$extension$parked_by$parked_time\n";
    -
    -		$i++;
    -		}
    -
    -	}
    -	else
    -	{
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "*************************************** NO PARKED CALLS **************************************\n";
    -	echo "**********************************************************************************************\n";
    -	echo "**********************************************************************************************\n";
    -	}
    -
    -
    -$ENDtime = date("U");
    -
    -$RUNtime = ($ENDtime - $STARTtime);
    -
    -echo "
    \n\n\n


    \n\n"; - - -echo "\n\n\n


    \nscript runtime: $RUNtime seconds
    "; - - -?> - - - - - - - - - - - diff --git a/agc_2-X/trunk/astguiclient_web/test.php b/agc_2-X/trunk/astguiclient_web/test.php deleted file mode 100644 index 62f8277b..00000000 --- a/agc_2-X/trunk/astguiclient_web/test.php +++ /dev/null @@ -1,30 +0,0 @@ - LICENSE: GPLv2 -### - -$STARTtime = date("U"); -$STARTdate = date("Y-m-d H:i:s"); - - -$link=mysql_connect("localhost", "cron", "1234"); -mysql_select_db("asterisk"); - - $stmt="SELECT * from phones;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - print "|$auth|\n"; - -exit; - - - -?> - - - - - diff --git a/agc_2-X/trunk/libs/AST_VICI_conf.pl.bak b/agc_2-X/trunk/libs/AST_VICI_conf.pl.bak deleted file mode 100644 index c4039f2b..00000000 --- a/agc_2-X/trunk/libs/AST_VICI_conf.pl.bak +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/perl - -### AST_VICI_conf.pl -### -### Copyright (C) 2006 Matt Florell LICENSE: GPLv2 -### - -### Customized Variables -$SIP_user = 'SIP/cc100'; # your phone id -$server_ip = '10.10.10.15'; # Asterisk server IP -$DB_server = '10.10.10.15'; # MySQL server IP -$DB_database = 'asterisk'; # MySQL database name -$DB_user = 'idcheck'; # MySQL user -$DB_pass = '1234'; # MySQL pass -$DB_port = '3306'; # MySQL connection port - -### Constants -$record_channel=''; -$filename=''; -$recording_id=''; -$US = '_'; -$MT[0] = ''; - -return 1; - - -# this subroutine is to be used with the callerID function to customize the -# variables that are passed in the URL string and the way that they are passed, -# these are the variables you have to work with: -# $callerID_areacode -# $callerID_prefix -# $callerID_last4 -# $callerID_Time -# $callerID_Channel -# $callerID_uniqueID -# $callerID_phone_ext -# $callerID_server_ip -# $callerID_extension -# $callerID_inbound_number -# $callerID_comment_a -# $callerID_comment_b -# $callerID_comment_c -# $callerID_comment_d -# $callerID_comment_e - -sub create_callerID_local_query_string -{ -$local_web_callerID_QUERY_STRING =''; -$local_web_callerID_QUERY_STRING.="?callerID_areacode=$callerID_areacode"; -$local_web_callerID_QUERY_STRING.="&callerID_prefix=$callerID_prefix"; -$local_web_callerID_QUERY_STRING.="&callerID_last4=$callerID_last4"; -$local_web_callerID_QUERY_STRING.="&callerID_Time=$callerID_Time"; -$local_web_callerID_QUERY_STRING.="&callerID_Channel=$callerID_Channel"; -$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$callerID_uniqueID"; -$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$callerID_phone_ext"; -$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$callerID_server_ip"; -$local_web_callerID_QUERY_STRING.="&callerID_extension=$callerID_extension"; -$local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$callerID_inbound_number"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_a=$callerID_comment_a"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_b=$callerID_comment_b"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$callerID_comment_c"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$callerID_comment_d"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$callerID_comment_e"; -} - -# $lead_id -# $vendor_id -# $list_id -# $phone_code -# $phone_number -# $title -# $first_name -# $middle_initial -# $last_name -# $address1 -# $address2 -# $address3 -# $city -# $state -# $province -# $postal_code -# $country_code -# $gender -# $date_of_birth -# $alt_phone -# $email -# $security -# $comments -# $user -# $pass -# $fronter -# $closer -# $campaign -# $group -# $SQLdate -# $epoch -# $uniqueid -# $customer_zap_channel -# $server_ip -# $SIPexten - -sub create_VICIDIAL_query_string -{ -$VICIDIAL_web_QUERY_STRING =''; -$VICIDIAL_web_QUERY_STRING.="?lead_id=$lead_id"; -$VICIDIAL_web_QUERY_STRING.="&vendor_id=$vendor_id"; -$VICIDIAL_web_QUERY_STRING.="&list_id=$list_id"; -$VICIDIAL_web_QUERY_STRING.="&phone_code=$phone_code"; -$VICIDIAL_web_QUERY_STRING.="&phone_number=$phone_number"; -$VICIDIAL_web_QUERY_STRING.="&title=$title"; -$VICIDIAL_web_QUERY_STRING.="&first_name=$first_name"; -$VICIDIAL_web_QUERY_STRING.="&middle_initial=$middle_initial"; -$VICIDIAL_web_QUERY_STRING.="&last_name=$last_name"; -$VICIDIAL_web_QUERY_STRING.="&address1=$address1"; -$VICIDIAL_web_QUERY_STRING.="&address2=$address2"; -$VICIDIAL_web_QUERY_STRING.="&address3=$address3"; -$VICIDIAL_web_QUERY_STRING.="&city=$city"; -$VICIDIAL_web_QUERY_STRING.="&state=$state"; -$VICIDIAL_web_QUERY_STRING.="&province=$province"; -$VICIDIAL_web_QUERY_STRING.="&postal_code=$postal_code"; -$VICIDIAL_web_QUERY_STRING.="&country_code=$country_code"; -$VICIDIAL_web_QUERY_STRING.="&gender=$gender"; -$VICIDIAL_web_QUERY_STRING.="&date_of_birth=$date_of_birth"; -$VICIDIAL_web_QUERY_STRING.="&alt_phone=$alt_phone"; -$VICIDIAL_web_QUERY_STRING.="&email=$email"; -$VICIDIAL_web_QUERY_STRING.="&security=$security"; -$VICIDIAL_web_QUERY_STRING.="&comments=$comments"; -$VICIDIAL_web_QUERY_STRING.="&user=$user"; -$VICIDIAL_web_QUERY_STRING.="&pass=$userpass"; -$VICIDIAL_web_QUERY_STRING.="&fronter=$fronter"; -$VICIDIAL_web_QUERY_STRING.="&closer=$user"; -$VICIDIAL_web_QUERY_STRING.="&campaign=$campaign"; -$VICIDIAL_web_QUERY_STRING.="&group=$group"; -$VICIDIAL_web_QUERY_STRING.="&channel_group=$channel_group"; -$VICIDIAL_web_QUERY_STRING.="&SQLdate=$SQLdate"; -$VICIDIAL_web_QUERY_STRING.="&epoch=$secX"; -$VICIDIAL_web_QUERY_STRING.="&uniqueid=$uniqueid"; -$VICIDIAL_web_QUERY_STRING.="&customer_zap_channel=$customer_zap_channel"; -$VICIDIAL_web_QUERY_STRING.="&server_ip=$server_ip"; -$VICIDIAL_web_QUERY_STRING.="&SIPexten=$SIPexten"; -$VICIDIAL_web_QUERY_STRING.="&session_id=$session_id"; -$VICIDIAL_web_QUERY_STRING.="&phone=$phone_number"; -$VICIDIAL_web_QUERY_STRING.="&parked_by=$lead_id"; -$VICIDIAL_web_QUERY_STRING =~ s/ /+/gi; -$VICIDIAL_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi; -} \ No newline at end of file diff --git a/agc_2-X/trunk/libs/AUS_zipcode_ranges.txt b/agc_2-X/trunk/libs/AUS_zipcode_ranges.txt deleted file mode 100644 index af434eb0..00000000 --- a/agc_2-X/trunk/libs/AUS_zipcode_ranges.txt +++ /dev/null @@ -1,14 +0,0 @@ -ACT|0200|0399 -NT|0800|0999 -NSW|1000|2599 -ACT|2600|2618 -NSW|2619|2899 -ACT|2900|2920 -NSW|2921|2999 -VIC|3000|3999 -QLD|4000|4999 -SA|5000|5999 -WA|6000|6999 -TAS|7000|7999 -VIC|8000|8999 -QLD|9000|9999 \ No newline at end of file diff --git a/agc_2-X/trunk/libs/Asterisk.pm b/agc_2-X/trunk/libs/Asterisk.pm deleted file mode 100644 index 15ecd4a8..00000000 --- a/agc_2-X/trunk/libs/Asterisk.pm +++ /dev/null @@ -1,20 +0,0 @@ -package Asterisk; - -require 5.004; - -$VERSION = '0.08'; - -sub version { $VERSION; } - -sub new { - my ($class, %args) = @_; - my $self = {}; - $self->{configfile} = undef; - $self->{config} = {}; - bless $self, ref $class || $class; - return $self; -} - -sub DESTROY { } - -1; diff --git a/agc_2-X/trunk/libs/Asterisk/AGI.pm b/agc_2-X/trunk/libs/Asterisk/AGI.pm deleted file mode 100644 index b1680ea6..00000000 --- a/agc_2-X/trunk/libs/Asterisk/AGI.pm +++ /dev/null @@ -1,685 +0,0 @@ -package Asterisk::AGI; - -require 5.004; - -use Asterisk; - -@ISA = ( 'Asterisk' ); - -=head1 NAME - -Asterisk::AGI - Simple Asterisk Gateway Interface Class - -=head1 SYNOPSIS - -use Asterisk::AGI; - -$AGI = new Asterisk::AGI; - -# pull AGI variables into %input - - %input = $AGI->ReadParse(); - -# say the number 1984 - - $AGI->say_number(1984); - -=head1 DESCRIPTION - -This module should make it easier to write scripts that interact with the -asterisk open source pbx via AGI (asterisk gateway interface) - -=head1 AGI COMMANDS - -=cut - -sub new { - my ($class, %args) = @_; - my $self = {}; - $self->{'callback'} = undef; - $self->{'status'} = undef; - $self->{'lastresponse'} = undef; - bless $self, ref $class || $class; - return $self; -} - -sub ReadParse { - my ($self, $fh) = @_; - - my %input = (); - - $fh = \*STDIN if (!$fh); - - while (<$fh>) { - chomp; - last unless length($_); - if (/^agi_(\w+)\:\s+(.*)$/) { - $input{$1} = $2; - } - } - - - if (defined($DEBUG)&&($DEBUG>0)) { - print STDERR "AGI Environment Dump:\n"; - foreach $i (sort keys %input) { - print STDERR " -- $i = $input{$i}\n"; - } - } - - return %input; -} - -sub setcallback { - my ($self, $function) = @_; - - if (defined($function) && ref($function) eq 'CODE') { - $self->{'callback'} = $function; - } -} - -sub callback { - my ($self, $result) = @_; - - if (defined($self->{'callback'}) && ref($self->{'callback'}) eq 'CODE') { - &{$self->{'callback'}}($result); - } -} - -sub execute { - my ($self, $command) = @_; - - $self->_execcommand($command); - my $res = $self->_readresponse(); - - return $self->_checkresult($res); -} - -sub _execcommand { - my ($self, $command, $fh) = @_; - - $fh = \*STDOUT if (!$fh); - - select ((select ($fh), $| = 1)[0]); - - return -1 if (!defined($command)); - - return print $fh "$command\n"; -} - -sub _readresponse { - my ($self, $fh) = @_; - - my $response = undef; - $fh = \*STDIN if (!$fh); - $response = <$fh> || return '200 result=-1 (noresponse)'; - chomp($response); - return $response; -} - -sub _checkresult { - my ($self, $response) = @_; - - return undef if (!defined($response)); - my $result = undef; - - $self->_lastresponse($response); - if ($response =~ /^200/) { - if ($response =~ /result=(-?[\d*#]+)/) { - $result = $1; - } - } elsif ($response =~ /\(noresponse\)/) { - $self->_status('noresponse'); - } else { - print STDERR "Unexpected result '$response'\n" if (defined($DEBUG) && $DEBUG); - } - print STDERR "_checkresult($response) = $result\n" if (defined($DEBUG) && $DEBUG>3); - - return $result; -} - -sub _status { - my ($self, $status) = @_; - - if (defined($status)) { - $self->{'status'} = $status; - } else { - return $self->{'status'}; - } -} - -sub _lastresponse { - my ($self, $response) = @_; - - if (defined($response)) { - $self->{'lastresponse'} = $response; - } else { - return $self->{'lastresponse'}; - } -} - -=over 4 - -=item $AGI->stream_file($filename, $digits) - -Executes AGI Command "STREAM FILE $filename $digits" - -This command instructs Asterisk to play the given sound file and listen for the given dtmf digits. The -fileextension must not be used in the filename because Asterisk will find the most appropriate file -type. - -Example: $AGI->stream_file('demo-echotest', '0123'); - -Returns: -1 on error or hangup, -0 if playback completes without a digit being pressed, -or the ASCII numerical value of the digit if a digit was pressed - -=cut - -sub stream_file { - my ($self, $filename, $digits) = @_; - - my $ret = 0; - - $digits = '""' if (!defined($digits)); - - return -1 if (!defined($filename)); - $ret = $self->execute("STREAM FILE $filename $digits"); - - $self->callback($ret) if ($ret == -1); - - return $ret; -} - -=item $AGI->send_text($text) - -Executes AGI Command "SEND TEXT "$text" - -Sends the given text on a channel. Most channels do not support the transmission of text. - -Example: $AGI->send_text('You've got mail!'); - -Returns: -1 on error or hangup, -0 if the text was sent or if the channel does not support text transmission. - -=cut - -sub send_text { - my ($self, $text) = @_; - - my $ret = 0; - - return $ret if (!defined($text)); - $ret = $self->execute("SEND TEXT \"$text\""); - $self->callback($ret) if ($ret == -1); - - return $ret; -} - -=item $AGI->send_image($image) - -Executes AGI Command "SEND IMAGE $image - -Sends the given image on a channel. Most channels do not support the transmission of images. - -Example: $AGI->send_image('image.png'); - -Returns: -1 on error or hangup, -0 if the image was sent or if the channel does not support image transmission. - -=cut - -sub send_image { - my ($self, $image) = @_; - - my $ret = 0; - return -1 if (!defined($image)); - - $ret = $self->execute("SEND IMAGE $image"); - $self->callback($ret) if ($ret == -1); - - return $ret; -} - -=item $AGI->say_number($number, $digits) - -Executes AGI Command "SAY NUMBER $number $digits" - -Says the given $number, returning early if any of the $digits are received. - -Example: $AGI->say_number('98765'); - -Returns: -1 on error or hangup, -0 if playback completes without a digit being pressed, -or the ASCII numerical value of the digit of one was pressed. - -=cut - -sub say_number { - my ($self, $number, $digits) = @_; - - my $ret = 0; - - $digits = '""' if (!defined($digits)); - - return -1 if (!defined($number)); - $number =~ s/\D//g; - $ret = $self->execute("SAY NUMBER $number $digits"); - - $self->callback($ret) if ($ret == -1); - - return $ret; -} - -=item $AGI->say_digits($number, $digits) - -Executes AGI Command "SAY DIGITS $number $digits" - -Says the given digit string $number, returning early if any of the $digits are received. - -Example: $AGI->say_digits('8675309'); - -Returns: -1 on error or hangup, -0 if playback completes without a digit being pressed, -or the ASCII numerical value of the digit of one was pressed. - -=cut - -sub say_digits { - my ($self, $number, $digits) = @_; - - my $ret = 0; - $digits = '""' if (!defined($digits)); - - return -1 if (!defined($number)); - $number =~ s/\D//g; - $ret = $self->execute("SAY DIGITS $number $digits"); - $self->callback($ret) if ($ret == -1); - - return $ret; -} - -=item $AGI->answer() - -Executes AGI Command "ANSWER" - -Answers channel if not already in answer state - -Example: $AGI->answer(); - -Returns: -1 on channel failure, or -0 if successful - -=cut - -sub answer { - my ($self) = @_; - - my $ret = 0; - $ret = $self->execute('ANSWER'); - $self->callback($ret) if ($ret == -1); - - return $ret; - -} - -=item $AGI->get_data($filename, $timeout, $maxdigits) - -Executes AGI Command "GET DATA $filename $timeout $maxdigits" - -Streams $filename and returns when $maxdigits have been received or -when $timeout has been reached. Timeout is specified in ms - -Example: $AGI->get_data('demo-welcome', 15000, 5); - -=cut - -sub get_data { - my ($self, $filename, $timeout, $maxdigits) = @_; - - my $ret = undef; - - return -1 if (!defined($filename)); - $ret = $self->execute("GET DATA $filename $timeout $maxdigits"); - $self->callback($ret) if ($ret == -1); - - return $ret; -} - -=item $AGI->set_callerid($number) - -Executes AGI Command "SET CALLERID $number" - -Changes the callerid of the current channel to - -Example: $AGI->set_callerid('9995551212'); - -Returns: Always returns 1 - -=cut - -sub set_callerid { - my ($self, $number) = @_; - - return if (!defined($number)); - return $self->execute("SET CALLERID $number"); -} - -=item $AGI->set_context($context) - -Executes AGI Command "SET CONTEXT $context" - -Changes the context for continuation upon exiting the agi application - -Example: $AGI->set_context('dialout'); - -Returns: Always returns 0 - -=cut - -sub set_context { - my ($self, $context) = @_; - - return -1 if (!defined($context)); - return $self->execute("SET CONTEXT $context"); -} - -=item $AGI->set_extension($extension) - -Executes AGI Command "SET EXTENSION $extension" - -Changes the extension for continuation upon exiting the agi application - -Example: $AGI->set_extension('7'); - -Returns: Always returns 0 - -=cut - -sub set_extension { - my ($self, $extension) = @_; - - return -1 if (!defined($extension)); - return $self->execute("SET EXTENSION $extension"); -} - -=item $AGI->set_priority($priority) - -Executes AGI Command "SET PRIORITY $priority" - -Changes the priority for continuation upon exiting the agi application - -Example: $AGI->set_priority(1); - -Returns: Always returns 0 - -=cut - -sub set_priority { - my ($self, $priority) = @_; - - return -1 if (!defined($priority)); - return $self->execute("SET PRIORITY $priority"); -} - -sub receive_char { - my ($self, $timeout) = @_; - - my $ret = 0; -#wait forever if timeout is not set. is this the prefered default? - $timeout = 0 if (!defined($timeout)); - $ret = $self->execute("RECEIVE CHAR $timeout"); - $self->callback($ret) if ($ret == -1); - - return $ret; - -} - -sub tdd_mode { - my ($self, $mode) = @_; - - return 0 if (!defined($mode)); - return $self->execute("TDD MODE $mode"); -} - - -sub wait_for_digit { - my ($self, $timeout) = @_; - - my $ret = 0; - $timeout = -1 if (!defined($timeout)); - $ret = $self->execute("WAIT FOR DIGIT $timeout"); - - $self->callback($ret) if ($ret == -1); - - return $ret; -} - -sub record_file { - my ($self, $filename, $format, $digits, $timeout, $beep) = @_; - - my $ret = 0; - - return -1 if (!defined($filename)); - $digits = '""' if (!defined($digits)); - $ret = $self->execute("RECORD FILE $filename $format $digits $timeout"); - - $self->callback($ret) if ($ret == -1); - - return $ret; -} - -sub set_autohangup { - my ($self, $time) = @_; - - $time = 0 if (!defined($time)); - return $self->execute("SET AUTOHANGUP $time"); -} - -=item $AGI->hangup($channel) - -Executes AGI Command "HANGUP $channel" - -Hangs up the passed $channel, or the current channel if $channel is not passed. -It is left to the AGI script to exit properly, otherwise you could end up with zombies. - -Example: $AGI->hangup(); - -Returns: Always returns 1 - -=cut - -sub hangup { - my ($self, $channel) = @_; - - if ($channel) { - return $self->execute("HANGUP $channel"); - } else { - return $self->execute("HANGUP"); - } -} - -=item $AGI->exec($app, $options) - -Executes AGI Command "EXEC $app $options" - -The most powerful AGI command. Executes the given application passing the given options. - -Example: $AGI->exec('Dial', 'Zap/g2/8005551212'); - -Returns: -2 on failure to find application, or -whatever the given application returns - -=cut - -sub exec { - my ($self, $app, $options) = @_; - return -1 if (!defined($app)); - $options = '""' if (!defined($options)); - return $self->execute("EXEC $app $options"); -} - -sub channel_status { - my ($self, $channel) = @_; - - return $self->execute("CHANNEL STATUS $channel"); -} - -=item $AGI->set_variable($variable, $value) - -Executes AGI Command "SET VARIABLE $variable $value" - -Sets the channel variable to - -Example: $AGI->set_variable('status', 'authorized'); - -Returns: Always returns 1 - -=cut - -sub set_variable { - my ($self, $variable, $value) = @_; - - return $self->execute("SET VARIABLE $variable $value"); -} - -=item $AGI->get_variable($variable) - -Executes AGI Command "GET VARIABLE $variablename" - -Gets the channel variable - -Example: $AGI->get_variable('status'); - -Returns: The value of the variable, or undef if variable does not exist - -=cut - -sub get_variable { - my ($self, $variable) = @_; - - my $result = undef; - - if ($self->execute("GET VARIABLE $variable")) { - my $tempresult = $self->_lastresponse(); - if ($tempresult =~ /\((.*)\)/) { - $result = $1; - } - } - return $result; -} - -=item $AGI->verbose($message, $level) - -Executes AGI Command "VERBOSE $message $level" - -Logs $message with verboselevel $level - -Example: $AGI->verbose("System Crashed\n", 1); - -Returns: Always returns 1 - -=cut - - -sub verbose { - my ($self, $message, $level) = @_; - - return $self->execute("VERBOSE \"$message\" $level"); -} - -=item $AGI->database_get($family, $key) - -Executes AGI Command "DATABASE GET $family $key" - -Example: $var = $AGI->database_get('test', 'status'); - -Returns: The value of the variable, or undef if variable does not exist - -=cut - -sub database_get { - my ($self, $family, $key) = @_; - - my $result = undef; - - if ($self->execute("DATABASE GET $family $key")) { - my $tempresult = $self->_lastresponse(); - if ($tempresult =~ /\((.*)\)/) { - $result = $1; - } - } - return $result; -} - -=item $AGI->database_put($family, $key, $value) - -Executes AGI Command "DATABASE PUT $family $key $value" - -Set/modifes database entry / to - -Example: $AGI->database_put('test', 'status', 'authorized'); - -Returns: 1 on success, 0 otherwise - -=cut - -sub database_put { - my ($self, $family, $key, $value) = @_; - - return $self->execute("DATABASE PUT $family $key $value"); -} - -=item $AGI->database_del($family, $key) - -Executes AGI Command "DATABASE DEL $family $key" - -Removes database entry / - -Example: $AGI->database_del('test', 'status'); - -Returns: 1 on success, 0 otherwise - -=cut - -sub database_del { - my ($self, $family, $key) = @_; - - return $self->execute("DATABASE DEL $family $key"); -} - -=item $AGI->database_deltree($family, $key) - -Executes AGI Command "DATABASE DELTREE $family $key" - -Deletes a family or specific keytree within a family in the Asterisk database - -Example: $AGI->database_deltree('test', 'status'); -Example: $AGI->database_deltree('test'); - -Returns: 1 on success, 0 otherwise - -=cut - -sub database_deltree { - my ($self, $family, $key) = @_; - - return $self->execute("DATABASE DELTREE $family $key"); -} - -sub noop { - my ($self) = @_; - - return $self->execute("NOOP"); -} - -sub set_music { - my ($self, $mode, $class) = @_; - - return $self->execute("SET MUSIC $mode $class"); -} - -1; - -__END__ - -=back diff --git a/agc_2-X/trunk/libs/Asterisk/DONOTUSE_AST_VICI_conf.pl b/agc_2-X/trunk/libs/Asterisk/DONOTUSE_AST_VICI_conf.pl deleted file mode 100644 index c4039f2b..00000000 --- a/agc_2-X/trunk/libs/Asterisk/DONOTUSE_AST_VICI_conf.pl +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/perl - -### AST_VICI_conf.pl -### -### Copyright (C) 2006 Matt Florell LICENSE: GPLv2 -### - -### Customized Variables -$SIP_user = 'SIP/cc100'; # your phone id -$server_ip = '10.10.10.15'; # Asterisk server IP -$DB_server = '10.10.10.15'; # MySQL server IP -$DB_database = 'asterisk'; # MySQL database name -$DB_user = 'idcheck'; # MySQL user -$DB_pass = '1234'; # MySQL pass -$DB_port = '3306'; # MySQL connection port - -### Constants -$record_channel=''; -$filename=''; -$recording_id=''; -$US = '_'; -$MT[0] = ''; - -return 1; - - -# this subroutine is to be used with the callerID function to customize the -# variables that are passed in the URL string and the way that they are passed, -# these are the variables you have to work with: -# $callerID_areacode -# $callerID_prefix -# $callerID_last4 -# $callerID_Time -# $callerID_Channel -# $callerID_uniqueID -# $callerID_phone_ext -# $callerID_server_ip -# $callerID_extension -# $callerID_inbound_number -# $callerID_comment_a -# $callerID_comment_b -# $callerID_comment_c -# $callerID_comment_d -# $callerID_comment_e - -sub create_callerID_local_query_string -{ -$local_web_callerID_QUERY_STRING =''; -$local_web_callerID_QUERY_STRING.="?callerID_areacode=$callerID_areacode"; -$local_web_callerID_QUERY_STRING.="&callerID_prefix=$callerID_prefix"; -$local_web_callerID_QUERY_STRING.="&callerID_last4=$callerID_last4"; -$local_web_callerID_QUERY_STRING.="&callerID_Time=$callerID_Time"; -$local_web_callerID_QUERY_STRING.="&callerID_Channel=$callerID_Channel"; -$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$callerID_uniqueID"; -$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$callerID_phone_ext"; -$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$callerID_server_ip"; -$local_web_callerID_QUERY_STRING.="&callerID_extension=$callerID_extension"; -$local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$callerID_inbound_number"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_a=$callerID_comment_a"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_b=$callerID_comment_b"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$callerID_comment_c"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$callerID_comment_d"; -$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$callerID_comment_e"; -} - -# $lead_id -# $vendor_id -# $list_id -# $phone_code -# $phone_number -# $title -# $first_name -# $middle_initial -# $last_name -# $address1 -# $address2 -# $address3 -# $city -# $state -# $province -# $postal_code -# $country_code -# $gender -# $date_of_birth -# $alt_phone -# $email -# $security -# $comments -# $user -# $pass -# $fronter -# $closer -# $campaign -# $group -# $SQLdate -# $epoch -# $uniqueid -# $customer_zap_channel -# $server_ip -# $SIPexten - -sub create_VICIDIAL_query_string -{ -$VICIDIAL_web_QUERY_STRING =''; -$VICIDIAL_web_QUERY_STRING.="?lead_id=$lead_id"; -$VICIDIAL_web_QUERY_STRING.="&vendor_id=$vendor_id"; -$VICIDIAL_web_QUERY_STRING.="&list_id=$list_id"; -$VICIDIAL_web_QUERY_STRING.="&phone_code=$phone_code"; -$VICIDIAL_web_QUERY_STRING.="&phone_number=$phone_number"; -$VICIDIAL_web_QUERY_STRING.="&title=$title"; -$VICIDIAL_web_QUERY_STRING.="&first_name=$first_name"; -$VICIDIAL_web_QUERY_STRING.="&middle_initial=$middle_initial"; -$VICIDIAL_web_QUERY_STRING.="&last_name=$last_name"; -$VICIDIAL_web_QUERY_STRING.="&address1=$address1"; -$VICIDIAL_web_QUERY_STRING.="&address2=$address2"; -$VICIDIAL_web_QUERY_STRING.="&address3=$address3"; -$VICIDIAL_web_QUERY_STRING.="&city=$city"; -$VICIDIAL_web_QUERY_STRING.="&state=$state"; -$VICIDIAL_web_QUERY_STRING.="&province=$province"; -$VICIDIAL_web_QUERY_STRING.="&postal_code=$postal_code"; -$VICIDIAL_web_QUERY_STRING.="&country_code=$country_code"; -$VICIDIAL_web_QUERY_STRING.="&gender=$gender"; -$VICIDIAL_web_QUERY_STRING.="&date_of_birth=$date_of_birth"; -$VICIDIAL_web_QUERY_STRING.="&alt_phone=$alt_phone"; -$VICIDIAL_web_QUERY_STRING.="&email=$email"; -$VICIDIAL_web_QUERY_STRING.="&security=$security"; -$VICIDIAL_web_QUERY_STRING.="&comments=$comments"; -$VICIDIAL_web_QUERY_STRING.="&user=$user"; -$VICIDIAL_web_QUERY_STRING.="&pass=$userpass"; -$VICIDIAL_web_QUERY_STRING.="&fronter=$fronter"; -$VICIDIAL_web_QUERY_STRING.="&closer=$user"; -$VICIDIAL_web_QUERY_STRING.="&campaign=$campaign"; -$VICIDIAL_web_QUERY_STRING.="&group=$group"; -$VICIDIAL_web_QUERY_STRING.="&channel_group=$channel_group"; -$VICIDIAL_web_QUERY_STRING.="&SQLdate=$SQLdate"; -$VICIDIAL_web_QUERY_STRING.="&epoch=$secX"; -$VICIDIAL_web_QUERY_STRING.="&uniqueid=$uniqueid"; -$VICIDIAL_web_QUERY_STRING.="&customer_zap_channel=$customer_zap_channel"; -$VICIDIAL_web_QUERY_STRING.="&server_ip=$server_ip"; -$VICIDIAL_web_QUERY_STRING.="&SIPexten=$SIPexten"; -$VICIDIAL_web_QUERY_STRING.="&session_id=$session_id"; -$VICIDIAL_web_QUERY_STRING.="&phone=$phone_number"; -$VICIDIAL_web_QUERY_STRING.="&parked_by=$lead_id"; -$VICIDIAL_web_QUERY_STRING =~ s/ /+/gi; -$VICIDIAL_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi; -} \ No newline at end of file diff --git a/agc_2-X/trunk/libs/Asterisk/Manager.pm b/agc_2-X/trunk/libs/Asterisk/Manager.pm deleted file mode 100644 index 69d860a1..00000000 --- a/agc_2-X/trunk/libs/Asterisk/Manager.pm +++ /dev/null @@ -1,412 +0,0 @@ -package Asterisk::Manager; - -require 5.004; - -use Asterisk; -use IO::Socket; -use Digest::MD5; - -#use strict; -#use warnings; - -=head1 NAME - -Asterisk::Manager - Asterisk Manager Interface - -=head1 SYNOPSIS - -use Asterisk::Manager; - -my $astman = new Asterisk::Manager; - -$astman->user('username'); - -$astman->secret('test'); - -$astman->host('localhost'); - -$astman->connect || die "Could not connect to " . $astman->host . "!\n"; - -$astman->disconnect; - -=head1 DESCRIPTION - -This module provides a simple interface to the asterisk manager interface. - -=cut - -my $EOL = "\r\n"; -my $BLANK = $EOL x 2; - -my $VERSION = '0.01'; - -sub version { $VERSION; } - -sub new { - my ($class, %args) = @_; - - my $self = {}; - $self->{_CONNFD} = undef; - $self->{_PROTOVERS} = undef; - $self->{_ERRORSTR} = undef; - $self->{_HOST} = 'localhost'; - $self->{_PORT} = 5038; - $self->{_USER} = undef; - $self->{_SECRET} = undef; - $self->{_EVENTCB} = {}; - $self->{_DEBUG} = 0; - $self->{_CONNECTED} = 0; - bless $self, ref $class || $class; - return $self; -} - -sub DESTROY { } - -sub user { - my ($self, $user) = @_; - - if ($user) { - $self->{_USER} = $user; - } - - return $self->{_USER}; -} - -sub secret { - my ($self, $secret) = @_; - - if ($secret) { - $self->{_SECRET} = $secret; - } - - return $self->{_SECRET}; -} - -sub host { - my ($self, $host) = @_; - - if ($host) { - $self->{_HOST} = $host; - } - - return $self->{_HOST}; -} - -sub port { - my ($self, $port) = @_; - - if ($port) { - $self->{_PORT} = $port; - } - - return $self->{_PORT}; -} - -sub connected { - my ($self, $connected) = @_; - - if (defined($connected)) { - $self->{_CONNECTED} = $connected; - } - - return $self->{_CONNECTED}; -} - -sub error { - my ($self, $error) = @_; - - if ($error) { - $self->{_ERRORSTR} = $error; - } - - return $self->{_ERRORSTR}; -} - -sub debug { - my ($self, $debug) = @_; - - if ($debug) { - $self->{_DEBUG} = $debug; - } - - return $self->{_DEBUG}; -} - -sub connfd { - my ($self, $connfd) = @_; - - if ($connfd) { - $self->{_CONNFD} = $connfd; - } - - return $self->{_CONNFD}; -} - -sub read_response { - my ($self, $connfd) = @_; - - my @response; - - if (!$connfd) { - $connfd = $self->connfd; - } - - while (my $line = <$connfd>) { - last if ($line eq $EOL); - - if (wantarray) { - $line =~ s/$EOL//g; - push(@response, $line) if $line; - } else { - $response[0] .= $line; - } - - } - - return wantarray ? @response : $response[0]; -} - -sub connect { - my ($self) = @_; - - my $host = $self->host; - my $port = $self->port; - my $user = $self->user; - my $secret = $self->secret; - my %resp; - - my $conn = new IO::Socket::INET( Proto => 'tcp', - PeerAddr => $host, - PeerPort => $port - ); - if (!$conn) { - $self->error("Connection refused ($host:$port)\n"); - return undef; - } - - $conn->autoflush(1); - - my $input = <$conn>; - $input =~ s/$EOL//g; - - my ($manager, $version) = split('/', $input); - - if ($manager !~ /Asterisk Call Manager/) { - return $self->error("Unknown Protocol\n"); - } - - $self->{_PROTOVERS} = $version; - $self->connfd($conn); - - # check if the remote host supports MD5 Challenge authentication - my %authresp = $self->sendcommand( Action => 'Challenge', - AuthType => 'MD5' - ); - - if (($authresp{Response} eq 'Success')) { - # do md5 login - my $md5 = new Digest::MD5; - $md5->add($authresp{Challenge}); - $md5->add($secret); - my $digest = $md5->hexdigest; - %resp = $self->sendcommand( Action => 'Login', - AuthType => 'MD5', - Username => $user, - Key => $digest - ); - } else { - # do plain text login - %resp = $self->sendcommand( Action => 'Login', - Username => $user, - Secret => $secret - ); - - } - - if ( ($resp{Response} ne 'Success') && ($resp{Message} ne 'Authentication accepted') ) { - $self->error("Authentication failed for user $user\n"); - return undef; - } - - $self->connected(1); - - return $conn; -} - -sub astman_h2s { - my ($self, %thash) = @_; - - my $tstring = ''; - - foreach my $key (keys %thash) { - $tstring .= $key . ': ' . $thash{$key} . ${EOL}; - } - - return $tstring; -} - -sub astman_s2h { - my ($self, $tstring) = @_; - - my %thash; - - foreach my $line (split(/$EOL/, $tstring)) { - if ($line =~ /(\w*):\s*(\w*)/) { - $thash{$1} = $2; - } - } - - return %thash; -} - -#$want is how you want the data returned -#$want = 0 (default) returns the results in a hash -#$want = 1 returns the results in a large string -#$want = 2 returns the results in an array -sub sendcommand { - my ($self, %command, $want) = @_; - - if (!defined($want)) { - $want = 0; - } - - my $conn = $self->connfd || return; - my $cstring = $self->astman_h2s(%command); - - $conn->send("$cstring$EOL"); - - if ($want == 1) { - my $response = $self->read_response($conn); - return $response; - } - - my @resp = $self->read_response($conn); - - if ($want == 2) { - return @resp; - } else { - return map { split(': ', $_) } @resp; - } -} - -sub setcallback { - my ($self, $event, $function) = @_; - - if (defined($function) && ref($function) eq 'CODE') { - $self->{_EVENTCB}{$event} = $function; - } -} - -sub eventcallback { - my ($self, %resp) = @_; - - my $callback; - my $event = $resp{Event}; - - return if (!$event); - - if (defined($self->{_EVENTCB}{$event})) { - $callback = $self->{_EVENTCB}{$event}; - } elsif (defined($self->{_EVENTCB}{DEFAULT})) { - $callback = $self->{_EVENTCB}{DEFAULT}; - } else { - return; - } - - return &{$callback}(%resp); -} - -sub eventloop { - my ($self) = @_; - - while (1) { - $self->handleevent; - } -} - -sub handleevent { - my ($self) = @_; - - my %resp = map { split(': ', $_); } $self->read_response; - $self->eventcallback(%resp); - - return %resp; -} - -sub action { - my ($self, $command, $wanthash) = @_; - - return if (!$command); - - my $conn = $self->connfd || return; - - print $conn "Action: $command" . $BLANK; - my @resp = $self->read_response($conn); - - if ($wanthash) { - return map { split(': ', $_) } @resp; - } elsif (wantarray) { - return @resp; - } else { - return $resp[0]; - } -} - -sub command { - my ($self, $command) = @_; - - return if (!$command); - - return $self->sendcommand('Action' => 'Command', - 'Command' => $command, 1 ); -} - -sub monitor { - my ($self, $channel, $file) = @_; - - return if (!$channel); - - return $self->sendcommand('Action' => 'Monitor', - 'Channel' => $channel, - 'File' => $file, 1 ); -} - -sub changemonitor { - my ($self, $channel, $file) = @_; - - return if (!$channel); - - return $self->sendcommand('Action' => 'ChangeMonitor', - 'Channel' => $channel, - 'File' => $file, 1 ); -} - -sub stopmonitor { - my ($self, $channel, $file) = @_; - - return if (!$channel); - - return $self->sendcommand('Action' => 'StopMonitor', - 'Channel' => $channel, - 'File' => $file, 1 ); -} - - -sub disconnect { - my ($self) = @_; - - my $conn = $self->connfd; - - my %resp = $self->sendcommand('Action' => 'Logoff'); - - - if ($resp{Response} eq 'Goodbye') { - $self->{_CONNFD} = undef; - $self->connected(0); - return 1; - } - - return 0; -} - -1; diff --git a/agc_2-X/trunk/libs/Asterisk/Outgoing.pm b/agc_2-X/trunk/libs/Asterisk/Outgoing.pm deleted file mode 100644 index 6e128332..00000000 --- a/agc_2-X/trunk/libs/Asterisk/Outgoing.pm +++ /dev/null @@ -1,110 +0,0 @@ -package Asterisk::Outgoing; - -=head1 NAME - -Asterisk::Outgoing - Create outgoing call queue file - -=head1 SYNOPSIS - -use Asterisk::Outgoing; - -my $out = new Asterisk::Outgoing; - -$out->setvariable('Channel', 'Zap/1/'); - -$out->setvariable('MaxRetries', 0); - -$out->setvariable('RetryTime', 60); - -$out->setvariable('WaitTime', 60); - -$out->setvariable('Application', 'Playback'); - -$out->setvariable('Data', 'beep'); - -$out->create_outgoing; - -=cut - -require 5.004; - -use Fcntl ':flock'; -use Asterisk; -@ISA = ('Asterisk'); - -$VERSION = '0.01'; - -sub new { - my ($class, %args) = @_; - my $self = {}; - $self->{OUTDIR} = '/var/spool/asterisk/outgoing'; - $self->{OUTTIME} = undef; - $self->{OUTVARS} = {}; - $self->{ALLOWEDVARS} = [ 'channel', 'maxretries', 'retrytime', 'waittime', 'context', 'extension', 'priority', 'application', 'data', 'callerid' ]; - bless $self, ref $class || $class; - return $self; -} - -sub outdir { - my ($self, $dir) = @_; - - if (defined($dir)) { - $self->{OUTDIR} = $dir; - } - - return $self->{OUTDIR}; -} - -sub outtime { - my ($self, $time) = @_; - - if (defined($time)) { - $self->{OUTTIME} = $time; - } elsif (!defined($self->{OUTTIME})) { - $self->{OUTTIME} = time(); - } - - return $self->{OUTTIME}; -} - -sub checkvariable { - my ($self, $var) = @_; - - my $ret = 0; - - foreach $allowed (@{$self->{ALLOWEDVARS}}) { - if ($allowed =~ /$var/i) { - $ret = 1; - } - } - return $ret; -} - -sub setvariable { - my ($self, $var, $value) = @_; - - if ($self->checkvariable($var)) { - $self->{OUTVARS}{$var} = $value; - } -} - -sub create_outgoing { - my ($self) = @_; - - my $time = $self->outtime(); - - my $outdir = $self->outdir(); - my $filename = $outdir . '/' . $time . '.outgoing'; - open(OUTFILE, ">$filename") || return 0; - flock(OUTFILE, LOCK_EX); - utime($time, $time, $filename); - foreach my $var (keys %{$self->{OUTVARS}}) { - print OUTFILE "$var: " . $self->{OUTVARS}{$var} . "\n"; - } - flock(OUTFILE, LOCK_UN); - close(OUTFILE); - utime($time, $time, $filename); - return 1; -} - -1; diff --git a/agc_2-X/trunk/libs/Asterisk/QCall.pm b/agc_2-X/trunk/libs/Asterisk/QCall.pm deleted file mode 100644 index 25f75a9c..00000000 --- a/agc_2-X/trunk/libs/Asterisk/QCall.pm +++ /dev/null @@ -1,61 +0,0 @@ -package Asterisk::QCall; - -require 5.004; - -use Fcntl ':flock'; -use Asterisk; - -$VERSION = '0.01'; - -sub version { $VERSION; } - -sub new { - my ($class, %args) = @_; - my $self = {}; - $self->{QUEUEDIR} = '/var/spool/asterisk/qcall'; - $self->{QUEUETIME} = undef; - bless $self, ref $class || $class; - return $self; -} - -sub DESTROY { } - -sub queuedir { - my ($self, $dir) = @_; - - if (defined($dir)) { - $self->{QUEUEDIR} = $dir; - } - - return $self->{QUEUEDIR}; -} - -sub queuetime { - my ($self, $time) = @_; - - if (defined($time)) { - $self->{QUEUETIME} = $time; - } elsif (!defined($self->{QUEUETIME})) { - $self->{QUEUETIME} = time(); - } - - return $self->{QUEUETIME}; -} - -sub create_qcall { - my ($self, $dialstring, $callerid, $extension, $maxsecs, $identifier, $response) = @_; - - my $time = $self->queuetime(); - - my $queuedir = $self->queuedir(); - my $filename = $queuedir . '/' . $time . '.queue'; - open(QFILE, ">$filename") || return 0; - flock(QFILE, LOCK_EX); - print QFILE "$dialstring $callerid $extension $maxsecs $identifier $response"; - flock(QFILE, LOCK_UN); - close(QFILE); - my $ret = utime($time, $time, $filename); - return 1; -} - -1; diff --git a/agc_2-X/trunk/libs/Asterisk/Voicemail.pm b/agc_2-X/trunk/libs/Asterisk/Voicemail.pm deleted file mode 100644 index 780cef56..00000000 --- a/agc_2-X/trunk/libs/Asterisk/Voicemail.pm +++ /dev/null @@ -1,261 +0,0 @@ -package Asterisk::Voicemail; - -require 5.004; - -=head1 NAME - -Asterisk::Voicemail - Stuff to deal with asterisk voicemail - -=head1 SYNOPSIS - -This is not completed yet - -=head1 DESCRIPTION - -description - -=cut - -use Asterisk; - -@ISA = ( 'Asterisk' ); - -$VERSION = '0.01'; - -$DEBUG = 5; - -sub version { $VERSION; } - -sub new { - my ($class, %args) = @_; - my $self = {}; - bless $self, ref $class || $class; -# while (my ($key,$value) = each %args) { $self->set($key,$value); } - return $self; -} - -sub DESTROY { } - -sub spooldirectory { - my ($self, $directory) = @_; - - if (defined($directory)) { - $self->{'spooldirectory'} = $directory; - } else { - $self->{'spooldirectory'} = '/var/spool/asterisk/vm' if (!defined($self->{'spooldirectory'})); - } - - return $self->{'spooldirectory'}; -} - -sub sounddirectory { - my ($self, $directory) = @_; - - if (defined($directory)) { - $self->{'sounddirectory'} = $directory; - } else { - $self->{'sounddirectory'} = '/var/lib/asterisk/sounds' if (!defined($self->{'sounddirectory'})); - } - - return $self->{'sounddirectory'}; -} - -sub serveremail { - my ($self, $email) = @_; - - $self->{'serveremail'} = $email if (defined($email)); - - return $self->{'serveremail'}; -} - -sub format { - my ($self, @formats) = @_; - - if (@formats) { - $self->{'formats'} = @formats; - } - - return $self->{'formats'}; -} - -sub vmbox { - my ($self, $vmbox, $vmpass, $vmfn, $vmemail) = @_; - - if (defined($vmbox) && (defined($vmpass) || defined($vmfn) || defined($vmemail)) ) { - $self->{'vmbox'}{$vmbox}{'pass'} = $vmpass if (defined($vmpass)); - $self->{'vmbox'}{$vmbox}{'fn'} = $vmfn if (defined($vmfn)); - $self->{'vmbox'}{$vmbox}{'email'} = $vmemail if (defined($vmemail)); - } elsif (defined($vmbox)) { - return ($self->{'vmbox'}{$vmbox}{'pass'}, - $self->{'vmbox'}{$vmbox}{'fn'}, - $self->{'vmbox'}{$vmbox}{'email'} ); - } - -} - -sub getfolders { - my ($self, $vmbox) = @_; - - my @folders = (); - - my $spool = $self->spooldirectory(); - - foreach $file (<$spool/$vmbox/*>) { - if ( -d $file ) { - $file =~ s/$spool\/$vmbox\///; - push(@folders, $file); - } - } - return @folders; -} - -sub configfile { - my ($self, $configfile) = @_; - - if (defined($configfile)) { - $self->{'configfile'} = $configfile; - } else { - $self->{'configfile'} = '/etc/asterisk/voicemail.conf' if (!defined($self->{'configfile'})); - } - - return $self->{'configfile'}; -} - -sub readconfig { - my ($self) = @_; - - my $context = ''; - my $line = ''; - - my $configfile = $self->configfile(); - - open(CF, "<$configfile") || die "Error loading $configfile: $!\n"; - while ($line = ) { - chop($line); - - $line =~ s/;.*$//; - $line =~ s/\s*$//; - - if ($line =~ /^;/) { - next; - } elsif ($line =~ /^\s*$/) { - next; - } elsif ($line =~ /^\[(\w+)\]$/) { - $context = $1; - print STDERR "Context: $context\n" if ($DEBUG>3); - } elsif ($line =~ /^format\s*[=>]+\s*(.*)/) { - my $formats = $1; - $self->format(split(/|/, $formats)); - } elsif ($line =~ /^serveremail\s*[=>]+\s*(.*)/) { - $self->serveremail($1); - } elsif ($line =~ /^(\d+)\s*[=>]+\s*(.*)/) { - my $vmbox = $1; - my $vmstr = $2; - my ($vmpass, $vmfn, $vmemail) = split(/,/, $vmstr); - print STDERR "VM BOX ($vmbox)\n" if ($DEBUG>3); - $self->vmbox($vmbox, $vmpass, $vmfn, $vmstr); - } else { - print STDERR "Unknown line: $line\n" if ($DEBUG); - } - } - - close(CF); -} - -sub appendsoundfile { - my ($self, $source, $dest) = @_; - - open(IN, "<$source") || return 0; - open(OUT, ">>$dest") || return 0; - while () { - print OUT $_; - } - close(IN); - close(OUT); - return 1; -} - -sub validmailbox { - my ($self, $vmbox) = @_; - - return 1 if ($self->vmbox($vmbox)); - return 0; -} - -sub msgcount { - my ($self, $vmbox, $folder) = @_; - - my $count = 0; - - return $count if (!defined($vmbox) || !defined($folder)); - - my $spool = $self->spooldirectory() . '/' . $vmbox . '/' . $folder; - - if (opendir(DIR, $spool)) { - my @msgs = grep(/^msg.*\.txt$/, readdir(DIR)); - $count = $#msgs+1; - closedir(DIR); - } - return $count; -} - -sub msgcountstr { - my ($self, $vmbox, $folder) = @_; - - my $count = $self->msgcount($vmbox, $folder); - - if ($count > 1) { - return "$count messages"; - } elsif ($count > 0) { - return "$count message"; - } else { - return "no messages"; - } -} - -sub createdefaultmailbox { - my ($self, $vmbox) = @_; - - my $spool = $self->spooldirectory(); - my $sounddir = $self->sounddirectory(); - - my $vmdir = "$spool/$vmbox"; - - - if ( -d $vmdir ) { - print STDERR "Directory already exists: $vmdir\n" if ($DEBUG); - } else { - mkdir($vmdir, 0755) || return 0; - mkdir("$vmdir/INBOX", 0755) || return 0; - } - - $self->appendsoundfile("$sounddir/vm-theperson.gsm", "$vmdir/unavail.gsm"); - $self->appendsoundfile("$sounddir/vm-theperson.gsm", "$vmdir/busy.gsm"); - $self->appendsoundfile("$sounddir/vm-extension.gsm", "$vmdir/greet.gsm"); - - foreach $chr (split(//, $vmbox)) { - $self->appendsoundfile("$sounddir/digits/$chr.gsm", "$vmdir/unavail.gsm"); - $self->appendsoundfile("$sounddir/digits/$chr.gsm", "$vmdir/busy.gsm"); - $self->appendsoundfile("$sounddir/digits/$chr.gsm", "$vmdir/greet.gsm"); - } - - $self->appendsoundfile("$sounddir/vm-isunavail.gsm", "$vmdir/unavail.gsm"); - $self->appendsoundfile("$sounddir/vm-isonphone.gsm", "$vmdir/busy.gsm"); - - return 1; -} - -sub messages { - my ($self, $messages, $folder) = @_; - - my $path = $self->spooldirectory() . '/' . $mailbox . '/' . $folder; - if (opendir(DIR, $path)) { - my @msgs = sort grep(/^msg....\.txt$/, readdir(DIR)); - closedir(DIR); - return map { s/^msg(....)\.txt$/$1/; $_ } @msgs; - } - return (); -} - -1; - diff --git a/agc_2-X/trunk/libs/Asterisk/buttons.gif b/agc_2-X/trunk/libs/Asterisk/buttons.gif deleted file mode 100644 index 6de93e8433267a09184456d117b0270fc86f0385..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10160 zcmajkXIRtO7BAp`5)#rV38VrUNJ1~tL_lyt6_DPflR)SJLXob97JBbRI?@pp6%h~+ zK~YDF1v^C)JC<=~oS8E>ICIW;Pr3I4Pri{n``y32_FikhwWYoRs~8XiW&q%H*Zd!U z{1NI_SbF5-otx`-7B&C?n44J1OsTv%_t@W)^J?q8_AdRd#_^GXA4>Rb)8}uaQ6gV{ z`E~sCVnf-9C-=9k%$$gLsUJW7y#3}AT~6uQ#+wLsva7vcVsuVgNQc}XD0>T67c&z_ z3vCTe2uSeX<$e(ok`#QZ3I2ecp8-INnX<*~u%^)7LC&iQ&GVos(}zie@6z7=G1+Fyv=~uiIx6p197Eut3ye)l*Egh!znk;Hr2ctNuwNDe)sd(^5DB) z@1`Bi$n;9j%E@))=N0A@6qOz+DXUEM)q&L2H#8n=YHn$5Ywzeh-c|P<*a|!_cw*?} zsnf$}&Yl}NKYHPW+}}S@2oM5t0Jz{M{vn%P2xsb91%e&U@4KmTBJ|6w!u4|6GtU@HX5r^opga*qH>?Cgv%9~vc%S_DYL$oNB%3ek8P9)<+s<2dR* zNVwQpct;nHOq0eC3eS0Y`^p!T6c?e>t=!_@Da&!I6Q^V{_X7jXN%#xTeF-!s`J>EMH`(K_HDwJ9h3wX<)= zA+`3s!9n8jTXV9OqhyMt9+Zzjt%hFR|Y1_e0OZ(@xtxKP<(5 zRK6`$I^1v~Ze4DxZ3_Cm+&A0s8{^gZLSd$1P9WIvyy?RK-?&$N3r0sw%B>1EQN`^5 ztqQlX^n8KwuGREx+Qy9?W8(kA7_noF0Fm;5_(&icM~jAbb9RiO!s2IzJ7RgHCM@x9 zVw8Xwbg2n66l0`xYgs@nac_sXClcG$hdp^n01OoXpK1rG-!q>@VMVXLxqjo^x_R85 zw&hNDuUS_m$5lIGl)^+6cR#Y)(CwC}1#Q25T|4rN-c0FSlu%Q0{=%Hq%EHa;Q@dqR z?5%^=Pz4)bx<{72Li(va8NoeZo=Gj4b;F%q`&?^^kHamM=}yT@YWa{~yk|-BDIHLR zyM}bqE)dM%4z@gIwN&K{AN$$(1HaU@7D^;)+XiO1J_ZxPM%R}$?XAzDR;gz`{v;xm zo$`dFbCOk_If8=xvG`Hm$_S<{FsL6 z$OF%`Z#>a&$=?lW^pb3j%Cc&!y}D@a(d%_Uq=?n$8F>*V#AB@%N-`l3o_)mLx8ue3^g8|kOSif&l!+$h#69jo8x7C-%5tds%xl%$^6Qu%EhmL|2;1@_lDg*N z(^q_CbziNVY}s~rK6;o=EX>H0HSIV;t*tY`cT2Qa8+BIq8z4j=&==_9tFXSyM*Sk6 zamu~rPZ!O80snHUg=hPn?a!Y`rKgvD)y7^>$5z9i(hA`i!Z=h>Nu_a#1|$9l%n@O=Wgd}2QJ#^z9fw>Sr0qJ|2}=i1*dP+U#Bm?5T+aM z?=_r^A8PBXALz|*`+e5X_t!2-4!dDHY9#YyrS7_w?tTTvjh60}Nzf32&dug9LGXeY z;N;VY*>V}wp8oQI-1U2=1{d(qPav%QQ7QuK;m(2zBS1JMVG_wy0z@J*y_Dl^l#7)^ zn+u6-mYxDCLKuo=$Kx8ZP!-BCsmcf!%Pd!RSc-5UqAzd?YAL=CH38s=RsN~am zp+`{5IBddk6$x=aeT4s`(1!quxC|xMvh=HXyqHfnYM=TG<9ej#C#0=bxV*|-z3R4K z7BlUxw;LyCM2212W&(#i|M3QK=$)8MOiDG*>#Xb)O!~#!;-AASFI$ZvNOVBXJf`HB z_v*7X59V{3`a>_TNS88$0*hnDK3P#eVHg>Qj?PN1R`2SDJFEO~8M3nAf@i&!ZZzU_kcen+oX`&Lde0R$F?w%q(qUcc?2uw$?OC^z8I_^1$(25p9gK z0nx+svX5Ka_@fG7ZS}%Z02jq;ozD6nM6zJ954j?3gGE+7fuqjt7wWe}O2WNsx*ito zkutX5^`!5!>8&O~vU;uUPQc7FV~V%{yno8sC6~lJX)=>%JKi?8nPQNAl5qe0Wk$nZ zYH*Bmw24EoAX9J69&A?>40% zOfry@eA3czSw5rE-BkP4^36M5weQ%ok6y>(v(I<6J1PP6!mZo6Ae@6%_ zh*0RiMQFV;ALzB`_EkUseOlSO;<&&k)5KPzx$l|bq;wrmH?!OeB0M*(VhxDiWpuj3 zcTKGEl;p}1EW`_Ofna|vU7d&+jS^50*C|RNND!X@Z4$|tgv~*CD}!=`r9dV;4`p0q zl^Ihiw?YC-MC1~&Zq<2EAVB#Dkk;VQpw-pG>1RT9_iLV|f&4Uy?JYHRntUkKTjQF( z6wzTaNLRfjV4=ycN)v}Ya~Oo`PtSWmL#PSkUP#r?Fzqj)65NkcgWO4DuPb8tMAGiv zqcQ2Y0+xpNeL4p&87kBa6~}Uj2knJUA_AJMy0`oG7x_p~(r>p0XEc^Th~lIT*6St+ zmpYR?26M7&Qv&=v3u9ZZXMmp$CL7VFmz`p<$Jh4Osls4rHx)*v9%x#*1KVc${+Tj_ zoK|bwl6e;D?trNkw_Nm+wUILbZEeyr556<*{f9W7RyT{t8X-EAqBOA-jXu}6nrVHg z)=Y3L-4Fr#TSY{m693O@B@h594b1HCpQk>{oBfb!6yjOJlX`F>M+puz6>8VPYi=EL z9j2)DXac>*TyQ+iq>GPE$gP)Yp`|^|KHk<xP6W z`WofK3J4LJP?S_OW-~kFOs9Ld=0uPbY>)hjJj^@x>-L26W zX*e>*ptZfIq`cWkFos zvs@7+Rq?^)4n~&lHhzTk(8HoZMr&Q)_Oy7qq%jh|o%~<~+j1d;vL3I5$nS1;-E%Sb z*Mqm7ANbynJ+H|amINHsPMO@#6uEa>0z*}^U}MYAoP+9=v5=D)3Wf0#+VFHiLXki z2wH2pHi|8%O3f0j?Zt)GC9dTuSW)lsW*`L$#bG@K)o3Qn7b;<4d-v|z(OPG%`LbPW zsFCAwV-~%Nh_DBb=1O0AU5}P(IhLeIbAU>Su1asyHyBWVsoMVDyX})OCn%X(Kv&qf zkOS3*`v|?rGv(7O$|FA!5R7BHt>I_qb1(ZfaS`i{BbNDhvyfrALAFX!M{;MF|nS*z4RQiQS@_$)YSEK<#F;C?f-{z~C3J>fUfgQ&6K z7pI2r_l+Jo$2gGW=EZ9T^sKtuw(9f1#4+>NbwU|#=-j*SF(2Kg$uP@Y$-CXG%Meh(s=N0;f;6_}m0yX|+kDWZxYxNP^%>Bg53lFu zw4lE;Av=t8D5D*fp3i97I^66|2Qi2lB?rtCmrQYJjjC57UTqs2^7k>8=-D4Njnj&a z$QWSf5^L{IlgaZJ!;n>UY0-PqQX>7(a0($uSEPgjk47p=XXACNd&6^&rVGx8EQ$vV zIpRiz$s{J50S>){5hQ`*--6emnmSxW8j|r{Dt#$GcwwYl>gUcnk-V<&kd$*P{fG0cySyx?m4sr~1ZdM`$uSqjtH87eh8&;9 zoHT79V7z*KRzv|=r4L!UL)_=41Bzw3+@3Zl=$;b%+vmeKt1EaK=6qdU;dsNZt7~8S zb#;a7xrw!Cxv#5>13QMU4P1s7I6S4N16Ol@oPoLotZo=z&p}pNJgZHKjtb4sI`F6yoZG?-eX16vY&b*j}8TVf4wpnjkky39R^mR!B zlk(zz^W$Z#!FUGD{4b{4i=UJjCj%G!(7k|8dMh%$pPf?o3VRd$4h(;vu}}la76-4Y z8HD>^aYsLbBXhR1ch$Hw+0IV})l@_L+NHleR*`~DoAT$TWo9}ul$~kYvT6s69r9)Y zuWEJEjlHEb5z;!pE%(Tohmp#!7xgSXqE<`IZEGq4=uD6PEuu}ZU0&-%(dByP zPp8tPs1)8hdewX#o)D56h>^AxVFjQanXnxBRNL|cBILlB6pSMp4frw129gvXfKX$C zkvW7{OZCUslr|3vHgr?Dx92`Tn^ZMQ4Sf%qFLOU7{Ep zp0jSSRhK$bP5QS_{6&h`6n)}_cvfk4j=4)Wp zsMd+FmmP|P({UO$K1s`{TTOncqB68r@h3LYN)2b&r9s!Euu^+s^~2@boCB~Ie3O29 z>qszDc{^--fh~>Fp);=jYT5%*@h9JN=0T&E%PYv2hURZmDQk&W$A*etiw2Av?^nFf z!cQ?ycG`a$41+Kp5f;DaqUgb>%5RyOv&%>u%$mW@C*bZPFlW;msn2unq zp{=aeg?9jxY(-fCC`UjFl>8M?lq3MeI-*blK$3xkw-&L+#N!Z7z=sp?^$X(iFFu5T z50xY+k4?Klq_2F7k5pVuE1Q`baX8!Ro}BURa$BdcwN#QTl*#G=3r3~y%cUPqy2d-aqYAcqb?h@~EcLNzSU>>x11>tvx-Gjw)*h?nt3z#L3G) z*t>LsqWIqk?lisl|Ee2TAb`kHW5{T=nkh&u?3B9o65PAX(9IG0@ECK>(>~96&7%z` ztFpAaSC8S?tC=*8A7~{=LC}~^6A&{^q~^i!KO^o|SA7bV9>9ioUEkwu2-F zt%M;1zR~as|KfNIr96-(b1XQ>*snN*gZ|pW)K5hkDmGI}?cn4d6&T+AL~l}uVv-_( z46{kicSuB{!y4Uv4HYiXD1_oA8XlwEnimqqNkVrDnxnB3wAk63YMW}e_om{JNIXn> zZ8AGil3>V7onEgywVk!B@6q>&>S9!C?p15wLP4|_`zq^Ao}_ttwd^*reVOu zu({H3@P;OgAg-VKzG$^6ifG4Aa}Z#LckAeJCLunK;mB^h5sw0!49Ms zJZT&k*&=`hV}n`%k2FZ_4kZ1~`h5BhB=K)Z2`owpOAr5{mj0aSWFkb28O6I0>==1jcK>1Pr`F;9QXOEw!sotJoQg!yoN5QCLj z(Sb6Q8W8b%zt5}z&NMSnlWe8QkK!vC&CC}nTNTuXf^|(z^tO}V6j)-^@=Hgz@}mn! zuW&T?<1`xhboXbhYq}yj_5pVvcG@fi&lpROi@b_`Szx9dwt=Wcj+#>p(7Xfi|KTSKI9lZy1!U?5jDkZ7947VVuM0nz@!@-i(&g^94-@MttyUNBBDfQPZVqrS(t zNcNeBN#BN)(z?)gmv#WGG#bk8!#ykH@HVB!tJL^v+7dY_D&g zJxgV(-@m=N^HyZ{mF7@yN@~O_ZFXmOo4$Yea6_|*kcs+9(uen>wP;;J=-XBAkUo#u zk|=Xy-k!+E6qf+Q9`V5KezD#hc-tEy!NPqctN!@!aveSPm)v3cOnT@6Gwt}i%Jj6r z$_^vUC%+YEA)M0$llECtnru<&z%)2IVZBLVZ;vBcp_VaqDw;gI(!FB@;MgC`wn zM%y0z^p5mDERWfTT1hHE9(`U7HZGFmebfGe369Z>KabJ>Oy2-(|x1@ZioZPxJ#AmLL|XVZVcMMNYjqUvCi*9eV!lZL}8w;u}QCihHVv%PYBcv#V2ZJDNe912|t>@DTb z&l2;mTm@RPwj$pNS)e|^E?oc<{a8pH%kPw3TVxlI3A5;PdYGGT&LPTnjmSy7+D2SB zh!2rE)fV$W(I%)E-sYoFUlIZ4BZ-Ky?WMccn*~34t@zhd^mL5 za)XA0kLt_3GAU^XODuUJyGZ3%%?AfP>cbhcX99l-1&ZrFfvphf)H-OnB*;V0v}9;k zHb+jRw=1So=-bdi1Z=tgtNJNQKbh2T7V~qsO)Uec0kKf?RdXxFVz+j~2+MjWJ-QZ7 z5V|EDtGJ!e>3j_xmF?ppxrZl#(Q!wk71LN4>7ZB`zzi!4IsAP=KGQ{wk^+axaPt~t zqw@q+kS-Hk7ZPO8%GgOBEiF+itNfDC+=|Ok5dV1B9gfby=kFZ(G1;t z`JZ23qg&ju*A2Y%CL^Q3exk_Z{o8;XIGdO!cWLmB3iLST{uY9-P<6uR$JOgDo6!nn zgXd_U`Qg)r83&^2h$5vhKWVKK*n#q87SzxareDcaYJI<6of;Z%Wt|!1nrz50W+#5CgWU&e=dav-f7vXBK8_&;yC^ii%|L!0 zo&`%ttI%Y>50BYZ+K#sUt$O*@+R2x5yPsBm%7a4k-D6IEYEoi3>SHM1_6NS<{?C;D z$u0gjx6!|Gqtdw}ODF+1gYf|+37}#C+C!#?#2#5W%r18nO2Cap1jT~B(YM)ifI|_PX(D07v2L2`ZeN{KdM8ib2J5}3Vg}+)xFML6_QSSrwZ-#&`_%3nqGj# zXfBRk%A)fN4ZM1hl^HFp$*j-FPn*L?MP^x9Z(O;bATi&}iA#KFY z-$uge*iKjunjUU6WKo1tU|%$>oaaH(lVBZ{76C{dR?x_ed?sOZv> zzj_Zbx3=u9dHQO6N$yn5#Oi_T`kCL9^kIGtEW3bJ{6i zpO*&}l8rN6yrkfDHEqNrx?zbpLB5^HVE{zf4^}36n!szlp7eicvm3Acd_*tF932gh zL}tbw3PkRUgdIK_5)CB#W5R*LU>{>nwqV|8K_^%}XHE~H+f_rStV1VC3j_fV4L+e>Z#=_rp-l?LeVrwZNMxv8O}=~>jdB#- zO=}XH8=K6;Z|2YJ4k3IYIKKBzZ+k4o+_uzp1ZK!;oO^~>0vMOQA>MEe^L)s&GC1U= zC3;>`)wxPLojY15L7!V_+L!7$G7PbnH?5!(O>Rw1b!5XIQIn~VtQ#m1On1k!lL{Sz z5(Jnr#|ICIVstgA=L=VLgfP?bn=!jzH8g8$yPqy)hp51iL$j$c2CV?@SY(Jug0jVW zep!fj+zD_T3S7YO2j`hGGdfgO z=|KA}DqLEQKECS@z=Awe{_6TJ_}G;7N2$%IIh&V`zgdMIfdAbgM+r{o&goln&pB@+BfDt|{DGy-wX=7lk?S++b1wpF#a`oZ9V^a;M$Kk|vo{=DxF z$$J?sA2fA@`-89OWNC`2cTx9wUCrI@?z0>Y{8gqb1yp1S{kC=XEud`vw}Zhzk?u&} zCM8oy&mEgXWbYr>|zn9}V#v$ZvsS z2FR04@d)NFZ)fuv51cWjHtQZ^30W!@@v zk=)j6vWrT4AxVt}9rN+KzvU7YbuJH?WL?L3+$bn9A8K`d++=rmwA5DMn@j_(+YmuhY^E_D?(%B&@~qM5*QZ zLZKkR$S_1OGSnww%Mq+2<${T!OQKXo)6S@{f{67g<0s=(6hh2=S}LKZM-opa=AZ%v zVN6BU>LfyS#a&RTG!R>pc)U!x%|(i+DSD&yd#8J#rm199$&GRAL|h5()|*|4&;7+e zQW5N{BYSZCNS=a-OkwE7(G~-x0T^9sQ!<~Bz}?}b(dEy0L5 zda))a=2?S~*S(AttGW%rmHf;6(3f)LwN{VaQRjbMXZY=I{V~aA+W@4*gNFV#!0XWH z+=E$ktXC~{&OjOIJ?vgrnR->F}n=KK?Qb!jhsYi ua^=xeo=7S5UeihgipAYAN$?#P$~mf#HTV^934a5o4q=QT`kKUnz5fRb2#EXu diff --git a/agc_2-X/trunk/libs/Asterisk/vm_indicator_anim.gif b/agc_2-X/trunk/libs/Asterisk/vm_indicator_anim.gif deleted file mode 100644 index 9445e76f57b977e27a064acb0a81b7ed02eb2df3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcmZ?wbhEHb(_rE(A4~Y@7|RwR~T>r#sA!Xt|7tB zjsdPldIrplKxK+QSy+u2#2IuzT0qWVU=4qu>U8Nzz&RDiBxzgLL=Cn;n~A3x!rn(S zxbb~@@VBmkePuz8m{-fQq=(8gc!ILd7X+E~bBTO={n&5OlX;YCcRiU_+H85kLOfsldK^nt2eV*|%Q#jdjfdkaiW7D*pJTzbdmq&jEB iOYxeS72Ac4+M>A1&vl(@I};lfdaEnNX{C!IgEas*CWI^i diff --git a/agc_2-X/trunk/libs/Asterisk/voicemail_digits.gif b/agc_2-X/trunk/libs/Asterisk/voicemail_digits.gif deleted file mode 100644 index 4ed7026fed2820a359de08d4acadd60b06144c75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1812 zcmc(eT}azk7{=cwjmBtQ{PS8bH8&DIGp!= z-rw`Q{~SN@R!wcdN-xkKL`om2lu(K*#grm_lTt~cBv+CtN%~PpC4>@O38n<;S}qkA zigU%8;-p)dR7@zw6=RAKloUxtLJ?QQ6yXAGNJ9(Fs3tu}A0Z`|l1WK=EN((b!KGkQ zkfy*R7m{7F5;s6s2 z!y%|42558w3mg~>ZAg<|k*>xw?l^>vAxQYcSlk%tk3;7g-?x5@uTaMv--@n{2dz_& zXQx}^ap)z)9craGwBAXaLkq{H@i|~i2oIhx>i;@UmD=oWId!!Dq_^r7w|NgZoPX}! zt8otMAN@BW>+95J&2OB2xa`@Oo|`WTw>Esfkz1BM;DbM?!D>QC!xcK6%R@20k>_5G=?;$YNPw)Ej_WGra0ywMqW>~IBhvkI@Ax1aNd z3JbbB-=6)h{&K0=lnA0WF7njja+%tVmi|M5Rl{aZx$d`*dt8>%=7omsYinN_?Q^&M zJ-1_DXHL0)ujw5&F1kz!)he~6jFHwz&=u|cVa@iaA!Kf^9BSO|h-_HU*g%RouciO)PqqPT zQO;6md!qh}{L=Z+UwbB&2OI^N`6+#Y*pTmF*>1gm4R%2fTTGoV>A%}lJZLIP`e?l= zVhrw|vCPMMZm$j$A8M9cl_!sl*xoGp%YW~kga-Hj^O;9h2CZ2Yo#!7vxH+(|s3P&y zD%37?dn5I(jp@9!m$n^~!4z}tm921VY$#edJ-cP!yy?j)YPx^^o4`si>6Bx)ObRkR z6d&0$Yy^`t&YoVW2rql0)0SInPn?sX%;dvEHQU$jT*}FN?c=SU@#W9{i*pZ|DGC22 hvZn8VPTx5snfB2hGNHsmGiOqF>|*B&J`O7#`5QI$VVeK| diff --git a/agc_2-X/trunk/libs/Asterisk/voicemail_new.gif b/agc_2-X/trunk/libs/Asterisk/voicemail_new.gif deleted file mode 100644 index 240d4ef89affea35905d7b69181a08764bdfa940..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 240 zcmV_txVU3uW5&kDe}8|Cjg1Zt4o62v92^`~RaL60 zs&R2~o12?CIXM6T0MyjfA^8LW000jFEC2ui05Sj%000D?@X1N5y*TU5yZ>Ow1U1R92`eSN2;o-RaI3gDk@`RV}E~t4h{~Djg7dt zxH&mFo12?)ad7|u0MyjfA^8LW000jFEC2ui05Sj%000D&@X1N5y*TU5yZ>P5F~+hG z%%n7j#WXNHh}PlUI3Y34Vl_CNfHvVF8h}Tl;AlK}z6ubE@~^N%t@d;b6b&%nU2dHE?Ii4`dRWC4rofJl&? z46OeXRQpmg=Vh!~r?WFA)c9;k?){2&?`!Pidrm!Z(vj*vv83o^j#Z~n*9XtFQR|Pt zxDv5Jpo@$9k&^*~&b0O>iH!~&%`8#^nv32~tGb<}z;%J&wO)+fRiIM5z0@Ph*{!}? zyojA8mS2z~ok=`5pP7-7LohvAT&zTJWqvLrg9{sDrYmdu#IDYco}fNAMphSgG0r(V zQy3VJ7XSm!b&RofV!e#sRUD0m2XL7Uo#V+Q}U3SAmjFJBn|5LFE zx9V?PX0M;Uqx8Y1H%>xp_!+{*FRW}nz$ay3{qfn==70k;#UojCL>dY>Zf{R=lT!5* zP&l*5Y$8XijQ6w&w^|c!$cVjcQ8=p~S^dG_w}j>s2bK17HHyic!E1cq@U?aoOgXVK zWaWfimMtFF4EqHBefe3znI$;U^V}EBpl3d_Om#M&yx4I~L~c%=-jSrTFdlJz`TKQ$ yJD0A%zdta}L&9grhKGkcgtg<&?D&|#F47P%!)NEFr>AEaXWu)sv-qh1gEavCU(4?R diff --git a/agc_2-X/trunk/libs/MySQL.pm b/agc_2-X/trunk/libs/MySQL.pm deleted file mode 100644 index e6a92c80..00000000 --- a/agc_2-X/trunk/libs/MySQL.pm +++ /dev/null @@ -1,1015 +0,0 @@ -package Net::MySQL; - -use 5.004; -use IO::Socket; -use Carp; -use vars qw($VERSION $DEBUG); -use strict; -$VERSION = '0.08'; - -use constant COMMAND_SLEEP => "\x00"; -use constant COMMAND_QUIT => "\x01"; -use constant COMMAND_INIT_DB => "\x02"; -use constant COMMAND_QUERY => "\x03"; -use constant COMMAND_FIELD_LIST => "\x04"; -use constant COMMAND_CREATE_DB => "\x05"; -use constant COMMAND_DROP_DB => "\x06"; -use constant COMMAND_REFRESH => "\x07"; -use constant COMMAND_SHUTDOWN => "\x08"; -use constant COMMAND_STATISTICS => "\x09"; -use constant COMMAND_PROCESS_INFO => "\x0A"; -use constant COMMAND_CONNECT => "\x0B"; -use constant COMMAND_PROCESS_KILL => "\x0C"; -use constant COMMAND_DEBUG => "\x0D"; -use constant COMMAND_PING => "\x0E"; -use constant COMMAND_TIME => "\x0F"; -use constant COMMAND_DELAYED_INSERT => "\x10"; -use constant COMMAND_CHANGE_USER => "\x11"; -use constant COMMAND_BINLOG_DUMP => "\x12"; -use constant COMMAND_TABLE_DUMP => "\x13"; -use constant COMMAND_CONNECT_OUT => "\x14"; - -use constant DEFAULT_PORT_NUMBER => 3306; -use constant BUFFER_LENGTH => 1460; -use constant DEFAULT_UNIX_SOCKET => '/tmp/mysql.sock'; - - -sub new -{ - my $class = shift; - my %args = @_; - - my $self = bless { - hostname => $args{hostname}, - unixsocket => $args{unixsocket} || DEFAULT_UNIX_SOCKET, - port => $args{port} || DEFAULT_PORT_NUMBER, - database => $args{database}, - user => $args{user}, - password => $args{password}, - timeout => $args{timeout} || 60, - socket => undef, - salt => '', - protocol_version => undef, - client_capabilities => 0, - affected_rows_length => 0, - }, $class; - $self->debug($args{debug}); - $self->_initialize; - return $self; -} - - -sub query -{ - my $self = shift; - my $sql = join '', @_; - my $mysql = $self->{socket}; - - return $self->_execute_command(COMMAND_QUERY, $sql); -} - - -sub create_database -{ - my $self = shift; - my $db_name = shift; - my $mysql = $self->{socket}; - - return $self->_execute_command(COMMAND_CREATE_DB, $db_name); -} - - -sub drop_database -{ - my $self = shift; - my $db_name = shift; - my $mysql = $self->{socket}; - - return $self->_execute_command(COMMAND_DROP_DB, $db_name); -} - - -sub close -{ - my $self = shift; - my $mysql = $self->{socket}; - return unless $mysql->can('send'); - - my $quit_message = - chr(length(COMMAND_QUIT)). "\x00\x00\x00". COMMAND_QUIT; - $mysql->send($quit_message, 0); - $self->_dump_packet($quit_message) if Net::MySQL->debug; - $mysql->close; -} - - -sub get_affected_rows_length -{ - my $self = shift; - $self->{affected_rows_length}; -} - - -sub get_insert_id -{ - my $self = shift; - $self->{insert_id}; -} - - -sub create_record_iterator -{ - my $self = shift; - return undef unless $self->has_selected_record; - - my $record = Net::MySQL::RecordIterator->new( - $self->{selected_record} - ); - $self->{selected_record} = undef; - $record->parse; - return $record; -} - - -sub has_selected_record -{ - my $self = shift; - $self->{selected_record} ? 1 : undef; -} - - -sub is_error -{ - my $self = shift; - $self->{error_code} ? 1 : undef; -} - - -sub get_error_code -{ - my $self = shift; - $self->{error_code}; -} - - -sub get_error_message -{ - my $self = shift; - $self->{server_message}; -} - - -sub debug -{ - my $class = shift; - $DEBUG = shift if @_; - $DEBUG; -} - - -sub _connect -{ - my $self = shift; - - my $mysql; - if ($self->{hostname}) { - printf "Use INET Socket: %s %d/tcp\n", $self->{hostname}, $self->{port} - if $self->debug; - $mysql = IO::Socket::INET->new( - PeerAddr => $self->{hostname}, - PeerPort => $self->{port}, - Proto => 'tcp', - Timeout => $self->{timeout} || 60, - ) or croak "Couldn't connect to $self->{hostname}:$self->{port}/tcp: $@"; - } - else { - printf "Use UNIX Socket: %s\n", $self->{unixsocket} if $self->debug; - $mysql = IO::Socket::UNIX->new( - Type => SOCK_STREAM, - Peer => $self->{unixsocket}, - ) or croak "Couldn't connect to $self->{unixsocket}: $@"; - } - $mysql->autoflush(1); - $self->{socket} = $mysql; -} - - -sub _get_server_information -{ - my $self = shift; - my $mysql = $self->{socket}; - - my $message; - $mysql->recv($message, BUFFER_LENGTH, 0); - $self->_dump_packet($message) - if Net::MySQL->debug; - my $i = 0; - my $packet_length = ord substr $message, $i, 1; - $i += 4; - $self->{protocol_version} = ord substr $message, $i, 1; - printf "Protocol Version: %d\n", $self->{protocol_version} - if Net::MySQL->debug; - if ($self->{protocol_version} == 10) { - $self->{client_capabilities} = 1; - } - - ++$i; - my $string_end = index($message, "\0", $i) - $i; - $self->{server_version} = substr $message, $i, $string_end; - printf "Server Version: %s\n", $self->{server_version} - if Net::MySQL->debug; - - $i += $string_end + 1; - $self->{server_thread_id} = unpack 'v', substr $message, $i, 2; - $i += 4; - $self->{salt} = substr $message, $i, 8; - printf "Salt: %s\n", $self->{salt} if Net::MySQL->debug; -} - - -sub _request_authentication -{ - my $self = shift; - my $mysql = $self->{socket}; - $self->_send_login_message(); - - my $auth_result; - $mysql->recv($auth_result, BUFFER_LENGTH, 0); - $self->_dump_packet($auth_result) if Net::MySQL->debug; - if ($self->_is_error($auth_result)) { - $mysql->close; - if (length $auth_result < 7) { - croak "Timeout of authentication"; - } - croak substr $auth_result, 7; - } - print "connect database\n" if Net::MySQL->debug; -} - - -sub _send_login_message -{ - my $self = shift; - my $mysql = $self->{socket}; - - my $body = "\0\0\x01\x8d\x00\00\00\00". join "\0", - $self->{user}, - Net::MySQL::Password->scramble( - $self->{password}, $self->{salt}, $self->{client_capabilities} - ), - $self->{database}; - my $login_message = chr(length($body)-3). $body; - $mysql->send($login_message, 0); - $self->_dump_packet($login_message) if Net::MySQL->debug; -} - - - -sub _execute_command -{ - my $self = shift; - my $command = shift; - my $sql = shift; - my $mysql = $self->{socket}; - - my $message = pack('V', length($sql) + 1). $command. $sql; - - $mysql->send($message, 0); - $self->_dump_packet($message) if Net::MySQL->debug; - - my $result; - $mysql->recv($result, BUFFER_LENGTH, 0); - $self->_dump_packet($result) if Net::MySQL->debug; - $self->_reset_status; - - if ($self->_is_error($result)) { - return $self->_set_error_by_packet($result); - } - elsif ($self->_is_select_query_result($result)) { - return $self->_get_record_by_server($result); - } - elsif ($self->_is_update_query_result($result)){ - return $self->_get_affected_rows_information_by_packet($result); - } - else { - croak 'Unknown Result: '. $self->_get_result_length($result). 'byte'; - } -} - - -sub _initialize -{ - my $self = shift; - $self->_connect; - $self->_get_server_information; - $self->_request_authentication; -} - - -sub _set_error_by_packet -{ - my $self = shift; - my $packet = shift; - - my $error_message = $self->_get_server_message($packet); - $self->{server_message} = $error_message; - $self->{error_code} = $self->_get_error_code($packet); - return undef; -} - - -sub _get_record_by_server -{ - my $self = shift; - my $packet = shift; - my $mysql = $self->{socket}; - - $self->_get_column_length($packet); - while ($self->_has_next_packet($packet)) { - my $next_result; - $mysql->recv($next_result, BUFFER_LENGTH, 0); - $packet .= $next_result; - $self->_dump_packet($next_result) if Net::MySQL->debug; - } - $self->{selected_record} = $packet; -} - - -sub _get_affected_rows_information_by_packet -{ - my $self = shift; - my $packet = shift; - - $self->{affected_rows_length} = $self->_get_affected_rows_length($packet); - $self->{insert_id} = $self->_get_insert_id($packet); - $self->{server_message} = $self->_get_server_message($packet); - return $self->{affected_rows_length}; -} - - -sub _is_error -{ - my $self = shift; - my $packet = shift; - return 1 if length $packet < 4; - ord(substr $packet, 4) == 255; -} - - -sub _is_select_query_result -{ - my $self = shift; - my $packet = shift; - return undef if $self->_is_error($packet); - ord(substr $packet, 4) >= 1; -} - - -sub _is_update_query_result -{ - my $self = shift; - my $packet = shift; - return undef if $self->_is_error($packet); - ord(substr $packet, 4) == 0; -} - - -sub _get_result_length -{ - my $self = shift; - my $packet = shift; - ord(substr $packet, 0, 1) -} - - -sub _get_column_length -{ - my $self = shift; - my $packet = shift; - ord(substr $packet, 4); -} - - -sub _get_affected_rows_length -{ - my $self = shift; - my $packet = shift; - ord(substr $packet, 5, 1); -} - - -sub _get_insert_id -{ - my $self = shift; - my $packet = shift; - return ord(substr $packet, 6, 1) if ord(substr $packet, 6, 1) != 0xfc; - unpack 'v', substr $packet, 7, 2; -} - - -sub _get_server_message -{ - my $self = shift; - my $packet = shift; - return '' if length $packet < 7; - substr $packet, 7; -} - - -sub _get_error_code -{ - my $self = shift; - my $packet = shift; - $self->_is_error($packet) - or croak "_get_error_code(): Is not error packet"; - unpack 'v', substr $packet, 5, 2; -} - - -sub _reset_status -{ - my $self = shift; - $self->{insert_id} = 0; - $self->{server_message} = ''; - $self->{error_code} = undef; - $self->{selected_record} = undef; -} - - -sub _has_next_packet -{ - my $self = shift; - substr($_[0], -1) ne "\xfe"; -} - - -sub _dump_packet -{ - my $self = shift; - my $packet = shift; - - my ($method_name) = (caller(1))[3]; - printf "%s():\n%s\n", - $method_name, - join ' ', map { sprintf "%02x", ord $_ } split //, $packet; - printf "%s():\n%s\n", - $method_name, - join ' ', map { m/[\d \w\._]/ ? $_ : '.' } split //, $packet; - print "--\n"; -} - - - -package Net::MySQL::RecordIterator; -use strict; - -use constant NULL_COLUMN => 251; -use constant UNSIGNED_CHAR_COLUMN => 251; -use constant UNSIGNED_SHORT_COLUMN => 252; -use constant UNSIGNED_INT24_COLUMN => 253; -use constant UNSIGNED_INT32_COLUMN => 254; -use constant UNSIGNED_CHAR_LENGTH => 1; -use constant UNSIGNED_SHORT_LENGTH => 2; -use constant UNSIGNED_INT24_LENGTH => 3; -use constant UNSIGNED_INT32_LENGTH => 4; -use constant UNSIGNED_INT32_PAD_LENGTH => 4; - - -sub new -{ - my $class = shift; - my $packet = shift; - bless { - packet => $packet, - position => 0, - column => [], - }, $class; -} - - -sub parse -{ - my $self = shift; - $self->_get_column_length; - $self->_get_column_name; -} - - -sub each -{ - my $self = shift; - my @result; - return undef if $self->is_end_of_packet; - - for (1..$self->{column_length}) { - push @result, $self->_get_string_and_seek_position; - } - $self->{position} += 4; - return \@result; -} - - -sub is_end_of_packet -{ - my $self = shift; - length $self->{packet} <= $self->{position} + 1; -} - - -sub get_field_length -{ - my $self = shift; - $self->{column_length}; -} - - -sub get_field_names -{ - my $self = shift; - map { $_->{column} } @{$self->{column}}; -} - - -sub _get_column_length -{ - my $self = shift; - $self->{position} += 4; - $self->{column_length} = ord substr $self->{packet}, $self->{position}, 1; - $self->{position} += 5; - printf "Column Length: %d\n", $self->{column_length} - if Net::MySQL->debug; -} - - -sub _get_column_name -{ - my $self = shift; - for my $i (1.. $self->{column_length}) { - push @{$self->{column}}, { - table => $self->_get_string_and_seek_position, - column => $self->_get_string_and_seek_position, - }; - $self->{position} += 14; - } - $self->{position} += 5; - - printf "Column name: %s\n", - join ", ", map { $_->{column} } @{$self->{column}} - if Net::MySQL->debug; -} - - -sub _get_string_and_seek_position -{ - my $self = shift; - - my $length = $self->_get_field_length(); - return undef unless defined $length; - - my $string = substr $self->{packet}, $self->{position}, $length; - $self->{position} += $length; - return $string; -} - - -sub _get_field_length -{ - my $self = shift; - - my $head = ord substr( - $self->{packet}, - $self->{position}, - UNSIGNED_CHAR_LENGTH - ); - $self->{position} += UNSIGNED_CHAR_LENGTH; - - return undef if $head == NULL_COLUMN; - if ($head < UNSIGNED_CHAR_COLUMN) { - return $head; - } - elsif ($head == UNSIGNED_SHORT_COLUMN) { - warn "in short"; - my $length = unpack 'v', substr( - $self->{packet}, - $self->{position}, - UNSIGNED_SHORT_LENGTH - ); - $self->{position} += UNSIGNED_SHORT_LENGTH; - return $length; - } - elsif ($head == UNSIGNED_INT24_COLUMN) { - warn "in int23"; - my $int24 = substr( - $self->{packet}, $self->{position}, - UNSIGNED_INT24_LENGTH - ); - my $length = unpack('C', substr($int24, 0, 1)) - + (unpack('C', substr($int24, 1, 1)) << 8) - + (unpack('C', substr($int24, 2, 1)) << 16); - $self->{position} += UNSIGNED_INT24_LENGTH; - return $length; - } - else { - warn "in int32"; - my $int32 = substr( - $self->{packet}, $self->{position}, - UNSIGNED_INT32_LENGTH - ); - my $length = unpack('C', substr($int32, 0, 1)) - + (unpack('C', substr($int32, 1, 1)) << 8) - + (unpack('C', substr($int32, 2, 1)) << 16) - + (unpack('C', substr($int32, 3, 1)) << 24); - $self->{position} += UNSIGNED_INT32_LENGTH; - $self->{position} += UNSIGNED_INT32_PAD_LENGTH; - return $length; - } -} - - -package Net::MySQL::Password; -use strict; - -sub scramble -{ - my $class = shift; - my $password = shift; - my $hash_seed = shift; - my $client_capabilities = shift; - - return '' unless $password; - return '' if length $password == 0; - - my $hsl = length $hash_seed; - my @out; - my @hash_pass = _get_hash($password); - my @hash_mess = _get_hash($hash_seed); - - my ($max_value, $seed, $seed2); - my ($dRes, $dSeed, $dMax); - if ($client_capabilities < 1) { - $max_value = 0x01FFFFFF; - $seed = _xor_by_long($hash_pass[0], $hash_mess[0]) % $max_value; - $seed2 = int($seed / 2); - } else { - $max_value= 0x3FFFFFFF; - $seed = _xor_by_long($hash_pass[0], $hash_mess[0]) % $max_value; - $seed2 = _xor_by_long($hash_pass[1], $hash_mess[1]) % $max_value; - } - $dMax = $max_value; - - for (my $i=0; $i < $hsl; $i++) { - $seed = int(($seed * 3 + $seed2) % $max_value); - $seed2 = int(($seed + $seed2 + 33) % $max_value); - $dSeed = $seed; - $dRes = $dSeed / $dMax; - push @out, int($dRes * 31) + 64; - } - - if ($client_capabilities == 1) { - # Make it harder to break - $seed = ($seed * 3 + $seed2 ) % $max_value; - $seed2 = ($seed + $seed2 + 33 ) % $max_value; - $dSeed = $seed; - - $dRes = $dSeed / $dMax; - my $e = int($dRes * 31); - for (my $i=0; $i < $hsl ; $i++) { - $out[$i] ^= $e; - } - } - return join '', map { chr $_ } @out; -} - - -sub _get_hash -{ - my $password = shift; - - my $nr = 1345345333; - my $add = 7; - my $nr2 = 0x12345671; - my $tmp; - my $pwlen = length $password; - my $c; - - for (my $i=0; $i < $pwlen; $i++) { - my $c = substr $password, $i, 1; - next if $c eq ' ' || $c eq "\t"; - my $tmp = ord $c; - my $value = ((_and_by_char($nr, 63) + $add) * $tmp) + $nr * 256; - $nr = _xor_by_long($nr, $value); - $nr2 += _xor_by_long(($nr2 * 256), $nr); - $add += $tmp; - } - return (_and_by_long($nr, 0x7fffffff), _and_by_long($nr2, 0x7fffffff)); -} - - -sub _and_by_char -{ - my $source = shift; - my $mask = shift; - - return $source & $mask; -} - - -sub _and_by_long -{ - my $source = shift; - my $mask = shift || 0xFFFFFFFF; - - return _cut_off_to_long($source) & _cut_off_to_long($mask); -} - - -sub _xor_by_long -{ - my $source = shift; - my $mask = shift || 0; - - return _cut_off_to_long($source) ^ _cut_off_to_long($mask); -} - - -sub _cut_off_to_long -{ - my $source = shift; - - if ($] >= 5.006) { - $source = $source % (0xFFFFFFFF + 1) if $source > 0xFFFFFFFF; - return $source; - } - while ($source > 0xFFFFFFFF) { - $source -= 0xFFFFFFFF + 1; - } - return $source; -} - - -1; -__END__ - -=head1 NAME - -Net::MySQL - Pure Perl MySQL network protocol interface. - -=head1 SYNOPSIS - - use Net::MySQL; - - my $mysql = Net::MySQL->new( - # hostname => 'mysql.example.jp', # Default use UNIX socket - database => 'your_database_name', - user => 'user', - password => 'password' - ); - - # INSERT example - $mysql->query(q{ - INSERT INTO tablename (first, next) VALUES ('Hello', 'World') - }); - printf "Affected row: %d\n", $mysql->get_affected_rows_length; - - # SLECT example - $mysql->query(q{SELECT * FROM tablename}); - my $record_set = $mysql->create_record_iterator; - while (my $record = $record_set->each) { - printf "First column: %s Next column: %s\n", - $record->[0], $record->[1]; - } - $mysql->close; - -=head1 DESCRIPTION - -Net::MySQL is a Pure Perl client interface for the MySQL database. This module implements network protocol between server and client of MySQL, thus you don't need external MySQL client library like libmysqlclient for this module to work. It means this module enables you to connect to MySQL server from some operation systems which MySQL is not ported. How nifty! - -Since this module's final goal is to completely replace DBD::mysql, API is made similar to that of DBI. - -From perl you activate the interface with the statement - - use Net::MySQL; - -After that you can connect to multiple MySQL daemon and send multiple queries to any of them via a simple object oriented interface. - -There are two classes which have public APIs: Net::MySQL and Net::MySQL::RecordIterator. - - $mysql = Net::MySQL->new( - hostname => $host, - database => $database, - user => $user, - password => $password, - ); - -Once you have connected to a daemon, you can can execute SQL with: - - $mysql->query(q{ - INSERT INTO foo (id, message) VALUES (1, 'Hello World') - }); - -If you want to retrieve results, you need to create a so-called statement handle with: - - $mysql->query(q{ - SELECT id, message FROM foo - }); - if ($mysql->has_selected_record) { - my $a_record_iterator = $mysql->create_record_iterator; - # ... - } - -This Net::MySQL::RecordIterator object can be used for multiple purposes. First of all you can retreive a row of data: - - my $record = $a_record_iterator->each; - -The each() method takes out the reference result of one line at a time, and the return value is ARRAY reference. - -=head2 Net::MySQL API - -=over 4 - -=item new(HASH) - - use Net::MySQL; - use strict; - - my $mysql = Net::MySQL->new( - unixsocket => $path_to_socket, - hostname => $host, - database => $database, - user => $user, - password => $password, - ); - -The constructor of Net::MySQL. Connection with MySQL daemon is established and the object is returned. Argument hash contains following parameters: - -=over 8 - -=item unixsocket - -Path of the UNIX socket where MySQL daemon. default is F. -Supposing I is omitted, it will connect by I. - -=item hostname - -Name of the host where MySQL daemon runs. -Supposing I is specified, it will connect by I. - -=item port - -Port where MySQL daemon listens to. default is 3306. - -=item database - -Name of the database to connect. - -=item user / password - -Username and password for database authentication. - -=item timeout - -The waiting time which carries out a timeout when connection is overdue is specified. - -=item debug - -The exchanged packet will be outputted if a true value is given. - -=back - - -=item create_database(DB_NAME) - -A create_DATABASE() method creates a database by the specified name. - - $mysql->create_database('example_db'); - die $mysql->get_error_message if $mysql->is_error; - -=item drop_database(DB_NAME) - -A drop_database() method deletes the database of the specified name. - - $mysql->drop_database('example_db'); - die $mysql->get_error_message if $mysql->is_error; - -=item query(SQL_STRING) - -A query() method transmits the specified SQL string to MySQL database, and obtains the response. - -=item create_record_iterator() - -When SELECT type SQL is specified, Net::MySQL::RecordIterator object which shows the reference result is returned. - - $mysql->query(q{SELECT * FROM table}); - my $a_record_iterator = $mysql->create_recrod_iterator(); - -Net::MySQL::RecordIterator object is applicable to acquisition of a reference result. See L<"/Net::SQL::RecordIterator API"> for more. - -=item get_affected_rows_length() - -returns the number of records finally influenced by specified SQL. - - my $affected_rows = $mysql->get_affected_rows_length; - -=item get_insert_id() - -MySQL has the ability to choose unique key values automatically. If this happened, the new ID will be stored in this attribute. - -=item is_error() - -TRUE will be returned if the error has occurred. - -=item has_selected_record() - -TRUE will be returned if it has a reference result by SELECT. - -=item get_field_length() - -return the number of column. - -=item get_field_names() - -return column names by ARRAY. - -=item close() - -transmits an end message to MySQL daemon, and closes a socket. - -=back - -=head2 Net::MySQL::RecordIterator API - -Net::MySQL::RecordIterator object is generated by the query() method of Net::MySQL object. Thus it has no public constructor method. - -=over 4 - -=item each() - -each() method takes out only one line from a result, and returns it as an ARRAY reference. C is returned when all the lines has been taken out. - - while (my $record = $a_record_iterator->each) { - printf "Column 1: %s Column 2: %s Collumn 3: %s\n", - $record->[0], $record->[1], $record->[2]; - } - -=back - -=head1 SUPPORT OPERATING SYSTEM - -This module has been tested on these OSes. - -=over 4 - -=item * MacOS 9.x - -with MacPerl5.6.1r. - -=item * MacOS X - -with perl5.6.0 build for darwin. - -=item * Windows2000 - -with ActivePerl5.6.1 build631. - -=item * FreeBSD 3.4 and 4.x - -with perl5.6.1 build for i386-freebsd. - -with perl5.005_03 build for i386-freebsd. - -=item * Linux - -with perl 5.005_03 built for ppc-linux. - -with perl 5.6.0 bult for i386-linux. - -=item * Solaris 2.6 (SPARC) - -with perl 5.6.1 built for sun4-solaris. - -with perl 5.004_04 built for sun4-solaris. - -Can use on Solaris2.6 with perl5.004_04, although I is failure. - -=back - -This list is the environment which I can use by the test usually. Net::MySQL will operate also in much environment which is not in a list. - -I believe this module can work with whatever perls which has B. I'll be glad if you give me a report of successful installation of this module on I OSes. - -=head1 SEE ALSO - -L, L - -=head1 AUTHOR - -Hiroyuki OYAMA Eoyama@module.jpE - -=head1 COPYRIGHT AND LICENCE - -Copyright (C) 2002 Hiroyuki OYAMA. Japan. All rights reserved. - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/agc_2-X/trunk/libs/Net/HTTP.pm b/agc_2-X/trunk/libs/Net/HTTP.pm deleted file mode 100644 index 80786825..00000000 --- a/agc_2-X/trunk/libs/Net/HTTP.pm +++ /dev/null @@ -1,266 +0,0 @@ -package Net::HTTP; - -# $Id: HTTP.pm,v 1.43 2002/12/26 09:13:53 gisle Exp $ - -use strict; -use vars qw($VERSION @ISA); - -$VERSION = "1.00"; -eval { require IO::Socket::INET } || require IO::Socket; -require Net::HTTP::Methods; - -@ISA=qw(IO::Socket::INET Net::HTTP::Methods); - -sub configure { - my($self, $cnf) = @_; - $self->http_configure($cnf); -} - -sub http_connect { - my($self, $cnf) = @_; - $self->SUPER::configure($cnf); -} - -1; - -__END__ - -=head1 NAME - -Net::HTTP - Low-level HTTP connection (client) - -=head1 SYNOPSIS - - use Net::HTTP; - my $s = Net::HTTP->new(Host => "www.perl.com) || die $@; - $s->write_request(GET => "/", 'User-Agent' => "Mozilla/5.0"); - my($code, $mess, %h) = $s->read_response_headers; - - while (1) { - my $buf; - my $n = $s->read_entity_body($buf, 1024); - die "read failed: $!" unless defined $n; - last unless $n; - print $buf; - } - -=head1 DESCRIPTION - -The C class is a low-level HTTP client. An instance of the -C class represents a connection to an HTTP server. The -HTTP protocol is described in RFC 2616. The C class -support C and C. - -C is a sub-class of C. You can mix the -methods described below with reading and writing from the socket -directly. This is not necessary a good idea, unless you know what you -are doing. - -The following methods are provided (in addition to those of -C): - -=over - -=item $s = Net::HTTP->new( %options ) - -The C constructor method takes the same options as -C's as well as these: - - Host: Initial host attribute value - KeepAlive: Initial keep_alive attribute value - SendTE: Initial send_te attribute_value - HTTPVersion: Initial http_version attribute value - PeerHTTPVersion: Initial peer_http_version attribute value - MaxLineLength: Initial max_line_length attribute value - MaxHeaderLines: Initial max_header_lines attribute value - -The C option is also the default for C's -C. The C defaults to 80 if not provided. - -The C option provided by C's constructor -method is not allowed. - -If unable to connect to the given HTTP server then the constructor -returns C and $@ contains the reason. After a successful -connect, a C object is returned. - -=item $s->host - -Get/set the default value of the C header to send. The $host -should not be set to an empty string (or C). - -=item $s->keep_alive - -Get/set the I value. If this value is TRUE then the -request will be sent with headers indicating that the server should try -to keep the connection open so that multiple requests can be sent. - -The actual headers set will depend on the value of the C -and C attributes. - -=item $s->send_te - -Get/set the a value indicating if the request will be sent with a "TE" -header to indicate the transfer encodings that the server can chose to -use. If the C module is installed then this will -annouce that this client accept both the I and I -encodings. - -=item $s->http_version - -Get/set the HTTP version number that this client should announce. -This value can only be set to "1.0" or "1.1". The default is "1.1". - -=item $s->peer_http_version - -Get/set the protocol version number of our peer. This value will -initially be "1.0", but will be updated by a successful -read_response_headers() method call. - -=item $s->max_line_length - -Get/set a limit on the length of response line and response header -lines. The default is 4096. A value of 0 means no limit. - -=item $s->max_header_length - -Get/set a limit on the number of headers lines that a response can -have. The default is 128. A value of 0 means no limit. - -=item $s->format_request($method, $uri, %headers, [$content]) - -Format a request message and return it as a string. If the headers do -not include a C header, then a header is inserted with the value -of the C attribute. Headers like C and -C might also be added depending on the status of the -C attribute. - -If $content is given (and it is non-empty), then a C -header is automatically added unless it was already present. - -=item $s->write_request($method, $uri, %headers, [$content]) - -Format and send a request message. Arguments are the same as for -format_request(). Returns true if successful. - -=item $s->format_chunk( $data ) - -Returns the string to be written for the given chunk of data. - -=item $s->write_chunk($data) - -Will write a new chunk of request entity body data. This method -should only be used if the C header with a value of -C was sent in the request. Note, writing zero-length data is -a no-op. Use the write_chunk_eof() method to signal end of entity -body data. - -Returns true if successful. - -=item $s->format_chunk_eof( %trailers ) - -Returns the string to be written for signaling EOF when a -C of C is used. - -=item $s->write_chunk_eof( %trailers ) - -Will write eof marker for chunked data and optional trailers. Note -that trailers should not really be used unless is was signaled -with a C header. - -Returns true if successful. - -=item ($code, $mess, %headers) = $s->read_response_headers( %opts ) - -Read response headers from server and return it. The $code is the 3 -digit HTTP status code (see L) and $mess is the textual -message that came with it. Headers are then returned as key/value -pairs. Since key letter casing is not normalized and the same key can -even occur multiple times, assigning these values directly to a hash -is not wise. Only the $code is returned if this method is called in -scalar context. - -As a side effect this method updates the 'peer_http_version' -attribute. - -Options might be passed in as key/value pairs. There are currently -only two options supported; C and C. - -The C option will make read_response_headers() more forgiving -towards servers that have not learned how to speak HTTP properly. The -C option is a boolean flag, and is enabled by passing in a TRUE -value. The C option can be used to capture bad header lines -when C is enabled. The value should be an array reference. -Bad header lines will be pushed onto the array. - -The C option must be specified in order to communicate with -pre-HTTP/1.0 servers that don't describe the response outcome or the -data they send back with a header block. For these servers -peer_http_version is set to "0.9" and this method returns (200, -"Assumed OK"). - -The method will raise an exception (die) if the server does not speak -proper HTTP or if the C or C -limits are reached. If the C option is turned on and -C and C checks are turned off, -then no exception will be raised and this method will always -return a response code. - -=item $n = $s->read_entity_body($buf, $size); - -Reads chunks of the entity body content. Basically the same interface -as for read() and sysread(), but the buffer offset argument is not -supported yet. This method should only be called after a successful -read_response_headers() call. - -The return value will be C on read errors, 0 on EOF, -1 if no data -could be returned this time, otherwise the number of bytes assgined -to $buf. The $buf set to "" when the return value is -1. - -This method will raise exceptions (die) if the server does not speak -proper HTTP. This can only happen when reading chunked data. - -=item %headers = $s->get_trailers - -After read_entity_body() has returned 0 to indicate end of the entity -body, you might call this method to pick up any trailers. - -=item $s->_rbuf - -Get/set the read buffer content. The read_response_headers() and -read_entity_body() methods use an internal buffer which they will look -for data before they actually sysread more from the socket itself. If -they read too much, the remaining data will be left in this buffer. - -=item $s->_rbuf_length - -Returns the number of bytes in the read buffer. This should always be -the same as: - - length($s->_rbuf) - -but might be more efficient. - -=back - -=head1 SUBCLASSING - -The read_response_headers() and read_entity_body() will invoke the -sysread() method when they need more data. Subclasses might want to -override this method to contol how reading takes place. - -The object itself is a glob. Subclasses should avoid using hash key -names prefixed with C and C. - -=head1 SEE ALSO - -L, L, L - -=head1 COPYRIGHT - -Copyright 2001-2003 Gisle Aas. - -This library is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=cut diff --git a/agc_2-X/trunk/libs/Net/HTTP/Methods.pm b/agc_2-X/trunk/libs/Net/HTTP/Methods.pm deleted file mode 100644 index b1b2115f..00000000 --- a/agc_2-X/trunk/libs/Net/HTTP/Methods.pm +++ /dev/null @@ -1,520 +0,0 @@ -package Net::HTTP::Methods; - -# $Id: Methods.pm,v 1.12 2002/12/26 09:13:55 gisle Exp $ - -require 5.005; # 4-arg substr - -use strict; -use vars qw($VERSION); - -$VERSION = "1.00"; - -my $CRLF = "\015\012"; # "\r\n" is not portable - -sub new { - my($class, %cnf) = @_; - require Symbol; - my $self = bless Symbol::gensym(), $class; - return $self->http_configure(\%cnf); -} - -sub http_configure { - my($self, $cnf) = @_; - - die "Listen option not allowed" if $cnf->{Listen}; - my $host = delete $cnf->{Host}; - my $peer = $cnf->{PeerAddr} || $cnf->{PeerHost}; - if ($host) { - $cnf->{PeerAddr} = $host unless $peer; - } - else { - $host = $peer; - $host =~ s/:.*//; - } - $cnf->{PeerPort} = $self->http_default_port unless $cnf->{PeerPort}; - $cnf->{Proto} = 'tcp'; - - my $keep_alive = delete $cnf->{KeepAlive}; - my $http_version = delete $cnf->{HTTPVersion}; - $http_version = "1.1" unless defined $http_version; - my $peer_http_version = delete $cnf->{PeerHTTPVersion}; - $peer_http_version = "1.0" unless defined $peer_http_version; - my $send_te = delete $cnf->{SendTE}; - my $max_line_length = delete $cnf->{MaxLineLength}; - $max_line_length = 4*1024 unless defined $max_line_length; - my $max_header_lines = delete $cnf->{MaxHeaderLines}; - $max_header_lines = 128 unless defined $max_header_lines; - - return undef unless $self->http_connect($cnf); - - unless ($host =~ /:/) { - my $p = $self->peerport; - $host .= ":$p"; - } - $self->host($host); - $self->keep_alive($keep_alive); - $self->send_te($send_te); - $self->http_version($http_version); - $self->peer_http_version($peer_http_version); - $self->max_line_length($max_line_length); - $self->max_header_lines($max_header_lines); - - ${*$self}{'http_buf'} = ""; - - return $self; -} - -sub http_default_port { - 80; -} - -# set up property accessors -for my $method (qw(host keep_alive send_te max_line_length max_header_lines peer_http_version)) { - my $prop_name = "http_" . $method; - no strict 'refs'; - *$method = sub { - my $self = shift; - my $old = ${*$self}{$prop_name}; - ${*$self}{$prop_name} = shift if @_; - return $old; - }; -} - -# we want this one to be a bit smarter -sub http_version { - my $self = shift; - my $old = ${*$self}{'http_version'}; - if (@_) { - my $v = shift; - $v = "1.0" if $v eq "1"; # float - unless ($v eq "1.0" or $v eq "1.1") { - require Carp; - Carp::croak("Unsupported HTTP version '$v'"); - } - ${*$self}{'http_version'} = $v; - } - $old; -} - -sub format_request { - my $self = shift; - my $method = shift; - my $uri = shift; - - my $content = (@_ % 2) ? pop : ""; - - for ($method, $uri) { - require Carp; - Carp::croak("Bad method or uri") if /\s/ || !length; - } - - push(@{${*$self}{'http_request_method'}}, $method); - my $ver = ${*$self}{'http_version'}; - my $peer_ver = ${*$self}{'http_peer_http_version'} || "1.0"; - - my @h; - my @connection; - my %given = (host => 0, "content-length" => 0, "te" => 0); - while (@_) { - my($k, $v) = splice(@_, 0, 2); - my $lc_k = lc($k); - if ($lc_k eq "connection") { - push(@connection, split(/\s*,\s*/, $v)); - next; - } - if (exists $given{$lc_k}) { - $given{$lc_k}++; - } - push(@h, "$k: $v"); - } - - if (length($content) && !$given{'content-length'}) { - push(@h, "Content-Length: " . length($content)); - } - - my @h2; - if ($given{te}) { - push(@connection, "TE") unless grep lc($_) eq "te", @connection; - } - elsif ($self->send_te && zlib_ok()) { - # gzip is less wanted since the Compress::Zlib interface for - # it does not really allow chunked decoding to take place easily. - push(@h2, "TE: deflate,gzip;q=0.3"); - push(@connection, "TE"); - } - - unless (grep lc($_) eq "close", @connection) { - if ($self->keep_alive) { - if ($peer_ver eq "1.0") { - # from looking at Netscape's headers - push(@h2, "Keep-Alive: 300"); - unshift(@connection, "Keep-Alive"); - } - } - else { - push(@connection, "close") if $ver ge "1.1"; - } - } - push(@h2, "Connection: " . join(", ", @connection)) if @connection; - push(@h2, "Host: ${*$self}{'http_host'}") unless $given{host}; - - return join($CRLF, "$method $uri HTTP/$ver", @h2, @h, "", $content); -} - - -sub write_request { - my $self = shift; - $self->print($self->format_request(@_)); -} - -sub format_chunk { - my $self = shift; - return $_[0] unless defined($_[0]) && length($_[0]); - return sprintf("%x", length($_[0])) . $CRLF . $_[0] . $CRLF; -} - -sub write_chunk { - my $self = shift; - return 1 unless defined($_[0]) && length($_[0]); - $self->print(sprintf("%x", length($_[0])) . $CRLF . $_[0] . $CRLF); -} - -sub format_chunk_eof { - my $self = shift; - my @h; - while (@_) { - push(@h, sprintf "%s: %s$CRLF", splice(@_, 0, 2)); - } - return join("", "0$CRLF", @h, $CRLF); -} - -sub write_chunk_eof { - my $self = shift; - $self->print($self->format_chunk_eof(@_)); -} - - -sub my_read { - die if @_ > 3; - my $self = shift; - my $len = $_[1]; - for (${*$self}{'http_buf'}) { - if (length) { - $_[0] = substr($_, 0, $len, ""); - return length($_[0]); - } - else { - return $self->sysread($_[0], $len); - } - } -} - - -sub my_readline { - my $self = shift; - for (${*$self}{'http_buf'}) { - my $max_line_length = ${*$self}{'http_max_line_length'}; - my $pos; - while (1) { - # find line ending - $pos = index($_, "\012"); - last if $pos >= 0; - die "Line too long (limit is $max_line_length)" - if $max_line_length && length($_) > $max_line_length; - - # need to read more data to find a line ending - my $n = $self->sysread($_, 1024, length); - if (!$n) { - return undef unless length; - return substr($_, 0, length, ""); - } - } - die "Line too long ($pos; limit is $max_line_length)" - if $max_line_length && $pos > $max_line_length; - - my $line = substr($_, 0, $pos+1, ""); - $line =~ s/(\015?\012)\z// || die "Assert"; - return wantarray ? ($line, $1) : $line; - } -} - - -sub _rbuf { - my $self = shift; - if (@_) { - for (${*$self}{'http_buf'}) { - my $old; - $old = $_ if defined wantarray; - $_ = shift; - return $old; - } - } - else { - return ${*$self}{'http_buf'}; - } -} - -sub _rbuf_length { - my $self = shift; - return length ${*$self}{'http_buf'}; -} - - -sub _read_header_lines { - my $self = shift; - my $junk_out = shift; - - my @headers; - my $line_count = 0; - my $max_header_lines = ${*$self}{'http_max_header_lines'}; - while (my $line = my_readline($self)) { - if ($line =~ /^(\S+)\s*:\s*(.*)/s) { - push(@headers, $1, $2); - } - elsif (@headers && $line =~ s/^\s+//) { - $headers[-1] .= " " . $line; - } - elsif ($junk_out) { - push(@$junk_out, $line); - } - else { - die "Bad header: '$line'\n"; - } - if ($max_header_lines) { - $line_count++; - if ($line_count >= $max_header_lines) { - die "Too many header lines (limit is $max_header_lines)"; - } - } - } - return @headers; -} - - -sub read_response_headers { - my($self, %opt) = @_; - my $laxed = $opt{laxed}; - - my($status, $eol) = my_readline($self); - unless (defined $status) { - die "EOF instead of response status line" unless $laxed; - # assume HTTP/0.9 - ${*$self}{'http_peer_http_version'} = "0.9"; - ${*$self}{'http_status'} = "200"; - return 200 unless wantarray; - return (200, "EOF"); - } - - my($peer_ver, $code, $message) = split(/\s+/, $status, 3); - if (!$peer_ver || $peer_ver !~ s,^HTTP/,, || $code !~ /^[1-5]\d\d$/) { - die "Bad response status line: '$status'" unless $laxed; - # assume HTTP/0.9 - ${*$self}{'http_peer_http_version'} = "0.9"; - ${*$self}{'http_status'} = "200"; - substr(${*$self}{'http_buf'}, 0, 0) = $status . $eol; - return 200 unless wantarray; - return (200, "Assumed OK"); - }; - - ${*$self}{'http_peer_http_version'} = $peer_ver; - ${*$self}{'http_status'} = $code; - - my $junk_out; - if ($laxed) { - $junk_out = $opt{junk_out} || []; - } - my @headers = $self->_read_header_lines($junk_out); - - # pick out headers that read_entity_body might need - my @te; - my $content_length; - for (my $i = 0; $i < @headers; $i += 2) { - my $h = lc($headers[$i]); - if ($h eq 'transfer-encoding') { - push(@te, $headers[$i+1]); - } - elsif ($h eq 'content-length') { - $content_length = $headers[$i+1]; - } - } - ${*$self}{'http_te'} = join(",", @te); - ${*$self}{'http_content_length'} = $content_length; - ${*$self}{'http_first_body'}++; - delete ${*$self}{'http_trailers'}; - return $code unless wantarray; - return ($code, $message, @headers); -} - - -sub read_entity_body { - my $self = shift; - my $buf_ref = \$_[0]; - my $size = $_[1]; - die "Offset not supported yet" if $_[2]; - - my $chunked; - my $bytes; - - if (${*$self}{'http_first_body'}) { - ${*$self}{'http_first_body'} = 0; - delete ${*$self}{'http_chunked'}; - delete ${*$self}{'http_bytes'}; - my $method = shift(@{${*$self}{'http_request_method'}}); - my $status = ${*$self}{'http_status'}; - if ($method eq "HEAD" || $status =~ /^(?:1|[23]04)/) { - # these responses are always empty - $bytes = 0; - } - elsif (my $te = ${*$self}{'http_te'}) { - my @te = split(/\s*,\s*/, lc($te)); - die "Chunked must be last Transfer-Encoding '$te'" - unless pop(@te) eq "chunked"; - - for (@te) { - if ($_ eq "deflate" && zlib_ok()) { - #require Compress::Zlib; - my $i = Compress::Zlib::inflateInit(); - die "Can't make inflator" unless $i; - $_ = sub { scalar($i->inflate($_[0])) } - } - elsif ($_ eq "gzip" && zlib_ok()) { - #require Compress::Zlib; - my @buf; - $_ = sub { - push(@buf, $_[0]); - return Compress::Zlib::memGunzip(join("", @buf)) if $_[1]; - return ""; - }; - } - elsif ($_ eq "identity") { - $_ = sub { $_[0] }; - } - else { - die "Can't handle transfer encoding '$te'"; - } - } - - @te = reverse(@te); - - ${*$self}{'http_te2'} = @te ? \@te : ""; - $chunked = -1; - } - elsif (defined(my $content_length = ${*$self}{'http_content_length'})) { - $bytes = $content_length; - } - else { - # XXX Multi-Part types are self delimiting, but RFC 2616 says we - # only has to deal with 'multipart/byteranges' - - # Read until EOF - } - } - else { - $chunked = ${*$self}{'http_chunked'}; - $bytes = ${*$self}{'http_bytes'}; - } - - if (defined $chunked) { - # The state encoded in $chunked is: - # $chunked == 0: read CRLF after chunk, then chunk header - # $chunked == -1: read chunk header - # $chunked > 0: bytes left in current chunk to read - - if ($chunked <= 0) { - my $line = my_readline($self); - if ($chunked == 0) { - die "Missing newline after chunk data: '$line'" unless $line eq ""; - $line = my_readline($self); - } - my $chunk_len = $line; - $chunk_len =~ s/;.*//; # ignore potential chunk parameters - unless ($chunk_len =~ /^([\da-fA-F]+)\s*$/) { - die "Bad chunk-size in HTTP response: $line"; - } - $chunked = hex($1); - if ($chunked == 0) { - ${*$self}{'http_trailers'} = [$self->_read_header_lines]; - $$buf_ref = ""; - - my $n = 0; - if (my $transforms = delete ${*$self}{'http_te2'}) { - for (@$transforms) { - $$buf_ref = &$_($$buf_ref, 1); - } - $n = length($$buf_ref); - } - - # in case somebody tries to read more, make sure we continue - # to return EOF - delete ${*$self}{'http_chunked'}; - ${*$self}{'http_bytes'} = 0; - - return $n; - } - } - - my $n = $chunked; - $n = $size if $size && $size < $n; - $n = my_read($self, $$buf_ref, $n); - return undef unless defined $n; - - ${*$self}{'http_chunked'} = $chunked - $n; - - if ($n > 0) { - if (my $transforms = ${*$self}{'http_te2'}) { - for (@$transforms) { - $$buf_ref = &$_($$buf_ref, 0); - } - $n = length($$buf_ref); - $n = -1 if $n == 0; - } - } - return $n; - } - elsif (defined $bytes) { - unless ($bytes) { - $$buf_ref = ""; - return 0; - } - my $n = $bytes; - $n = $size if $size && $size < $n; - $n = my_read($self, $$buf_ref, $n); - return undef unless defined $n; - ${*$self}{'http_bytes'} = $bytes - $n; - return $n; - } - else { - # read until eof - $size ||= 8*1024; - return my_read($self, $$buf_ref, $size); - } -} - -sub get_trailers { - my $self = shift; - @{${*$self}{'http_trailers'} || []}; -} - -BEGIN { -my $zlib_ok; - -sub zlib_ok { - return $zlib_ok if defined $zlib_ok; - - # Try to load Compress::Zlib. - local $@; - local $SIG{__DIE__}; - $zlib_ok = 0; - - eval { - require Compress::Zlib; - Compress::Zlib->VERSION(1.10); - $zlib_ok++; - }; - - return $zlib_ok; -} - -} # BEGIN - -1; diff --git a/agc_2-X/trunk/libs/Net/HTTP/NB.pm b/agc_2-X/trunk/libs/Net/HTTP/NB.pm deleted file mode 100644 index feeee310..00000000 --- a/agc_2-X/trunk/libs/Net/HTTP/NB.pm +++ /dev/null @@ -1,106 +0,0 @@ -package Net::HTTP::NB; - -# $Id: NB.pm,v 1.5 2001/08/28 03:03:42 gisle Exp $ - -use strict; -use vars qw($VERSION @ISA); - -$VERSION = "0.02"; -require Net::HTTP; -@ISA=qw(Net::HTTP); - -sub sysread { - my $self = $_[0]; - if (${*$self}{'httpnb_read_count'}++) { - ${*$self}{'http_buf'} = ${*$self}{'httpnb_save'}; - die "Multi-read\n"; - } - my $buf; - my $offset = $_[3] || 0; - my $n = sysread($self, $_[1], $_[2], $offset); - ${*$self}{'httpnb_save'} .= substr($_[1], $offset); - return $n; -} - -sub read_response_headers { - my $self = shift; - ${*$self}{'httpnb_read_count'} = 0; - ${*$self}{'httpnb_save'} = ${*$self}{'http_buf'}; - my @h = eval { $self->SUPER::read_response_headers(@_) }; - if ($@) { - return if $@ eq "Multi-read\n"; - die; - } - return @h; -} - -sub read_entity_body { - my $self = shift; - ${*$self}{'httpnb_read_count'} = 0; - ${*$self}{'httpnb_save'} = ${*$self}{'http_buf'}; - # XXX I'm not so sure this does the correct thing in case of - # transfer-encoding tranforms - my $n = eval { $self->SUPER::read_entity_body(@_); }; - if ($@) { - $_[0] = ""; - return -1; - } - return $n; -} - -1; - -__END__ - -=head1 NAME - -Net::HTTP::NB - Non-blocking HTTP client - -=head1 SYNOPSIS - - use Net::HTTP::NB; - my $s = Net::HTTP::NB->new(Host => "www.perl.com) || die $@; - $s->write_request(GET => "/"); - - use IO::Select; - my $sel = IO::Select->new($s); - - READ_HEADER: { - die "Header timeout" unless $sel->can_read(10); - my($code, $mess, %h) = $s->read_response_headers; - redo READ_HEADER unless $code; - } - - while (1) { - die "Body timeout" unless $sel->can_read(10); - my $buf; - my $n = $s->read_entity_body($buf, 1024); - last unless $n; - print $buf; - } - -=head1 DESCRIPTION - -Same interface as C but it will never try multiple reads -when the read_response_headers() or read_entity_body() methods are -invoked. This make it possible to multiplex multiple Net::HTTP::NB -using select without risk blocking. - -If read_response_headers() did not see enough data to complete the -headers an empty list is returned. - -If read_entity_body() did not see new entity data in its read -the value -1 is returned. - -=head1 SEE ALSO - -L - -=head1 COPYRIGHT - -Copyright 2001 Gisle Aas. - -This library is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=cut diff --git a/agc_2-X/trunk/libs/Net/HTTPS.pm b/agc_2-X/trunk/libs/Net/HTTPS.pm deleted file mode 100644 index 1549a06d..00000000 --- a/agc_2-X/trunk/libs/Net/HTTPS.pm +++ /dev/null @@ -1,55 +0,0 @@ -package Net::HTTPS; - -# $Id: HTTPS.pm,v 1.3 2002/12/23 18:16:29 gisle Exp $ - -use strict; -use vars qw($VERSION $SSL_SOCKET_CLASS @ISA); - -$VERSION = "1.00"; - -# Figure out which SSL implementation to use -if ($IO::Socket::SSL::VERSION) { - $SSL_SOCKET_CLASS = "IO::Socket::SSL"; # it was already loaded -} -else { - eval { require Net::SSL; }; # from Crypt-SSLeay - if ($@) { - my $old_errsv = $@; - eval { - require IO::Socket::SSL; - }; - if ($@) { - $old_errsv =~ s/\s\(\@INC contains:.*\)/)/g; - die $old_errsv . $@; - } - $SSL_SOCKET_CLASS = "IO::Socket::SSL"; - } - else { - $SSL_SOCKET_CLASS = "Net::SSL"; - } -} - -require Net::HTTP::Methods; - -@ISA=($SSL_SOCKET_CLASS, 'Net::HTTP::Methods'); - -sub configure { - my($self, $cnf) = @_; - $self->http_configure($cnf); -} - -sub http_connect { - my($self, $cnf) = @_; - $self->SUPER::configure($cnf); -} - -sub http_default_port { - 443; -} - -# The underlying SSLeay classes fails to work if the socket is -# placed in non-blocking mode. This override of the blocking -# method makes sure it stays the way it was created. -sub blocking { } # noop - -1; diff --git a/agc_2-X/trunk/libs/Net/MySQL.pm b/agc_2-X/trunk/libs/Net/MySQL.pm deleted file mode 100644 index e6a92c80..00000000 --- a/agc_2-X/trunk/libs/Net/MySQL.pm +++ /dev/null @@ -1,1015 +0,0 @@ -package Net::MySQL; - -use 5.004; -use IO::Socket; -use Carp; -use vars qw($VERSION $DEBUG); -use strict; -$VERSION = '0.08'; - -use constant COMMAND_SLEEP => "\x00"; -use constant COMMAND_QUIT => "\x01"; -use constant COMMAND_INIT_DB => "\x02"; -use constant COMMAND_QUERY => "\x03"; -use constant COMMAND_FIELD_LIST => "\x04"; -use constant COMMAND_CREATE_DB => "\x05"; -use constant COMMAND_DROP_DB => "\x06"; -use constant COMMAND_REFRESH => "\x07"; -use constant COMMAND_SHUTDOWN => "\x08"; -use constant COMMAND_STATISTICS => "\x09"; -use constant COMMAND_PROCESS_INFO => "\x0A"; -use constant COMMAND_CONNECT => "\x0B"; -use constant COMMAND_PROCESS_KILL => "\x0C"; -use constant COMMAND_DEBUG => "\x0D"; -use constant COMMAND_PING => "\x0E"; -use constant COMMAND_TIME => "\x0F"; -use constant COMMAND_DELAYED_INSERT => "\x10"; -use constant COMMAND_CHANGE_USER => "\x11"; -use constant COMMAND_BINLOG_DUMP => "\x12"; -use constant COMMAND_TABLE_DUMP => "\x13"; -use constant COMMAND_CONNECT_OUT => "\x14"; - -use constant DEFAULT_PORT_NUMBER => 3306; -use constant BUFFER_LENGTH => 1460; -use constant DEFAULT_UNIX_SOCKET => '/tmp/mysql.sock'; - - -sub new -{ - my $class = shift; - my %args = @_; - - my $self = bless { - hostname => $args{hostname}, - unixsocket => $args{unixsocket} || DEFAULT_UNIX_SOCKET, - port => $args{port} || DEFAULT_PORT_NUMBER, - database => $args{database}, - user => $args{user}, - password => $args{password}, - timeout => $args{timeout} || 60, - socket => undef, - salt => '', - protocol_version => undef, - client_capabilities => 0, - affected_rows_length => 0, - }, $class; - $self->debug($args{debug}); - $self->_initialize; - return $self; -} - - -sub query -{ - my $self = shift; - my $sql = join '', @_; - my $mysql = $self->{socket}; - - return $self->_execute_command(COMMAND_QUERY, $sql); -} - - -sub create_database -{ - my $self = shift; - my $db_name = shift; - my $mysql = $self->{socket}; - - return $self->_execute_command(COMMAND_CREATE_DB, $db_name); -} - - -sub drop_database -{ - my $self = shift; - my $db_name = shift; - my $mysql = $self->{socket}; - - return $self->_execute_command(COMMAND_DROP_DB, $db_name); -} - - -sub close -{ - my $self = shift; - my $mysql = $self->{socket}; - return unless $mysql->can('send'); - - my $quit_message = - chr(length(COMMAND_QUIT)). "\x00\x00\x00". COMMAND_QUIT; - $mysql->send($quit_message, 0); - $self->_dump_packet($quit_message) if Net::MySQL->debug; - $mysql->close; -} - - -sub get_affected_rows_length -{ - my $self = shift; - $self->{affected_rows_length}; -} - - -sub get_insert_id -{ - my $self = shift; - $self->{insert_id}; -} - - -sub create_record_iterator -{ - my $self = shift; - return undef unless $self->has_selected_record; - - my $record = Net::MySQL::RecordIterator->new( - $self->{selected_record} - ); - $self->{selected_record} = undef; - $record->parse; - return $record; -} - - -sub has_selected_record -{ - my $self = shift; - $self->{selected_record} ? 1 : undef; -} - - -sub is_error -{ - my $self = shift; - $self->{error_code} ? 1 : undef; -} - - -sub get_error_code -{ - my $self = shift; - $self->{error_code}; -} - - -sub get_error_message -{ - my $self = shift; - $self->{server_message}; -} - - -sub debug -{ - my $class = shift; - $DEBUG = shift if @_; - $DEBUG; -} - - -sub _connect -{ - my $self = shift; - - my $mysql; - if ($self->{hostname}) { - printf "Use INET Socket: %s %d/tcp\n", $self->{hostname}, $self->{port} - if $self->debug; - $mysql = IO::Socket::INET->new( - PeerAddr => $self->{hostname}, - PeerPort => $self->{port}, - Proto => 'tcp', - Timeout => $self->{timeout} || 60, - ) or croak "Couldn't connect to $self->{hostname}:$self->{port}/tcp: $@"; - } - else { - printf "Use UNIX Socket: %s\n", $self->{unixsocket} if $self->debug; - $mysql = IO::Socket::UNIX->new( - Type => SOCK_STREAM, - Peer => $self->{unixsocket}, - ) or croak "Couldn't connect to $self->{unixsocket}: $@"; - } - $mysql->autoflush(1); - $self->{socket} = $mysql; -} - - -sub _get_server_information -{ - my $self = shift; - my $mysql = $self->{socket}; - - my $message; - $mysql->recv($message, BUFFER_LENGTH, 0); - $self->_dump_packet($message) - if Net::MySQL->debug; - my $i = 0; - my $packet_length = ord substr $message, $i, 1; - $i += 4; - $self->{protocol_version} = ord substr $message, $i, 1; - printf "Protocol Version: %d\n", $self->{protocol_version} - if Net::MySQL->debug; - if ($self->{protocol_version} == 10) { - $self->{client_capabilities} = 1; - } - - ++$i; - my $string_end = index($message, "\0", $i) - $i; - $self->{server_version} = substr $message, $i, $string_end; - printf "Server Version: %s\n", $self->{server_version} - if Net::MySQL->debug; - - $i += $string_end + 1; - $self->{server_thread_id} = unpack 'v', substr $message, $i, 2; - $i += 4; - $self->{salt} = substr $message, $i, 8; - printf "Salt: %s\n", $self->{salt} if Net::MySQL->debug; -} - - -sub _request_authentication -{ - my $self = shift; - my $mysql = $self->{socket}; - $self->_send_login_message(); - - my $auth_result; - $mysql->recv($auth_result, BUFFER_LENGTH, 0); - $self->_dump_packet($auth_result) if Net::MySQL->debug; - if ($self->_is_error($auth_result)) { - $mysql->close; - if (length $auth_result < 7) { - croak "Timeout of authentication"; - } - croak substr $auth_result, 7; - } - print "connect database\n" if Net::MySQL->debug; -} - - -sub _send_login_message -{ - my $self = shift; - my $mysql = $self->{socket}; - - my $body = "\0\0\x01\x8d\x00\00\00\00". join "\0", - $self->{user}, - Net::MySQL::Password->scramble( - $self->{password}, $self->{salt}, $self->{client_capabilities} - ), - $self->{database}; - my $login_message = chr(length($body)-3). $body; - $mysql->send($login_message, 0); - $self->_dump_packet($login_message) if Net::MySQL->debug; -} - - - -sub _execute_command -{ - my $self = shift; - my $command = shift; - my $sql = shift; - my $mysql = $self->{socket}; - - my $message = pack('V', length($sql) + 1). $command. $sql; - - $mysql->send($message, 0); - $self->_dump_packet($message) if Net::MySQL->debug; - - my $result; - $mysql->recv($result, BUFFER_LENGTH, 0); - $self->_dump_packet($result) if Net::MySQL->debug; - $self->_reset_status; - - if ($self->_is_error($result)) { - return $self->_set_error_by_packet($result); - } - elsif ($self->_is_select_query_result($result)) { - return $self->_get_record_by_server($result); - } - elsif ($self->_is_update_query_result($result)){ - return $self->_get_affected_rows_information_by_packet($result); - } - else { - croak 'Unknown Result: '. $self->_get_result_length($result). 'byte'; - } -} - - -sub _initialize -{ - my $self = shift; - $self->_connect; - $self->_get_server_information; - $self->_request_authentication; -} - - -sub _set_error_by_packet -{ - my $self = shift; - my $packet = shift; - - my $error_message = $self->_get_server_message($packet); - $self->{server_message} = $error_message; - $self->{error_code} = $self->_get_error_code($packet); - return undef; -} - - -sub _get_record_by_server -{ - my $self = shift; - my $packet = shift; - my $mysql = $self->{socket}; - - $self->_get_column_length($packet); - while ($self->_has_next_packet($packet)) { - my $next_result; - $mysql->recv($next_result, BUFFER_LENGTH, 0); - $packet .= $next_result; - $self->_dump_packet($next_result) if Net::MySQL->debug; - } - $self->{selected_record} = $packet; -} - - -sub _get_affected_rows_information_by_packet -{ - my $self = shift; - my $packet = shift; - - $self->{affected_rows_length} = $self->_get_affected_rows_length($packet); - $self->{insert_id} = $self->_get_insert_id($packet); - $self->{server_message} = $self->_get_server_message($packet); - return $self->{affected_rows_length}; -} - - -sub _is_error -{ - my $self = shift; - my $packet = shift; - return 1 if length $packet < 4; - ord(substr $packet, 4) == 255; -} - - -sub _is_select_query_result -{ - my $self = shift; - my $packet = shift; - return undef if $self->_is_error($packet); - ord(substr $packet, 4) >= 1; -} - - -sub _is_update_query_result -{ - my $self = shift; - my $packet = shift; - return undef if $self->_is_error($packet); - ord(substr $packet, 4) == 0; -} - - -sub _get_result_length -{ - my $self = shift; - my $packet = shift; - ord(substr $packet, 0, 1) -} - - -sub _get_column_length -{ - my $self = shift; - my $packet = shift; - ord(substr $packet, 4); -} - - -sub _get_affected_rows_length -{ - my $self = shift; - my $packet = shift; - ord(substr $packet, 5, 1); -} - - -sub _get_insert_id -{ - my $self = shift; - my $packet = shift; - return ord(substr $packet, 6, 1) if ord(substr $packet, 6, 1) != 0xfc; - unpack 'v', substr $packet, 7, 2; -} - - -sub _get_server_message -{ - my $self = shift; - my $packet = shift; - return '' if length $packet < 7; - substr $packet, 7; -} - - -sub _get_error_code -{ - my $self = shift; - my $packet = shift; - $self->_is_error($packet) - or croak "_get_error_code(): Is not error packet"; - unpack 'v', substr $packet, 5, 2; -} - - -sub _reset_status -{ - my $self = shift; - $self->{insert_id} = 0; - $self->{server_message} = ''; - $self->{error_code} = undef; - $self->{selected_record} = undef; -} - - -sub _has_next_packet -{ - my $self = shift; - substr($_[0], -1) ne "\xfe"; -} - - -sub _dump_packet -{ - my $self = shift; - my $packet = shift; - - my ($method_name) = (caller(1))[3]; - printf "%s():\n%s\n", - $method_name, - join ' ', map { sprintf "%02x", ord $_ } split //, $packet; - printf "%s():\n%s\n", - $method_name, - join ' ', map { m/[\d \w\._]/ ? $_ : '.' } split //, $packet; - print "--\n"; -} - - - -package Net::MySQL::RecordIterator; -use strict; - -use constant NULL_COLUMN => 251; -use constant UNSIGNED_CHAR_COLUMN => 251; -use constant UNSIGNED_SHORT_COLUMN => 252; -use constant UNSIGNED_INT24_COLUMN => 253; -use constant UNSIGNED_INT32_COLUMN => 254; -use constant UNSIGNED_CHAR_LENGTH => 1; -use constant UNSIGNED_SHORT_LENGTH => 2; -use constant UNSIGNED_INT24_LENGTH => 3; -use constant UNSIGNED_INT32_LENGTH => 4; -use constant UNSIGNED_INT32_PAD_LENGTH => 4; - - -sub new -{ - my $class = shift; - my $packet = shift; - bless { - packet => $packet, - position => 0, - column => [], - }, $class; -} - - -sub parse -{ - my $self = shift; - $self->_get_column_length; - $self->_get_column_name; -} - - -sub each -{ - my $self = shift; - my @result; - return undef if $self->is_end_of_packet; - - for (1..$self->{column_length}) { - push @result, $self->_get_string_and_seek_position; - } - $self->{position} += 4; - return \@result; -} - - -sub is_end_of_packet -{ - my $self = shift; - length $self->{packet} <= $self->{position} + 1; -} - - -sub get_field_length -{ - my $self = shift; - $self->{column_length}; -} - - -sub get_field_names -{ - my $self = shift; - map { $_->{column} } @{$self->{column}}; -} - - -sub _get_column_length -{ - my $self = shift; - $self->{position} += 4; - $self->{column_length} = ord substr $self->{packet}, $self->{position}, 1; - $self->{position} += 5; - printf "Column Length: %d\n", $self->{column_length} - if Net::MySQL->debug; -} - - -sub _get_column_name -{ - my $self = shift; - for my $i (1.. $self->{column_length}) { - push @{$self->{column}}, { - table => $self->_get_string_and_seek_position, - column => $self->_get_string_and_seek_position, - }; - $self->{position} += 14; - } - $self->{position} += 5; - - printf "Column name: %s\n", - join ", ", map { $_->{column} } @{$self->{column}} - if Net::MySQL->debug; -} - - -sub _get_string_and_seek_position -{ - my $self = shift; - - my $length = $self->_get_field_length(); - return undef unless defined $length; - - my $string = substr $self->{packet}, $self->{position}, $length; - $self->{position} += $length; - return $string; -} - - -sub _get_field_length -{ - my $self = shift; - - my $head = ord substr( - $self->{packet}, - $self->{position}, - UNSIGNED_CHAR_LENGTH - ); - $self->{position} += UNSIGNED_CHAR_LENGTH; - - return undef if $head == NULL_COLUMN; - if ($head < UNSIGNED_CHAR_COLUMN) { - return $head; - } - elsif ($head == UNSIGNED_SHORT_COLUMN) { - warn "in short"; - my $length = unpack 'v', substr( - $self->{packet}, - $self->{position}, - UNSIGNED_SHORT_LENGTH - ); - $self->{position} += UNSIGNED_SHORT_LENGTH; - return $length; - } - elsif ($head == UNSIGNED_INT24_COLUMN) { - warn "in int23"; - my $int24 = substr( - $self->{packet}, $self->{position}, - UNSIGNED_INT24_LENGTH - ); - my $length = unpack('C', substr($int24, 0, 1)) - + (unpack('C', substr($int24, 1, 1)) << 8) - + (unpack('C', substr($int24, 2, 1)) << 16); - $self->{position} += UNSIGNED_INT24_LENGTH; - return $length; - } - else { - warn "in int32"; - my $int32 = substr( - $self->{packet}, $self->{position}, - UNSIGNED_INT32_LENGTH - ); - my $length = unpack('C', substr($int32, 0, 1)) - + (unpack('C', substr($int32, 1, 1)) << 8) - + (unpack('C', substr($int32, 2, 1)) << 16) - + (unpack('C', substr($int32, 3, 1)) << 24); - $self->{position} += UNSIGNED_INT32_LENGTH; - $self->{position} += UNSIGNED_INT32_PAD_LENGTH; - return $length; - } -} - - -package Net::MySQL::Password; -use strict; - -sub scramble -{ - my $class = shift; - my $password = shift; - my $hash_seed = shift; - my $client_capabilities = shift; - - return '' unless $password; - return '' if length $password == 0; - - my $hsl = length $hash_seed; - my @out; - my @hash_pass = _get_hash($password); - my @hash_mess = _get_hash($hash_seed); - - my ($max_value, $seed, $seed2); - my ($dRes, $dSeed, $dMax); - if ($client_capabilities < 1) { - $max_value = 0x01FFFFFF; - $seed = _xor_by_long($hash_pass[0], $hash_mess[0]) % $max_value; - $seed2 = int($seed / 2); - } else { - $max_value= 0x3FFFFFFF; - $seed = _xor_by_long($hash_pass[0], $hash_mess[0]) % $max_value; - $seed2 = _xor_by_long($hash_pass[1], $hash_mess[1]) % $max_value; - } - $dMax = $max_value; - - for (my $i=0; $i < $hsl; $i++) { - $seed = int(($seed * 3 + $seed2) % $max_value); - $seed2 = int(($seed + $seed2 + 33) % $max_value); - $dSeed = $seed; - $dRes = $dSeed / $dMax; - push @out, int($dRes * 31) + 64; - } - - if ($client_capabilities == 1) { - # Make it harder to break - $seed = ($seed * 3 + $seed2 ) % $max_value; - $seed2 = ($seed + $seed2 + 33 ) % $max_value; - $dSeed = $seed; - - $dRes = $dSeed / $dMax; - my $e = int($dRes * 31); - for (my $i=0; $i < $hsl ; $i++) { - $out[$i] ^= $e; - } - } - return join '', map { chr $_ } @out; -} - - -sub _get_hash -{ - my $password = shift; - - my $nr = 1345345333; - my $add = 7; - my $nr2 = 0x12345671; - my $tmp; - my $pwlen = length $password; - my $c; - - for (my $i=0; $i < $pwlen; $i++) { - my $c = substr $password, $i, 1; - next if $c eq ' ' || $c eq "\t"; - my $tmp = ord $c; - my $value = ((_and_by_char($nr, 63) + $add) * $tmp) + $nr * 256; - $nr = _xor_by_long($nr, $value); - $nr2 += _xor_by_long(($nr2 * 256), $nr); - $add += $tmp; - } - return (_and_by_long($nr, 0x7fffffff), _and_by_long($nr2, 0x7fffffff)); -} - - -sub _and_by_char -{ - my $source = shift; - my $mask = shift; - - return $source & $mask; -} - - -sub _and_by_long -{ - my $source = shift; - my $mask = shift || 0xFFFFFFFF; - - return _cut_off_to_long($source) & _cut_off_to_long($mask); -} - - -sub _xor_by_long -{ - my $source = shift; - my $mask = shift || 0; - - return _cut_off_to_long($source) ^ _cut_off_to_long($mask); -} - - -sub _cut_off_to_long -{ - my $source = shift; - - if ($] >= 5.006) { - $source = $source % (0xFFFFFFFF + 1) if $source > 0xFFFFFFFF; - return $source; - } - while ($source > 0xFFFFFFFF) { - $source -= 0xFFFFFFFF + 1; - } - return $source; -} - - -1; -__END__ - -=head1 NAME - -Net::MySQL - Pure Perl MySQL network protocol interface. - -=head1 SYNOPSIS - - use Net::MySQL; - - my $mysql = Net::MySQL->new( - # hostname => 'mysql.example.jp', # Default use UNIX socket - database => 'your_database_name', - user => 'user', - password => 'password' - ); - - # INSERT example - $mysql->query(q{ - INSERT INTO tablename (first, next) VALUES ('Hello', 'World') - }); - printf "Affected row: %d\n", $mysql->get_affected_rows_length; - - # SLECT example - $mysql->query(q{SELECT * FROM tablename}); - my $record_set = $mysql->create_record_iterator; - while (my $record = $record_set->each) { - printf "First column: %s Next column: %s\n", - $record->[0], $record->[1]; - } - $mysql->close; - -=head1 DESCRIPTION - -Net::MySQL is a Pure Perl client interface for the MySQL database. This module implements network protocol between server and client of MySQL, thus you don't need external MySQL client library like libmysqlclient for this module to work. It means this module enables you to connect to MySQL server from some operation systems which MySQL is not ported. How nifty! - -Since this module's final goal is to completely replace DBD::mysql, API is made similar to that of DBI. - -From perl you activate the interface with the statement - - use Net::MySQL; - -After that you can connect to multiple MySQL daemon and send multiple queries to any of them via a simple object oriented interface. - -There are two classes which have public APIs: Net::MySQL and Net::MySQL::RecordIterator. - - $mysql = Net::MySQL->new( - hostname => $host, - database => $database, - user => $user, - password => $password, - ); - -Once you have connected to a daemon, you can can execute SQL with: - - $mysql->query(q{ - INSERT INTO foo (id, message) VALUES (1, 'Hello World') - }); - -If you want to retrieve results, you need to create a so-called statement handle with: - - $mysql->query(q{ - SELECT id, message FROM foo - }); - if ($mysql->has_selected_record) { - my $a_record_iterator = $mysql->create_record_iterator; - # ... - } - -This Net::MySQL::RecordIterator object can be used for multiple purposes. First of all you can retreive a row of data: - - my $record = $a_record_iterator->each; - -The each() method takes out the reference result of one line at a time, and the return value is ARRAY reference. - -=head2 Net::MySQL API - -=over 4 - -=item new(HASH) - - use Net::MySQL; - use strict; - - my $mysql = Net::MySQL->new( - unixsocket => $path_to_socket, - hostname => $host, - database => $database, - user => $user, - password => $password, - ); - -The constructor of Net::MySQL. Connection with MySQL daemon is established and the object is returned. Argument hash contains following parameters: - -=over 8 - -=item unixsocket - -Path of the UNIX socket where MySQL daemon. default is F. -Supposing I is omitted, it will connect by I. - -=item hostname - -Name of the host where MySQL daemon runs. -Supposing I is specified, it will connect by I. - -=item port - -Port where MySQL daemon listens to. default is 3306. - -=item database - -Name of the database to connect. - -=item user / password - -Username and password for database authentication. - -=item timeout - -The waiting time which carries out a timeout when connection is overdue is specified. - -=item debug - -The exchanged packet will be outputted if a true value is given. - -=back - - -=item create_database(DB_NAME) - -A create_DATABASE() method creates a database by the specified name. - - $mysql->create_database('example_db'); - die $mysql->get_error_message if $mysql->is_error; - -=item drop_database(DB_NAME) - -A drop_database() method deletes the database of the specified name. - - $mysql->drop_database('example_db'); - die $mysql->get_error_message if $mysql->is_error; - -=item query(SQL_STRING) - -A query() method transmits the specified SQL string to MySQL database, and obtains the response. - -=item create_record_iterator() - -When SELECT type SQL is specified, Net::MySQL::RecordIterator object which shows the reference result is returned. - - $mysql->query(q{SELECT * FROM table}); - my $a_record_iterator = $mysql->create_recrod_iterator(); - -Net::MySQL::RecordIterator object is applicable to acquisition of a reference result. See L<"/Net::SQL::RecordIterator API"> for more. - -=item get_affected_rows_length() - -returns the number of records finally influenced by specified SQL. - - my $affected_rows = $mysql->get_affected_rows_length; - -=item get_insert_id() - -MySQL has the ability to choose unique key values automatically. If this happened, the new ID will be stored in this attribute. - -=item is_error() - -TRUE will be returned if the error has occurred. - -=item has_selected_record() - -TRUE will be returned if it has a reference result by SELECT. - -=item get_field_length() - -return the number of column. - -=item get_field_names() - -return column names by ARRAY. - -=item close() - -transmits an end message to MySQL daemon, and closes a socket. - -=back - -=head2 Net::MySQL::RecordIterator API - -Net::MySQL::RecordIterator object is generated by the query() method of Net::MySQL object. Thus it has no public constructor method. - -=over 4 - -=item each() - -each() method takes out only one line from a result, and returns it as an ARRAY reference. C is returned when all the lines has been taken out. - - while (my $record = $a_record_iterator->each) { - printf "Column 1: %s Column 2: %s Collumn 3: %s\n", - $record->[0], $record->[1], $record->[2]; - } - -=back - -=head1 SUPPORT OPERATING SYSTEM - -This module has been tested on these OSes. - -=over 4 - -=item * MacOS 9.x - -with MacPerl5.6.1r. - -=item * MacOS X - -with perl5.6.0 build for darwin. - -=item * Windows2000 - -with ActivePerl5.6.1 build631. - -=item * FreeBSD 3.4 and 4.x - -with perl5.6.1 build for i386-freebsd. - -with perl5.005_03 build for i386-freebsd. - -=item * Linux - -with perl 5.005_03 built for ppc-linux. - -with perl 5.6.0 bult for i386-linux. - -=item * Solaris 2.6 (SPARC) - -with perl 5.6.1 built for sun4-solaris. - -with perl 5.004_04 built for sun4-solaris. - -Can use on Solaris2.6 with perl5.004_04, although I is failure. - -=back - -This list is the environment which I can use by the test usually. Net::MySQL will operate also in much environment which is not in a list. - -I believe this module can work with whatever perls which has B. I'll be glad if you give me a report of successful installation of this module on I OSes. - -=head1 SEE ALSO - -L, L - -=head1 AUTHOR - -Hiroyuki OYAMA Eoyama@module.jpE - -=head1 COPYRIGHT AND LICENCE - -Copyright (C) 2002 Hiroyuki OYAMA. Japan. All rights reserved. - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/agc_2-X/trunk/libs/Net/SSH.pm b/agc_2-X/trunk/libs/Net/SSH.pm deleted file mode 100644 index 41f87f1f..00000000 --- a/agc_2-X/trunk/libs/Net/SSH.pm +++ /dev/null @@ -1,255 +0,0 @@ -package Net::SSH; - -use strict; -use vars qw($VERSION @ISA @EXPORT_OK $ssh $equalspace $DEBUG @ssh_options); -use Exporter; -use IO::File; -use IPC::Open2; -use IPC::Open3; - -@ISA = qw(Exporter); -@EXPORT_OK = qw( ssh issh ssh_cmd sshopen2 sshopen3 ); -$VERSION = '0.07'; - -$DEBUG = 0; - -$ssh = "ssh"; - -=head1 NAME - -Net::SSH - Perl extension for secure shell - -=head1 SYNOPSIS - - use Net::SSH qw(ssh issh sshopen2 sshopen3); - - ssh('user@hostname', $command); - - issh('user@hostname', $command); - - ssh_cmd('user@hostname', $command); - ssh_cmd( { - user => 'user', - host => 'host.name', - command => 'command', - args => [ '-arg1', '-arg2' ], - stdin_string => "string\n", - } ); - - sshopen2('user@hostname', $reader, $writer, $command); - - sshopen3('user@hostname', $writer, $reader, $error, $command); - -=head1 DESCRIPTION - -Simple wrappers around ssh commands. - -For an all-perl implementation that does not require the system B command, -see L instead. - -=head1 SUBROUTINES - -=over 4 - -=item ssh [USER@]HOST, COMMAND [, ARGS ... ] - -Calls ssh in batch mode. - -=cut - -sub ssh { - my($host, @command) = @_; - @ssh_options = &_ssh_options unless @ssh_options; - my @cmd = ($ssh, @ssh_options, $host, @command); - warn "[Net::SSH::ssh] executing ". join(' ', @cmd). "\n" - if $DEBUG; - system(@cmd); -} - -=item issh [USER@]HOST, COMMAND [, ARGS ... ] - -Prints the ssh command to be executed, waits for the user to confirm, and -(optionally) executes the command. - -=cut - -sub issh { - my($host, @command) = @_; - my @cmd = ($ssh, $host, @command); - print join(' ', @cmd), "\n"; - if ( &_yesno ) { - system(@cmd); - } -} - -=item ssh_cmd [USER@]HOST, COMMAND [, ARGS ... ] - -=item ssh_cmd OPTIONS_HASHREF - -Calls ssh in batch mode. Throws a fatal error if data occurs on the command's -STDERR. Returns any data from the command's STDOUT. - -If using the hashref-style of passing arguments, possible keys are: - - user (optional) - host (requried) - command (required) - args (optional, arrayref) - stdin_string (optional) - written to the command's STDIN - -=cut - -sub ssh_cmd { - my($host, $stdin_string, @command); - if ( ref($_[0]) ) { - my $opt = shift; - $host = $opt->{host}; - $host = $opt->{user}. '@'. $host if exists $opt->{user}; - @command = ( $opt->{command} ); - push @command, @{ $opt->{args} } if exists $opt->{args}; - $stdin_string = $opt->{stdin_string}; - } else { - ($host, @command) = @_; - undef $stdin_string; - } - - my $reader = IO::File->new(); - my $writer = IO::File->new(); - my $error = IO::File->new(); - - sshopen3( $host, $writer, $reader, $error, @command ) or die $!; - - print $writer $stdin_string if defined $stdin_string; - close $writer; - - local $/ = undef; - my $output_stream = <$reader>; - my $error_stream = <$error>; - - if ( length $error_stream ) { - die "[Net:SSH::ssh_cmd] STDERR $error_stream"; - } - - return $output_stream; - -} - -=item sshopen2 [USER@]HOST, READER, WRITER, COMMAND [, ARGS ... ] - -Connects the supplied filehandles to the ssh process (in batch mode). - -=cut - -sub sshopen2 { - my($host, $reader, $writer, @command) = @_; - @ssh_options = &_ssh_options unless @ssh_options; - open2($reader, $writer, $ssh, @ssh_options, $host, @command); -} - -=item sshopen3 HOST, WRITER, READER, ERROR, COMMAND [, ARGS ... ] - -Connects the supplied filehandles to the ssh process (in batch mode). - -=cut - -sub sshopen3 { - my($host, $writer, $reader, $error, @command) = @_; - @ssh_options = &_ssh_options unless @ssh_options; - open3($writer, $reader, $error, $ssh, @ssh_options, $host, @command); -} - -sub _yesno { - print "Proceed [y/N]:"; - my $x = scalar(); - $x =~ /^y/i; -} - -sub _ssh_options { - my $reader = IO::File->new(); - my $writer = IO::File->new(); - my $error = IO::File->new(); - open3($writer, $reader, $error, $ssh, '-V'); - my $ssh_version = <$error>; - chomp($ssh_version); - if ( $ssh_version =~ /.*OpenSSH[-|_](\w+)\./ && $1 == 1 ) { - $equalspace = " "; - } else { - $equalspace = "="; - } - my @options = ( '-o', 'BatchMode'.$equalspace.'yes' ); - if ( $ssh_version =~ /.*OpenSSH[-|_](\w+)\./ && $1 > 1 ) { - unshift @options, '-T'; - } - @options; -} - -=back - -=head1 EXAMPLE - - use Net::SSH qw(sshopen2); - use strict; - - my $user = "username"; - my $host = "hostname"; - my $cmd = "command"; - - sshopen2("$user\@$host", *READER, *WRITER, "$cmd") || die "ssh: $!"; - - while () { - chomp(); - print "$_\n"; - } - - close(READER); - close(WRITER); - -=head1 FREQUENTLY ASKED QUESTIONS - -Q: How do you supply a password to connect with ssh within a perl script -using the Net::SSH module? - -A: You don't. Use RSA or DSA keys. See the ssh-keygen(1) manpage. - -Q: My script is "leaking" ssh processes. - -A: See L, L, -L and L. - -=head1 AUTHORS - -Ivan Kohler - -John Harrison contributed an example for the documentation. - -Martin Langhoff contributed the ssh_cmd command, and -Jeff Finucane updated it and took care of the 0.04 release. - -Anthony Awtrey contributed a fix for those still using -OpenSSH v1. - -=head1 COPYRIGHT - -Copyright (c) 2002 Ivan Kohler. -Copyright (c) 2002 Freeside Internet Services, LLC -All rights reserved. -This program is free software; you can redistribute it and/or modify it under -the same terms as Perl itself. - -=head1 BUGS - -Not OO. - -Look at IPC::Session (also fsh) - -=head1 SEE ALSO - -For an all-perl implementation that does not require the system B command, -see L instead. - -ssh-keygen(1), ssh(1), L, L, L - -=cut - -1; - diff --git a/agc_2-X/trunk/libs/Net/Telnet.pm b/agc_2-X/trunk/libs/Net/Telnet.pm deleted file mode 100644 index 9f84fe31..00000000 --- a/agc_2-X/trunk/libs/Net/Telnet.pm +++ /dev/null @@ -1,5252 +0,0 @@ -package Net::Telnet; - -## Copyright 1997, 2000, 2002 Jay Rogers. All rights reserved. -## This program is free software; you can redistribute it and/or -## modify it under the same terms as Perl itself. - -## See user documentation at the end of this file. Search for =head - -use strict; -require 5.002; - -## Module export. -use vars qw(@EXPORT_OK); -@EXPORT_OK = qw(TELNET_IAC TELNET_DONT TELNET_DO TELNET_WONT TELNET_WILL - TELNET_SB TELNET_GA TELNET_EL TELNET_EC TELNET_AYT TELNET_AO - TELNET_IP TELNET_BREAK TELNET_DM TELNET_NOP TELNET_SE - TELNET_EOR TELNET_ABORT TELNET_SUSP TELNET_EOF TELNET_SYNCH - TELOPT_BINARY TELOPT_ECHO TELOPT_RCP TELOPT_SGA TELOPT_NAMS - TELOPT_STATUS TELOPT_TM TELOPT_RCTE TELOPT_NAOL TELOPT_NAOP - TELOPT_NAOCRD TELOPT_NAOHTS TELOPT_NAOHTD TELOPT_NAOFFD - TELOPT_NAOVTS TELOPT_NAOVTD TELOPT_NAOLFD TELOPT_XASCII - TELOPT_LOGOUT TELOPT_BM TELOPT_DET TELOPT_SUPDUP - TELOPT_SUPDUPOUTPUT TELOPT_SNDLOC TELOPT_TTYPE TELOPT_EOR - TELOPT_TUID TELOPT_OUTMRK TELOPT_TTYLOC TELOPT_3270REGIME - TELOPT_X3PAD TELOPT_NAWS TELOPT_TSPEED TELOPT_LFLOW - TELOPT_LINEMODE TELOPT_XDISPLOC TELOPT_OLD_ENVIRON - TELOPT_AUTHENTICATION TELOPT_ENCRYPT TELOPT_NEW_ENVIRON - TELOPT_EXOPL); - -## Module import. -use Exporter (); -use Socket qw(AF_INET SOCK_STREAM inet_aton sockaddr_in); -use Symbol qw(qualify); - -## Base classes. -use vars qw(@ISA); -@ISA = qw(Exporter); -if (&_io_socket_include) { # successfully required module IO::Socket - push @ISA, "IO::Socket::INET"; -} -else { # perl version < 5.004 - require FileHandle; - push @ISA, "FileHandle"; -} - -## Global variables. -use vars qw($VERSION @Telopts); -$VERSION = "3.03"; -@Telopts = ("BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", "STATUS", - "TIMING MARK", "RCTE", "NAOL", "NAOP", "NAOCRD", "NAOHTS", - "NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD", "NAOLFD", "EXTEND ASCII", - "LOGOUT", "BYTE MACRO", "DATA ENTRY TERMINAL", "SUPDUP", - "SUPDUP OUTPUT", "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", - "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", - "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", - "AUTHENTICATION", "ENCRYPT", "NEW-ENVIRON"); - - -########################### Public Methods ########################### - - -sub new { - my ($class) = @_; - my ( - $errmode, - $fh_open, - $host, - $self, - %args, - ); - local $_; - - ## Create a new object with defaults. - $self = $class->SUPER::new; - *$self->{net_telnet} = { - bin_mode => 0, - blksize => &_optimal_blksize(), - buf => "", - cmd_prompt => '/[\$%#>] $/', - cmd_rm_mode => "auto", - dumplog => '', - eofile => 1, - errormode => "die", - errormsg => "", - fdmask => '', - host => "localhost", - inputlog => '', - last_line => "", - last_prompt => "", - maxbufsize => 1_048_576, - num_wrote => 0, - ofs => "", - opened => '', - opt_cback => '', - opt_log => '', - opts => {}, - ors => "\n", - outputlog => '', - pending_errormsg => "", - port => 23, - pushback_buf => "", - rs => "\n", - subopt_cback => '', - telnet_mode => 1, - time_out => 10, - timedout => '', - unsent_opts => "", - }; - - ## Indicate that we'll accept an offer from remote side for it to echo - ## and suppress go aheads. - &_opt_accept($self, - { option => &TELOPT_ECHO, - is_remote => 1, - is_enable => 1 }, - { option => &TELOPT_SGA, - is_remote => 1, - is_enable => 1 }, - ); - - ## Parse the args. - if (@_ == 2) { # one positional arg given - $host = $_[1]; - } - elsif (@_ > 2) { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse all other named args. - foreach (keys %args) { - if (/^-?binmode$/i) { - $self->binmode($args{$_}); - } - elsif (/^-?cmd_remove_mode$/i) { - $self->cmd_remove_mode($args{$_}); - } - elsif (/^-?dump_log$/i) { - $self->dump_log($args{$_}); - } - elsif (/^-?errmode$/i) { - $errmode = $args{$_}; - } - elsif (/^-?fhopen$/i) { - $fh_open = $args{$_}; - } - elsif (/^-?host$/i) { - $host = $args{$_}; - } - elsif (/^-?input_log$/i) { - $self->input_log($args{$_}); - } - elsif (/^-?input_record_separator$/i or /^-?rs$/i) { - $self->input_record_separator($args{$_}); - } - elsif (/^-?option_log$/i) { - $self->option_log($args{$_}); - } - elsif (/^-?output_log$/i) { - $self->output_log($args{$_}); - } - elsif (/^-?output_record_separator$/i or /^-?ors$/i) { - $self->output_record_separator($args{$_}); - } - elsif (/^-?port$/i) { - $self->port($args{$_}); - } - elsif (/^-?prompt$/i) { - $self->prompt($args{$_}); - } - elsif (/^-?telnetmode$/i) { - $self->telnetmode($args{$_}); - } - elsif (/^-?timeout$/i) { - $self->timeout($args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::new()"); - } - } - } - - if (defined $errmode) { # user wants to set errmode - $self->errmode($errmode); - } - - if (defined $fh_open) { # user wants us to attach to existing filehandle - $self->fhopen($fh_open) - or return; - } - elsif (defined $host) { # user wants us to open a connection to host - $self->host($host); - $self->open - or return; - } - - $self; -} # end sub new - - -sub DESTROY { -} # end sub DESTROY - - -sub binmode { - my ($self, $mode) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{bin_mode}; - - if (@_ >= 2) { - unless (defined $mode) { - $mode = 0; - } - - $s->{bin_mode} = $mode; - } - - $prev; -} # end sub binmode - - -sub break { - my ($self) = @_; - my $s = *$self->{net_telnet}; - my $break_cmd = "\xff\xf3"; - - $s->{timedout} = ''; - - &_put($self, \$break_cmd, "break"); -} # end sub break - - -sub buffer { - my ($self) = @_; - my $s = *$self->{net_telnet}; - - \$s->{buf}; -} # end sub buffer - - -sub buffer_empty { - my ($self) = @_; - my ( - $buffer, - ); - - $buffer = $self->buffer; - $$buffer = ""; -} # end sub buffer_empty - - -sub close { - my ($self) = @_; - my $s = *$self->{net_telnet}; - - $s->{eofile} = 1; - $s->{opened} = ''; - close $self - if defined fileno($self); - - 1; -} # end sub close - - -sub cmd { - my ($self, @args) = @_; - my ( - $cmd_remove_mode, - $errmode, - $firstpos, - $last_prompt, - $lastpos, - $lines, - $ors, - $output, - $output_ref, - $prompt, - $remove_echo, - $rs, - $rs_len, - $s, - $telopt_echo, - $timeout, - %args, - ); - my $cmd = ""; - local $_; - - ## Init. - $self->timed_out(''); - $self->last_prompt(""); - $s = *$self->{net_telnet}; - $output = []; - $cmd_remove_mode = $self->cmd_remove_mode; - $errmode = $self->errmode; - $ors = $self->output_record_separator; - $prompt = $self->prompt; - $rs = $self->input_record_separator; - $timeout = $self->timeout; - - ## Parse args. - if (@_ == 2) { # one positional arg given - $cmd = $_[1]; - } - elsif (@_ > 2) { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?cmd_remove/i) { - $cmd_remove_mode = &_parse_cmd_remove_mode($self, $args{$_}); - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?input_record_separator$/i or /^-?rs$/i) { - $rs = &_parse_input_record_separator($self, $args{$_}); - } - elsif (/^-?output$/i) { - $output_ref = $args{$_}; - if (defined($output_ref) and ref($output_ref) eq "ARRAY") { - $output = $output_ref; - } - } - elsif (/^-?output_record_separator$/i or /^-?ors$/i) { - $ors = $self->output_record_separator($args{$_}); - } - elsif (/^-?prompt$/i) { - $prompt = &_parse_prompt($self, $args{$_}); - } - elsif (/^-?string$/i) { - $cmd = $args{$_}; - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::cmd()"); - } - } - } - - ## Override some user settings. - local $s->{errormode} = "return"; - local $s->{time_out} = &_endtime($timeout); - $self->errmsg(""); - - ## Send command and wait for the prompt. - $self->put($cmd . $ors) - and ($lines, $last_prompt) = $self->waitfor($prompt); - - ## Check for failure. - $s->{errormode} = $errmode; - return $self->error("command timed-out") if $self->timed_out; - return $self->error($self->errmsg) if $self->errmsg ne ""; - - ## Save the most recently matched prompt. - $self->last_prompt($last_prompt); - - ## Split lines into an array, keeping record separator at end of line. - $firstpos = 0; - $rs_len = length $rs; - while (($lastpos = index($lines, $rs, $firstpos)) > -1) { - push(@$output, - substr($lines, $firstpos, $lastpos - $firstpos + $rs_len)); - $firstpos = $lastpos + $rs_len; - } - - if ($firstpos < length $lines) { - push @$output, substr($lines, $firstpos); - } - - ## Determine if we should remove the first line of output based - ## on the assumption that it's an echoed back command. - if ($cmd_remove_mode eq "auto") { - ## See if remote side told us they'd echo. - $telopt_echo = $self->option_state(&TELOPT_ECHO); - $remove_echo = $telopt_echo->{remote_enabled}; - } - else { # user explicitly told us how many lines to remove. - $remove_echo = $cmd_remove_mode; - } - - ## Get rid of possible echo back command. - while ($remove_echo--) { - shift @$output; - } - - ## Ensure at least a null string when there's no command output - so - ## "true" is returned in a list context. - unless (@$output) { - @$output = (""); - } - - ## Return command output via named arg, if requested. - if (defined $output_ref) { - if (ref($output_ref) eq "SCALAR") { - $$output_ref = join "", @$output; - } - elsif (ref($output_ref) eq "HASH") { - %$output_ref = @$output; - } - } - - wantarray ? @$output : 1; -} # end sub cmd - - -sub cmd_remove_mode { - my ($self, $mode) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{cmd_rm_mode}; - - if (@_ >= 2) { - $s->{cmd_rm_mode} = &_parse_cmd_remove_mode($self, $mode); - } - - $prev; -} # end sub cmd_remove_mode - - -sub dump_log { - my ($self, $name) = @_; - my ( - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $fh = $s->{dumplog}; - - if (@_ >= 2) { - unless (defined $name) { - $name = ""; - } - - $fh = &_fname_to_handle($self, $name) - or return; - $s->{dumplog} = $fh; - } - - $fh; -} # end sub dump_log - - -sub eof { - my ($self) = @_; - - *$self->{net_telnet}{eofile}; -} # end sub eof - - -sub errmode { - my ($self, $mode) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{errormode}; - - if (@_ >= 2) { - $s->{errormode} = &_parse_errmode($self, $mode); - } - - $prev; -} # end sub errmode - - -sub errmsg { - my ($self, @errmsgs) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{errormsg}; - - if (@_ >= 2) { - $s->{errormsg} = join "", @errmsgs; - } - - $prev; -} # end sub errmsg - - -sub error { - my ($self, @errmsg) = @_; - my ( - $errmsg, - $func, - $mode, - $s, - @args, - ); - local $_; - - $s = *$self->{net_telnet}; - - if (@_ >= 2) { - ## Put error message in the object. - $errmsg = join "", @errmsg; - $s->{errormsg} = $errmsg; - - ## Do the error action as described by error mode. - $mode = $s->{errormode}; - if (ref($mode) eq "CODE") { - &$mode($errmsg); - return; - } - elsif (ref($mode) eq "ARRAY") { - ($func, @args) = @$mode; - &$func(@args); - return; - } - elsif ($mode =~ /^return$/i) { - return; - } - else { # die - if ($errmsg =~ /\n$/) { - die $errmsg; - } - else { - ## Die and append caller's line number to message. - &_croak($self, $errmsg); - } - } - } - else { - return $s->{errormsg} ne ""; - } -} # end sub error - - -sub fhopen { - my ($self, $fh) = @_; - my ( - $globref, - $s, - ); - - ## Convert given filehandle to a typeglob reference, if necessary. - $globref = &_qualify_fh($self, $fh); - - ## Ensure filehandle is already open. - return $self->error("fhopen filehandle isn't already open") - unless defined($globref) and defined(fileno $globref); - - ## Ensure we're closed. - $self->close; - - ## Save our private data. - $s = *$self->{net_telnet}; - - ## Switch ourself with the given filehandle. - *$self = *$globref; - - ## Restore our private data. - *$self->{net_telnet} = $s; - - ## Re-initialize ourself. - select((select($self), $|=1)[$[]); # don't buffer writes - $s = *$self->{net_telnet}; - $s->{blksize} = &_optimal_blksize((stat $self)[11]); - $s->{buf} = ""; - $s->{eofile} = ''; - $s->{errormsg} = ""; - vec($s->{fdmask}='', fileno($self), 1) = 1; - $s->{host} = ""; - $s->{last_line} = ""; - $s->{last_prompt} = ""; - $s->{num_wrote} = 0; - $s->{opened} = 1; - $s->{pending_errormsg} = ""; - $s->{port} = ''; - $s->{pushback_buf} = ""; - $s->{timedout} = ''; - $s->{unsent_opts} = ""; - &_reset_options($s->{opts}); - - 1; -} # end sub fhopen - - -sub get { - my ($self, %args) = @_; - my ( - $binmode, - $endtime, - $errmode, - $line, - $s, - $telnetmode, - $timeout, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $timeout = $s->{time_out}; - $s->{timedout} = ''; - return if $s->{eofile}; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?binmode$/i) { - $binmode = $args{$_}; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $args{$_}; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::get()"); - } - } - - ## If any args given, override corresponding instance data. - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - - ## Set wall time when we time out. - $endtime = &_endtime($timeout); - - ## Try to send any waiting option negotiation. - if (length $s->{unsent_opts}) { - &_flush_opts($self); - } - - ## Try to read just the waiting data using return error mode. - { - local $s->{errormode} = "return"; - $s->{errormsg} = ""; - &_fillbuf($self, $s, 0); - } - - ## We're done if we timed-out and timeout value is set to "poll". - return $self->error($s->{errormsg}) - if ($s->{timedout} and defined($timeout) and $timeout == 0 - and !length $s->{buf}); - - ## We're done if we hit an error other than timing out. - if ($s->{errormsg} and !$s->{timedout}) { - if (!length $s->{buf}) { - return $self->error($s->{errormsg}); - } - else { # error encountered but there's some data in buffer - $s->{pending_errormsg} = $s->{errormsg}; - } - } - - ## Clear time-out error from first read. - $s->{timedout} = ''; - $s->{errormsg} = ""; - - ## If buffer is still empty, try to read according to user's timeout. - if (!length $s->{buf}) { - &_fillbuf($self, $s, $endtime) - or do { - return if $s->{timedout}; - - ## We've reached end-of-file. - $self->close; - return; - }; - } - - ## Extract chars from buffer. - $line = $s->{buf}; - $s->{buf} = ""; - - $line; -} # end sub get - - -sub getline { - my ($self, %args) = @_; - my ( - $binmode, - $endtime, - $errmode, - $len, - $line, - $offset, - $pos, - $rs, - $s, - $telnetmode, - $timeout, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - return if $s->{eofile}; - $rs = $s->{rs}; - $timeout = $s->{time_out}; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?binmode$/i) { - $binmode = $args{$_}; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?input_record_separator$/i or /^-?rs$/i) { - $rs = &_parse_input_record_separator($self, $args{$_}); - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $args{$_}; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::getline()"); - } - } - - ## If any args given, override corresponding instance data. - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - - ## Set wall time when we time out. - $endtime = &_endtime($timeout); - - ## Try to send any waiting option negotiation. - if (length $s->{unsent_opts}) { - &_flush_opts($self); - } - - ## Keep reading into buffer until end-of-line is read. - $offset = 0; - while (($pos = index($s->{buf}, $rs, $offset)) == -1) { - $offset = length $s->{buf}; - &_fillbuf($self, $s, $endtime) - or do { - return if $s->{timedout}; - - ## We've reached end-of-file. - $self->close; - if (length $s->{buf}) { - return $s->{buf}; - } - else { - return; - } - }; - } - - ## Extract line from buffer. - $len = $pos + length $rs; - $line = substr($s->{buf}, 0, $len); - substr($s->{buf}, 0, $len) = ""; - - $line; -} # end sub getline - - -sub getlines { - my ($self, %args) = @_; - my ( - $binmode, - $errmode, - $line, - $rs, - $s, - $telnetmode, - $timeout, - ); - my $all = 1; - my @lines = (); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - return if $s->{eofile}; - $timeout = $s->{time_out}; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?all$/i) { - $all = $args{$_}; - unless (defined $all) { - $all = ''; - } - } - elsif (/^-?binmode$/i) { - $binmode = $args{$_}; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?input_record_separator$/i or /^-?rs$/i) { - $rs = &_parse_input_record_separator($self, $args{$_}); - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $args{$_}; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::getlines()"); - } - } - - ## If any args given, override corresponding instance data. - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{rs} = $rs - if defined $rs; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - local $s->{time_out} = &_endtime($timeout); - - ## User requested only the currently available lines. - if (! $all) { - return &_next_getlines($self, $s); - } - - ## Read lines until eof or error. - while (1) { - $line = $self->getline - or last; - push @lines, $line; - } - - ## Check for error. - return if ! $self->eof; - - @lines; -} # end sub getlines - - -sub host { - my ($self, $host) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{host}; - - if (@_ >= 2) { - unless (defined $host) { - $host = ""; - } - - $s->{host} = $host; - } - - $prev; -} # end sub host - - -sub input_log { - my ($self, $name) = @_; - my ( - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $fh = $s->{inputlog}; - - if (@_ >= 2) { - unless (defined $name) { - $name = ""; - } - - $fh = &_fname_to_handle($self, $name) - or return; - $s->{inputlog} = $fh; - } - - $fh; -} # end sub input_log - - -sub input_record_separator { - my ($self, $rs) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{rs}; - - if (@_ >= 2) { - $s->{rs} = &_parse_input_record_separator($self, $rs); - } - - $prev; -} # end sub input_record_separator - - -sub last_prompt { - my ($self, $string) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{last_prompt}; - - if (@_ >= 2) { - unless (defined $string) { - $string = ""; - } - - $s->{last_prompt} = $string; - } - - $prev; -} # end sub last_prompt - - -sub lastline { - my ($self, $line) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{last_line}; - - if (@_ >= 2) { - unless (defined $line) { - $line = ""; - } - - $s->{last_line} = $line; - } - - $prev; -} # end sub lastline - - -sub login { - my ($self) = @_; - my ( - $errmode, - $error, - $is_passwd_arg, - $is_username_arg, - $lastline, - $match, - $ors, - $passwd, - $prematch, - $prompt, - $s, - $timeout, - $username, - %args, - ); - local $_; - - ## Init. - $self->timed_out(''); - $self->last_prompt(""); - $s = *$self->{net_telnet}; - $timeout = $self->timeout; - $ors = $self->output_record_separator; - $prompt = $self->prompt; - - ## Parse args. - if (@_ == 3) { # just username and passwd given - $username = $_[1]; - $passwd = $_[2]; - - $is_username_arg = 1; - $is_passwd_arg = 1; - } - else { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?name$/i) { - $username = $args{$_}; - unless (defined $username) { - $username = ""; - } - - $is_username_arg = 1; - } - elsif (/^-?pass/i) { - $passwd = $args{$_}; - unless (defined $passwd) { - $passwd = ""; - } - - $is_passwd_arg = 1; - } - elsif (/^-?prompt$/i) { - $prompt = &_parse_prompt($self, $args{$_}); - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given ", - "to " . ref($self) . "::login()"); - } - } - } - - ## Ensure both username and password argument given. - &_croak($self,"Name argument not given to " . ref($self) . "::login()") - unless $is_username_arg; - &_croak($self,"Password argument not given to " . ref($self) . "::login()") - unless $is_passwd_arg; - - ## Override some user settings. - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{time_out} = &_endtime($timeout); - - ## Create a subroutine to generate an error. - $error - = sub { - my ($errmsg) = @_; - - if ($self->timed_out) { - return $self->error($errmsg); - } - elsif ($self->eof) { - ($lastline = $self->lastline) =~ s/\n+//; - return $self->error($errmsg, ": ", $lastline); - } - else { - return $self->error($self->errmsg); - } - }; - - - return $self->error("login failed: filehandle isn't open") - if $self->eof; - - ## Wait for login prompt. - $self->waitfor(Match => '/login[: ]*$/i', - Match => '/username[: ]*$/i', - Errmode => "return") - or do { - return &$error("eof read waiting for login prompt") - if $self->eof; - return &$error("timed-out waiting for login prompt"); - }; - - ## Delay sending response because of bug in Linux login program. - &_sleep(0.01); - - ## Send login name. - $self->put(String => $username . $ors, - Errmode => "return") - or return &$error("login disconnected"); - - ## Wait for password prompt. - $self->waitfor(Match => '/password[: ]*$/i', - Errmode => "return") - or do { - return &$error("eof read waiting for password prompt") - if $self->eof; - return &$error("timed-out waiting for password prompt"); - }; - - ## Delay sending response because of bug in Linux login program. - &_sleep(0.01); - - ## Send password. - $self->put(String => $passwd . $ors, - Errmode => "return") - or return &$error("login disconnected"); - - ## Wait for command prompt or another login prompt. - ($prematch, $match) = $self->waitfor(Match => '/login[: ]*$/i', - Match => '/username[: ]*$/i', - Match => $prompt, - Errmode => "return") - or do { - return &$error("eof read waiting for command prompt") - if $self->eof; - return &$error("timed-out waiting for command prompt"); - }; - - ## It's a bad login if we got another login prompt. - return $self->error("login failed: bad name or password") - if $match =~ /login[: ]*$/i or $match =~ /username[: ]*$/i; - - ## Save the most recently matched command prompt. - $self->last_prompt($match); - - 1; -} # end sub login - - -sub max_buffer_length { - my ($self, $maxbufsize) = @_; - my ( - $prev, - $s, - ); - my $minbufsize = 512; - - $s = *$self->{net_telnet}; - $prev = $s->{maxbufsize}; - - if (@_ >= 2) { - ## Ensure a positive integer value. - unless (defined $maxbufsize - and $maxbufsize =~ /^\d+$/ - and $maxbufsize) - { - &_carp($self, "ignoring bad Max_buffer_length " . - "argument \"$maxbufsize\": it's not a positive integer"); - $maxbufsize = $prev; - } - - ## Adjust up values that are too small. - if ($maxbufsize < $minbufsize) { - $maxbufsize = $minbufsize; - } - - $s->{maxbufsize} = $maxbufsize; - } - - $prev; -} # end sub max_buffer_length - - -## Make ofs() synonymous with output_field_separator(). -*ofs = \&output_field_separator; - - -sub open { - my ($self) = @_; - my ( - $errmode, - $errno, - $host, - $ip_addr, - $port, - $s, - $timeout, - %args, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $timeout = $s->{time_out}; - $s->{timedout} = ''; - - if (@_ == 2) { # one positional arg given - $self->host($_[1]); - } - elsif (@_ > 2) { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?host$/i) { - $self->host($args{$_}); - } - elsif (/^-?port$/i) { - $self->port($args{$_}) - or return; - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given ", - "to " . ref($self) . "::open()"); - } - } - } - - ## If any args given, override corresponding instance data. - local $s->{errormode} = $errmode - if defined $errmode; - - ## Get host and port. - $host = $self->host; - $port = $self->port; - - ## Ensure we're already closed. - $self->close; - - ## Connect with or without a timeout. - if (defined($timeout) and &_have_alarm) { # use a timeout - ## Convert possible absolute timeout to relative timeout. - if ($timeout >= $^T) { # it's an absolute time - $timeout = $timeout - time; - } - - ## Ensure a valid timeout value for alarm. - if ($timeout < 1) { - $timeout = 1; - } - $timeout = int($timeout + 1.5); - - ## Connect to server, timing out if it takes too long. - eval { - ## Turn on timer. - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{ALRM} = sub { die "timed-out\n" }; - alarm $timeout; - - ## Lookup server's IP address. - $ip_addr = inet_aton $host - or die "unknown remote host: $host\n"; - - ## Create a socket and attach the filehandle to it. - socket $self, AF_INET, SOCK_STREAM, 0 - or die "problem creating socket: $!\n"; - - ## Open connection to server. - connect $self, sockaddr_in($port, $ip_addr) - or die "problem connecting to \"$host\", port $port: $!\n"; - }; - alarm 0; - - ## Check for error. - if ($@ =~ /^timed-out$/) { # time out failure - $s->{timedout} = 1; - $self->close; - if (!$ip_addr) { - return $self->error("unknown remote host: $host: ", - "name lookup timed-out"); - } - else { - return $self->error("problem connecting to \"$host\", ", - "port $port: connect timed-out"); - } - } - elsif ($@) { # hostname lookup or connect failure - $self->close; - chomp $@; - return $self->error($@); - } - } - else { # don't use a timeout - $timeout = undef; - - ## Lookup server's IP address. - $ip_addr = inet_aton $host - or return $self->error("unknown remote host: $host"); - - ## Create a socket and attach the filehandle to it. - socket $self, AF_INET, SOCK_STREAM, 0 - or return $self->error("problem creating socket: $!"); - - ## Open connection to server. - connect $self, sockaddr_in($port, $ip_addr) - or do { - $errno = "$!"; - $self->close; - return $self->error("problem connecting to \"$host\", ", - "port $port: $errno"); - }; - } - - select((select($self), $|=1)[$[]); # don't buffer writes - $s->{blksize} = &_optimal_blksize((stat $self)[11]); - $s->{buf} = ""; - $s->{eofile} = ''; - $s->{errormsg} = ""; - vec($s->{fdmask}='', fileno($self), 1) = 1; - $s->{last_line} = ""; - $s->{num_wrote} = 0; - $s->{opened} = 1; - $s->{pending_errormsg} = ""; - $s->{pushback_buf} = ""; - $s->{timedout} = ''; - $s->{unsent_opts} = ""; - &_reset_options($s->{opts}); - - 1; -} # end sub open - - -sub option_accept { - my ($self, @args) = @_; - my ( - $arg, - $option, - $s, - @opt_args, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - - ## Parse the named args. - while (($_, $arg) = splice @args, 0, 2) { - ## Verify and save arguments. - if (/^-?do$/i) { - ## Make sure a callback is defined. - return $self->error("usage: an option callback must already ", - "be defined when enabling with $_") - unless $s->{opt_cback}; - - $option = &_verify_telopt_arg($self, $arg, $_); - return unless defined $option; - push @opt_args, { option => $option, - is_remote => '', - is_enable => 1, - }; - } - elsif (/^-?dont$/i) { - $option = &_verify_telopt_arg($self, $arg, $_); - return unless defined $option; - push @opt_args, { option => $option, - is_remote => '', - is_enable => '', - }; - } - elsif (/^-?will$/i) { - ## Make sure a callback is defined. - return $self->error("usage: an option callback must already ", - "be defined when enabling with $_") - unless $s->{opt_cback}; - - $option = &_verify_telopt_arg($self, $arg, $_); - return unless defined $option; - push @opt_args, { option => $option, - is_remote => 1, - is_enable => 1, - }; - } - elsif (/^-?wont$/i) { - $option = &_verify_telopt_arg($self, $arg, $_); - return unless defined $option; - push @opt_args, { option => $option, - is_remote => 1, - is_enable => '', - }; - } - else { - return $self->error('usage: $obj->option_accept(' . - '[Do => $telopt,] ', - '[Dont => $telopt,] ', - '[Will => $telopt,] ', - '[Wont => $telopt,]'); - } - } - - ## Set "receive ok" for options specified. - &_opt_accept($self, @opt_args); -} # end sub option_accept - - -sub option_callback { - my ($self, $callback) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{opt_cback}; - - if (@_ >= 2) { - unless (defined $callback and ref($callback) eq "CODE") { - &_carp($self, "ignoring Option_callback argument because it's " . - "not a code ref"); - $callback = $prev; - } - - $s->{opt_cback} = $callback; - } - - $prev; -} # end sub option_callback - - -sub option_log { - my ($self, $name) = @_; - my ( - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $fh = $s->{opt_log}; - - if (@_ >= 2) { - unless (defined $name) { - $name = ""; - } - - $fh = &_fname_to_handle($self, $name) - or return; - $s->{opt_log} = $fh; - } - - $fh; -} # end sub option_log - - -sub option_state { - my ($self, $option) = @_; - my ( - $opt_state, - $s, - %opt_state, - ); - - ## Ensure telnet option is non-negative integer. - $option = &_verify_telopt_arg($self, $option); - return unless defined $option; - - ## Init. - $s = *$self->{net_telnet}; - unless (defined $s->{opts}{$option}) { - &_set_default_option($s, $option); - } - - ## Return hashref to a copy of the values. - $opt_state = $s->{opts}{$option}; - %opt_state = %$opt_state; - \%opt_state; -} # end sub option_state - - -## Make ors() synonymous with output_record_separator(). -*ors = \&output_record_separator; - - -sub output_field_separator { - my ($self, $ofs) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{ofs}; - - if (@_ >= 2) { - unless (defined $ofs) { - $ofs = ""; - } - - $s->{ofs} = $ofs; - } - - $prev; -} # end sub output_field_separator - - -sub output_log { - my ($self, $name) = @_; - my ( - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $fh = $s->{outputlog}; - - if (@_ >= 2) { - unless (defined $name) { - $name = ""; - } - - $fh = &_fname_to_handle($self, $name) - or return; - $s->{outputlog} = $fh; - } - - $fh; -} # end sub output_log - - -sub output_record_separator { - my ($self, $ors) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{ors}; - - if (@_ >= 2) { - unless (defined $ors) { - $ors = ""; - } - - $s->{ors} = $ors; - } - - $prev; -} # end sub output_record_separator - - -sub port { - my ($self, $port) = @_; - my ( - $prev, - $s, - $service, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{port}; - - if (@_ >= 2) { - unless (defined $port) { - $port = ""; - } - - if (!$port) { - &_carp($self, "ignoring bad Port argument \"$port\""); - $port = $prev; - } - elsif ($port !~ /^\d+$/) { # port isn't all digits - $service = $port; - $port = getservbyname($service, "tcp"); - unless ($port) { - &_carp($self, "ignoring bad Port argument \"$service\": " . - "it's an unknown TCP service"); - $port = $prev; - } - } - - $s->{port} = $port; - } - - $prev; -} # end sub port - - -sub print { - my ($self) = shift; - my ( - $buf, - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - return $self->error("write error: filehandle isn't open") - unless $s->{opened}; - - ## Add field and record separators. - $buf = join($s->{ofs}, @_) . $s->{ors}; - - ## Log the output if requested. - if ($s->{outputlog}) { - &_log_print($s->{outputlog}, $buf); - } - - ## Convert native newlines to CR LF. - if (!$s->{bin_mode}) { - $buf =~ s(\n)(\015\012)g; - } - - ## Escape TELNET IAC and also CR not followed by LF. - if ($s->{telnet_mode}) { - $buf =~ s(\377)(\377\377)g; - &_escape_cr(\$buf); - } - - &_put($self, \$buf, "print"); -} # end sub print - - -sub print_length { - my ($self) = @_; - - *$self->{net_telnet}{num_wrote}; -} # end sub print_length - - -sub prompt { - my ($self, $prompt) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{cmd_prompt}; - - ## Parse args. - if (@_ == 2) { - $s->{cmd_prompt} = &_parse_prompt($self, $prompt); - } - - $prev; -} # end sub prompt - - -sub put { - my ($self) = @_; - my ( - $binmode, - $buf, - $errmode, - $is_timeout_arg, - $s, - $telnetmode, - $timeout, - %args, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - - ## Parse args. - if (@_ == 2) { # one positional arg given - $buf = $_[1]; - } - elsif (@_ > 2) { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?binmode$/i) { - $binmode = $args{$_}; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?string$/i) { - $buf = $args{$_}; - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $args{$_}; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - $is_timeout_arg = 1; - } - else { - &_croak($self, "bad named parameter \"$_\" given ", - "to " . ref($self) . "::put()"); - } - } - } - - ## If any args given, override corresponding instance data. - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - local $s->{time_out} = $timeout - if defined $is_timeout_arg; - - ## Check for errors. - return $self->error("write error: filehandle isn't open") - unless $s->{opened}; - - ## Log the output if requested. - if ($s->{outputlog}) { - &_log_print($s->{outputlog}, $buf); - } - - ## Convert native newlines to CR LF. - if (!$s->{bin_mode}) { - $buf =~ s(\n)(\015\012)g; - } - - ## Escape TELNET IAC and also CR not followed by LF. - if ($s->{telnet_mode}) { - $buf =~ s(\377)(\377\377)g; - &_escape_cr(\$buf); - } - - &_put($self, \$buf, "print"); -} # end sub put - - -## Make rs() synonymous input_record_separator(). -*rs = \&input_record_separator; - - -sub suboption_callback { - my ($self, $callback) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{subopt_cback}; - - if (@_ >= 2) { - unless (defined $callback and ref($callback) eq "CODE") { - &_carp($self,"ignoring Suboption_callback argument because it's " . - "not a code ref"); - $callback = $prev; - } - - $s->{subopt_cback} = $callback; - } - - $prev; -} # end sub suboption_callback - - -sub telnetmode { - my ($self, $mode) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{telnet_mode}; - - if (@_ >= 2) { - unless (defined $mode) { - $mode = 0; - } - - $s->{telnet_mode} = $mode; - } - - $prev; -} # end sub telnetmode - - -sub timed_out { - my ($self, $value) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{timedout}; - - if (@_ >= 2) { - unless (defined $value) { - $value = ""; - } - - $s->{timedout} = $value; - } - - $prev; -} # end sub timed_out - - -sub timeout { - my ($self, $timeout) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{time_out}; - - if (@_ >= 2) { - $s->{time_out} = &_parse_timeout($self, $timeout); - } - - $prev; -} # end sub timeout - - -sub waitfor { - my ($self, @args) = @_; - my ( - $arg, - $binmode, - $endtime, - $errmode, - $len, - $match, - $match_op, - $pos, - $prematch, - $s, - $search, - $search_cond, - $telnetmode, - $timeout, - @match_cond, - @match_ops, - @search_cond, - @string_cond, - @warns, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - return if $s->{eofile}; - return unless @args; - $timeout = $s->{time_out}; - - ## Code template used to build string match conditional. - ## Values between array elements must be supplied later. - @string_cond = - ('if (($pos = index $s->{buf}, ', ') > -1) { - $len = ', '; - $prematch = substr $s->{buf}, 0, $pos; - $match = substr $s->{buf}, $pos, $len; - substr($s->{buf}, 0, $pos + $len) = ""; - last; - }'); - - ## Code template used to build pattern match conditional. - ## Values between array elements must be supplied later. - @match_cond = - ('if ($s->{buf} =~ ', ') { - $prematch = $`; - $match = $&; - substr($s->{buf}, 0, length($`) + length($&)) = ""; - last; - }'); - - ## Parse args. - if (@_ == 2) { # one positional arg given - $arg = $_[1]; - - ## Fill in the blanks in the code template. - push @match_ops, $arg; - push @search_cond, join("", $match_cond[0], $arg, $match_cond[1]); - } - elsif (@_ > 2) { # named args given - ## Parse the named args. - while (($_, $arg) = splice @args, 0, 2) { - if (/^-?binmode$/i) { - $binmode = $arg; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $arg); - } - elsif (/^-?match$/i) { - ## Fill in the blanks in the code template. - push @match_ops, $arg; - push @search_cond, join("", - $match_cond[0], $arg, $match_cond[1]); - } - elsif (/^-?string$/i) { - ## Fill in the blanks in the code template. - $arg =~ s/'/\\'/g; # quote ticks - push @search_cond, join("", - $string_cond[0], "'$arg'", - $string_cond[1], length($arg), - $string_cond[2]); - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $arg; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $arg); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::waitfor()"); - } - } - } - - ## If any args given, override corresponding instance data. - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - - ## Check for bad match operator argument. - foreach $match_op (@match_ops) { - return $self->error("missing opening delimiter of match operator ", - "in argument \"$match_op\" given to ", - ref($self) . "::waitfor()") - unless $match_op =~ m(^\s*/) or $match_op =~ m(^\s*m\s*\W); - } - - ## Construct conditional to check for requested string and pattern matches. - ## Turn subsequent "if"s into "elsif". - $search_cond = join "\n\tels", @search_cond; - - ## Construct loop to fill buffer until string/pattern, timeout, or eof. - $search = join "", " - while (1) {\n\t", - $search_cond, ' - &_fillbuf($self, $s, $endtime) - or do { - last if $s->{timedout}; - $self->close; - last; - }; - }'; - - ## Set wall time when we timeout. - $endtime = &_endtime($timeout); - - ## Run the loop. - { - local $^W = 1; - local $SIG{"__WARN__"} = sub { push @warns, @_ }; - local $s->{errormode} = "return"; - $s->{errormsg} = ""; - eval $search; - } - - ## Check for failure. - return $self->error("pattern match timed-out") if $s->{timedout}; - return $self->error($s->{errormsg}) if $s->{errormsg} ne ""; - return $self->error("pattern match read eof") if $s->{eofile}; - - ## Check for Perl syntax errors or warnings. - if ($@ or @warns) { - foreach $match_op (@match_ops) { - &_match_check($self, $match_op) - or return; - } - return $self->error($@) if $@; - return $self->error(@warns) if @warns; - } - - wantarray ? ($prematch, $match) : 1; -} # end sub waitfor - - -######################## Private Subroutines ######################### - - -sub _append_lineno { - my ($obj, @msgs) = @_; - my ( - $file, - $line, - $pkg, - ); - - ## Find the caller that's not in object's class or one of its base classes. - ($pkg, $file , $line) = &_user_caller($obj); - join("", @msgs, " at ", $file, " line ", $line, "\n"); -} # end sub _append_lineno - - -sub _carp { - warn &_append_lineno(@_); -} # end sub _carp - - -sub _croak { - die &_append_lineno(@_); -} # end sub _croak - - -sub _endtime { - my ($interval) = @_; - - ## Compute wall time when timeout occurs. - if (defined $interval) { - if ($interval >= $^T) { # it's already an absolute time - return $interval; - } - elsif ($interval > 0) { # it's relative to the current time - return int(time + 1.5 + $interval); - } - else { # it's a one time poll - return 0; - } - } - else { # there's no timeout - return undef; - } -} # end sub _endtime - - -sub _escape_cr { - my ($string) = @_; - my ( - $nextchar, - ); - my $pos = 0; - - ## Convert all CR (not followed by LF) to CR NULL. - while (($pos = index($$string, "\015", $pos)) > -1) { - $nextchar = substr $$string, $pos + 1, 1; - - substr($$string, $pos, 1) = "\015\000" - unless $nextchar eq "\012"; - - $pos++; - } - - 1; -} # end sub _escape_cr - - -sub _fillbuf { - my ($self, $s, $endtime) = @_; - my ( - $msg, - $nfound, - $nread, - $pushback_len, - $read_pos, - $ready, - $timed_out, - $timeout, - $unparsed_pos, - ); - - ## If error from last read not yet reported then do it now. - if ($s->{pending_errormsg}) { - $msg = $s->{pending_errormsg}; - $s->{pending_errormsg} = ""; - return $self->error($msg); - } - - return unless $s->{opened}; - - while (1) { - ## Maximum buffer size exceeded? - return $self->error("maximum input buffer length exceeded: ", - $s->{maxbufsize}, " bytes") - unless length($s->{buf}) <= $s->{maxbufsize}; - - ## Determine how long to wait for input ready. - ($timed_out, $timeout) = &_timeout_interval($endtime); - if ($timed_out) { - $s->{timedout} = 1; - return $self->error("read timed-out"); - } - - ## Wait for input ready. - $nfound = select $ready=$s->{fdmask}, "", "", $timeout; - - ## Handle any errors while waiting. - if (!defined $nfound or $nfound <= 0) { # input not ready - if (defined $nfound and $nfound == 0) { # timed-out - $s->{timedout} = 1; - return $self->error("read timed-out"); - } - else { # error waiting for input ready - next if $! =~ /^interrupted/i; - - $s->{opened} = ''; - return $self->error("read error: $!"); - } - } - - ## Append to buffer any partially processed telnet or CR sequence. - $pushback_len = length $s->{pushback_buf}; - if ($pushback_len) { - $s->{buf} .= $s->{pushback_buf}; - $s->{pushback_buf} = ""; - } - - ## Read the waiting data. - $read_pos = length $s->{buf}; - $unparsed_pos = $read_pos - $pushback_len; - $nread = sysread $self, $s->{buf}, $s->{blksize}, $read_pos; - - ## Handle any read errors. - if (!defined $nread) { # read failed - next if $! =~ /^interrupted/i; # restart interrupted syscall - - $s->{opened} = ''; - return $self->error("read error: $!"); - } - - ## Handle eof. - if ($nread == 0) { # eof read - $s->{opened} = ''; - return; - } - - ## Display network traffic if requested. - if ($s->{dumplog}) { - &_log_dump('<', $s->{dumplog}, \$s->{buf}, $read_pos); - } - - ## Process any telnet commands in the data stream. - if ($s->{telnet_mode} and index($s->{buf},"\377",$unparsed_pos) > -1) { - &_interpret_tcmd($self, $s, $unparsed_pos); - } - - ## Process any carriage-return sequences in the data stream. - &_interpret_cr($s, $unparsed_pos); - - ## Read again if all chars read were consumed as telnet cmds. - next if $unparsed_pos >= length $s->{buf}; - - ## Log the input if requested. - if ($s->{inputlog}) { - &_log_print($s->{inputlog}, substr($s->{buf}, $unparsed_pos)); - } - - ## Save the last line read. - &_save_lastline($s); - - ## We've successfully read some data into the buffer. - last; - } # end while(1) - - 1; -} # end sub _fillbuf - - -sub _flush_opts { - my ($self) = @_; - my ( - $option_chars, - ); - my $s = *$self->{net_telnet}; - - ## Get option and clear the output buf. - $option_chars = $s->{unsent_opts}; - $s->{unsent_opts} = ""; - - ## Try to send options without waiting. - { - local $s->{errormode} = "return"; - local $s->{time_out} = 0; - &_put($self, \$option_chars, "telnet option negotiation") - or do { - ## Save chars not printed for later. - substr($option_chars, 0, $self->print_length) = ""; - $s->{unsent_opts} .= $option_chars; - }; - } - - 1; -} # end sub _flush_opts - - -sub _fname_to_handle { - my ($self, $fh) = @_; - my ( - $filename, - ); - - ## Ensure valid input. - return "" - unless defined $fh and (ref $fh or length $fh); - - ## Open a new filehandle if input is a filename. - no strict "refs"; - if (!ref($fh) and !defined(fileno $fh)) { # fh is a filename - $filename = $fh; - $fh = &_new_handle(); - CORE::open $fh, "> $filename" - or return $self->error("problem creating $filename: $!"); - } - - select((select($fh), $|=1)[$[]); # don't buffer writes - $fh; -} # end sub _fname_to_handle - - -sub _have_alarm { - eval { - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{ALRM} = sub { die }; - alarm 0; - }; - - ! $@; -} # end sub _have_alarm - - -sub _interpret_cr { - my ($s, $pos) = @_; - my ( - $nextchar, - ); - - while (($pos = index($s->{buf}, "\015", $pos)) > -1) { - $nextchar = substr($s->{buf}, $pos + 1, 1); - if ($nextchar eq "\0") { - ## Convert CR NULL to CR when in telnet mode. - if ($s->{telnet_mode}) { - substr($s->{buf}, $pos + 1, 1) = ""; - } - } - elsif ($nextchar eq "\012") { - ## Convert CR LF to newline when not in binary mode. - if (!$s->{bin_mode}) { - substr($s->{buf}, $pos, 2) = "\n"; - } - } - elsif (!length($nextchar) and ($s->{telnet_mode} or !$s->{bin_mode})) { - ## Save CR in alt buffer for possible CR LF or CR NULL conversion. - $s->{pushback_buf} .= "\015"; - chop $s->{buf}; - } - - $pos++; - } - - 1; -} # end sub _interpret_cr - - -sub _interpret_tcmd { - my ($self, $s, $offset) = @_; - my ( - $callback, - $endpos, - $nextchar, - $option, - $parameters, - $pos, - $subcmd, - ); - local $_; - - ## Parse telnet commands in the data stream. - $pos = $offset; - while (($pos = index $s->{buf}, "\377", $pos) > -1) { # unprocessed IAC - $nextchar = substr $s->{buf}, $pos + 1, 1; - - ## Save command if it's only partially read. - if (!length $nextchar) { - $s->{pushback_buf} .= "\377"; - chop $s->{buf}; - last; - } - - if ($nextchar eq "\377") { # IAC is escaping "\377" char - ## Remove escape char from data stream. - substr($s->{buf}, $pos, 1) = ""; - $pos++; - } - elsif ($nextchar eq "\375" or $nextchar eq "\373" or - $nextchar eq "\374" or $nextchar eq "\376") { # opt negotiation - $option = substr $s->{buf}, $pos + 2, 1; - - ## Save command if it's only partially read. - if (!length $option) { - $s->{pushback_buf} .= "\377" . $nextchar; - chop $s->{buf}; - chop $s->{buf}; - last; - } - - ## Remove command from data stream. - substr($s->{buf}, $pos, 3) = ""; - - ## Handle option negotiation. - &_negotiate_recv($self, $s, $nextchar, ord($option), $pos); - } - elsif ($nextchar eq "\372") { # start of subnegotiation parameters - ## Save command if it's only partially read. - $endpos = index $s->{buf}, "\360", $pos; - if ($endpos == -1) { - $s->{pushback_buf} .= substr $s->{buf}, $pos; - substr($s->{buf}, $pos) = ""; - last; - } - - ## Remove subnegotiation cmd from buffer. - $subcmd = substr($s->{buf}, $pos, $endpos - $pos + 1); - substr($s->{buf}, $pos, $endpos - $pos + 1) = ""; - - ## Invoke subnegotiation callback. - if ($s->{subopt_cback} and length($subcmd) >= 5) { - $option = unpack "C", substr($subcmd, 2, 1); - if (length($subcmd) >= 6) { - $parameters = substr $subcmd, 3, length($subcmd) - 5; - } - else { - $parameters = ""; - } - - $callback = $s->{subopt_cback}; - &$callback($self, $option, $parameters); - } - } - else { # various two char telnet commands - ## Ignore and remove command from data stream. - substr($s->{buf}, $pos, 2) = ""; - } - } - - ## Try to send any waiting option negotiation. - if (length $s->{unsent_opts}) { - &_flush_opts($self); - } - - 1; -} # end sub _interpret_tcmd - - -sub _io_socket_include { - local $SIG{"__DIE__"} = "DEFAULT"; - eval "require IO::Socket"; -} # end sub io_socket_include - - -sub _log_dump { - my ($direction, $fh, $data, $offset, $len) = @_; - my ( - $addr, - $hexvals, - $line, - ); - - $addr = 0; - $len = length($$data) - $offset - if !defined $len; - return 1 if $len <= 0; - - ## Print data in dump format. - while ($len > 0) { - ## Convert up to the next 16 chars to hex, padding w/ spaces. - if ($len >= 16) { - $line = substr $$data, $offset, 16; - } - else { - $line = substr $$data, $offset, $len; - } - $hexvals = unpack("H*", $line); - $hexvals .= ' ' x (32 - length $hexvals); - - ## Place in 16 columns, each containing two hex digits. - $hexvals = sprintf("%s %s %s %s " x 4, - unpack("a2" x 16, $hexvals)); - - ## For the ASCII column, change unprintable chars to a period. - $line =~ s/[\000-\037,\177-\237]/./g; - - ## Print the line in dump format. - &_log_print($fh, sprintf("%s 0x%5.5lx: %s%s\n", - $direction, $addr, $hexvals, $line)); - - $addr += 16; - $offset += 16; - $len -= 16; - } - - &_log_print($fh, "\n"); - - 1; -} # end sub _log_dump - - -sub _log_option { - my ($fh, $direction, $request, $option) = @_; - my ( - $name, - ); - - if ($option >= 0 and $option <= $#Telopts) { - $name = $Telopts[$option]; - } - else { - $name = $option; - } - - &_log_print($fh, "$direction $request $name\n"); -} # end sub _log_option - - -sub _log_print { - my ($fh, $buf) = @_; - local $\ = ''; - - if (ref($fh) and ref($fh) ne "GLOB") { # fh is blessed ref - $fh->print($buf); - } - else { # fh isn't blessed ref - print $fh $buf; - } -} # end sub _log_print - - -sub _match_check { - my ($self, $code) = @_; - my $error; - my @warns = (); - - ## Use eval to check for syntax errors or warnings. - { - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{"__WARN__"} = sub { push @warns, @_ }; - local $^W = 1; - local $_ = ''; - eval "\$_ =~ $code;"; - } - if ($@) { - ## Remove useless lines numbers from message. - ($error = $@) =~ s/ at \(eval \d+\) line \d+.?//; - chomp $error; - return $self->error("bad match operator: $error"); - } - elsif (@warns) { - ## Remove useless lines numbers from message. - ($error = shift @warns) =~ s/ at \(eval \d+\) line \d+.?//; - $error =~ s/ while "strict subs" in use//; - chomp $error; - return $self->error("bad match operator: $error"); - } - - 1; -} # end sub _match_check - - -sub _negotiate_callback { - my ($self, $opt, $is_remote, $is_enabled, $was_enabled, $opt_bufpos) = @_; - my ( - $callback, - $s, - ); - local $_; - - ## Keep track of remote echo. - if ($is_remote and $opt == &TELOPT_ECHO) { # received WILL or WONT ECHO - $s = *$self->{net_telnet}; - - if ($is_enabled and !$was_enabled) { # received WILL ECHO - $s->{remote_echo} = 1; - } - elsif (!$is_enabled and $was_enabled) { # received WONT ECHO - $s->{remote_echo} = ''; - } - } - - ## Invoke callback, if there is one. - $callback = $self->option_callback; - if ($callback) { - &$callback($self, $opt, $is_remote, - $is_enabled, $was_enabled, $opt_bufpos); - } - - 1; -} # end sub _negotiate_callback - - -sub _negotiate_recv { - my ($self, $s, $opt_request, $opt, $opt_bufpos) = @_; - - ## Ensure data structure exists for this option. - unless (defined $s->{opts}{$opt}) { - &_set_default_option($s, $opt); - } - - ## Process the option. - if ($opt_request eq "\376") { # DONT - &_negotiate_recv_disable($self, $s, $opt, "dont", $opt_bufpos, - $s->{opts}{$opt}{local_enable_ok}, - \$s->{opts}{$opt}{local_enabled}, - \$s->{opts}{$opt}{local_state}); - } - elsif ($opt_request eq "\375") { # DO - &_negotiate_recv_enable($self, $s, $opt, "do", $opt_bufpos, - $s->{opts}{$opt}{local_enable_ok}, - \$s->{opts}{$opt}{local_enabled}, - \$s->{opts}{$opt}{local_state}); - } - elsif ($opt_request eq "\374") { # WONT - &_negotiate_recv_disable($self, $s, $opt, "wont", $opt_bufpos, - $s->{opts}{$opt}{remote_enable_ok}, - \$s->{opts}{$opt}{remote_enabled}, - \$s->{opts}{$opt}{remote_state}); - } - elsif ($opt_request eq "\373") { # WILL - &_negotiate_recv_enable($self, $s, $opt, "will", $opt_bufpos, - $s->{opts}{$opt}{remote_enable_ok}, - \$s->{opts}{$opt}{remote_enabled}, - \$s->{opts}{$opt}{remote_state}); - } - else { # internal error - die; - } - - 1; -} # end sub _negotiate_recv - - -sub _negotiate_recv_disable { - my ($self, $s, $opt, $opt_request, - $opt_bufpos, $enable_ok, $is_enabled, $state) = @_; - my ( - $ack, - $disable_cmd, - $enable_cmd, - $is_remote, - $nak, - $was_enabled, - ); - - ## What do we use to request enable/disable or respond with ack/nak. - if ($opt_request eq "wont") { - $enable_cmd = "\377\375" . pack("C", $opt); # do command - $disable_cmd = "\377\376" . pack("C", $opt); # dont command - $is_remote = 1; - $ack = "DO"; - $nak = "DONT"; - - &_log_option($s->{opt_log}, "RCVD", "WONT", $opt) - if $s->{opt_log}; - } - elsif ($opt_request eq "dont") { - $enable_cmd = "\377\373" . pack("C", $opt); # will command - $disable_cmd = "\377\374" . pack("C", $opt); # wont command - $is_remote = ''; - $ack = "WILL"; - $nak = "WONT"; - - &_log_option($s->{opt_log}, "RCVD", "DONT", $opt) - if $s->{opt_log}; - } - else { # internal error - die; - } - - ## Respond to WONT or DONT based on the current negotiation state. - if ($$state eq "no") { # state is already disabled - } - elsif ($$state eq "yes") { # they're initiating disable - $$is_enabled = ''; - $$state = "no"; - - ## Send positive acknowledgment. - $s->{unsent_opts} .= $disable_cmd; - &_log_option($s->{opt_log}, "SENT", $nak, $opt) - if $s->{opt_log}; - - ## Invoke callbacks. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantno") { # they sent positive ack - $$is_enabled = ''; - $$state = "no"; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantno opposite") { # pos ack but we changed our mind - ## Indicate disabled but now we want to enable. - $$is_enabled = ''; - $$state = "wantyes"; - - ## Send queued request. - $s->{unsent_opts} .= $enable_cmd; - &_log_option($s->{opt_log}, "SENT", $ack, $opt) - if $s->{opt_log}; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantyes") { # they sent negative ack - $$is_enabled = ''; - $$state = "no"; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantyes opposite") { # nak but we changed our mind - $$is_enabled = ''; - $$state = "no"; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } -} # end sub _negotiate_recv_disable - - -sub _negotiate_recv_enable { - my ($self, $s, $opt, $opt_request, - $opt_bufpos, $enable_ok, $is_enabled, $state) = @_; - my ( - $ack, - $disable_cmd, - $enable_cmd, - $is_remote, - $nak, - $was_enabled, - ); - - ## What we use to send enable/disable request or send ack/nak response. - if ($opt_request eq "will") { - $enable_cmd = "\377\375" . pack("C", $opt); # do command - $disable_cmd = "\377\376" . pack("C", $opt); # dont command - $is_remote = 1; - $ack = "DO"; - $nak = "DONT"; - - &_log_option($s->{opt_log}, "RCVD", "WILL", $opt) - if $s->{opt_log}; - } - elsif ($opt_request eq "do") { - $enable_cmd = "\377\373" . pack("C", $opt); # will command - $disable_cmd = "\377\374" . pack("C", $opt); # wont command - $is_remote = ''; - $ack = "WILL"; - $nak = "WONT"; - - &_log_option($s->{opt_log}, "RCVD", "DO", $opt) - if $s->{opt_log}; - } - else { # internal error - die; - } - - ## Save current enabled state. - $was_enabled = $$is_enabled; - - ## Respond to WILL or DO based on the current negotiation state. - if ($$state eq "no") { # they're initiating enable - if ($enable_ok) { # we agree they/us should enable - $$is_enabled = 1; - $$state = "yes"; - - ## Send positive acknowledgment. - $s->{unsent_opts} .= $enable_cmd; - &_log_option($s->{opt_log}, "SENT", $ack, $opt) - if $s->{opt_log}; - - ## Invoke callbacks. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - else { # we disagree they/us should enable - ## Send negative acknowledgment. - $s->{unsent_opts} .= $disable_cmd; - &_log_option($s->{opt_log}, "SENT", $nak, $opt) - if $s->{opt_log}; - } - } - elsif ($$state eq "yes") { # state is already enabled - } - elsif ($$state eq "wantno") { # error: our disable req answered by enable - $$is_enabled = ''; - $$state = "no"; - - ## Invoke callbacks. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantno opposite") { # err: disable req answerd by enable - $$is_enabled = 1; - $$state = "yes"; - - ## Invoke callbacks. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantyes") { # they sent pos ack - $$is_enabled = 1; - $$state = "yes"; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantyes opposite") { # pos ack but we changed our mind - ## Indicate enabled but now we want to disable. - $$is_enabled = 1; - $$state = "wantno"; - - ## Inform other side we changed our mind. - $s->{unsent_opts} .= $disable_cmd; - &_log_option($s->{opt_log}, "SENT", $nak, $opt) - if $s->{opt_log}; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - - 1; -} # end sub _negotiate_recv_enable - - -sub _new_handle { - if ($INC{"IO/Handle.pm"}) { - return IO::Handle->new; - } - else { - require FileHandle; - return FileHandle->new; - } -} # end sub _new_handle - - -sub _next_getlines { - my ($self, $s) = @_; - my ( - $len, - $line, - $pos, - @lines, - ); - - ## Fill buffer and get first line. - $line = $self->getline - or return; - push @lines, $line; - - ## Extract subsequent lines from buffer. - while (($pos = index($s->{buf}, $s->{rs})) != -1) { - $len = $pos + length $s->{rs}; - push @lines, substr($s->{buf}, 0, $len); - substr($s->{buf}, 0, $len) = ""; - } - - @lines; -} # end sub _next_getlines - - -sub _opt_accept { - my ($self, @args) = @_; - my ( - $arg, - $option, - $s, - ); - - ## Init. - $s = *$self->{net_telnet}; - - foreach $arg (@args) { - ## Ensure data structure defined for this option. - $option = $arg->{option}; - if (!defined $s->{opts}{$option}) { - &_set_default_option($s, $option); - } - - ## Save whether we'll accept or reject this option. - if ($arg->{is_remote}) { - $s->{opts}{$option}{remote_enable_ok} = $arg->{is_enable}; - } - else { - $s->{opts}{$option}{local_enable_ok} = $arg->{is_enable}; - } - } - - 1; -} # end sub _opt_accept - - -sub _optimal_blksize { - my ($blksize) = @_; - local $^W = ''; # avoid non-numeric warning for ms-windows blksize of "" - - ## Use default when block size is invalid. - return 8192 - unless defined $blksize and $blksize >= 1 and $blksize <= 1_048_576; - - $blksize; -} # end sub _optimal_blksize - - -sub _parse_cmd_remove_mode { - my ($self, $mode) = @_; - - if (!defined $mode) { - $mode = 0; - } - elsif ($mode =~ /^\s*auto\s*$/i) { - $mode = "auto"; - } - elsif ($mode !~ /^\d+$/) { - &_carp($self, "ignoring bad Cmd_remove_mode " . - "argument \"$mode\": it's not \"auto\" or a " . - "non-negative integer"); - $mode = *$self->{net_telnet}{cmd_rm_mode}; - } - - $mode; -} # end sub _parse_cmd_remove_mode - - -sub _parse_errmode { - my ($self, $errmode) = @_; - - ## Set the error mode. - if (!defined $errmode) { - &_carp($self, "ignoring undefined Errmode argument"); - $errmode = *$self->{net_telnet}{errormode}; - } - elsif ($errmode =~ /^\s*return\s*$/i) { - $errmode = "return"; - } - elsif ($errmode =~ /^\s*die\s*$/i) { - $errmode = "die"; - } - elsif (ref($errmode) eq "CODE") { - } - elsif (ref($errmode) eq "ARRAY") { - unless (ref($errmode->[0]) eq "CODE") { - &_carp($self, "ignoring bad Errmode argument: " . - "first list item isn't a code ref"); - $errmode = *$self->{net_telnet}{errormode}; - } - } - else { - &_carp($self, "ignoring bad Errmode argument \"$errmode\""); - $errmode = *$self->{net_telnet}{errormode}; - } - - $errmode; -} # end sub _parse_errmode - - -sub _parse_input_record_separator { - my ($self, $rs) = @_; - - unless (defined $rs and length $rs) { - &_carp($self, "ignoring null Input_record_separator argument"); - $rs = *$self->{net_telnet}{rs}; - } - - $rs; -} # end sub _parse_input_record_separator - - -sub _parse_prompt { - my ($self, $prompt) = @_; - - unless (defined $prompt) { - $prompt = ""; - } - - unless ($prompt =~ m(^\s*/) or $prompt =~ m(^\s*m\s*\W)) { - &_carp($self, "ignoring bad Prompt argument \"$prompt\": " . - "missing opening delimiter of match operator"); - $prompt = *$self->{net_telnet}{cmd_prompt}; - } - - $prompt; -} # end sub _parse_prompt - - -sub _parse_timeout { - my ($self, $timeout) = @_; - - ## Ensure valid timeout. - if (defined $timeout) { - ## Test for non-numeric or negative values. - eval { - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{"__WARN__"} = sub { die "non-numeric\n" }; - local $^W = 1; - $timeout *= 1; - }; - if ($@) { # timeout arg is non-numeric - &_carp($self, - "ignoring non-numeric Timeout argument \"$timeout\""); - $timeout = *$self->{net_telnet}{time_out}; - } - elsif ($timeout < 0) { # timeout arg is negative - &_carp($self, "ignoring negative Timeout argument \"$timeout\""); - $timeout = *$self->{net_telnet}{time_out}; - } - } - - $timeout; -} # end sub _parse_timeout - - -sub _put { - my ($self, $buf, $subname) = @_; - my ( - $endtime, - $len, - $nfound, - $nwrote, - $offset, - $ready, - $s, - $timed_out, - $timeout, - $zero_wrote_count, - ); - - ## Init. - $s = *$self->{net_telnet}; - $s->{num_wrote} = 0; - $zero_wrote_count = 0; - $offset = 0; - $len = length $$buf; - $endtime = &_endtime($s->{time_out}); - - return $self->error("write error: filehandle isn't open") - unless $s->{opened}; - - ## Try to send any waiting option negotiation. - if (length $s->{unsent_opts}) { - &_flush_opts($self); - } - - ## Write until all data blocks written. - while ($len) { - ## Determine how long to wait for output ready. - ($timed_out, $timeout) = &_timeout_interval($endtime); - if ($timed_out) { - $s->{timedout} = 1; - return $self->error("$subname timed-out"); - } - - ## Wait for output ready. - $nfound = select "", $ready=$s->{fdmask}, "", $timeout; - - ## Handle any errors while waiting. - if (!defined $nfound or $nfound <= 0) { # output not ready - if (defined $nfound and $nfound == 0) { # timed-out - $s->{timedout} = 1; - return $self->error("$subname timed-out"); - } - else { # error waiting for output ready - next if $! =~ /^interrupted/i; - - $s->{opened} = ''; - return $self->error("write error: $!"); - } - } - - ## Write the data. - $nwrote = syswrite $self, $$buf, $len, $offset; - - ## Handle any write errors. - if (!defined $nwrote) { # write failed - next if $! =~ /^interrupted/i; # restart interrupted syscall - - $s->{opened} = ''; - return $self->error("write error: $!"); - } - elsif ($nwrote == 0) { # zero chars written - ## Try ten more times to write the data. - if ($zero_wrote_count++ <= 10) { - &_sleep(0.01); - next; - } - - $s->{opened} = ''; - return $self->error("write error: zero length write: $!"); - } - - ## Display network traffic if requested. - if ($s->{dumplog}) { - &_log_dump('>', $s->{dumplog}, $buf, $offset, $nwrote); - } - - ## Increment. - $s->{num_wrote} += $nwrote; - $offset += $nwrote; - $len -= $nwrote; - } - - 1; -} # end sub _put - - -sub _qualify_fh { - my ($obj, $name) = @_; - my ( - $user_class, - ); - local $_; - - ## Get user's package name. - ($user_class) = &_user_caller($obj); - - ## Ensure name is qualified with a package name. - $name = qualify($name, $user_class); - - ## If it's not already, make it a typeglob ref. - if (!ref $name) { - no strict; - local $^W = 0; - - $name =~ s/^\*+//; - $name = eval "\\*$name"; - return unless ref $name; - } - - $name; -} # end sub _qualify_fh - - -sub _reset_options { - my ($opts) = @_; - my ( - $opt, - ); - - foreach $opt (keys %$opts) { - $opts->{$opt}{remote_enabled} = ''; - $opts->{$opt}{remote_state} = "no"; - $opts->{$opt}{local_enabled} = ''; - $opts->{$opt}{local_state} = "no"; - } - - 1; -} # end sub _reset_options - - -sub _save_lastline { - my ($s) = @_; - my ( - $firstpos, - $lastpos, - $len_w_sep, - $len_wo_sep, - $offset, - ); - my $rs = "\n"; - - if (($lastpos = rindex $s->{buf}, $rs) > -1) { # eol found - while (1) { - ## Find beginning of line. - $firstpos = rindex $s->{buf}, $rs, $lastpos - 1; - if ($firstpos == -1) { - $offset = 0; - } - else { - $offset = $firstpos + length $rs; - } - - ## Determine length of line with and without separator. - $len_wo_sep = $lastpos - $offset; - $len_w_sep = $len_wo_sep + length $rs; - - ## Save line if it's not blank. - if (substr($s->{buf}, $offset, $len_wo_sep) - !~ /^\s*$/) - { - $s->{last_line} = substr($s->{buf}, - $offset, - $len_w_sep); - last; - } - - last if $firstpos == -1; - - $lastpos = $firstpos; - } - } - - 1; -} # end sub _save_lastline - - -sub _set_default_option { - my ($s, $option) = @_; - - $s->{opts}{$option} = { - remote_enabled => '', - remote_state => "no", - remote_enable_ok => '', - local_enabled => '', - local_state => "no", - local_enable_ok => '', - }; -} # end sub _set_default_option - - -sub _sleep { - my ($secs) = @_; - my $bitmask = ""; - local *SOCK; - - socket SOCK, AF_INET, SOCK_STREAM, 0; - vec($bitmask, fileno(SOCK), 1) = 1; - select $bitmask, "", "", $secs; - CORE::close SOCK; - - 1; -} # end sub _sleep - - -sub _timeout_interval { - my ($endtime) = @_; - my ( - $timeout, - ); - - ## Return timed-out boolean and timeout interval. - if (defined $endtime) { - ## Is it a one-time poll. - return ('', 0) if $endtime == 0; - - ## Calculate the timeout interval. - $timeout = $endtime - time; - - ## Did we already timeout. - return (1, 0) unless $timeout > 0; - - return ('', $timeout); - } - else { # there is no timeout - return ('', undef); - } -} # end sub _timeout_interval - - -sub _user_caller { - my ($obj) = @_; - my ( - $class, - $curr_pkg, - $file, - $i, - $line, - $pkg, - %isa, - @isa, - ); - local $_; - - ## Create a boolean hash to test for isa. Make sure current - ## package and the object's class are members. - $class = ref $obj; - @isa = eval "\@${class}::ISA"; - push @isa, $class; - ($curr_pkg) = caller 1; - push @isa, $curr_pkg; - %isa = map { $_ => 1 } @isa; - - ## Search back in call frames for a package that's not in isa. - $i = 1; - while (($pkg, $file, $line) = caller ++$i) { - next if $isa{$pkg}; - - return ($pkg, $file, $line); - } - - ## If not found, choose outer most call frame. - ($pkg, $file, $line) = caller --$i; - return ($pkg, $file, $line); -} # end sub _user_caller - - -sub _verify_telopt_arg { - my ($self, $option, $argname) = @_; - - ## If provided, use argument name in error message. - if (defined $argname) { - $argname = "for arg $argname"; - } - else { - $argname = ""; - } - - ## Ensure telnet option is a non-negative integer. - eval { - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{"__WARN__"} = sub { die "non-numeric\n" }; - local $^W = 1; - $option = abs(int $option); - }; - return $self->error("bad telnet option $argname: non-numeric") - if $@; - - return $self->error("bad telnet option $argname: option > 255") - unless $option <= 255; - - $option; -} # end sub _verify_telopt_arg - - -######################## Exported Constants ########################## - - -sub TELNET_IAC () {255}; # interpret as command: -sub TELNET_DONT () {254}; # you are not to use option -sub TELNET_DO () {253}; # please, you use option -sub TELNET_WONT () {252}; # I won't use option -sub TELNET_WILL () {251}; # I will use option -sub TELNET_SB () {250}; # interpret as subnegotiation -sub TELNET_GA () {249}; # you may reverse the line -sub TELNET_EL () {248}; # erase the current line -sub TELNET_EC () {247}; # erase the current character -sub TELNET_AYT () {246}; # are you there -sub TELNET_AO () {245}; # abort output--but let prog finish -sub TELNET_IP () {244}; # interrupt process--permanently -sub TELNET_BREAK () {243}; # break -sub TELNET_DM () {242}; # data mark--for connect. cleaning -sub TELNET_NOP () {241}; # nop -sub TELNET_SE () {240}; # end sub negotiation -sub TELNET_EOR () {239}; # end of record (transparent mode) -sub TELNET_ABORT () {238}; # Abort process -sub TELNET_SUSP () {237}; # Suspend process -sub TELNET_EOF () {236}; # End of file -sub TELNET_SYNCH () {242}; # for telfunc calls - -sub TELOPT_BINARY () {0}; # Binary Transmission -sub TELOPT_ECHO () {1}; # Echo -sub TELOPT_RCP () {2}; # Reconnection -sub TELOPT_SGA () {3}; # Suppress Go Ahead -sub TELOPT_NAMS () {4}; # Approx Message Size Negotiation -sub TELOPT_STATUS () {5}; # Status -sub TELOPT_TM () {6}; # Timing Mark -sub TELOPT_RCTE () {7}; # Remote Controlled Trans and Echo -sub TELOPT_NAOL () {8}; # Output Line Width -sub TELOPT_NAOP () {9}; # Output Page Size -sub TELOPT_NAOCRD () {10}; # Output Carriage-Return Disposition -sub TELOPT_NAOHTS () {11}; # Output Horizontal Tab Stops -sub TELOPT_NAOHTD () {12}; # Output Horizontal Tab Disposition -sub TELOPT_NAOFFD () {13}; # Output Formfeed Disposition -sub TELOPT_NAOVTS () {14}; # Output Vertical Tabstops -sub TELOPT_NAOVTD () {15}; # Output Vertical Tab Disposition -sub TELOPT_NAOLFD () {16}; # Output Linefeed Disposition -sub TELOPT_XASCII () {17}; # Extended ASCII -sub TELOPT_LOGOUT () {18}; # Logout -sub TELOPT_BM () {19}; # Byte Macro -sub TELOPT_DET () {20}; # Data Entry Terminal -sub TELOPT_SUPDUP () {21}; # SUPDUP -sub TELOPT_SUPDUPOUTPUT () {22}; # SUPDUP Output -sub TELOPT_SNDLOC () {23}; # Send Location -sub TELOPT_TTYPE () {24}; # Terminal Type -sub TELOPT_EOR () {25}; # End of Record -sub TELOPT_TUID () {26}; # TACACS User Identification -sub TELOPT_OUTMRK () {27}; # Output Marking -sub TELOPT_TTYLOC () {28}; # Terminal Location Number -sub TELOPT_3270REGIME () {29}; # Telnet 3270 Regime -sub TELOPT_X3PAD () {30}; # X.3 PAD -sub TELOPT_NAWS () {31}; # Negotiate About Window Size -sub TELOPT_TSPEED () {32}; # Terminal Speed -sub TELOPT_LFLOW () {33}; # Remote Flow Control -sub TELOPT_LINEMODE () {34}; # Linemode -sub TELOPT_XDISPLOC () {35}; # X Display Location -sub TELOPT_OLD_ENVIRON () {36}; # Environment Option -sub TELOPT_AUTHENTICATION () {37}; # Authentication Option -sub TELOPT_ENCRYPT () {38}; # Encryption Option -sub TELOPT_NEW_ENVIRON () {39}; # New Environment Option -sub TELOPT_EXOPL () {255}; # Extended-Options-List - - -1; -__END__; - - -######################## User Documentation ########################## - - -## To format the following documentation into a more readable format, -## use one of these programs: perldoc; pod2man; pod2html; pod2text. -## For example, to nicely format this documentation for printing, you -## may use pod2man and groff to convert to postscript: -## pod2man Net/Telnet.pm | groff -man -Tps > Net::Telnet.ps - -=head1 NAME - -Net::Telnet - interact with TELNET port or other TCP ports - -=head1 SYNOPSIS - -C - -see METHODS section below - -=head1 DESCRIPTION - -Net::Telnet allows you to make client connections to a TCP port and do -network I/O, especially to a port using the TELNET protocol. Simple -I/O methods such as print, get, and getline are provided. More -sophisticated interactive features are provided because connecting to -a TELNET port ultimately means communicating with a program designed -for human interaction. These interactive features include the ability -to specify a time-out and to wait for patterns to appear in the input -stream, such as the prompt from a shell. - -Other reasons to use this module than strictly with a TELNET port are: - -=over 2 - -=item * - -You're not familiar with sockets and you want a simple way to make -client connections to TCP services. - -=item * - -You want to be able to specify your own time-out while connecting, -reading, or writing. - -=item * - -You're communicating with an interactive program at the other end of -some socket or pipe and you want to wait for certain patterns to -appear. - -=back - -Here's an example that prints who's logged-on to the remote host -sparky. In addition to a username and password, you must also know -the user's shell prompt, which for this example is C - - use Net::Telnet (); - $t = new Net::Telnet (Timeout => 10, - Prompt => '/bash\$ $/'); - $t->open("sparky"); - $t->login($username, $passwd); - @lines = $t->cmd("who"); - print @lines; - -More examples are in the B section below. - -Usage questions should be directed to the Usenet newsgroup -comp.lang.perl.modules. - -Contact me, Jay Rogers , if you find any bugs or have -suggestions for improvement. - -=head2 What To Know Before Using - -=over 2 - -=item * - -All output is flushed while all input is buffered. Each object -contains its own input buffer. - -=item * - -The output record separator for C and C is set to -C<"\n"> by default, so that you don't have to append all your commands -with a newline. To avoid printing a trailing C<"\n"> use C or -set the I to C<"">. - -=item * - -The methods C and C use the I setting in the -object to determine when a login or remote command is complete. Those -methods will fail with a time-out if you don't set the prompt -correctly. - -=item * - -Use a combination of C and C as an alternative to -C or C when they don't do what you want. - -=item * - -Errors such as timing-out are handled according to the error mode -action. The default action is to print an error message to standard -error and have the program die. See the C method for more -information. - -=item * - -When constructing the match operator argument for C or -C, always use single quotes instead of double quotes to -avoid unexpected backslash interpretation (e.g. C<'/bash\$ $/'>). If -you're constructing a DOS like file path, you'll need to use four -backslashes to represent one (e.g. C<'/c:\\\\users\\\\billE$/i'>). - -Of course don't forget about regexp metacharacters like C<.>, C<[>, or -C<$>. You'll only need a single backslash to quote them. The anchor -metacharacters C<^> and C<$> refer to positions in the input buffer. -To avoid matching characters read that look like a prompt, it's a good -idea to end your prompt pattern with the C<$> anchor. That way the -prompt will only match if it's the last thing read. - -=item * - -In the input stream, each sequence of I and I (i.e. C<"\015\012"> or CR LF) is converted to C<"\n">. In the -output stream, each occurrence of C<"\n"> is converted to a sequence -of CR LF. See C to change the behavior. TCP protocols -typically use the ASCII sequence, carriage return and line feed to -designate a newline. - -=item * - -Timing-out while making a connection is disabled for machines that -don't support the C function. Most notably these include -MS-Windows machines. - -=item * - -You'll need to be running at least Perl version 5.002 to use this -module. This module does not require any libraries that don't already -come with a standard Perl distribution. - -If you have the IO:: libraries installed (they come standard with -perl5.004 and later) then IO::Socket::INET is used as a base class, -otherwise FileHandle is used. - -=item * - -Contact me, Jay Rogers , if you find any bugs or have -suggestions for improvement. - -=back - -=head2 Debugging - -The typical usage bug causes a time-out error because you've made -incorrect assumptions about what the remote side actually sends. The -easiest way to reconcile what the remote side sends with your -expectations is to use C or C. - -C allows you to see the data being sent from the remote -side before any translation is done, while C shows you -the results after translation. The translation includes converting -end of line characters, removing and responding to TELNET protocol -commands in the data stream. - -=head2 Style of Named Parameters - -Two different styles of named parameters are supported. This document -only shows the IO:: style: - - Net::Telnet->new(Timeout => 20); - -however the dash-option style is also allowed: - - Net::Telnet->new(-timeout => 20); - -=head2 Connecting to a Remote MS-Windows Machine - -By default MS-Windows doesn't come with a TELNET server. However -third party TELNET servers are available. Unfortunately many of these -servers falsely claim to be a TELNET server. This is especially true -of the so-called "Microsoft Telnet Server" that comes installed with -some newer versions MS-Windows. - -When a TELNET server first accepts a connection, it must use the ASCII -control characters carriage-return and line-feed to start a new line -(see RFC854). A server like the "Microsoft Telnet Server" that -doesn't do this, isn't a TELNET server. These servers send ANSI -terminal escape sequences to position to a column on a subsequent line -and to even position while writing characters that are adjacent to -each other. Worse, when sending output these servers resend -previously sent command output in a misguided attempt to display an -entire terminal screen. - -Connecting Net::Telnet to one of these false TELNET servers makes your -job of parsing command output very difficult. It's better to replace -a false TELNET server with a real TELNET server. The better TELNET -servers for MS-Windows allow you to avoid the ANSI escapes by turning -off something some of them call I. - - -=head1 METHODS - -In the calling sequences below, square brackets B<[]> represent -optional parameters. - -=over 4 - -=item B - create a new Net::Telnet object - - $obj = new Net::Telnet ([$host]); - - $obj = new Net::Telnet ([Binmode => $mode,] - [Cmd_remove_mode => $mode,] - [Dump_Log => $filename,] - [Errmode => $errmode,] - [Fhopen => $filehandle,] - [Host => $host,] - [Input_log => $file,] - [Input_record_separator => $chars,] - [Option_log => $file,] - [Ors => $chars,] - [Output_log => $file,] - [Output_record_separator => $chars,] - [Port => $port,] - [Prompt => $matchop,] - [Rs => $chars,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This is the constructor for Net::Telnet objects. A new object is -returned on success, the error mode action is performed on failure - -see C. The optional arguments are short-cuts to methods of -the same name. - -If the I<$host> argument is given then the object is opened by -connecting to TCP I<$port> on I<$host>. Also see C. The new -object returned is given the following defaults in the absence of -corresponding named parameters: - -=over 4 - -=item - -The default I is C<"localhost"> - -=item - -The default I is C<23> - -=item - -The default I is C<'/[\$%#E] $/'> - -=item - -The default I is C<10> - -=item - -The default I is C<"die"> - -=item - -The default I is C<"\n">. Note that I -is synonymous with I. - -=item - -The default I is C<"\n">. Note that I is -synonymous with I. - -=item - -The default I is C<0>, which means do newline translation. - -=item - -The default I is C<1>, which means respond to TELNET -commands in the data stream. - -=item - -The default I is C<"auto"> - -=item - -The defaults for I, I, I, and -I are C<"">, which means that logging is turned-off. - -=back - -=back - - -=over 4 - -=item B - toggle newline translation - - $mode = $obj->binmode; - - $prev = $obj->binmode($mode); - -This method controls whether or not sequences of carriage returns and -line feeds (CR LF or more specifically C<"\015\012">) are translated. -By default they are translated (i.e. binmode is C<0>). - -If no argument is given, the current mode is returned. - -If I<$mode> is C<1> then binmode is I and newline translation is -not done. - -If I<$mode> is C<0> then binmode is I and newline translation is -done. In the input stream, each sequence of CR LF is converted to -C<"\n"> and in the output stream, each occurrence of C<"\n"> is -converted to a sequence of CR LF. - -Note that input is always buffered. Changing binmode doesn't effect -what's already been read into the buffer. Output is not buffered and -changing binmode will have an immediate effect. - -=back - - -=over 4 - -=item B - send TELNET break character - - $ok = $obj->break; - -This method sends the TELNET break character. This character is -provided because it's a signal outside the ASCII character set which -is currently given local meaning within many systems. It's intended -to indicate that the Break Key or the Attention Key was hit. - -This method returns C<1> on success, or performs the error mode action -on failure. - -=back - - -=over 4 - -=item B - scalar reference to object's input buffer - - $ref = $obj->buffer; - -This method returns a scalar reference to the input buffer for -I<$obj>. Data in the input buffer is data that has been read from the -remote side but has yet to be read by the user. Modifications to the -input buffer are returned by a subsequent read. - -=back - - -=over 4 - -=item B - discard all data in object's input buffer - - $obj->buffer_empty; - -This method removes all data in the input buffer for I<$obj>. - -=back - - -=over 4 - -=item B - close object - - $ok = $obj->close; - -This method closes the socket, file, or pipe associated with the -object. It always returns a value of C<1>. - -=back - - -=over 4 - -=item B - issue command and retrieve output - - $ok = $obj->cmd($string); - $ok = $obj->cmd(String => $string, - [Output => $ref,] - [Cmd_remove_mode => $mode,] - [Errmode => $mode,] - [Input_record_separator => $chars,] - [Ors => $chars,] - [Output_record_separator => $chars,] - [Prompt => $match,] - [Rs => $chars,] - [Timeout => $secs,]); - - @output = $obj->cmd($string); - @output = $obj->cmd(String => $string, - [Output => $ref,] - [Cmd_remove_mode => $mode,] - [Errmode => $mode,] - [Input_record_separator => $chars,] - [Ors => $chars,] - [Output_record_separator => $chars,] - [Prompt => $match,] - [Rs => $chars,] - [Timeout => $secs,]); - -This method sends the command I<$string>, and reads the characters -sent back by the command up until and including the matching prompt. -It's assumed that the program to which you're sending is some kind of -command prompting interpreter such as a shell. - -The command I<$string> is automatically appended with the -output_record_separator, By default that's C<"\n">. This is similar -to someone typing a command and hitting the return key. Set the -output_record_separator to change this behavior. - -In a scalar context, the characters read from the remote side are -discarded and C<1> is returned on success. On time-out, eof, or other -failures, the error mode action is performed. See C. - -In a list context, just the output generated by the command is -returned, one line per element. In other words, all the characters in -between the echoed back command string and the prompt are returned. -If the command happens to return no output, a list containing one -element, the empty string is returned. This is so the list will -indicate true in a boolean context. On time-out, eof, or other -failures, the error mode action is performed. See C. - -The characters that matched the prompt may be retrieved using -C. - -Many command interpreters echo back the command sent. In most -situations, this method removes the first line returned from the -remote side (i.e. the echoed back command). See C -for more control over this feature. - -Use C to debug when this method keeps timing-out and you -don't think it should. - -Consider using a combination of C and C as an -alternative to this method when it doesn't do what you want, e.g. the -command you send prompts for input. - -The I named parameter provides an alternative method of -receiving command output. If you pass a scalar reference, all the -output (even if it contains multiple lines) is returned in the -referenced scalar. If you pass an array or hash reference, the lines -of output are returned in the referenced array or hash. You can use -C to change the notion of what separates a -line. - -Optional named parameters are provided to override the current -settings of cmd_remove_mode, errmode, input_record_separator, ors, -output_record_separator, prompt, rs, and timeout. Rs is synonymous -with input_record_separator and ors is synonymous with -output_record_separator. - -=back - - -=over 4 - -=item B - toggle removal of echoed commands - - $mode = $obj->cmd_remove_mode; - - $prev = $obj->cmd_remove_mode($mode); - -This method controls how to deal with echoed back commands in the -output returned by cmd(). Typically, when you send a command to the -remote side, the first line of output returned is the command echoed -back. Use this mode to remove the first line of output normally -returned by cmd(). - -If no argument is given, the current mode is returned. - -If I<$mode> is C<0> then the command output returned from cmd() has no -lines removed. If I<$mode> is a positive integer, then the first -I<$mode> lines of command output are stripped. - -By default, I<$mode> is set to C<"auto">. Auto means that whether or -not the first line of command output is stripped, depends on whether -or not the remote side offered to echo. By default, Net::Telnet -always accepts an offer to echo by the remote side. You can change -the default to reject such an offer using C. - -A warning is printed to STDERR when attempting to set this attribute -to something that's not C<"auto"> or a non-negative integer. - -=back - - -=over 4 - -=item B - log all I/O in dump format - - $fh = $obj->dump_log; - - $fh = $obj->dump_log($fh); - - $fh = $obj->dump_log($filename); - -This method starts or stops dump format logging of all the object's -input and output. The dump format shows the blocks read and written -in a hexadecimal and printable character format. This method is -useful when debugging, however you might want to first try -C as it's more readable. - -If no argument is given, the current log filehandle is returned. An -empty string indicates logging is off. - -To stop logging, use an empty string as an argument. - -If an open filehandle is given, it is used for logging and returned. -Otherwise, the argument is assumed to be the name of a file, the file -is opened and a filehandle to it is returned. If the file can't be -opened for writing, the error mode action is performed. - -=back - - -=over 4 - -=item B - end of file indicator - - $eof = $obj->eof; - -This method returns C<1> if end of file has been read, otherwise it -returns an empty string. Because the input is buffered this isn't the -same thing as I<$obj> has closed. In other words I<$obj> can be -closed but there still can be stuff in the buffer to be read. Under -this condition you can still read but you won't be able to write. - -=back - - -=over 4 - -=item B - define action to be performed on error - - $mode = $obj->errmode; - - $prev = $obj->errmode($mode); - -This method gets or sets the action used when errors are encountered -using the object. The first calling sequence returns the current -error mode. The second calling sequence sets it to I<$mode> and -returns the previous mode. Valid values for I<$mode> are C<"die"> -(the default), C<"return">, a I, or an I. - -When mode is C<"die"> and an error is encountered using the object, -then an error message is printed to standard error and the program -dies. - -When mode is C<"return"> then the method generating the error places -an error message in the object and returns an undefined value in a -scalar context and an empty list in list context. The error message -may be obtained using C. - -When mode is a I, then when an error is encountered -I is called with the error message as its first argument. -Using this mode you may have your own subroutine handle errors. If -I itself returns then the method generating the error returns -undefined or an empty list depending on context. - -When mode is an I, the first element of the array must be a -I. Any elements that follow are the arguments to I. -When an error is encountered, the I is called with its -arguments. Using this mode you may have your own subroutine handle -errors. If the I itself returns then the method generating -the error returns undefined or an empty list depending on context. - -A warning is printed to STDERR when attempting to set this attribute -to something that's not C<"die">, C<"return">, a I, or an -I whose first element isn't a I. - -=back - - -=over 4 - -=item B - most recent error message - - $msg = $obj->errmsg; - - $prev = $obj->errmsg(@msgs); - -The first calling sequence returns the error message associated with -the object. The empty string is returned if no error has been -encountered yet. The second calling sequence sets the error message -for the object to the concatenation of I<@msgs> and returns the -previous error message. Normally, error messages are set internally -by a method when an error is encountered. - -=back - - -=over 4 - -=item B - perform the error mode action - - $obj->error(@msgs); - -This method concatenates I<@msgs> into a string and places it in the -object as the error message. Also see C. It then performs -the error mode action. Also see C. - -If the error mode doesn't cause the program to die, then an undefined -value or an empty list is returned depending on the context. - -This method is primarily used by this class or a sub-class to perform -the user requested action when an error is encountered. - -=back - - -=over 4 - -=item B - use already open filehandle for I/O - - $ok = $obj->fhopen($fh); - -This method associates the open filehandle I<$fh> with I<$obj> for -further I/O. Filehandle I<$fh> must already be opened. - -Suppose you want to use the features of this module to do I/O to -something other than a TCP port, for example STDIN or a filehandle -opened to read from a process. Instead of opening the object for I/O -to a TCP port by using C or C, call this method -instead. - -The value C<1> is returned success, the error mode action is performed -on failure. - -=back - - -=over 4 - -=item B - read block of data - - $data = $obj->get([Binmode => $mode,] - [Errmode => $errmode,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This method reads a block of data from the object and returns it along -with any buffered data. If no buffered data is available to return, -it will wait for data to read using the timeout specified in the -object. You can override that timeout using I<$secs>. Also see -C. If buffered data is available to return, it also checks -for a block of data that can be immediately read. - -On eof an undefined value is returned. On time-out or other failures, -the error mode action is performed. To distinguish between eof or an -error occurring when the error mode is not set to C<"die">, use -C. - -Optional named parameters are provided to override the current -settings of binmode, errmode, telnetmode, and timeout. - -=back - - -=over 4 - -=item B - read next line - - $line = $obj->getline([Binmode => $mode,] - [Errmode => $errmode,] - [Input_record_separator => $chars,] - [Rs => $chars,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This method reads and returns the next line of data from the object. -You can use C to change the notion of what -separates a line. The default is C<"\n">. If a line isn't -immediately available, this method blocks waiting for a line or a -time-out. - -On eof an undefined value is returned. On time-out or other failures, -the error mode action is performed. To distinguish between eof or an -error occurring when the error mode is not set to C<"die">, use -C. - -Optional named parameters are provided to override the current -settings of binmode, errmode, input_record_separator, rs, telnetmode, -and timeout. Rs is synonymous with input_record_separator. - -=back - - -=over 4 - -=item B - read next lines - - @lines = $obj->getlines([Binmode => $mode,] - [Errmode => $errmode,] - [Input_record_separator => $chars,] - [Rs => $chars,] - [Telnetmode => $mode,] - [Timeout => $secs,] - [All => $boolean,]); - -This method reads and returns all the lines of data from the object -until end of file is read. You can use C to -change the notion of what separates a line. The default is C<"\n">. -A time-out error occurs if all the lines can't be read within the -time-out interval. See C. - -The behavior of this method was changed in version 3.03. Prior to -version 3.03 this method returned just the lines available from the -next read. To get that old behavior, use the optional named parameter -I and set I<$boolean> to C<""> or C<0>. - -If only eof is read then an empty list is returned. On time-out or -other failures, the error mode action is performed. Use C to -distinguish between reading only eof or an error occurring when the -error mode is not set to C<"die">. - -Optional named parameters are provided to override the current -settings of binmode, errmode, input_record_separator, rs, telnetmode, -and timeout. Rs is synonymous with input_record_separator. - -=back - - -=over 4 - -=item B - name of remote host - - $host = $obj->host; - - $prev = $obj->host($host); - -This method designates the remote host for C. With no -argument it returns the current host name set in the object. With an -argument it sets the current host name to I<$host> and returns the -previous host name. You may indicate the remote host using either a -hostname or an IP address. - -The default value is C<"localhost">. It may also be set by C -or C. - -=back - - -=over 4 - -=item B - log all input - - $fh = $obj->input_log; - - $fh = $obj->input_log($fh); - - $fh = $obj->input_log($filename); - -This method starts or stops logging of input. This is useful when -debugging. Also see C. Because most command interpreters -echo back commands received, it's likely all your output will also be -in this log. Note that input logging occurs after newline -translation. See C for details on newline translation. - -If no argument is given, the log filehandle is returned. An empty -string indicates logging is off. - -To stop logging, use an empty string as an argument. - -If an open filehandle is given, it is used for logging and returned. -Otherwise, the argument is assumed to be the name of a file, the file -is opened for logging and a filehandle to it is returned. If the file -can't be opened for writing, the error mode action is performed. - -=back - - -=over 4 - -=item B - input line delimiter - - $chars = $obj->input_record_separator; - - $prev = $obj->input_record_separator($chars); - -This method designates the line delimiter for input. It's used with -C, C, and C to determine lines in the -input. - -With no argument this method returns the current input record -separator set in the object. With an argument it sets the input -record separator to I<$chars> and returns the previous value. Note -that I<$chars> must have length. - -A warning is printed to STDERR when attempting to set this attribute -to a string with no length. - -=back - - -=over 4 - -=item B - last prompt read - - $string = $obj->last_prompt; - - $prev = $obj->last_prompt($string); - -With no argument this method returns the last prompt read by cmd() or -login(). See C. With an argument it sets the last prompt -read to I<$string> and returns the previous value. Normally, only -internal methods set the last prompt. - -=back - - -=over 4 - -=item B - last line read - - $line = $obj->lastline; - - $prev = $obj->lastline($line); - -This method retrieves the last line read from the object. This may be -a useful error message when the remote side abnormally closes the -connection. Typically the remote side will print an error message -before closing. - -With no argument this method returns the last line read from the -object. With an argument it sets the last line read to I<$line> and -returns the previous value. Normally, only internal methods set the -last line. - -=back - - -=over 4 - -=item B - perform standard login - - $ok = $obj->login($username, $password); - - $ok = $obj->login(Name => $username, - Password => $password, - [Errmode => $mode,] - [Prompt => $match,] - [Timeout => $secs,]); - -This method performs a standard login by waiting for a login prompt -and responding with I<$username>, then waiting for the password prompt -and responding with I<$password>, and then waiting for the command -interpreter prompt. If any of those prompts sent by the remote side -don't match what's expected, this method will time-out, unless timeout -is turned off. - -Login prompt must match either of these case insensitive patterns: - - /login[: ]*$/i - /username[: ]*$/i - -Password prompt must match this case insensitive pattern: - - /password[: ]*$/i - -The command interpreter prompt must match the current setting of -prompt. See C. - -Use C to debug when this method keeps timing-out and you -don't think it should. - -Consider using a combination of C and C as an -alternative to this method when it doesn't do what you want, e.g. the -remote host doesn't prompt for a username. - -On success, C<1> is returned. On time out, eof, or other failures, -the error mode action is performed. See C. - -Optional named parameters are provided to override the current -settings of errmode, prompt, and timeout. - -=back - - -=over 4 - -=item B - maximum size of input buffer - - $len = $obj->max_buffer_length; - - $prev = $obj->max_buffer_length($len); - -This method designates the maximum size of the input buffer. An error -is generated when a read causes the buffer to exceed this limit. The -default value is 1,048,576 bytes (1MB). The input buffer can grow -much larger than the block size when you continuously read using -C or C and the data stream contains no newlines -or matching waitfor patterns. - -With no argument, this method returns the current maximum buffer -length set in the object. With an argument it sets the maximum buffer -length to I<$len> and returns the previous value. Values of I<$len> -smaller than 512 will be adjusted to 512. - -A warning is printed to STDERR when attempting to set this attribute -to something that isn't a positive integer. - -=back - - -=over 4 - -=item B - field separator for print - - $chars = $obj->ofs - - $prev = $obj->ofs($chars); - -This method is synonymous with C. - -=back - - -=over 4 - -=item B - connect to port on remote host - - $ok = $obj->open($host); - - $ok = $obj->open([Host => $host,] - [Port => $port,] - [Errmode => $mode,] - [Timeout => $secs,]); - -This method opens a TCP connection to I<$port> on I<$host>. If either -argument is missing then the current value of C or C -is used. Optional named parameters are provided to override the -current setting of errmode and timeout. - -On success C<1> is returned. On time-out or other connection -failures, the error mode action is performed. See C. - -Time-outs don't work for this method on machines that don't implement -SIGALRM - most notably MS-Windows machines. For those machines, an -error is returned when the system reaches its own time-out while -trying to connect. - -A side effect of this method is to reset the alarm interval associated -with SIGALRM. - -=back - - -=over 4 - -=item B - indicate willingness to accept a TELNET option - - $fh = $obj->option_accept([Do => $telopt,] - [Dont => $telopt,] - [Will => $telopt,] - [Wont => $telopt,]); - -This method is used to indicate whether to accept or reject an offer -to enable a TELNET option made by the remote side. If you're using -I or I to indicate a willingness to enable, then a -notification callback must have already been defined by a prior call -to C. See C for details on -receiving enable/disable notification of a TELNET option. - -You can give multiple I, I, I, or I arguments -for different TELNET options in the same call to this method. - -The following example describes the meaning of the named parameters. -A TELNET option, such as C used below, is an integer -constant that you can import from Net::Telnet. See the source in file -Telnet.pm for the complete list. - -=over 4 - -=item - -I => C - -=over 4 - -=item - -we'll accept an offer to enable the echo option on the local side - -=back - -=item - -I => C - -=over 4 - -=item - -we'll reject an offer to enable the echo option on the local side - -=back - -=item - -I => C - -=over 4 - -=item - -we'll accept an offer to enable the echo option on the remote side - -=back - -=item - -I => C - -=over 4 - -=item - -we'll reject an offer to enable the echo option on the remote side - -=back - -=back - -=item - -Use C to send a request to the remote side to enable or -disable a particular TELNET option. - -=back - - -=over 4 - -=item B - define the option negotiation callback - - $coderef = $obj->option_callback; - - $prev = $obj->option_callback($coderef); - -This method defines the callback subroutine that's called when a -TELNET option is enabled or disabled. Once defined, the -I may not be undefined. However, calling this method -with a different I<$coderef> changes it. - -A warning is printed to STDERR when attempting to set this attribute -to something that isn't a coderef. - -Here are the circumstances that invoke I<$coderef>: - -=over 4 - -=item - -An option becomes enabled because the remote side requested an enable -and C had been used to arrange that it be accepted. - -=item - -The remote side arbitrarily decides to disable an option that is -currently enabled. Note that Net::Telnet always accepts a request to -disable from the remote side. - -=item - -C was used to send a request to enable or disable an -option and the response from the remote side has just been received. -Note, that if a request to enable is rejected then I<$coderef> is -still invoked even though the option didn't change. - -=back - -=item - -Here are the arguments passed to I<&$coderef>: - - &$coderef($obj, $option, $is_remote, - $is_enabled, $was_enabled, $buf_position); - -=over 4 - -=item - -1. I<$obj> is the Net::Telnet object - -=item - -2. I<$option> is the TELNET option. Net::Telnet exports constants -for the various TELNET options which just equate to an integer. - -=item - -3. I<$is_remote> is a boolean indicating for which side the option -applies. - -=item - -4. I<$is_enabled> is a boolean indicating the option is enabled or -disabled - -=item - -5. I<$was_enabled> is a boolean indicating the option was previously -enabled or disabled - -=item - -6. I<$buf_position> is an integer indicating the position in the -object's input buffer where the option takes effect. See C -to access the object's input buffer. - -=back - -=back - - -=over 4 - -=item B - log all TELNET options sent or received - - $fh = $obj->option_log; - - $fh = $obj->option_log($fh); - - $fh = $obj->option_log($filename); - -This method starts or stops logging of all TELNET options being sent -or received. This is useful for debugging when you send options via -C or you arrange to accept option requests from the -remote side via C. Also see C. - -If no argument is given, the log filehandle is returned. An empty -string indicates logging is off. - -To stop logging, use an empty string as an argument. - -If an open filehandle is given, it is used for logging and returned. -Otherwise, the argument is assumed to be the name of a file, the file -is opened for logging and a filehandle to it is returned. If the file -can't be opened for writing, the error mode action is performed. - -=back - - -=over 4 - -=item B - send TELNET option negotiation request - - $ok = $obj->option_send([Do => $telopt,] - [Dont => $telopt,] - [Will => $telopt,] - [Wont => $telopt,] - [Async => $boolean,]); - -This method is not yet implemented. Look for it in a future version. - -=back - - -=over 4 - -=item B - get current state of a TELNET option - - $hashref = $obj->option_state($telopt); - -This method returns a hashref containing a copy of the current state -of TELNET option I<$telopt>. - -Here are the values returned in the hash: - -=over 4 - -=item - -I<$hashref>->{remote_enabled} - -=over 4 - -=item - -boolean that indicates if the option is enabled on the remote side. - -=back - -=item - -I<$hashref>->{remote_enable_ok} - -=over 4 - -=item - -boolean that indicates if it's ok to accept an offer to enable this -option on the remote side. - -=back - -=item - -I<$hashref>->{remote_state} - -=over 4 - -=item - -string used to hold the internal state of option negotiation for this -option on the remote side. - -=back - -=item - -I<$hashref>->{local_enabled} - -=over 4 - -=item - -boolean that indicates if the option is enabled on the local side. - -=back - -=item - -I<$hashref>->{local_enable_ok} - -=over 4 - -=item - -boolean that indicates if it's ok to accept an offer to enable this -option on the local side. - -=back - -=item - -I<$hashref>->{local_state} - -=over 4 - -=item - -string used to hold the internal state of option negotiation for this -option on the local side. - -=back - -=back - -=back - - -=over 4 - -=item B - output line delimiter - - $chars = $obj->ors; - - $prev = $obj->ors($chars); - -This method is synonymous with C. - -=back - - -=over 4 - -=item B - field separator for print - - $chars = $obj->output_field_separator; - - $prev = $obj->output_field_separator($chars); - -This method designates the output field separator for C. -Ordinarily the print method simply prints out the comma separated -fields you specify. Set this to specify what's printed between -fields. - -With no argument this method returns the current output field -separator set in the object. With an argument it sets the output -field separator to I<$chars> and returns the previous value. - -By default it's set to an empty string. - -=back - - -=over 4 - -=item B - log all output - - $fh = $obj->output_log; - - $fh = $obj->output_log($fh); - - $fh = $obj->output_log($filename); - -This method starts or stops logging of output. This is useful when -debugging. Also see C. Because most command interpreters -echo back commands received, it's likely all your output would also be -in an input log. See C. Note that output logging occurs -before newline translation. See C for details on newline -translation. - -If no argument is given, the log filehandle is returned. An empty -string indicates logging is off. - -To stop logging, use an empty string as an argument. - -If an open filehandle is given, it is used for logging and returned. -Otherwise, the argument is assumed to be the name of a file, the file -is opened for logging and a filehandle to it is returned. If the file -can't be opened for writing, the error mode action is performed. - -=back - - -=over 4 - -=item B - output line delimiter - - $chars = $obj->output_record_separator; - - $prev = $obj->output_record_separator($chars); - -This method designates the output line delimiter for C and -C. Set this to specify what's printed at the end of C -and C. - -The output record separator is set to C<"\n"> by default, so there's -no need to append all your commands with a newline. To avoid printing -the output_record_separator use C or set the -output_record_separator to an empty string. - -With no argument this method returns the current output record -separator set in the object. With an argument it sets the output -record separator to I<$chars> and returns the previous value. - -=back - - -=over 4 - -=item B - remote port - - $port = $obj->port; - - $prev = $obj->port($port); - -This method designates the remote TCP port. With no argument this -method returns the current port number. With an argument it sets the -current port number to I<$port> and returns the previous port. If -I<$port> is a TCP service name, then it's first converted to a port -number using the perl function C. - -The default value is C<23>. It may also be set by C or -C. - -A warning is printed to STDERR when attempting to set this attribute -to something that's not a positive integer or a valid TCP service -name. - -=back - - -=over 4 - -=item B - write to object - - $ok = $obj->print(@list); - -This method writes I<@list> followed by the I -to the open object and returns C<1> if all data was successfully -written. On time-out or other failures, the error mode action is -performed. See C. - -By default, the C is set to C<"\n"> so all -your commands automatically end with a newline. In most cases your -output is being read by a command interpreter which won't accept a -command until newline is read. This is similar to someone typing a -command and hitting the return key. To avoid printing a trailing -C<"\n"> use C instead or set the output_record_separator to an -empty string. - -On failure, it's possible that some data was written. If you choose -to try and recover from a print timing-out, use C to -determine how much was written before the error occurred. - -You may also use the output field separator to print a string between -the list elements. See C. - -=back - - -=over 4 - -=item B - number of bytes written by print - - $num = $obj->print_length; - -This returns the number of bytes successfully written by the most -recent C or C. - -=back - - -=over 4 - -=item B - pattern to match a prompt - - $matchop = $obj->prompt; - - $prev = $obj->prompt($matchop); - -This method sets the pattern used to find a prompt in the input -stream. It must be a string representing a valid perl pattern match -operator. The methods C and C try to read until -matching the prompt. They will fail with a time-out error if the -pattern you've chosen doesn't match what the remote side sends. - -With no argument this method returns the prompt set in the object. -With an argument it sets the prompt to I<$matchop> and returns the -previous value. - -The default prompt is C<'/[\$%#E] $/'> - -Always use single quotes, instead of double quotes, to construct -I<$matchop> (e.g. C<'/bash\$ $/'>). If you're constructing a DOS like -file path, you'll need to use four backslashes to represent one -(e.g. C<'/c:\\\\users\\\\billE$/i'>). - -Of course don't forget about regexp metacharacters like C<.>, C<[>, or -C<$>. You'll only need a single backslash to quote them. The anchor -metacharacters C<^> and C<$> refer to positions in the input buffer. - -A warning is printed to STDERR when attempting to set this attribute -with a match operator missing its opening delimiter. - -=back - - -=over 4 - -=item B - write to object - - $ok = $obj->put($string); - - $ok = $obj->put(String => $string, - [Binmode => $mode,] - [Errmode => $errmode,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This method writes I<$string> to the opened object and returns C<1> if -all data was successfully written. This method is like C -except that it doesn't write the trailing output_record_separator -("\n" by default). On time-out or other failures, the error mode -action is performed. See C. - -On failure, it's possible that some data was written. If you choose -to try and recover from a put timing-out, use C to -determine how much was written before the error occurred. - -Optional named parameters are provided to override the current -settings of binmode, errmode, telnetmode, and timeout. - -=back - - -=over 4 - -=item B - input line delimiter - - $chars = $obj->rs; - - $prev = $obj->rs($chars); - -This method is synonymous with C. - -=back - - -=over 4 - -=item B - turn off/on telnet command interpretation - - $mode = $obj->telnetmode; - - $prev = $obj->telnetmode($mode); - -This method controls whether or not TELNET commands in the data stream -are recognized and handled. The TELNET protocol uses certain -character sequences sent in the data stream to control the session. -If the port you're connecting to isn't using the TELNET protocol, then -you should turn this mode off. The default is I. - -If no argument is given, the current mode is returned. - -If I<$mode> is C<0> then telnet mode is off. If I<$mode> is C<1> then -telnet mode is on. - -=back - - -=over 4 - -=item B - time-out indicator - - $boolean = $obj->timed_out; - - $prev = $obj->timed_out($boolean); - -This method indicates if a previous read, write, or open method -timed-out. Remember that timing-out is itself an error. To be able -to invoke C after a time-out error, you'd have to change -the default error mode to something other than C<"die">. See -C. - -With no argument this method returns C<1> if the previous method -timed-out. With an argument it sets the indicator. Normally, only -internal methods set this indicator. - -=back - - -=over 4 - -=item B - I/O time-out interval - - $secs = $obj->timeout; - - $prev = $obj->timeout($secs); - -This method sets the timeout interval that's used when performing I/O -or connecting to a port. When a method doesn't complete within the -timeout interval then it's an error and the error mode action is -performed. - -A timeout may be expressed as a relative or absolute value. If -I<$secs> is greater than or equal to the time the program started, as -determined by $^T, then it's an absolute time value for when time-out -occurs. The perl function C may be used to obtain an absolute -time value. For a relative time-out value less than $^T, time-out -happens I<$secs> from when the method begins. - -If I<$secs> is C<0> then time-out occurs if the data cannot be -immediately read or written. Use the undefined value to turn off -timing-out completely. - -With no argument this method returns the timeout set in the object. -With an argument it sets the timeout to I<$secs> and returns the -previous value. The default timeout value is C<10> seconds. - -A warning is printed to STDERR when attempting to set this attribute -to something that's not an C or a non-negative integer. - -=back - - -=over 4 - -=item B - wait for pattern in the input - - $ok = $obj->waitfor($matchop); - $ok = $obj->waitfor([Match => $matchop,] - [String => $string,] - [Binmode => $mode,] - [Errmode => $errmode,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - - ($prematch, $match) = $obj->waitfor($matchop); - ($prematch, $match) = $obj->waitfor([Match => $matchop,] - [String => $string,] - [Binmode => $mode,] - [Errmode => $errmode,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This method reads until a pattern match or string is found in the -input stream. All the characters before and including the match are -removed from the input stream. - -In a list context the characters before the match and the matched -characters are returned in I<$prematch> and I<$match>. In a scalar -context, the matched characters and all characters before it are -discarded and C<1> is returned on success. On time-out, eof, or other -failures, for both list and scalar context, the error mode action is -performed. See C. - -You can specify more than one pattern or string by simply providing -multiple I and/or I named parameters. A I<$matchop> -must be a string representing a valid Perl pattern match operator. -The I<$string> is just a substring to find in the input stream. - -Use C to debug when this method keeps timing-out and you -don't think it should. - -An optional named parameter is provided to override the current -setting of timeout. - -To avoid unexpected backslash interpretation, always use single quotes -instead of double quotes to construct a match operator argument for -C and C (e.g. C<'/bash\$ $/'>). If you're -constructing a DOS like file path, you'll need to use four backslashes -to represent one (e.g. C<'/c:\\\\users\\\\billE$/i'>). - -Of course don't forget about regexp metacharacters like C<.>, C<[>, or -C<$>. You'll only need a single backslash to quote them. The anchor -metacharacters C<^> and C<$> refer to positions in the input buffer. - -Optional named parameters are provided to override the current -settings of binmode, errmode, telnetmode, and timeout. - -=back - - -=head1 SEE ALSO - -=over 2 - -=item RFC 854 - -S - -S - -=item RFC 1143 - -S - -S - -=item TELNET Option Assignments - -S - -=back - - -=head1 EXAMPLES - -This example gets the current weather forecast for Brainerd, Minnesota. - - my ($forecast, $t); - - use Net::Telnet (); - $t = new Net::Telnet; - $t->open("rainmaker.wunderground.com"); - - ## Wait for first prompt and "hit return". - $t->waitfor('/continue:.*$/'); - $t->print(""); - - ## Wait for second prompt and respond with city code. - $t->waitfor('/city code.*$/'); - $t->print("BRD"); - - ## Read and print the first page of forecast. - ($forecast) = $t->waitfor('/[ \t]+press return to continue/i'); - print $forecast; - - exit; - - -This example checks a POP server to see if you have mail. - - my ($hostname, $line, $passwd, $pop, $username); - - $hostname = "your_destination_host_here"; - $username = "your_username_here"; - $passwd = "your_password_here"; - - use Net::Telnet (); - $pop = new Net::Telnet (Telnetmode => 0); - $pop->open(Host => $hostname, - Port => 110); - - - ## Read connection message. - $line = $pop->getline; - die $line unless $line =~ /^\+OK/; - - ## Send user name. - $pop->print("user $username"); - $line = $pop->getline; - die $line unless $line =~ /^\+OK/; - - ## Send password. - $pop->print("pass $passwd"); - $line = $pop->getline; - die $line unless $line =~ /^\+OK/; - - ## Request status of messages. - $pop->print("list"); - $line = $pop->getline; - print $line; - - exit; - - -Here's an example that uses the ssh program to connect to a remote -host. Because the ssh program reads and writes to its controlling -terminal, the IO::Pty module is used to create a new pseudo terminal -for use by ssh. A new Net::Telnet object is then created to read and -write to that pseudo terminal. To use the code below, substitute -"changeme" with the actual host, user, password, and command prompt. - - ## Main program. - { - my ($pty, $ssh, @lines); - my $host = "changeme"; - my $user = "changeme"; - my $password = "changeme"; - my $prompt = '/changeme:~> $/'; - - ## Start ssh program. - $pty = &spawn("ssh", "-l", $user, $host); # spawn() defined below - - ## Create a Net::Telnet object to perform I/O on ssh's tty. - use Net::Telnet; - $ssh = new Net::Telnet (-fhopen => $pty, - -prompt => $prompt, - -telnetmode => 0, - -cmd_remove_mode => 1, - -output_record_separator => "\r"); - - ## Login to remote host. - $ssh->waitfor(-match => '/password: ?$/i', - -errmode => "return") - or die "problem connecting to host: ", $ssh->lastline; - $ssh->print($password); - $ssh->waitfor(-match => $ssh->prompt, - -errmode => "return") - or die "login failed: ", $ssh->lastline; - - ## Send command, get and print its output. - @lines = $ssh->cmd("who"); - print @lines; - - exit; - } # end main program - - sub spawn { - my(@cmd) = @_; - my($pid, $pty, $tty, $tty_fd); - - ## Create a new pseudo terminal. - use IO::Pty (); - $pty = new IO::Pty - or die $!; - - ## Execute the program in another process. - unless ($pid = fork) { # child process - die "problem spawning program: $!\n" unless defined $pid; - - ## Disassociate process from existing controlling terminal. - use POSIX (); - POSIX::setsid - or die "setsid failed: $!"; - - ## Associate process with a new controlling terminal. - $tty = $pty->slave; - $tty_fd = $tty->fileno; - close $pty; - - ## Make stdio use the new controlling terminal. - open STDIN, "<&$tty_fd" or die $!; - open STDOUT, ">&$tty_fd" or die $!; - open STDERR, ">&STDOUT" or die $!; - close $tty; - - ## Execute requested program. - exec @cmd - or die "problem executing $cmd[0]\n"; - } # end child process - - $pty; - } # end sub spawn - - -Here's an example that changes a user's login password. Because the -passwd program always prompts for passwords on its controlling -terminal, the IO::Pty module is used to create a new pseudo terminal -for use by passwd. A new Net::Telnet object is then created to read -and write to that pseudo terminal. To use the code below, substitute -"changeme" with the actual old and new passwords. - - my ($pty, $passwd); - my $oldpw = "changeme"; - my $newpw = "changeme"; - - ## Start passwd program. - $pty = &spawn("passwd"); # spawn() defined above - - ## Create a Net::Telnet object to perform I/O on passwd's tty. - use Net::Telnet; - $passwd = new Net::Telnet (-fhopen => $pty, - -timeout => 2, - -output_record_separator => "\r", - -telnetmode => 0, - -cmd_remove_mode => 1); - $passwd->errmode("return"); - - ## Send existing password. - $passwd->waitfor('/password: ?$/i') - or die "no old password prompt: ", $passwd->lastline; - $passwd->print($oldpw); - - ## Send new password. - $passwd->waitfor('/new password: ?$/i') - or die "bad old password: ", $passwd->lastline; - $passwd->print($newpw); - - ## Send new password verification. - $passwd->waitfor('/new password: ?$/i') - or die "bad new password: ", $passwd->lastline; - $passwd->print($newpw); - - ## Display success or failure. - $passwd->waitfor('/changed/') - or die "bad new password: ", $passwd->lastline; - print $passwd->lastline; - - $passwd->close; - exit; - - -Here's an example you can use to down load a file of any type. The -file is read from the remote host's standard output using cat. To -prevent any output processing, the remote host's standard output is -put in raw mode using the Bourne shell. The Bourne shell is used -because some shells, notably tcsh, prevent changing tty modes. Upon -completion, FTP style statistics are printed to stderr. - - my ($block, $filename, $host, $hostname, $k_per_sec, $line, - $num_read, $passwd, $prevblock, $prompt, $size, $size_bsd, - $size_sysv, $start_time, $total_time, $username); - - $hostname = "your_destination_host_here"; - $username = "your_username_here"; - $passwd = "your_password_here"; - $filename = "your_download_file_here"; - - ## Connect and login. - use Net::Telnet (); - $host = new Net::Telnet (Timeout => 30, - Prompt => '/[%#>] $/'); - $host->open($hostname); - $host->login($username, $passwd); - - ## Make sure prompt won't match anything in send data. - $prompt = "_funkyPrompt_"; - $host->prompt("/$prompt\$/"); - $host->cmd("set prompt = '$prompt'"); - - ## Get size of file. - ($line) = $host->cmd("/bin/ls -l $filename"); - ($size_bsd, $size_sysv) = (split ' ', $line)[3,4]; - if ($size_sysv =~ /^\d+$/) { - $size = $size_sysv; - } - elsif ($size_bsd =~ /^\d+$/) { - $size = $size_bsd; - } - else { - die "$filename: no such file on $hostname"; - } - - ## Start sending the file. - binmode STDOUT; - $host->binmode(1); - $host->print("/bin/sh -c 'stty raw; cat $filename'"); - $host->getline; # discard echoed back line - - ## Read file a block at a time. - $num_read = 0; - $prevblock = ""; - $start_time = time; - while (($block = $host->get) and ($block !~ /$prompt$/o)) { - if (length $block >= length $prompt) { - print $prevblock; - $num_read += length $prevblock; - $prevblock = $block; - } - else { - $prevblock .= $block; - } - - } - $host->close; - - ## Print last block without trailing prompt. - $prevblock .= $block; - $prevblock =~ s/$prompt$//; - print $prevblock; - $num_read += length $prevblock; - die "error: expected size $size, received size $num_read\n" - unless $num_read == $size; - - ## Print totals. - $total_time = (time - $start_time) || 1; - $k_per_sec = ($size / 1024) / $total_time; - $k_per_sec = sprintf "%3.1f", $k_per_sec; - warn("$num_read bytes received in $total_time seconds ", - "($k_per_sec Kbytes/s)\n"); - - exit; - - -=head1 AUTHOR - -Jay Rogers - - -=head1 COPYRIGHT - -Copyright 1997, 2000, 2002 by Jay Rogers. All rights reserved. -This program is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. diff --git a/agc_2-X/trunk/libs/Telnet.pm b/agc_2-X/trunk/libs/Telnet.pm deleted file mode 100644 index 9f84fe31..00000000 --- a/agc_2-X/trunk/libs/Telnet.pm +++ /dev/null @@ -1,5252 +0,0 @@ -package Net::Telnet; - -## Copyright 1997, 2000, 2002 Jay Rogers. All rights reserved. -## This program is free software; you can redistribute it and/or -## modify it under the same terms as Perl itself. - -## See user documentation at the end of this file. Search for =head - -use strict; -require 5.002; - -## Module export. -use vars qw(@EXPORT_OK); -@EXPORT_OK = qw(TELNET_IAC TELNET_DONT TELNET_DO TELNET_WONT TELNET_WILL - TELNET_SB TELNET_GA TELNET_EL TELNET_EC TELNET_AYT TELNET_AO - TELNET_IP TELNET_BREAK TELNET_DM TELNET_NOP TELNET_SE - TELNET_EOR TELNET_ABORT TELNET_SUSP TELNET_EOF TELNET_SYNCH - TELOPT_BINARY TELOPT_ECHO TELOPT_RCP TELOPT_SGA TELOPT_NAMS - TELOPT_STATUS TELOPT_TM TELOPT_RCTE TELOPT_NAOL TELOPT_NAOP - TELOPT_NAOCRD TELOPT_NAOHTS TELOPT_NAOHTD TELOPT_NAOFFD - TELOPT_NAOVTS TELOPT_NAOVTD TELOPT_NAOLFD TELOPT_XASCII - TELOPT_LOGOUT TELOPT_BM TELOPT_DET TELOPT_SUPDUP - TELOPT_SUPDUPOUTPUT TELOPT_SNDLOC TELOPT_TTYPE TELOPT_EOR - TELOPT_TUID TELOPT_OUTMRK TELOPT_TTYLOC TELOPT_3270REGIME - TELOPT_X3PAD TELOPT_NAWS TELOPT_TSPEED TELOPT_LFLOW - TELOPT_LINEMODE TELOPT_XDISPLOC TELOPT_OLD_ENVIRON - TELOPT_AUTHENTICATION TELOPT_ENCRYPT TELOPT_NEW_ENVIRON - TELOPT_EXOPL); - -## Module import. -use Exporter (); -use Socket qw(AF_INET SOCK_STREAM inet_aton sockaddr_in); -use Symbol qw(qualify); - -## Base classes. -use vars qw(@ISA); -@ISA = qw(Exporter); -if (&_io_socket_include) { # successfully required module IO::Socket - push @ISA, "IO::Socket::INET"; -} -else { # perl version < 5.004 - require FileHandle; - push @ISA, "FileHandle"; -} - -## Global variables. -use vars qw($VERSION @Telopts); -$VERSION = "3.03"; -@Telopts = ("BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", "STATUS", - "TIMING MARK", "RCTE", "NAOL", "NAOP", "NAOCRD", "NAOHTS", - "NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD", "NAOLFD", "EXTEND ASCII", - "LOGOUT", "BYTE MACRO", "DATA ENTRY TERMINAL", "SUPDUP", - "SUPDUP OUTPUT", "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", - "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", - "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", - "AUTHENTICATION", "ENCRYPT", "NEW-ENVIRON"); - - -########################### Public Methods ########################### - - -sub new { - my ($class) = @_; - my ( - $errmode, - $fh_open, - $host, - $self, - %args, - ); - local $_; - - ## Create a new object with defaults. - $self = $class->SUPER::new; - *$self->{net_telnet} = { - bin_mode => 0, - blksize => &_optimal_blksize(), - buf => "", - cmd_prompt => '/[\$%#>] $/', - cmd_rm_mode => "auto", - dumplog => '', - eofile => 1, - errormode => "die", - errormsg => "", - fdmask => '', - host => "localhost", - inputlog => '', - last_line => "", - last_prompt => "", - maxbufsize => 1_048_576, - num_wrote => 0, - ofs => "", - opened => '', - opt_cback => '', - opt_log => '', - opts => {}, - ors => "\n", - outputlog => '', - pending_errormsg => "", - port => 23, - pushback_buf => "", - rs => "\n", - subopt_cback => '', - telnet_mode => 1, - time_out => 10, - timedout => '', - unsent_opts => "", - }; - - ## Indicate that we'll accept an offer from remote side for it to echo - ## and suppress go aheads. - &_opt_accept($self, - { option => &TELOPT_ECHO, - is_remote => 1, - is_enable => 1 }, - { option => &TELOPT_SGA, - is_remote => 1, - is_enable => 1 }, - ); - - ## Parse the args. - if (@_ == 2) { # one positional arg given - $host = $_[1]; - } - elsif (@_ > 2) { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse all other named args. - foreach (keys %args) { - if (/^-?binmode$/i) { - $self->binmode($args{$_}); - } - elsif (/^-?cmd_remove_mode$/i) { - $self->cmd_remove_mode($args{$_}); - } - elsif (/^-?dump_log$/i) { - $self->dump_log($args{$_}); - } - elsif (/^-?errmode$/i) { - $errmode = $args{$_}; - } - elsif (/^-?fhopen$/i) { - $fh_open = $args{$_}; - } - elsif (/^-?host$/i) { - $host = $args{$_}; - } - elsif (/^-?input_log$/i) { - $self->input_log($args{$_}); - } - elsif (/^-?input_record_separator$/i or /^-?rs$/i) { - $self->input_record_separator($args{$_}); - } - elsif (/^-?option_log$/i) { - $self->option_log($args{$_}); - } - elsif (/^-?output_log$/i) { - $self->output_log($args{$_}); - } - elsif (/^-?output_record_separator$/i or /^-?ors$/i) { - $self->output_record_separator($args{$_}); - } - elsif (/^-?port$/i) { - $self->port($args{$_}); - } - elsif (/^-?prompt$/i) { - $self->prompt($args{$_}); - } - elsif (/^-?telnetmode$/i) { - $self->telnetmode($args{$_}); - } - elsif (/^-?timeout$/i) { - $self->timeout($args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::new()"); - } - } - } - - if (defined $errmode) { # user wants to set errmode - $self->errmode($errmode); - } - - if (defined $fh_open) { # user wants us to attach to existing filehandle - $self->fhopen($fh_open) - or return; - } - elsif (defined $host) { # user wants us to open a connection to host - $self->host($host); - $self->open - or return; - } - - $self; -} # end sub new - - -sub DESTROY { -} # end sub DESTROY - - -sub binmode { - my ($self, $mode) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{bin_mode}; - - if (@_ >= 2) { - unless (defined $mode) { - $mode = 0; - } - - $s->{bin_mode} = $mode; - } - - $prev; -} # end sub binmode - - -sub break { - my ($self) = @_; - my $s = *$self->{net_telnet}; - my $break_cmd = "\xff\xf3"; - - $s->{timedout} = ''; - - &_put($self, \$break_cmd, "break"); -} # end sub break - - -sub buffer { - my ($self) = @_; - my $s = *$self->{net_telnet}; - - \$s->{buf}; -} # end sub buffer - - -sub buffer_empty { - my ($self) = @_; - my ( - $buffer, - ); - - $buffer = $self->buffer; - $$buffer = ""; -} # end sub buffer_empty - - -sub close { - my ($self) = @_; - my $s = *$self->{net_telnet}; - - $s->{eofile} = 1; - $s->{opened} = ''; - close $self - if defined fileno($self); - - 1; -} # end sub close - - -sub cmd { - my ($self, @args) = @_; - my ( - $cmd_remove_mode, - $errmode, - $firstpos, - $last_prompt, - $lastpos, - $lines, - $ors, - $output, - $output_ref, - $prompt, - $remove_echo, - $rs, - $rs_len, - $s, - $telopt_echo, - $timeout, - %args, - ); - my $cmd = ""; - local $_; - - ## Init. - $self->timed_out(''); - $self->last_prompt(""); - $s = *$self->{net_telnet}; - $output = []; - $cmd_remove_mode = $self->cmd_remove_mode; - $errmode = $self->errmode; - $ors = $self->output_record_separator; - $prompt = $self->prompt; - $rs = $self->input_record_separator; - $timeout = $self->timeout; - - ## Parse args. - if (@_ == 2) { # one positional arg given - $cmd = $_[1]; - } - elsif (@_ > 2) { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?cmd_remove/i) { - $cmd_remove_mode = &_parse_cmd_remove_mode($self, $args{$_}); - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?input_record_separator$/i or /^-?rs$/i) { - $rs = &_parse_input_record_separator($self, $args{$_}); - } - elsif (/^-?output$/i) { - $output_ref = $args{$_}; - if (defined($output_ref) and ref($output_ref) eq "ARRAY") { - $output = $output_ref; - } - } - elsif (/^-?output_record_separator$/i or /^-?ors$/i) { - $ors = $self->output_record_separator($args{$_}); - } - elsif (/^-?prompt$/i) { - $prompt = &_parse_prompt($self, $args{$_}); - } - elsif (/^-?string$/i) { - $cmd = $args{$_}; - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::cmd()"); - } - } - } - - ## Override some user settings. - local $s->{errormode} = "return"; - local $s->{time_out} = &_endtime($timeout); - $self->errmsg(""); - - ## Send command and wait for the prompt. - $self->put($cmd . $ors) - and ($lines, $last_prompt) = $self->waitfor($prompt); - - ## Check for failure. - $s->{errormode} = $errmode; - return $self->error("command timed-out") if $self->timed_out; - return $self->error($self->errmsg) if $self->errmsg ne ""; - - ## Save the most recently matched prompt. - $self->last_prompt($last_prompt); - - ## Split lines into an array, keeping record separator at end of line. - $firstpos = 0; - $rs_len = length $rs; - while (($lastpos = index($lines, $rs, $firstpos)) > -1) { - push(@$output, - substr($lines, $firstpos, $lastpos - $firstpos + $rs_len)); - $firstpos = $lastpos + $rs_len; - } - - if ($firstpos < length $lines) { - push @$output, substr($lines, $firstpos); - } - - ## Determine if we should remove the first line of output based - ## on the assumption that it's an echoed back command. - if ($cmd_remove_mode eq "auto") { - ## See if remote side told us they'd echo. - $telopt_echo = $self->option_state(&TELOPT_ECHO); - $remove_echo = $telopt_echo->{remote_enabled}; - } - else { # user explicitly told us how many lines to remove. - $remove_echo = $cmd_remove_mode; - } - - ## Get rid of possible echo back command. - while ($remove_echo--) { - shift @$output; - } - - ## Ensure at least a null string when there's no command output - so - ## "true" is returned in a list context. - unless (@$output) { - @$output = (""); - } - - ## Return command output via named arg, if requested. - if (defined $output_ref) { - if (ref($output_ref) eq "SCALAR") { - $$output_ref = join "", @$output; - } - elsif (ref($output_ref) eq "HASH") { - %$output_ref = @$output; - } - } - - wantarray ? @$output : 1; -} # end sub cmd - - -sub cmd_remove_mode { - my ($self, $mode) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{cmd_rm_mode}; - - if (@_ >= 2) { - $s->{cmd_rm_mode} = &_parse_cmd_remove_mode($self, $mode); - } - - $prev; -} # end sub cmd_remove_mode - - -sub dump_log { - my ($self, $name) = @_; - my ( - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $fh = $s->{dumplog}; - - if (@_ >= 2) { - unless (defined $name) { - $name = ""; - } - - $fh = &_fname_to_handle($self, $name) - or return; - $s->{dumplog} = $fh; - } - - $fh; -} # end sub dump_log - - -sub eof { - my ($self) = @_; - - *$self->{net_telnet}{eofile}; -} # end sub eof - - -sub errmode { - my ($self, $mode) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{errormode}; - - if (@_ >= 2) { - $s->{errormode} = &_parse_errmode($self, $mode); - } - - $prev; -} # end sub errmode - - -sub errmsg { - my ($self, @errmsgs) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{errormsg}; - - if (@_ >= 2) { - $s->{errormsg} = join "", @errmsgs; - } - - $prev; -} # end sub errmsg - - -sub error { - my ($self, @errmsg) = @_; - my ( - $errmsg, - $func, - $mode, - $s, - @args, - ); - local $_; - - $s = *$self->{net_telnet}; - - if (@_ >= 2) { - ## Put error message in the object. - $errmsg = join "", @errmsg; - $s->{errormsg} = $errmsg; - - ## Do the error action as described by error mode. - $mode = $s->{errormode}; - if (ref($mode) eq "CODE") { - &$mode($errmsg); - return; - } - elsif (ref($mode) eq "ARRAY") { - ($func, @args) = @$mode; - &$func(@args); - return; - } - elsif ($mode =~ /^return$/i) { - return; - } - else { # die - if ($errmsg =~ /\n$/) { - die $errmsg; - } - else { - ## Die and append caller's line number to message. - &_croak($self, $errmsg); - } - } - } - else { - return $s->{errormsg} ne ""; - } -} # end sub error - - -sub fhopen { - my ($self, $fh) = @_; - my ( - $globref, - $s, - ); - - ## Convert given filehandle to a typeglob reference, if necessary. - $globref = &_qualify_fh($self, $fh); - - ## Ensure filehandle is already open. - return $self->error("fhopen filehandle isn't already open") - unless defined($globref) and defined(fileno $globref); - - ## Ensure we're closed. - $self->close; - - ## Save our private data. - $s = *$self->{net_telnet}; - - ## Switch ourself with the given filehandle. - *$self = *$globref; - - ## Restore our private data. - *$self->{net_telnet} = $s; - - ## Re-initialize ourself. - select((select($self), $|=1)[$[]); # don't buffer writes - $s = *$self->{net_telnet}; - $s->{blksize} = &_optimal_blksize((stat $self)[11]); - $s->{buf} = ""; - $s->{eofile} = ''; - $s->{errormsg} = ""; - vec($s->{fdmask}='', fileno($self), 1) = 1; - $s->{host} = ""; - $s->{last_line} = ""; - $s->{last_prompt} = ""; - $s->{num_wrote} = 0; - $s->{opened} = 1; - $s->{pending_errormsg} = ""; - $s->{port} = ''; - $s->{pushback_buf} = ""; - $s->{timedout} = ''; - $s->{unsent_opts} = ""; - &_reset_options($s->{opts}); - - 1; -} # end sub fhopen - - -sub get { - my ($self, %args) = @_; - my ( - $binmode, - $endtime, - $errmode, - $line, - $s, - $telnetmode, - $timeout, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $timeout = $s->{time_out}; - $s->{timedout} = ''; - return if $s->{eofile}; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?binmode$/i) { - $binmode = $args{$_}; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $args{$_}; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::get()"); - } - } - - ## If any args given, override corresponding instance data. - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - - ## Set wall time when we time out. - $endtime = &_endtime($timeout); - - ## Try to send any waiting option negotiation. - if (length $s->{unsent_opts}) { - &_flush_opts($self); - } - - ## Try to read just the waiting data using return error mode. - { - local $s->{errormode} = "return"; - $s->{errormsg} = ""; - &_fillbuf($self, $s, 0); - } - - ## We're done if we timed-out and timeout value is set to "poll". - return $self->error($s->{errormsg}) - if ($s->{timedout} and defined($timeout) and $timeout == 0 - and !length $s->{buf}); - - ## We're done if we hit an error other than timing out. - if ($s->{errormsg} and !$s->{timedout}) { - if (!length $s->{buf}) { - return $self->error($s->{errormsg}); - } - else { # error encountered but there's some data in buffer - $s->{pending_errormsg} = $s->{errormsg}; - } - } - - ## Clear time-out error from first read. - $s->{timedout} = ''; - $s->{errormsg} = ""; - - ## If buffer is still empty, try to read according to user's timeout. - if (!length $s->{buf}) { - &_fillbuf($self, $s, $endtime) - or do { - return if $s->{timedout}; - - ## We've reached end-of-file. - $self->close; - return; - }; - } - - ## Extract chars from buffer. - $line = $s->{buf}; - $s->{buf} = ""; - - $line; -} # end sub get - - -sub getline { - my ($self, %args) = @_; - my ( - $binmode, - $endtime, - $errmode, - $len, - $line, - $offset, - $pos, - $rs, - $s, - $telnetmode, - $timeout, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - return if $s->{eofile}; - $rs = $s->{rs}; - $timeout = $s->{time_out}; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?binmode$/i) { - $binmode = $args{$_}; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?input_record_separator$/i or /^-?rs$/i) { - $rs = &_parse_input_record_separator($self, $args{$_}); - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $args{$_}; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::getline()"); - } - } - - ## If any args given, override corresponding instance data. - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - - ## Set wall time when we time out. - $endtime = &_endtime($timeout); - - ## Try to send any waiting option negotiation. - if (length $s->{unsent_opts}) { - &_flush_opts($self); - } - - ## Keep reading into buffer until end-of-line is read. - $offset = 0; - while (($pos = index($s->{buf}, $rs, $offset)) == -1) { - $offset = length $s->{buf}; - &_fillbuf($self, $s, $endtime) - or do { - return if $s->{timedout}; - - ## We've reached end-of-file. - $self->close; - if (length $s->{buf}) { - return $s->{buf}; - } - else { - return; - } - }; - } - - ## Extract line from buffer. - $len = $pos + length $rs; - $line = substr($s->{buf}, 0, $len); - substr($s->{buf}, 0, $len) = ""; - - $line; -} # end sub getline - - -sub getlines { - my ($self, %args) = @_; - my ( - $binmode, - $errmode, - $line, - $rs, - $s, - $telnetmode, - $timeout, - ); - my $all = 1; - my @lines = (); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - return if $s->{eofile}; - $timeout = $s->{time_out}; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?all$/i) { - $all = $args{$_}; - unless (defined $all) { - $all = ''; - } - } - elsif (/^-?binmode$/i) { - $binmode = $args{$_}; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?input_record_separator$/i or /^-?rs$/i) { - $rs = &_parse_input_record_separator($self, $args{$_}); - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $args{$_}; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::getlines()"); - } - } - - ## If any args given, override corresponding instance data. - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{rs} = $rs - if defined $rs; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - local $s->{time_out} = &_endtime($timeout); - - ## User requested only the currently available lines. - if (! $all) { - return &_next_getlines($self, $s); - } - - ## Read lines until eof or error. - while (1) { - $line = $self->getline - or last; - push @lines, $line; - } - - ## Check for error. - return if ! $self->eof; - - @lines; -} # end sub getlines - - -sub host { - my ($self, $host) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{host}; - - if (@_ >= 2) { - unless (defined $host) { - $host = ""; - } - - $s->{host} = $host; - } - - $prev; -} # end sub host - - -sub input_log { - my ($self, $name) = @_; - my ( - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $fh = $s->{inputlog}; - - if (@_ >= 2) { - unless (defined $name) { - $name = ""; - } - - $fh = &_fname_to_handle($self, $name) - or return; - $s->{inputlog} = $fh; - } - - $fh; -} # end sub input_log - - -sub input_record_separator { - my ($self, $rs) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{rs}; - - if (@_ >= 2) { - $s->{rs} = &_parse_input_record_separator($self, $rs); - } - - $prev; -} # end sub input_record_separator - - -sub last_prompt { - my ($self, $string) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{last_prompt}; - - if (@_ >= 2) { - unless (defined $string) { - $string = ""; - } - - $s->{last_prompt} = $string; - } - - $prev; -} # end sub last_prompt - - -sub lastline { - my ($self, $line) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{last_line}; - - if (@_ >= 2) { - unless (defined $line) { - $line = ""; - } - - $s->{last_line} = $line; - } - - $prev; -} # end sub lastline - - -sub login { - my ($self) = @_; - my ( - $errmode, - $error, - $is_passwd_arg, - $is_username_arg, - $lastline, - $match, - $ors, - $passwd, - $prematch, - $prompt, - $s, - $timeout, - $username, - %args, - ); - local $_; - - ## Init. - $self->timed_out(''); - $self->last_prompt(""); - $s = *$self->{net_telnet}; - $timeout = $self->timeout; - $ors = $self->output_record_separator; - $prompt = $self->prompt; - - ## Parse args. - if (@_ == 3) { # just username and passwd given - $username = $_[1]; - $passwd = $_[2]; - - $is_username_arg = 1; - $is_passwd_arg = 1; - } - else { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?name$/i) { - $username = $args{$_}; - unless (defined $username) { - $username = ""; - } - - $is_username_arg = 1; - } - elsif (/^-?pass/i) { - $passwd = $args{$_}; - unless (defined $passwd) { - $passwd = ""; - } - - $is_passwd_arg = 1; - } - elsif (/^-?prompt$/i) { - $prompt = &_parse_prompt($self, $args{$_}); - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given ", - "to " . ref($self) . "::login()"); - } - } - } - - ## Ensure both username and password argument given. - &_croak($self,"Name argument not given to " . ref($self) . "::login()") - unless $is_username_arg; - &_croak($self,"Password argument not given to " . ref($self) . "::login()") - unless $is_passwd_arg; - - ## Override some user settings. - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{time_out} = &_endtime($timeout); - - ## Create a subroutine to generate an error. - $error - = sub { - my ($errmsg) = @_; - - if ($self->timed_out) { - return $self->error($errmsg); - } - elsif ($self->eof) { - ($lastline = $self->lastline) =~ s/\n+//; - return $self->error($errmsg, ": ", $lastline); - } - else { - return $self->error($self->errmsg); - } - }; - - - return $self->error("login failed: filehandle isn't open") - if $self->eof; - - ## Wait for login prompt. - $self->waitfor(Match => '/login[: ]*$/i', - Match => '/username[: ]*$/i', - Errmode => "return") - or do { - return &$error("eof read waiting for login prompt") - if $self->eof; - return &$error("timed-out waiting for login prompt"); - }; - - ## Delay sending response because of bug in Linux login program. - &_sleep(0.01); - - ## Send login name. - $self->put(String => $username . $ors, - Errmode => "return") - or return &$error("login disconnected"); - - ## Wait for password prompt. - $self->waitfor(Match => '/password[: ]*$/i', - Errmode => "return") - or do { - return &$error("eof read waiting for password prompt") - if $self->eof; - return &$error("timed-out waiting for password prompt"); - }; - - ## Delay sending response because of bug in Linux login program. - &_sleep(0.01); - - ## Send password. - $self->put(String => $passwd . $ors, - Errmode => "return") - or return &$error("login disconnected"); - - ## Wait for command prompt or another login prompt. - ($prematch, $match) = $self->waitfor(Match => '/login[: ]*$/i', - Match => '/username[: ]*$/i', - Match => $prompt, - Errmode => "return") - or do { - return &$error("eof read waiting for command prompt") - if $self->eof; - return &$error("timed-out waiting for command prompt"); - }; - - ## It's a bad login if we got another login prompt. - return $self->error("login failed: bad name or password") - if $match =~ /login[: ]*$/i or $match =~ /username[: ]*$/i; - - ## Save the most recently matched command prompt. - $self->last_prompt($match); - - 1; -} # end sub login - - -sub max_buffer_length { - my ($self, $maxbufsize) = @_; - my ( - $prev, - $s, - ); - my $minbufsize = 512; - - $s = *$self->{net_telnet}; - $prev = $s->{maxbufsize}; - - if (@_ >= 2) { - ## Ensure a positive integer value. - unless (defined $maxbufsize - and $maxbufsize =~ /^\d+$/ - and $maxbufsize) - { - &_carp($self, "ignoring bad Max_buffer_length " . - "argument \"$maxbufsize\": it's not a positive integer"); - $maxbufsize = $prev; - } - - ## Adjust up values that are too small. - if ($maxbufsize < $minbufsize) { - $maxbufsize = $minbufsize; - } - - $s->{maxbufsize} = $maxbufsize; - } - - $prev; -} # end sub max_buffer_length - - -## Make ofs() synonymous with output_field_separator(). -*ofs = \&output_field_separator; - - -sub open { - my ($self) = @_; - my ( - $errmode, - $errno, - $host, - $ip_addr, - $port, - $s, - $timeout, - %args, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $timeout = $s->{time_out}; - $s->{timedout} = ''; - - if (@_ == 2) { # one positional arg given - $self->host($_[1]); - } - elsif (@_ > 2) { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?host$/i) { - $self->host($args{$_}); - } - elsif (/^-?port$/i) { - $self->port($args{$_}) - or return; - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - } - else { - &_croak($self, "bad named parameter \"$_\" given ", - "to " . ref($self) . "::open()"); - } - } - } - - ## If any args given, override corresponding instance data. - local $s->{errormode} = $errmode - if defined $errmode; - - ## Get host and port. - $host = $self->host; - $port = $self->port; - - ## Ensure we're already closed. - $self->close; - - ## Connect with or without a timeout. - if (defined($timeout) and &_have_alarm) { # use a timeout - ## Convert possible absolute timeout to relative timeout. - if ($timeout >= $^T) { # it's an absolute time - $timeout = $timeout - time; - } - - ## Ensure a valid timeout value for alarm. - if ($timeout < 1) { - $timeout = 1; - } - $timeout = int($timeout + 1.5); - - ## Connect to server, timing out if it takes too long. - eval { - ## Turn on timer. - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{ALRM} = sub { die "timed-out\n" }; - alarm $timeout; - - ## Lookup server's IP address. - $ip_addr = inet_aton $host - or die "unknown remote host: $host\n"; - - ## Create a socket and attach the filehandle to it. - socket $self, AF_INET, SOCK_STREAM, 0 - or die "problem creating socket: $!\n"; - - ## Open connection to server. - connect $self, sockaddr_in($port, $ip_addr) - or die "problem connecting to \"$host\", port $port: $!\n"; - }; - alarm 0; - - ## Check for error. - if ($@ =~ /^timed-out$/) { # time out failure - $s->{timedout} = 1; - $self->close; - if (!$ip_addr) { - return $self->error("unknown remote host: $host: ", - "name lookup timed-out"); - } - else { - return $self->error("problem connecting to \"$host\", ", - "port $port: connect timed-out"); - } - } - elsif ($@) { # hostname lookup or connect failure - $self->close; - chomp $@; - return $self->error($@); - } - } - else { # don't use a timeout - $timeout = undef; - - ## Lookup server's IP address. - $ip_addr = inet_aton $host - or return $self->error("unknown remote host: $host"); - - ## Create a socket and attach the filehandle to it. - socket $self, AF_INET, SOCK_STREAM, 0 - or return $self->error("problem creating socket: $!"); - - ## Open connection to server. - connect $self, sockaddr_in($port, $ip_addr) - or do { - $errno = "$!"; - $self->close; - return $self->error("problem connecting to \"$host\", ", - "port $port: $errno"); - }; - } - - select((select($self), $|=1)[$[]); # don't buffer writes - $s->{blksize} = &_optimal_blksize((stat $self)[11]); - $s->{buf} = ""; - $s->{eofile} = ''; - $s->{errormsg} = ""; - vec($s->{fdmask}='', fileno($self), 1) = 1; - $s->{last_line} = ""; - $s->{num_wrote} = 0; - $s->{opened} = 1; - $s->{pending_errormsg} = ""; - $s->{pushback_buf} = ""; - $s->{timedout} = ''; - $s->{unsent_opts} = ""; - &_reset_options($s->{opts}); - - 1; -} # end sub open - - -sub option_accept { - my ($self, @args) = @_; - my ( - $arg, - $option, - $s, - @opt_args, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - - ## Parse the named args. - while (($_, $arg) = splice @args, 0, 2) { - ## Verify and save arguments. - if (/^-?do$/i) { - ## Make sure a callback is defined. - return $self->error("usage: an option callback must already ", - "be defined when enabling with $_") - unless $s->{opt_cback}; - - $option = &_verify_telopt_arg($self, $arg, $_); - return unless defined $option; - push @opt_args, { option => $option, - is_remote => '', - is_enable => 1, - }; - } - elsif (/^-?dont$/i) { - $option = &_verify_telopt_arg($self, $arg, $_); - return unless defined $option; - push @opt_args, { option => $option, - is_remote => '', - is_enable => '', - }; - } - elsif (/^-?will$/i) { - ## Make sure a callback is defined. - return $self->error("usage: an option callback must already ", - "be defined when enabling with $_") - unless $s->{opt_cback}; - - $option = &_verify_telopt_arg($self, $arg, $_); - return unless defined $option; - push @opt_args, { option => $option, - is_remote => 1, - is_enable => 1, - }; - } - elsif (/^-?wont$/i) { - $option = &_verify_telopt_arg($self, $arg, $_); - return unless defined $option; - push @opt_args, { option => $option, - is_remote => 1, - is_enable => '', - }; - } - else { - return $self->error('usage: $obj->option_accept(' . - '[Do => $telopt,] ', - '[Dont => $telopt,] ', - '[Will => $telopt,] ', - '[Wont => $telopt,]'); - } - } - - ## Set "receive ok" for options specified. - &_opt_accept($self, @opt_args); -} # end sub option_accept - - -sub option_callback { - my ($self, $callback) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{opt_cback}; - - if (@_ >= 2) { - unless (defined $callback and ref($callback) eq "CODE") { - &_carp($self, "ignoring Option_callback argument because it's " . - "not a code ref"); - $callback = $prev; - } - - $s->{opt_cback} = $callback; - } - - $prev; -} # end sub option_callback - - -sub option_log { - my ($self, $name) = @_; - my ( - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $fh = $s->{opt_log}; - - if (@_ >= 2) { - unless (defined $name) { - $name = ""; - } - - $fh = &_fname_to_handle($self, $name) - or return; - $s->{opt_log} = $fh; - } - - $fh; -} # end sub option_log - - -sub option_state { - my ($self, $option) = @_; - my ( - $opt_state, - $s, - %opt_state, - ); - - ## Ensure telnet option is non-negative integer. - $option = &_verify_telopt_arg($self, $option); - return unless defined $option; - - ## Init. - $s = *$self->{net_telnet}; - unless (defined $s->{opts}{$option}) { - &_set_default_option($s, $option); - } - - ## Return hashref to a copy of the values. - $opt_state = $s->{opts}{$option}; - %opt_state = %$opt_state; - \%opt_state; -} # end sub option_state - - -## Make ors() synonymous with output_record_separator(). -*ors = \&output_record_separator; - - -sub output_field_separator { - my ($self, $ofs) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{ofs}; - - if (@_ >= 2) { - unless (defined $ofs) { - $ofs = ""; - } - - $s->{ofs} = $ofs; - } - - $prev; -} # end sub output_field_separator - - -sub output_log { - my ($self, $name) = @_; - my ( - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $fh = $s->{outputlog}; - - if (@_ >= 2) { - unless (defined $name) { - $name = ""; - } - - $fh = &_fname_to_handle($self, $name) - or return; - $s->{outputlog} = $fh; - } - - $fh; -} # end sub output_log - - -sub output_record_separator { - my ($self, $ors) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{ors}; - - if (@_ >= 2) { - unless (defined $ors) { - $ors = ""; - } - - $s->{ors} = $ors; - } - - $prev; -} # end sub output_record_separator - - -sub port { - my ($self, $port) = @_; - my ( - $prev, - $s, - $service, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{port}; - - if (@_ >= 2) { - unless (defined $port) { - $port = ""; - } - - if (!$port) { - &_carp($self, "ignoring bad Port argument \"$port\""); - $port = $prev; - } - elsif ($port !~ /^\d+$/) { # port isn't all digits - $service = $port; - $port = getservbyname($service, "tcp"); - unless ($port) { - &_carp($self, "ignoring bad Port argument \"$service\": " . - "it's an unknown TCP service"); - $port = $prev; - } - } - - $s->{port} = $port; - } - - $prev; -} # end sub port - - -sub print { - my ($self) = shift; - my ( - $buf, - $fh, - $s, - ); - - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - return $self->error("write error: filehandle isn't open") - unless $s->{opened}; - - ## Add field and record separators. - $buf = join($s->{ofs}, @_) . $s->{ors}; - - ## Log the output if requested. - if ($s->{outputlog}) { - &_log_print($s->{outputlog}, $buf); - } - - ## Convert native newlines to CR LF. - if (!$s->{bin_mode}) { - $buf =~ s(\n)(\015\012)g; - } - - ## Escape TELNET IAC and also CR not followed by LF. - if ($s->{telnet_mode}) { - $buf =~ s(\377)(\377\377)g; - &_escape_cr(\$buf); - } - - &_put($self, \$buf, "print"); -} # end sub print - - -sub print_length { - my ($self) = @_; - - *$self->{net_telnet}{num_wrote}; -} # end sub print_length - - -sub prompt { - my ($self, $prompt) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{cmd_prompt}; - - ## Parse args. - if (@_ == 2) { - $s->{cmd_prompt} = &_parse_prompt($self, $prompt); - } - - $prev; -} # end sub prompt - - -sub put { - my ($self) = @_; - my ( - $binmode, - $buf, - $errmode, - $is_timeout_arg, - $s, - $telnetmode, - $timeout, - %args, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - - ## Parse args. - if (@_ == 2) { # one positional arg given - $buf = $_[1]; - } - elsif (@_ > 2) { # named args given - ## Get the named args. - (undef, %args) = @_; - - ## Parse the named args. - foreach (keys %args) { - if (/^-?binmode$/i) { - $binmode = $args{$_}; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $args{$_}); - } - elsif (/^-?string$/i) { - $buf = $args{$_}; - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $args{$_}; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $args{$_}); - $is_timeout_arg = 1; - } - else { - &_croak($self, "bad named parameter \"$_\" given ", - "to " . ref($self) . "::put()"); - } - } - } - - ## If any args given, override corresponding instance data. - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - local $s->{time_out} = $timeout - if defined $is_timeout_arg; - - ## Check for errors. - return $self->error("write error: filehandle isn't open") - unless $s->{opened}; - - ## Log the output if requested. - if ($s->{outputlog}) { - &_log_print($s->{outputlog}, $buf); - } - - ## Convert native newlines to CR LF. - if (!$s->{bin_mode}) { - $buf =~ s(\n)(\015\012)g; - } - - ## Escape TELNET IAC and also CR not followed by LF. - if ($s->{telnet_mode}) { - $buf =~ s(\377)(\377\377)g; - &_escape_cr(\$buf); - } - - &_put($self, \$buf, "print"); -} # end sub put - - -## Make rs() synonymous input_record_separator(). -*rs = \&input_record_separator; - - -sub suboption_callback { - my ($self, $callback) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{subopt_cback}; - - if (@_ >= 2) { - unless (defined $callback and ref($callback) eq "CODE") { - &_carp($self,"ignoring Suboption_callback argument because it's " . - "not a code ref"); - $callback = $prev; - } - - $s->{subopt_cback} = $callback; - } - - $prev; -} # end sub suboption_callback - - -sub telnetmode { - my ($self, $mode) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{telnet_mode}; - - if (@_ >= 2) { - unless (defined $mode) { - $mode = 0; - } - - $s->{telnet_mode} = $mode; - } - - $prev; -} # end sub telnetmode - - -sub timed_out { - my ($self, $value) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{timedout}; - - if (@_ >= 2) { - unless (defined $value) { - $value = ""; - } - - $s->{timedout} = $value; - } - - $prev; -} # end sub timed_out - - -sub timeout { - my ($self, $timeout) = @_; - my ( - $prev, - $s, - ); - - $s = *$self->{net_telnet}; - $prev = $s->{time_out}; - - if (@_ >= 2) { - $s->{time_out} = &_parse_timeout($self, $timeout); - } - - $prev; -} # end sub timeout - - -sub waitfor { - my ($self, @args) = @_; - my ( - $arg, - $binmode, - $endtime, - $errmode, - $len, - $match, - $match_op, - $pos, - $prematch, - $s, - $search, - $search_cond, - $telnetmode, - $timeout, - @match_cond, - @match_ops, - @search_cond, - @string_cond, - @warns, - ); - local $_; - - ## Init. - $s = *$self->{net_telnet}; - $s->{timedout} = ''; - return if $s->{eofile}; - return unless @args; - $timeout = $s->{time_out}; - - ## Code template used to build string match conditional. - ## Values between array elements must be supplied later. - @string_cond = - ('if (($pos = index $s->{buf}, ', ') > -1) { - $len = ', '; - $prematch = substr $s->{buf}, 0, $pos; - $match = substr $s->{buf}, $pos, $len; - substr($s->{buf}, 0, $pos + $len) = ""; - last; - }'); - - ## Code template used to build pattern match conditional. - ## Values between array elements must be supplied later. - @match_cond = - ('if ($s->{buf} =~ ', ') { - $prematch = $`; - $match = $&; - substr($s->{buf}, 0, length($`) + length($&)) = ""; - last; - }'); - - ## Parse args. - if (@_ == 2) { # one positional arg given - $arg = $_[1]; - - ## Fill in the blanks in the code template. - push @match_ops, $arg; - push @search_cond, join("", $match_cond[0], $arg, $match_cond[1]); - } - elsif (@_ > 2) { # named args given - ## Parse the named args. - while (($_, $arg) = splice @args, 0, 2) { - if (/^-?binmode$/i) { - $binmode = $arg; - unless (defined $binmode) { - $binmode = 0; - } - } - elsif (/^-?errmode$/i) { - $errmode = &_parse_errmode($self, $arg); - } - elsif (/^-?match$/i) { - ## Fill in the blanks in the code template. - push @match_ops, $arg; - push @search_cond, join("", - $match_cond[0], $arg, $match_cond[1]); - } - elsif (/^-?string$/i) { - ## Fill in the blanks in the code template. - $arg =~ s/'/\\'/g; # quote ticks - push @search_cond, join("", - $string_cond[0], "'$arg'", - $string_cond[1], length($arg), - $string_cond[2]); - } - elsif (/^-?telnetmode$/i) { - $telnetmode = $arg; - unless (defined $telnetmode) { - $telnetmode = 0; - } - } - elsif (/^-?timeout$/i) { - $timeout = &_parse_timeout($self, $arg); - } - else { - &_croak($self, "bad named parameter \"$_\" given " . - "to " . ref($self) . "::waitfor()"); - } - } - } - - ## If any args given, override corresponding instance data. - local $s->{errormode} = $errmode - if defined $errmode; - local $s->{bin_mode} = $binmode - if defined $binmode; - local $s->{telnet_mode} = $telnetmode - if defined $telnetmode; - - ## Check for bad match operator argument. - foreach $match_op (@match_ops) { - return $self->error("missing opening delimiter of match operator ", - "in argument \"$match_op\" given to ", - ref($self) . "::waitfor()") - unless $match_op =~ m(^\s*/) or $match_op =~ m(^\s*m\s*\W); - } - - ## Construct conditional to check for requested string and pattern matches. - ## Turn subsequent "if"s into "elsif". - $search_cond = join "\n\tels", @search_cond; - - ## Construct loop to fill buffer until string/pattern, timeout, or eof. - $search = join "", " - while (1) {\n\t", - $search_cond, ' - &_fillbuf($self, $s, $endtime) - or do { - last if $s->{timedout}; - $self->close; - last; - }; - }'; - - ## Set wall time when we timeout. - $endtime = &_endtime($timeout); - - ## Run the loop. - { - local $^W = 1; - local $SIG{"__WARN__"} = sub { push @warns, @_ }; - local $s->{errormode} = "return"; - $s->{errormsg} = ""; - eval $search; - } - - ## Check for failure. - return $self->error("pattern match timed-out") if $s->{timedout}; - return $self->error($s->{errormsg}) if $s->{errormsg} ne ""; - return $self->error("pattern match read eof") if $s->{eofile}; - - ## Check for Perl syntax errors or warnings. - if ($@ or @warns) { - foreach $match_op (@match_ops) { - &_match_check($self, $match_op) - or return; - } - return $self->error($@) if $@; - return $self->error(@warns) if @warns; - } - - wantarray ? ($prematch, $match) : 1; -} # end sub waitfor - - -######################## Private Subroutines ######################### - - -sub _append_lineno { - my ($obj, @msgs) = @_; - my ( - $file, - $line, - $pkg, - ); - - ## Find the caller that's not in object's class or one of its base classes. - ($pkg, $file , $line) = &_user_caller($obj); - join("", @msgs, " at ", $file, " line ", $line, "\n"); -} # end sub _append_lineno - - -sub _carp { - warn &_append_lineno(@_); -} # end sub _carp - - -sub _croak { - die &_append_lineno(@_); -} # end sub _croak - - -sub _endtime { - my ($interval) = @_; - - ## Compute wall time when timeout occurs. - if (defined $interval) { - if ($interval >= $^T) { # it's already an absolute time - return $interval; - } - elsif ($interval > 0) { # it's relative to the current time - return int(time + 1.5 + $interval); - } - else { # it's a one time poll - return 0; - } - } - else { # there's no timeout - return undef; - } -} # end sub _endtime - - -sub _escape_cr { - my ($string) = @_; - my ( - $nextchar, - ); - my $pos = 0; - - ## Convert all CR (not followed by LF) to CR NULL. - while (($pos = index($$string, "\015", $pos)) > -1) { - $nextchar = substr $$string, $pos + 1, 1; - - substr($$string, $pos, 1) = "\015\000" - unless $nextchar eq "\012"; - - $pos++; - } - - 1; -} # end sub _escape_cr - - -sub _fillbuf { - my ($self, $s, $endtime) = @_; - my ( - $msg, - $nfound, - $nread, - $pushback_len, - $read_pos, - $ready, - $timed_out, - $timeout, - $unparsed_pos, - ); - - ## If error from last read not yet reported then do it now. - if ($s->{pending_errormsg}) { - $msg = $s->{pending_errormsg}; - $s->{pending_errormsg} = ""; - return $self->error($msg); - } - - return unless $s->{opened}; - - while (1) { - ## Maximum buffer size exceeded? - return $self->error("maximum input buffer length exceeded: ", - $s->{maxbufsize}, " bytes") - unless length($s->{buf}) <= $s->{maxbufsize}; - - ## Determine how long to wait for input ready. - ($timed_out, $timeout) = &_timeout_interval($endtime); - if ($timed_out) { - $s->{timedout} = 1; - return $self->error("read timed-out"); - } - - ## Wait for input ready. - $nfound = select $ready=$s->{fdmask}, "", "", $timeout; - - ## Handle any errors while waiting. - if (!defined $nfound or $nfound <= 0) { # input not ready - if (defined $nfound and $nfound == 0) { # timed-out - $s->{timedout} = 1; - return $self->error("read timed-out"); - } - else { # error waiting for input ready - next if $! =~ /^interrupted/i; - - $s->{opened} = ''; - return $self->error("read error: $!"); - } - } - - ## Append to buffer any partially processed telnet or CR sequence. - $pushback_len = length $s->{pushback_buf}; - if ($pushback_len) { - $s->{buf} .= $s->{pushback_buf}; - $s->{pushback_buf} = ""; - } - - ## Read the waiting data. - $read_pos = length $s->{buf}; - $unparsed_pos = $read_pos - $pushback_len; - $nread = sysread $self, $s->{buf}, $s->{blksize}, $read_pos; - - ## Handle any read errors. - if (!defined $nread) { # read failed - next if $! =~ /^interrupted/i; # restart interrupted syscall - - $s->{opened} = ''; - return $self->error("read error: $!"); - } - - ## Handle eof. - if ($nread == 0) { # eof read - $s->{opened} = ''; - return; - } - - ## Display network traffic if requested. - if ($s->{dumplog}) { - &_log_dump('<', $s->{dumplog}, \$s->{buf}, $read_pos); - } - - ## Process any telnet commands in the data stream. - if ($s->{telnet_mode} and index($s->{buf},"\377",$unparsed_pos) > -1) { - &_interpret_tcmd($self, $s, $unparsed_pos); - } - - ## Process any carriage-return sequences in the data stream. - &_interpret_cr($s, $unparsed_pos); - - ## Read again if all chars read were consumed as telnet cmds. - next if $unparsed_pos >= length $s->{buf}; - - ## Log the input if requested. - if ($s->{inputlog}) { - &_log_print($s->{inputlog}, substr($s->{buf}, $unparsed_pos)); - } - - ## Save the last line read. - &_save_lastline($s); - - ## We've successfully read some data into the buffer. - last; - } # end while(1) - - 1; -} # end sub _fillbuf - - -sub _flush_opts { - my ($self) = @_; - my ( - $option_chars, - ); - my $s = *$self->{net_telnet}; - - ## Get option and clear the output buf. - $option_chars = $s->{unsent_opts}; - $s->{unsent_opts} = ""; - - ## Try to send options without waiting. - { - local $s->{errormode} = "return"; - local $s->{time_out} = 0; - &_put($self, \$option_chars, "telnet option negotiation") - or do { - ## Save chars not printed for later. - substr($option_chars, 0, $self->print_length) = ""; - $s->{unsent_opts} .= $option_chars; - }; - } - - 1; -} # end sub _flush_opts - - -sub _fname_to_handle { - my ($self, $fh) = @_; - my ( - $filename, - ); - - ## Ensure valid input. - return "" - unless defined $fh and (ref $fh or length $fh); - - ## Open a new filehandle if input is a filename. - no strict "refs"; - if (!ref($fh) and !defined(fileno $fh)) { # fh is a filename - $filename = $fh; - $fh = &_new_handle(); - CORE::open $fh, "> $filename" - or return $self->error("problem creating $filename: $!"); - } - - select((select($fh), $|=1)[$[]); # don't buffer writes - $fh; -} # end sub _fname_to_handle - - -sub _have_alarm { - eval { - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{ALRM} = sub { die }; - alarm 0; - }; - - ! $@; -} # end sub _have_alarm - - -sub _interpret_cr { - my ($s, $pos) = @_; - my ( - $nextchar, - ); - - while (($pos = index($s->{buf}, "\015", $pos)) > -1) { - $nextchar = substr($s->{buf}, $pos + 1, 1); - if ($nextchar eq "\0") { - ## Convert CR NULL to CR when in telnet mode. - if ($s->{telnet_mode}) { - substr($s->{buf}, $pos + 1, 1) = ""; - } - } - elsif ($nextchar eq "\012") { - ## Convert CR LF to newline when not in binary mode. - if (!$s->{bin_mode}) { - substr($s->{buf}, $pos, 2) = "\n"; - } - } - elsif (!length($nextchar) and ($s->{telnet_mode} or !$s->{bin_mode})) { - ## Save CR in alt buffer for possible CR LF or CR NULL conversion. - $s->{pushback_buf} .= "\015"; - chop $s->{buf}; - } - - $pos++; - } - - 1; -} # end sub _interpret_cr - - -sub _interpret_tcmd { - my ($self, $s, $offset) = @_; - my ( - $callback, - $endpos, - $nextchar, - $option, - $parameters, - $pos, - $subcmd, - ); - local $_; - - ## Parse telnet commands in the data stream. - $pos = $offset; - while (($pos = index $s->{buf}, "\377", $pos) > -1) { # unprocessed IAC - $nextchar = substr $s->{buf}, $pos + 1, 1; - - ## Save command if it's only partially read. - if (!length $nextchar) { - $s->{pushback_buf} .= "\377"; - chop $s->{buf}; - last; - } - - if ($nextchar eq "\377") { # IAC is escaping "\377" char - ## Remove escape char from data stream. - substr($s->{buf}, $pos, 1) = ""; - $pos++; - } - elsif ($nextchar eq "\375" or $nextchar eq "\373" or - $nextchar eq "\374" or $nextchar eq "\376") { # opt negotiation - $option = substr $s->{buf}, $pos + 2, 1; - - ## Save command if it's only partially read. - if (!length $option) { - $s->{pushback_buf} .= "\377" . $nextchar; - chop $s->{buf}; - chop $s->{buf}; - last; - } - - ## Remove command from data stream. - substr($s->{buf}, $pos, 3) = ""; - - ## Handle option negotiation. - &_negotiate_recv($self, $s, $nextchar, ord($option), $pos); - } - elsif ($nextchar eq "\372") { # start of subnegotiation parameters - ## Save command if it's only partially read. - $endpos = index $s->{buf}, "\360", $pos; - if ($endpos == -1) { - $s->{pushback_buf} .= substr $s->{buf}, $pos; - substr($s->{buf}, $pos) = ""; - last; - } - - ## Remove subnegotiation cmd from buffer. - $subcmd = substr($s->{buf}, $pos, $endpos - $pos + 1); - substr($s->{buf}, $pos, $endpos - $pos + 1) = ""; - - ## Invoke subnegotiation callback. - if ($s->{subopt_cback} and length($subcmd) >= 5) { - $option = unpack "C", substr($subcmd, 2, 1); - if (length($subcmd) >= 6) { - $parameters = substr $subcmd, 3, length($subcmd) - 5; - } - else { - $parameters = ""; - } - - $callback = $s->{subopt_cback}; - &$callback($self, $option, $parameters); - } - } - else { # various two char telnet commands - ## Ignore and remove command from data stream. - substr($s->{buf}, $pos, 2) = ""; - } - } - - ## Try to send any waiting option negotiation. - if (length $s->{unsent_opts}) { - &_flush_opts($self); - } - - 1; -} # end sub _interpret_tcmd - - -sub _io_socket_include { - local $SIG{"__DIE__"} = "DEFAULT"; - eval "require IO::Socket"; -} # end sub io_socket_include - - -sub _log_dump { - my ($direction, $fh, $data, $offset, $len) = @_; - my ( - $addr, - $hexvals, - $line, - ); - - $addr = 0; - $len = length($$data) - $offset - if !defined $len; - return 1 if $len <= 0; - - ## Print data in dump format. - while ($len > 0) { - ## Convert up to the next 16 chars to hex, padding w/ spaces. - if ($len >= 16) { - $line = substr $$data, $offset, 16; - } - else { - $line = substr $$data, $offset, $len; - } - $hexvals = unpack("H*", $line); - $hexvals .= ' ' x (32 - length $hexvals); - - ## Place in 16 columns, each containing two hex digits. - $hexvals = sprintf("%s %s %s %s " x 4, - unpack("a2" x 16, $hexvals)); - - ## For the ASCII column, change unprintable chars to a period. - $line =~ s/[\000-\037,\177-\237]/./g; - - ## Print the line in dump format. - &_log_print($fh, sprintf("%s 0x%5.5lx: %s%s\n", - $direction, $addr, $hexvals, $line)); - - $addr += 16; - $offset += 16; - $len -= 16; - } - - &_log_print($fh, "\n"); - - 1; -} # end sub _log_dump - - -sub _log_option { - my ($fh, $direction, $request, $option) = @_; - my ( - $name, - ); - - if ($option >= 0 and $option <= $#Telopts) { - $name = $Telopts[$option]; - } - else { - $name = $option; - } - - &_log_print($fh, "$direction $request $name\n"); -} # end sub _log_option - - -sub _log_print { - my ($fh, $buf) = @_; - local $\ = ''; - - if (ref($fh) and ref($fh) ne "GLOB") { # fh is blessed ref - $fh->print($buf); - } - else { # fh isn't blessed ref - print $fh $buf; - } -} # end sub _log_print - - -sub _match_check { - my ($self, $code) = @_; - my $error; - my @warns = (); - - ## Use eval to check for syntax errors or warnings. - { - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{"__WARN__"} = sub { push @warns, @_ }; - local $^W = 1; - local $_ = ''; - eval "\$_ =~ $code;"; - } - if ($@) { - ## Remove useless lines numbers from message. - ($error = $@) =~ s/ at \(eval \d+\) line \d+.?//; - chomp $error; - return $self->error("bad match operator: $error"); - } - elsif (@warns) { - ## Remove useless lines numbers from message. - ($error = shift @warns) =~ s/ at \(eval \d+\) line \d+.?//; - $error =~ s/ while "strict subs" in use//; - chomp $error; - return $self->error("bad match operator: $error"); - } - - 1; -} # end sub _match_check - - -sub _negotiate_callback { - my ($self, $opt, $is_remote, $is_enabled, $was_enabled, $opt_bufpos) = @_; - my ( - $callback, - $s, - ); - local $_; - - ## Keep track of remote echo. - if ($is_remote and $opt == &TELOPT_ECHO) { # received WILL or WONT ECHO - $s = *$self->{net_telnet}; - - if ($is_enabled and !$was_enabled) { # received WILL ECHO - $s->{remote_echo} = 1; - } - elsif (!$is_enabled and $was_enabled) { # received WONT ECHO - $s->{remote_echo} = ''; - } - } - - ## Invoke callback, if there is one. - $callback = $self->option_callback; - if ($callback) { - &$callback($self, $opt, $is_remote, - $is_enabled, $was_enabled, $opt_bufpos); - } - - 1; -} # end sub _negotiate_callback - - -sub _negotiate_recv { - my ($self, $s, $opt_request, $opt, $opt_bufpos) = @_; - - ## Ensure data structure exists for this option. - unless (defined $s->{opts}{$opt}) { - &_set_default_option($s, $opt); - } - - ## Process the option. - if ($opt_request eq "\376") { # DONT - &_negotiate_recv_disable($self, $s, $opt, "dont", $opt_bufpos, - $s->{opts}{$opt}{local_enable_ok}, - \$s->{opts}{$opt}{local_enabled}, - \$s->{opts}{$opt}{local_state}); - } - elsif ($opt_request eq "\375") { # DO - &_negotiate_recv_enable($self, $s, $opt, "do", $opt_bufpos, - $s->{opts}{$opt}{local_enable_ok}, - \$s->{opts}{$opt}{local_enabled}, - \$s->{opts}{$opt}{local_state}); - } - elsif ($opt_request eq "\374") { # WONT - &_negotiate_recv_disable($self, $s, $opt, "wont", $opt_bufpos, - $s->{opts}{$opt}{remote_enable_ok}, - \$s->{opts}{$opt}{remote_enabled}, - \$s->{opts}{$opt}{remote_state}); - } - elsif ($opt_request eq "\373") { # WILL - &_negotiate_recv_enable($self, $s, $opt, "will", $opt_bufpos, - $s->{opts}{$opt}{remote_enable_ok}, - \$s->{opts}{$opt}{remote_enabled}, - \$s->{opts}{$opt}{remote_state}); - } - else { # internal error - die; - } - - 1; -} # end sub _negotiate_recv - - -sub _negotiate_recv_disable { - my ($self, $s, $opt, $opt_request, - $opt_bufpos, $enable_ok, $is_enabled, $state) = @_; - my ( - $ack, - $disable_cmd, - $enable_cmd, - $is_remote, - $nak, - $was_enabled, - ); - - ## What do we use to request enable/disable or respond with ack/nak. - if ($opt_request eq "wont") { - $enable_cmd = "\377\375" . pack("C", $opt); # do command - $disable_cmd = "\377\376" . pack("C", $opt); # dont command - $is_remote = 1; - $ack = "DO"; - $nak = "DONT"; - - &_log_option($s->{opt_log}, "RCVD", "WONT", $opt) - if $s->{opt_log}; - } - elsif ($opt_request eq "dont") { - $enable_cmd = "\377\373" . pack("C", $opt); # will command - $disable_cmd = "\377\374" . pack("C", $opt); # wont command - $is_remote = ''; - $ack = "WILL"; - $nak = "WONT"; - - &_log_option($s->{opt_log}, "RCVD", "DONT", $opt) - if $s->{opt_log}; - } - else { # internal error - die; - } - - ## Respond to WONT or DONT based on the current negotiation state. - if ($$state eq "no") { # state is already disabled - } - elsif ($$state eq "yes") { # they're initiating disable - $$is_enabled = ''; - $$state = "no"; - - ## Send positive acknowledgment. - $s->{unsent_opts} .= $disable_cmd; - &_log_option($s->{opt_log}, "SENT", $nak, $opt) - if $s->{opt_log}; - - ## Invoke callbacks. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantno") { # they sent positive ack - $$is_enabled = ''; - $$state = "no"; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantno opposite") { # pos ack but we changed our mind - ## Indicate disabled but now we want to enable. - $$is_enabled = ''; - $$state = "wantyes"; - - ## Send queued request. - $s->{unsent_opts} .= $enable_cmd; - &_log_option($s->{opt_log}, "SENT", $ack, $opt) - if $s->{opt_log}; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantyes") { # they sent negative ack - $$is_enabled = ''; - $$state = "no"; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantyes opposite") { # nak but we changed our mind - $$is_enabled = ''; - $$state = "no"; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } -} # end sub _negotiate_recv_disable - - -sub _negotiate_recv_enable { - my ($self, $s, $opt, $opt_request, - $opt_bufpos, $enable_ok, $is_enabled, $state) = @_; - my ( - $ack, - $disable_cmd, - $enable_cmd, - $is_remote, - $nak, - $was_enabled, - ); - - ## What we use to send enable/disable request or send ack/nak response. - if ($opt_request eq "will") { - $enable_cmd = "\377\375" . pack("C", $opt); # do command - $disable_cmd = "\377\376" . pack("C", $opt); # dont command - $is_remote = 1; - $ack = "DO"; - $nak = "DONT"; - - &_log_option($s->{opt_log}, "RCVD", "WILL", $opt) - if $s->{opt_log}; - } - elsif ($opt_request eq "do") { - $enable_cmd = "\377\373" . pack("C", $opt); # will command - $disable_cmd = "\377\374" . pack("C", $opt); # wont command - $is_remote = ''; - $ack = "WILL"; - $nak = "WONT"; - - &_log_option($s->{opt_log}, "RCVD", "DO", $opt) - if $s->{opt_log}; - } - else { # internal error - die; - } - - ## Save current enabled state. - $was_enabled = $$is_enabled; - - ## Respond to WILL or DO based on the current negotiation state. - if ($$state eq "no") { # they're initiating enable - if ($enable_ok) { # we agree they/us should enable - $$is_enabled = 1; - $$state = "yes"; - - ## Send positive acknowledgment. - $s->{unsent_opts} .= $enable_cmd; - &_log_option($s->{opt_log}, "SENT", $ack, $opt) - if $s->{opt_log}; - - ## Invoke callbacks. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - else { # we disagree they/us should enable - ## Send negative acknowledgment. - $s->{unsent_opts} .= $disable_cmd; - &_log_option($s->{opt_log}, "SENT", $nak, $opt) - if $s->{opt_log}; - } - } - elsif ($$state eq "yes") { # state is already enabled - } - elsif ($$state eq "wantno") { # error: our disable req answered by enable - $$is_enabled = ''; - $$state = "no"; - - ## Invoke callbacks. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantno opposite") { # err: disable req answerd by enable - $$is_enabled = 1; - $$state = "yes"; - - ## Invoke callbacks. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantyes") { # they sent pos ack - $$is_enabled = 1; - $$state = "yes"; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - elsif ($$state eq "wantyes opposite") { # pos ack but we changed our mind - ## Indicate enabled but now we want to disable. - $$is_enabled = 1; - $$state = "wantno"; - - ## Inform other side we changed our mind. - $s->{unsent_opts} .= $disable_cmd; - &_log_option($s->{opt_log}, "SENT", $nak, $opt) - if $s->{opt_log}; - - ## Invoke callback. - &_negotiate_callback($self, $opt, $is_remote, - $$is_enabled, $was_enabled, $opt_bufpos); - } - - 1; -} # end sub _negotiate_recv_enable - - -sub _new_handle { - if ($INC{"IO/Handle.pm"}) { - return IO::Handle->new; - } - else { - require FileHandle; - return FileHandle->new; - } -} # end sub _new_handle - - -sub _next_getlines { - my ($self, $s) = @_; - my ( - $len, - $line, - $pos, - @lines, - ); - - ## Fill buffer and get first line. - $line = $self->getline - or return; - push @lines, $line; - - ## Extract subsequent lines from buffer. - while (($pos = index($s->{buf}, $s->{rs})) != -1) { - $len = $pos + length $s->{rs}; - push @lines, substr($s->{buf}, 0, $len); - substr($s->{buf}, 0, $len) = ""; - } - - @lines; -} # end sub _next_getlines - - -sub _opt_accept { - my ($self, @args) = @_; - my ( - $arg, - $option, - $s, - ); - - ## Init. - $s = *$self->{net_telnet}; - - foreach $arg (@args) { - ## Ensure data structure defined for this option. - $option = $arg->{option}; - if (!defined $s->{opts}{$option}) { - &_set_default_option($s, $option); - } - - ## Save whether we'll accept or reject this option. - if ($arg->{is_remote}) { - $s->{opts}{$option}{remote_enable_ok} = $arg->{is_enable}; - } - else { - $s->{opts}{$option}{local_enable_ok} = $arg->{is_enable}; - } - } - - 1; -} # end sub _opt_accept - - -sub _optimal_blksize { - my ($blksize) = @_; - local $^W = ''; # avoid non-numeric warning for ms-windows blksize of "" - - ## Use default when block size is invalid. - return 8192 - unless defined $blksize and $blksize >= 1 and $blksize <= 1_048_576; - - $blksize; -} # end sub _optimal_blksize - - -sub _parse_cmd_remove_mode { - my ($self, $mode) = @_; - - if (!defined $mode) { - $mode = 0; - } - elsif ($mode =~ /^\s*auto\s*$/i) { - $mode = "auto"; - } - elsif ($mode !~ /^\d+$/) { - &_carp($self, "ignoring bad Cmd_remove_mode " . - "argument \"$mode\": it's not \"auto\" or a " . - "non-negative integer"); - $mode = *$self->{net_telnet}{cmd_rm_mode}; - } - - $mode; -} # end sub _parse_cmd_remove_mode - - -sub _parse_errmode { - my ($self, $errmode) = @_; - - ## Set the error mode. - if (!defined $errmode) { - &_carp($self, "ignoring undefined Errmode argument"); - $errmode = *$self->{net_telnet}{errormode}; - } - elsif ($errmode =~ /^\s*return\s*$/i) { - $errmode = "return"; - } - elsif ($errmode =~ /^\s*die\s*$/i) { - $errmode = "die"; - } - elsif (ref($errmode) eq "CODE") { - } - elsif (ref($errmode) eq "ARRAY") { - unless (ref($errmode->[0]) eq "CODE") { - &_carp($self, "ignoring bad Errmode argument: " . - "first list item isn't a code ref"); - $errmode = *$self->{net_telnet}{errormode}; - } - } - else { - &_carp($self, "ignoring bad Errmode argument \"$errmode\""); - $errmode = *$self->{net_telnet}{errormode}; - } - - $errmode; -} # end sub _parse_errmode - - -sub _parse_input_record_separator { - my ($self, $rs) = @_; - - unless (defined $rs and length $rs) { - &_carp($self, "ignoring null Input_record_separator argument"); - $rs = *$self->{net_telnet}{rs}; - } - - $rs; -} # end sub _parse_input_record_separator - - -sub _parse_prompt { - my ($self, $prompt) = @_; - - unless (defined $prompt) { - $prompt = ""; - } - - unless ($prompt =~ m(^\s*/) or $prompt =~ m(^\s*m\s*\W)) { - &_carp($self, "ignoring bad Prompt argument \"$prompt\": " . - "missing opening delimiter of match operator"); - $prompt = *$self->{net_telnet}{cmd_prompt}; - } - - $prompt; -} # end sub _parse_prompt - - -sub _parse_timeout { - my ($self, $timeout) = @_; - - ## Ensure valid timeout. - if (defined $timeout) { - ## Test for non-numeric or negative values. - eval { - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{"__WARN__"} = sub { die "non-numeric\n" }; - local $^W = 1; - $timeout *= 1; - }; - if ($@) { # timeout arg is non-numeric - &_carp($self, - "ignoring non-numeric Timeout argument \"$timeout\""); - $timeout = *$self->{net_telnet}{time_out}; - } - elsif ($timeout < 0) { # timeout arg is negative - &_carp($self, "ignoring negative Timeout argument \"$timeout\""); - $timeout = *$self->{net_telnet}{time_out}; - } - } - - $timeout; -} # end sub _parse_timeout - - -sub _put { - my ($self, $buf, $subname) = @_; - my ( - $endtime, - $len, - $nfound, - $nwrote, - $offset, - $ready, - $s, - $timed_out, - $timeout, - $zero_wrote_count, - ); - - ## Init. - $s = *$self->{net_telnet}; - $s->{num_wrote} = 0; - $zero_wrote_count = 0; - $offset = 0; - $len = length $$buf; - $endtime = &_endtime($s->{time_out}); - - return $self->error("write error: filehandle isn't open") - unless $s->{opened}; - - ## Try to send any waiting option negotiation. - if (length $s->{unsent_opts}) { - &_flush_opts($self); - } - - ## Write until all data blocks written. - while ($len) { - ## Determine how long to wait for output ready. - ($timed_out, $timeout) = &_timeout_interval($endtime); - if ($timed_out) { - $s->{timedout} = 1; - return $self->error("$subname timed-out"); - } - - ## Wait for output ready. - $nfound = select "", $ready=$s->{fdmask}, "", $timeout; - - ## Handle any errors while waiting. - if (!defined $nfound or $nfound <= 0) { # output not ready - if (defined $nfound and $nfound == 0) { # timed-out - $s->{timedout} = 1; - return $self->error("$subname timed-out"); - } - else { # error waiting for output ready - next if $! =~ /^interrupted/i; - - $s->{opened} = ''; - return $self->error("write error: $!"); - } - } - - ## Write the data. - $nwrote = syswrite $self, $$buf, $len, $offset; - - ## Handle any write errors. - if (!defined $nwrote) { # write failed - next if $! =~ /^interrupted/i; # restart interrupted syscall - - $s->{opened} = ''; - return $self->error("write error: $!"); - } - elsif ($nwrote == 0) { # zero chars written - ## Try ten more times to write the data. - if ($zero_wrote_count++ <= 10) { - &_sleep(0.01); - next; - } - - $s->{opened} = ''; - return $self->error("write error: zero length write: $!"); - } - - ## Display network traffic if requested. - if ($s->{dumplog}) { - &_log_dump('>', $s->{dumplog}, $buf, $offset, $nwrote); - } - - ## Increment. - $s->{num_wrote} += $nwrote; - $offset += $nwrote; - $len -= $nwrote; - } - - 1; -} # end sub _put - - -sub _qualify_fh { - my ($obj, $name) = @_; - my ( - $user_class, - ); - local $_; - - ## Get user's package name. - ($user_class) = &_user_caller($obj); - - ## Ensure name is qualified with a package name. - $name = qualify($name, $user_class); - - ## If it's not already, make it a typeglob ref. - if (!ref $name) { - no strict; - local $^W = 0; - - $name =~ s/^\*+//; - $name = eval "\\*$name"; - return unless ref $name; - } - - $name; -} # end sub _qualify_fh - - -sub _reset_options { - my ($opts) = @_; - my ( - $opt, - ); - - foreach $opt (keys %$opts) { - $opts->{$opt}{remote_enabled} = ''; - $opts->{$opt}{remote_state} = "no"; - $opts->{$opt}{local_enabled} = ''; - $opts->{$opt}{local_state} = "no"; - } - - 1; -} # end sub _reset_options - - -sub _save_lastline { - my ($s) = @_; - my ( - $firstpos, - $lastpos, - $len_w_sep, - $len_wo_sep, - $offset, - ); - my $rs = "\n"; - - if (($lastpos = rindex $s->{buf}, $rs) > -1) { # eol found - while (1) { - ## Find beginning of line. - $firstpos = rindex $s->{buf}, $rs, $lastpos - 1; - if ($firstpos == -1) { - $offset = 0; - } - else { - $offset = $firstpos + length $rs; - } - - ## Determine length of line with and without separator. - $len_wo_sep = $lastpos - $offset; - $len_w_sep = $len_wo_sep + length $rs; - - ## Save line if it's not blank. - if (substr($s->{buf}, $offset, $len_wo_sep) - !~ /^\s*$/) - { - $s->{last_line} = substr($s->{buf}, - $offset, - $len_w_sep); - last; - } - - last if $firstpos == -1; - - $lastpos = $firstpos; - } - } - - 1; -} # end sub _save_lastline - - -sub _set_default_option { - my ($s, $option) = @_; - - $s->{opts}{$option} = { - remote_enabled => '', - remote_state => "no", - remote_enable_ok => '', - local_enabled => '', - local_state => "no", - local_enable_ok => '', - }; -} # end sub _set_default_option - - -sub _sleep { - my ($secs) = @_; - my $bitmask = ""; - local *SOCK; - - socket SOCK, AF_INET, SOCK_STREAM, 0; - vec($bitmask, fileno(SOCK), 1) = 1; - select $bitmask, "", "", $secs; - CORE::close SOCK; - - 1; -} # end sub _sleep - - -sub _timeout_interval { - my ($endtime) = @_; - my ( - $timeout, - ); - - ## Return timed-out boolean and timeout interval. - if (defined $endtime) { - ## Is it a one-time poll. - return ('', 0) if $endtime == 0; - - ## Calculate the timeout interval. - $timeout = $endtime - time; - - ## Did we already timeout. - return (1, 0) unless $timeout > 0; - - return ('', $timeout); - } - else { # there is no timeout - return ('', undef); - } -} # end sub _timeout_interval - - -sub _user_caller { - my ($obj) = @_; - my ( - $class, - $curr_pkg, - $file, - $i, - $line, - $pkg, - %isa, - @isa, - ); - local $_; - - ## Create a boolean hash to test for isa. Make sure current - ## package and the object's class are members. - $class = ref $obj; - @isa = eval "\@${class}::ISA"; - push @isa, $class; - ($curr_pkg) = caller 1; - push @isa, $curr_pkg; - %isa = map { $_ => 1 } @isa; - - ## Search back in call frames for a package that's not in isa. - $i = 1; - while (($pkg, $file, $line) = caller ++$i) { - next if $isa{$pkg}; - - return ($pkg, $file, $line); - } - - ## If not found, choose outer most call frame. - ($pkg, $file, $line) = caller --$i; - return ($pkg, $file, $line); -} # end sub _user_caller - - -sub _verify_telopt_arg { - my ($self, $option, $argname) = @_; - - ## If provided, use argument name in error message. - if (defined $argname) { - $argname = "for arg $argname"; - } - else { - $argname = ""; - } - - ## Ensure telnet option is a non-negative integer. - eval { - local $SIG{"__DIE__"} = "DEFAULT"; - local $SIG{"__WARN__"} = sub { die "non-numeric\n" }; - local $^W = 1; - $option = abs(int $option); - }; - return $self->error("bad telnet option $argname: non-numeric") - if $@; - - return $self->error("bad telnet option $argname: option > 255") - unless $option <= 255; - - $option; -} # end sub _verify_telopt_arg - - -######################## Exported Constants ########################## - - -sub TELNET_IAC () {255}; # interpret as command: -sub TELNET_DONT () {254}; # you are not to use option -sub TELNET_DO () {253}; # please, you use option -sub TELNET_WONT () {252}; # I won't use option -sub TELNET_WILL () {251}; # I will use option -sub TELNET_SB () {250}; # interpret as subnegotiation -sub TELNET_GA () {249}; # you may reverse the line -sub TELNET_EL () {248}; # erase the current line -sub TELNET_EC () {247}; # erase the current character -sub TELNET_AYT () {246}; # are you there -sub TELNET_AO () {245}; # abort output--but let prog finish -sub TELNET_IP () {244}; # interrupt process--permanently -sub TELNET_BREAK () {243}; # break -sub TELNET_DM () {242}; # data mark--for connect. cleaning -sub TELNET_NOP () {241}; # nop -sub TELNET_SE () {240}; # end sub negotiation -sub TELNET_EOR () {239}; # end of record (transparent mode) -sub TELNET_ABORT () {238}; # Abort process -sub TELNET_SUSP () {237}; # Suspend process -sub TELNET_EOF () {236}; # End of file -sub TELNET_SYNCH () {242}; # for telfunc calls - -sub TELOPT_BINARY () {0}; # Binary Transmission -sub TELOPT_ECHO () {1}; # Echo -sub TELOPT_RCP () {2}; # Reconnection -sub TELOPT_SGA () {3}; # Suppress Go Ahead -sub TELOPT_NAMS () {4}; # Approx Message Size Negotiation -sub TELOPT_STATUS () {5}; # Status -sub TELOPT_TM () {6}; # Timing Mark -sub TELOPT_RCTE () {7}; # Remote Controlled Trans and Echo -sub TELOPT_NAOL () {8}; # Output Line Width -sub TELOPT_NAOP () {9}; # Output Page Size -sub TELOPT_NAOCRD () {10}; # Output Carriage-Return Disposition -sub TELOPT_NAOHTS () {11}; # Output Horizontal Tab Stops -sub TELOPT_NAOHTD () {12}; # Output Horizontal Tab Disposition -sub TELOPT_NAOFFD () {13}; # Output Formfeed Disposition -sub TELOPT_NAOVTS () {14}; # Output Vertical Tabstops -sub TELOPT_NAOVTD () {15}; # Output Vertical Tab Disposition -sub TELOPT_NAOLFD () {16}; # Output Linefeed Disposition -sub TELOPT_XASCII () {17}; # Extended ASCII -sub TELOPT_LOGOUT () {18}; # Logout -sub TELOPT_BM () {19}; # Byte Macro -sub TELOPT_DET () {20}; # Data Entry Terminal -sub TELOPT_SUPDUP () {21}; # SUPDUP -sub TELOPT_SUPDUPOUTPUT () {22}; # SUPDUP Output -sub TELOPT_SNDLOC () {23}; # Send Location -sub TELOPT_TTYPE () {24}; # Terminal Type -sub TELOPT_EOR () {25}; # End of Record -sub TELOPT_TUID () {26}; # TACACS User Identification -sub TELOPT_OUTMRK () {27}; # Output Marking -sub TELOPT_TTYLOC () {28}; # Terminal Location Number -sub TELOPT_3270REGIME () {29}; # Telnet 3270 Regime -sub TELOPT_X3PAD () {30}; # X.3 PAD -sub TELOPT_NAWS () {31}; # Negotiate About Window Size -sub TELOPT_TSPEED () {32}; # Terminal Speed -sub TELOPT_LFLOW () {33}; # Remote Flow Control -sub TELOPT_LINEMODE () {34}; # Linemode -sub TELOPT_XDISPLOC () {35}; # X Display Location -sub TELOPT_OLD_ENVIRON () {36}; # Environment Option -sub TELOPT_AUTHENTICATION () {37}; # Authentication Option -sub TELOPT_ENCRYPT () {38}; # Encryption Option -sub TELOPT_NEW_ENVIRON () {39}; # New Environment Option -sub TELOPT_EXOPL () {255}; # Extended-Options-List - - -1; -__END__; - - -######################## User Documentation ########################## - - -## To format the following documentation into a more readable format, -## use one of these programs: perldoc; pod2man; pod2html; pod2text. -## For example, to nicely format this documentation for printing, you -## may use pod2man and groff to convert to postscript: -## pod2man Net/Telnet.pm | groff -man -Tps > Net::Telnet.ps - -=head1 NAME - -Net::Telnet - interact with TELNET port or other TCP ports - -=head1 SYNOPSIS - -C - -see METHODS section below - -=head1 DESCRIPTION - -Net::Telnet allows you to make client connections to a TCP port and do -network I/O, especially to a port using the TELNET protocol. Simple -I/O methods such as print, get, and getline are provided. More -sophisticated interactive features are provided because connecting to -a TELNET port ultimately means communicating with a program designed -for human interaction. These interactive features include the ability -to specify a time-out and to wait for patterns to appear in the input -stream, such as the prompt from a shell. - -Other reasons to use this module than strictly with a TELNET port are: - -=over 2 - -=item * - -You're not familiar with sockets and you want a simple way to make -client connections to TCP services. - -=item * - -You want to be able to specify your own time-out while connecting, -reading, or writing. - -=item * - -You're communicating with an interactive program at the other end of -some socket or pipe and you want to wait for certain patterns to -appear. - -=back - -Here's an example that prints who's logged-on to the remote host -sparky. In addition to a username and password, you must also know -the user's shell prompt, which for this example is C - - use Net::Telnet (); - $t = new Net::Telnet (Timeout => 10, - Prompt => '/bash\$ $/'); - $t->open("sparky"); - $t->login($username, $passwd); - @lines = $t->cmd("who"); - print @lines; - -More examples are in the B section below. - -Usage questions should be directed to the Usenet newsgroup -comp.lang.perl.modules. - -Contact me, Jay Rogers , if you find any bugs or have -suggestions for improvement. - -=head2 What To Know Before Using - -=over 2 - -=item * - -All output is flushed while all input is buffered. Each object -contains its own input buffer. - -=item * - -The output record separator for C and C is set to -C<"\n"> by default, so that you don't have to append all your commands -with a newline. To avoid printing a trailing C<"\n"> use C or -set the I to C<"">. - -=item * - -The methods C and C use the I setting in the -object to determine when a login or remote command is complete. Those -methods will fail with a time-out if you don't set the prompt -correctly. - -=item * - -Use a combination of C and C as an alternative to -C or C when they don't do what you want. - -=item * - -Errors such as timing-out are handled according to the error mode -action. The default action is to print an error message to standard -error and have the program die. See the C method for more -information. - -=item * - -When constructing the match operator argument for C or -C, always use single quotes instead of double quotes to -avoid unexpected backslash interpretation (e.g. C<'/bash\$ $/'>). If -you're constructing a DOS like file path, you'll need to use four -backslashes to represent one (e.g. C<'/c:\\\\users\\\\billE$/i'>). - -Of course don't forget about regexp metacharacters like C<.>, C<[>, or -C<$>. You'll only need a single backslash to quote them. The anchor -metacharacters C<^> and C<$> refer to positions in the input buffer. -To avoid matching characters read that look like a prompt, it's a good -idea to end your prompt pattern with the C<$> anchor. That way the -prompt will only match if it's the last thing read. - -=item * - -In the input stream, each sequence of I and I (i.e. C<"\015\012"> or CR LF) is converted to C<"\n">. In the -output stream, each occurrence of C<"\n"> is converted to a sequence -of CR LF. See C to change the behavior. TCP protocols -typically use the ASCII sequence, carriage return and line feed to -designate a newline. - -=item * - -Timing-out while making a connection is disabled for machines that -don't support the C function. Most notably these include -MS-Windows machines. - -=item * - -You'll need to be running at least Perl version 5.002 to use this -module. This module does not require any libraries that don't already -come with a standard Perl distribution. - -If you have the IO:: libraries installed (they come standard with -perl5.004 and later) then IO::Socket::INET is used as a base class, -otherwise FileHandle is used. - -=item * - -Contact me, Jay Rogers , if you find any bugs or have -suggestions for improvement. - -=back - -=head2 Debugging - -The typical usage bug causes a time-out error because you've made -incorrect assumptions about what the remote side actually sends. The -easiest way to reconcile what the remote side sends with your -expectations is to use C or C. - -C allows you to see the data being sent from the remote -side before any translation is done, while C shows you -the results after translation. The translation includes converting -end of line characters, removing and responding to TELNET protocol -commands in the data stream. - -=head2 Style of Named Parameters - -Two different styles of named parameters are supported. This document -only shows the IO:: style: - - Net::Telnet->new(Timeout => 20); - -however the dash-option style is also allowed: - - Net::Telnet->new(-timeout => 20); - -=head2 Connecting to a Remote MS-Windows Machine - -By default MS-Windows doesn't come with a TELNET server. However -third party TELNET servers are available. Unfortunately many of these -servers falsely claim to be a TELNET server. This is especially true -of the so-called "Microsoft Telnet Server" that comes installed with -some newer versions MS-Windows. - -When a TELNET server first accepts a connection, it must use the ASCII -control characters carriage-return and line-feed to start a new line -(see RFC854). A server like the "Microsoft Telnet Server" that -doesn't do this, isn't a TELNET server. These servers send ANSI -terminal escape sequences to position to a column on a subsequent line -and to even position while writing characters that are adjacent to -each other. Worse, when sending output these servers resend -previously sent command output in a misguided attempt to display an -entire terminal screen. - -Connecting Net::Telnet to one of these false TELNET servers makes your -job of parsing command output very difficult. It's better to replace -a false TELNET server with a real TELNET server. The better TELNET -servers for MS-Windows allow you to avoid the ANSI escapes by turning -off something some of them call I. - - -=head1 METHODS - -In the calling sequences below, square brackets B<[]> represent -optional parameters. - -=over 4 - -=item B - create a new Net::Telnet object - - $obj = new Net::Telnet ([$host]); - - $obj = new Net::Telnet ([Binmode => $mode,] - [Cmd_remove_mode => $mode,] - [Dump_Log => $filename,] - [Errmode => $errmode,] - [Fhopen => $filehandle,] - [Host => $host,] - [Input_log => $file,] - [Input_record_separator => $chars,] - [Option_log => $file,] - [Ors => $chars,] - [Output_log => $file,] - [Output_record_separator => $chars,] - [Port => $port,] - [Prompt => $matchop,] - [Rs => $chars,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This is the constructor for Net::Telnet objects. A new object is -returned on success, the error mode action is performed on failure - -see C. The optional arguments are short-cuts to methods of -the same name. - -If the I<$host> argument is given then the object is opened by -connecting to TCP I<$port> on I<$host>. Also see C. The new -object returned is given the following defaults in the absence of -corresponding named parameters: - -=over 4 - -=item - -The default I is C<"localhost"> - -=item - -The default I is C<23> - -=item - -The default I is C<'/[\$%#E] $/'> - -=item - -The default I is C<10> - -=item - -The default I is C<"die"> - -=item - -The default I is C<"\n">. Note that I -is synonymous with I. - -=item - -The default I is C<"\n">. Note that I is -synonymous with I. - -=item - -The default I is C<0>, which means do newline translation. - -=item - -The default I is C<1>, which means respond to TELNET -commands in the data stream. - -=item - -The default I is C<"auto"> - -=item - -The defaults for I, I, I, and -I are C<"">, which means that logging is turned-off. - -=back - -=back - - -=over 4 - -=item B - toggle newline translation - - $mode = $obj->binmode; - - $prev = $obj->binmode($mode); - -This method controls whether or not sequences of carriage returns and -line feeds (CR LF or more specifically C<"\015\012">) are translated. -By default they are translated (i.e. binmode is C<0>). - -If no argument is given, the current mode is returned. - -If I<$mode> is C<1> then binmode is I and newline translation is -not done. - -If I<$mode> is C<0> then binmode is I and newline translation is -done. In the input stream, each sequence of CR LF is converted to -C<"\n"> and in the output stream, each occurrence of C<"\n"> is -converted to a sequence of CR LF. - -Note that input is always buffered. Changing binmode doesn't effect -what's already been read into the buffer. Output is not buffered and -changing binmode will have an immediate effect. - -=back - - -=over 4 - -=item B - send TELNET break character - - $ok = $obj->break; - -This method sends the TELNET break character. This character is -provided because it's a signal outside the ASCII character set which -is currently given local meaning within many systems. It's intended -to indicate that the Break Key or the Attention Key was hit. - -This method returns C<1> on success, or performs the error mode action -on failure. - -=back - - -=over 4 - -=item B - scalar reference to object's input buffer - - $ref = $obj->buffer; - -This method returns a scalar reference to the input buffer for -I<$obj>. Data in the input buffer is data that has been read from the -remote side but has yet to be read by the user. Modifications to the -input buffer are returned by a subsequent read. - -=back - - -=over 4 - -=item B - discard all data in object's input buffer - - $obj->buffer_empty; - -This method removes all data in the input buffer for I<$obj>. - -=back - - -=over 4 - -=item B - close object - - $ok = $obj->close; - -This method closes the socket, file, or pipe associated with the -object. It always returns a value of C<1>. - -=back - - -=over 4 - -=item B - issue command and retrieve output - - $ok = $obj->cmd($string); - $ok = $obj->cmd(String => $string, - [Output => $ref,] - [Cmd_remove_mode => $mode,] - [Errmode => $mode,] - [Input_record_separator => $chars,] - [Ors => $chars,] - [Output_record_separator => $chars,] - [Prompt => $match,] - [Rs => $chars,] - [Timeout => $secs,]); - - @output = $obj->cmd($string); - @output = $obj->cmd(String => $string, - [Output => $ref,] - [Cmd_remove_mode => $mode,] - [Errmode => $mode,] - [Input_record_separator => $chars,] - [Ors => $chars,] - [Output_record_separator => $chars,] - [Prompt => $match,] - [Rs => $chars,] - [Timeout => $secs,]); - -This method sends the command I<$string>, and reads the characters -sent back by the command up until and including the matching prompt. -It's assumed that the program to which you're sending is some kind of -command prompting interpreter such as a shell. - -The command I<$string> is automatically appended with the -output_record_separator, By default that's C<"\n">. This is similar -to someone typing a command and hitting the return key. Set the -output_record_separator to change this behavior. - -In a scalar context, the characters read from the remote side are -discarded and C<1> is returned on success. On time-out, eof, or other -failures, the error mode action is performed. See C. - -In a list context, just the output generated by the command is -returned, one line per element. In other words, all the characters in -between the echoed back command string and the prompt are returned. -If the command happens to return no output, a list containing one -element, the empty string is returned. This is so the list will -indicate true in a boolean context. On time-out, eof, or other -failures, the error mode action is performed. See C. - -The characters that matched the prompt may be retrieved using -C. - -Many command interpreters echo back the command sent. In most -situations, this method removes the first line returned from the -remote side (i.e. the echoed back command). See C -for more control over this feature. - -Use C to debug when this method keeps timing-out and you -don't think it should. - -Consider using a combination of C and C as an -alternative to this method when it doesn't do what you want, e.g. the -command you send prompts for input. - -The I named parameter provides an alternative method of -receiving command output. If you pass a scalar reference, all the -output (even if it contains multiple lines) is returned in the -referenced scalar. If you pass an array or hash reference, the lines -of output are returned in the referenced array or hash. You can use -C to change the notion of what separates a -line. - -Optional named parameters are provided to override the current -settings of cmd_remove_mode, errmode, input_record_separator, ors, -output_record_separator, prompt, rs, and timeout. Rs is synonymous -with input_record_separator and ors is synonymous with -output_record_separator. - -=back - - -=over 4 - -=item B - toggle removal of echoed commands - - $mode = $obj->cmd_remove_mode; - - $prev = $obj->cmd_remove_mode($mode); - -This method controls how to deal with echoed back commands in the -output returned by cmd(). Typically, when you send a command to the -remote side, the first line of output returned is the command echoed -back. Use this mode to remove the first line of output normally -returned by cmd(). - -If no argument is given, the current mode is returned. - -If I<$mode> is C<0> then the command output returned from cmd() has no -lines removed. If I<$mode> is a positive integer, then the first -I<$mode> lines of command output are stripped. - -By default, I<$mode> is set to C<"auto">. Auto means that whether or -not the first line of command output is stripped, depends on whether -or not the remote side offered to echo. By default, Net::Telnet -always accepts an offer to echo by the remote side. You can change -the default to reject such an offer using C. - -A warning is printed to STDERR when attempting to set this attribute -to something that's not C<"auto"> or a non-negative integer. - -=back - - -=over 4 - -=item B - log all I/O in dump format - - $fh = $obj->dump_log; - - $fh = $obj->dump_log($fh); - - $fh = $obj->dump_log($filename); - -This method starts or stops dump format logging of all the object's -input and output. The dump format shows the blocks read and written -in a hexadecimal and printable character format. This method is -useful when debugging, however you might want to first try -C as it's more readable. - -If no argument is given, the current log filehandle is returned. An -empty string indicates logging is off. - -To stop logging, use an empty string as an argument. - -If an open filehandle is given, it is used for logging and returned. -Otherwise, the argument is assumed to be the name of a file, the file -is opened and a filehandle to it is returned. If the file can't be -opened for writing, the error mode action is performed. - -=back - - -=over 4 - -=item B - end of file indicator - - $eof = $obj->eof; - -This method returns C<1> if end of file has been read, otherwise it -returns an empty string. Because the input is buffered this isn't the -same thing as I<$obj> has closed. In other words I<$obj> can be -closed but there still can be stuff in the buffer to be read. Under -this condition you can still read but you won't be able to write. - -=back - - -=over 4 - -=item B - define action to be performed on error - - $mode = $obj->errmode; - - $prev = $obj->errmode($mode); - -This method gets or sets the action used when errors are encountered -using the object. The first calling sequence returns the current -error mode. The second calling sequence sets it to I<$mode> and -returns the previous mode. Valid values for I<$mode> are C<"die"> -(the default), C<"return">, a I, or an I. - -When mode is C<"die"> and an error is encountered using the object, -then an error message is printed to standard error and the program -dies. - -When mode is C<"return"> then the method generating the error places -an error message in the object and returns an undefined value in a -scalar context and an empty list in list context. The error message -may be obtained using C. - -When mode is a I, then when an error is encountered -I is called with the error message as its first argument. -Using this mode you may have your own subroutine handle errors. If -I itself returns then the method generating the error returns -undefined or an empty list depending on context. - -When mode is an I, the first element of the array must be a -I. Any elements that follow are the arguments to I. -When an error is encountered, the I is called with its -arguments. Using this mode you may have your own subroutine handle -errors. If the I itself returns then the method generating -the error returns undefined or an empty list depending on context. - -A warning is printed to STDERR when attempting to set this attribute -to something that's not C<"die">, C<"return">, a I, or an -I whose first element isn't a I. - -=back - - -=over 4 - -=item B - most recent error message - - $msg = $obj->errmsg; - - $prev = $obj->errmsg(@msgs); - -The first calling sequence returns the error message associated with -the object. The empty string is returned if no error has been -encountered yet. The second calling sequence sets the error message -for the object to the concatenation of I<@msgs> and returns the -previous error message. Normally, error messages are set internally -by a method when an error is encountered. - -=back - - -=over 4 - -=item B - perform the error mode action - - $obj->error(@msgs); - -This method concatenates I<@msgs> into a string and places it in the -object as the error message. Also see C. It then performs -the error mode action. Also see C. - -If the error mode doesn't cause the program to die, then an undefined -value or an empty list is returned depending on the context. - -This method is primarily used by this class or a sub-class to perform -the user requested action when an error is encountered. - -=back - - -=over 4 - -=item B - use already open filehandle for I/O - - $ok = $obj->fhopen($fh); - -This method associates the open filehandle I<$fh> with I<$obj> for -further I/O. Filehandle I<$fh> must already be opened. - -Suppose you want to use the features of this module to do I/O to -something other than a TCP port, for example STDIN or a filehandle -opened to read from a process. Instead of opening the object for I/O -to a TCP port by using C or C, call this method -instead. - -The value C<1> is returned success, the error mode action is performed -on failure. - -=back - - -=over 4 - -=item B - read block of data - - $data = $obj->get([Binmode => $mode,] - [Errmode => $errmode,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This method reads a block of data from the object and returns it along -with any buffered data. If no buffered data is available to return, -it will wait for data to read using the timeout specified in the -object. You can override that timeout using I<$secs>. Also see -C. If buffered data is available to return, it also checks -for a block of data that can be immediately read. - -On eof an undefined value is returned. On time-out or other failures, -the error mode action is performed. To distinguish between eof or an -error occurring when the error mode is not set to C<"die">, use -C. - -Optional named parameters are provided to override the current -settings of binmode, errmode, telnetmode, and timeout. - -=back - - -=over 4 - -=item B - read next line - - $line = $obj->getline([Binmode => $mode,] - [Errmode => $errmode,] - [Input_record_separator => $chars,] - [Rs => $chars,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This method reads and returns the next line of data from the object. -You can use C to change the notion of what -separates a line. The default is C<"\n">. If a line isn't -immediately available, this method blocks waiting for a line or a -time-out. - -On eof an undefined value is returned. On time-out or other failures, -the error mode action is performed. To distinguish between eof or an -error occurring when the error mode is not set to C<"die">, use -C. - -Optional named parameters are provided to override the current -settings of binmode, errmode, input_record_separator, rs, telnetmode, -and timeout. Rs is synonymous with input_record_separator. - -=back - - -=over 4 - -=item B - read next lines - - @lines = $obj->getlines([Binmode => $mode,] - [Errmode => $errmode,] - [Input_record_separator => $chars,] - [Rs => $chars,] - [Telnetmode => $mode,] - [Timeout => $secs,] - [All => $boolean,]); - -This method reads and returns all the lines of data from the object -until end of file is read. You can use C to -change the notion of what separates a line. The default is C<"\n">. -A time-out error occurs if all the lines can't be read within the -time-out interval. See C. - -The behavior of this method was changed in version 3.03. Prior to -version 3.03 this method returned just the lines available from the -next read. To get that old behavior, use the optional named parameter -I and set I<$boolean> to C<""> or C<0>. - -If only eof is read then an empty list is returned. On time-out or -other failures, the error mode action is performed. Use C to -distinguish between reading only eof or an error occurring when the -error mode is not set to C<"die">. - -Optional named parameters are provided to override the current -settings of binmode, errmode, input_record_separator, rs, telnetmode, -and timeout. Rs is synonymous with input_record_separator. - -=back - - -=over 4 - -=item B - name of remote host - - $host = $obj->host; - - $prev = $obj->host($host); - -This method designates the remote host for C. With no -argument it returns the current host name set in the object. With an -argument it sets the current host name to I<$host> and returns the -previous host name. You may indicate the remote host using either a -hostname or an IP address. - -The default value is C<"localhost">. It may also be set by C -or C. - -=back - - -=over 4 - -=item B - log all input - - $fh = $obj->input_log; - - $fh = $obj->input_log($fh); - - $fh = $obj->input_log($filename); - -This method starts or stops logging of input. This is useful when -debugging. Also see C. Because most command interpreters -echo back commands received, it's likely all your output will also be -in this log. Note that input logging occurs after newline -translation. See C for details on newline translation. - -If no argument is given, the log filehandle is returned. An empty -string indicates logging is off. - -To stop logging, use an empty string as an argument. - -If an open filehandle is given, it is used for logging and returned. -Otherwise, the argument is assumed to be the name of a file, the file -is opened for logging and a filehandle to it is returned. If the file -can't be opened for writing, the error mode action is performed. - -=back - - -=over 4 - -=item B - input line delimiter - - $chars = $obj->input_record_separator; - - $prev = $obj->input_record_separator($chars); - -This method designates the line delimiter for input. It's used with -C, C, and C to determine lines in the -input. - -With no argument this method returns the current input record -separator set in the object. With an argument it sets the input -record separator to I<$chars> and returns the previous value. Note -that I<$chars> must have length. - -A warning is printed to STDERR when attempting to set this attribute -to a string with no length. - -=back - - -=over 4 - -=item B - last prompt read - - $string = $obj->last_prompt; - - $prev = $obj->last_prompt($string); - -With no argument this method returns the last prompt read by cmd() or -login(). See C. With an argument it sets the last prompt -read to I<$string> and returns the previous value. Normally, only -internal methods set the last prompt. - -=back - - -=over 4 - -=item B - last line read - - $line = $obj->lastline; - - $prev = $obj->lastline($line); - -This method retrieves the last line read from the object. This may be -a useful error message when the remote side abnormally closes the -connection. Typically the remote side will print an error message -before closing. - -With no argument this method returns the last line read from the -object. With an argument it sets the last line read to I<$line> and -returns the previous value. Normally, only internal methods set the -last line. - -=back - - -=over 4 - -=item B - perform standard login - - $ok = $obj->login($username, $password); - - $ok = $obj->login(Name => $username, - Password => $password, - [Errmode => $mode,] - [Prompt => $match,] - [Timeout => $secs,]); - -This method performs a standard login by waiting for a login prompt -and responding with I<$username>, then waiting for the password prompt -and responding with I<$password>, and then waiting for the command -interpreter prompt. If any of those prompts sent by the remote side -don't match what's expected, this method will time-out, unless timeout -is turned off. - -Login prompt must match either of these case insensitive patterns: - - /login[: ]*$/i - /username[: ]*$/i - -Password prompt must match this case insensitive pattern: - - /password[: ]*$/i - -The command interpreter prompt must match the current setting of -prompt. See C. - -Use C to debug when this method keeps timing-out and you -don't think it should. - -Consider using a combination of C and C as an -alternative to this method when it doesn't do what you want, e.g. the -remote host doesn't prompt for a username. - -On success, C<1> is returned. On time out, eof, or other failures, -the error mode action is performed. See C. - -Optional named parameters are provided to override the current -settings of errmode, prompt, and timeout. - -=back - - -=over 4 - -=item B - maximum size of input buffer - - $len = $obj->max_buffer_length; - - $prev = $obj->max_buffer_length($len); - -This method designates the maximum size of the input buffer. An error -is generated when a read causes the buffer to exceed this limit. The -default value is 1,048,576 bytes (1MB). The input buffer can grow -much larger than the block size when you continuously read using -C or C and the data stream contains no newlines -or matching waitfor patterns. - -With no argument, this method returns the current maximum buffer -length set in the object. With an argument it sets the maximum buffer -length to I<$len> and returns the previous value. Values of I<$len> -smaller than 512 will be adjusted to 512. - -A warning is printed to STDERR when attempting to set this attribute -to something that isn't a positive integer. - -=back - - -=over 4 - -=item B - field separator for print - - $chars = $obj->ofs - - $prev = $obj->ofs($chars); - -This method is synonymous with C. - -=back - - -=over 4 - -=item B - connect to port on remote host - - $ok = $obj->open($host); - - $ok = $obj->open([Host => $host,] - [Port => $port,] - [Errmode => $mode,] - [Timeout => $secs,]); - -This method opens a TCP connection to I<$port> on I<$host>. If either -argument is missing then the current value of C or C -is used. Optional named parameters are provided to override the -current setting of errmode and timeout. - -On success C<1> is returned. On time-out or other connection -failures, the error mode action is performed. See C. - -Time-outs don't work for this method on machines that don't implement -SIGALRM - most notably MS-Windows machines. For those machines, an -error is returned when the system reaches its own time-out while -trying to connect. - -A side effect of this method is to reset the alarm interval associated -with SIGALRM. - -=back - - -=over 4 - -=item B - indicate willingness to accept a TELNET option - - $fh = $obj->option_accept([Do => $telopt,] - [Dont => $telopt,] - [Will => $telopt,] - [Wont => $telopt,]); - -This method is used to indicate whether to accept or reject an offer -to enable a TELNET option made by the remote side. If you're using -I or I to indicate a willingness to enable, then a -notification callback must have already been defined by a prior call -to C. See C for details on -receiving enable/disable notification of a TELNET option. - -You can give multiple I, I, I, or I arguments -for different TELNET options in the same call to this method. - -The following example describes the meaning of the named parameters. -A TELNET option, such as C used below, is an integer -constant that you can import from Net::Telnet. See the source in file -Telnet.pm for the complete list. - -=over 4 - -=item - -I => C - -=over 4 - -=item - -we'll accept an offer to enable the echo option on the local side - -=back - -=item - -I => C - -=over 4 - -=item - -we'll reject an offer to enable the echo option on the local side - -=back - -=item - -I => C - -=over 4 - -=item - -we'll accept an offer to enable the echo option on the remote side - -=back - -=item - -I => C - -=over 4 - -=item - -we'll reject an offer to enable the echo option on the remote side - -=back - -=back - -=item - -Use C to send a request to the remote side to enable or -disable a particular TELNET option. - -=back - - -=over 4 - -=item B - define the option negotiation callback - - $coderef = $obj->option_callback; - - $prev = $obj->option_callback($coderef); - -This method defines the callback subroutine that's called when a -TELNET option is enabled or disabled. Once defined, the -I may not be undefined. However, calling this method -with a different I<$coderef> changes it. - -A warning is printed to STDERR when attempting to set this attribute -to something that isn't a coderef. - -Here are the circumstances that invoke I<$coderef>: - -=over 4 - -=item - -An option becomes enabled because the remote side requested an enable -and C had been used to arrange that it be accepted. - -=item - -The remote side arbitrarily decides to disable an option that is -currently enabled. Note that Net::Telnet always accepts a request to -disable from the remote side. - -=item - -C was used to send a request to enable or disable an -option and the response from the remote side has just been received. -Note, that if a request to enable is rejected then I<$coderef> is -still invoked even though the option didn't change. - -=back - -=item - -Here are the arguments passed to I<&$coderef>: - - &$coderef($obj, $option, $is_remote, - $is_enabled, $was_enabled, $buf_position); - -=over 4 - -=item - -1. I<$obj> is the Net::Telnet object - -=item - -2. I<$option> is the TELNET option. Net::Telnet exports constants -for the various TELNET options which just equate to an integer. - -=item - -3. I<$is_remote> is a boolean indicating for which side the option -applies. - -=item - -4. I<$is_enabled> is a boolean indicating the option is enabled or -disabled - -=item - -5. I<$was_enabled> is a boolean indicating the option was previously -enabled or disabled - -=item - -6. I<$buf_position> is an integer indicating the position in the -object's input buffer where the option takes effect. See C -to access the object's input buffer. - -=back - -=back - - -=over 4 - -=item B - log all TELNET options sent or received - - $fh = $obj->option_log; - - $fh = $obj->option_log($fh); - - $fh = $obj->option_log($filename); - -This method starts or stops logging of all TELNET options being sent -or received. This is useful for debugging when you send options via -C or you arrange to accept option requests from the -remote side via C. Also see C. - -If no argument is given, the log filehandle is returned. An empty -string indicates logging is off. - -To stop logging, use an empty string as an argument. - -If an open filehandle is given, it is used for logging and returned. -Otherwise, the argument is assumed to be the name of a file, the file -is opened for logging and a filehandle to it is returned. If the file -can't be opened for writing, the error mode action is performed. - -=back - - -=over 4 - -=item B - send TELNET option negotiation request - - $ok = $obj->option_send([Do => $telopt,] - [Dont => $telopt,] - [Will => $telopt,] - [Wont => $telopt,] - [Async => $boolean,]); - -This method is not yet implemented. Look for it in a future version. - -=back - - -=over 4 - -=item B - get current state of a TELNET option - - $hashref = $obj->option_state($telopt); - -This method returns a hashref containing a copy of the current state -of TELNET option I<$telopt>. - -Here are the values returned in the hash: - -=over 4 - -=item - -I<$hashref>->{remote_enabled} - -=over 4 - -=item - -boolean that indicates if the option is enabled on the remote side. - -=back - -=item - -I<$hashref>->{remote_enable_ok} - -=over 4 - -=item - -boolean that indicates if it's ok to accept an offer to enable this -option on the remote side. - -=back - -=item - -I<$hashref>->{remote_state} - -=over 4 - -=item - -string used to hold the internal state of option negotiation for this -option on the remote side. - -=back - -=item - -I<$hashref>->{local_enabled} - -=over 4 - -=item - -boolean that indicates if the option is enabled on the local side. - -=back - -=item - -I<$hashref>->{local_enable_ok} - -=over 4 - -=item - -boolean that indicates if it's ok to accept an offer to enable this -option on the local side. - -=back - -=item - -I<$hashref>->{local_state} - -=over 4 - -=item - -string used to hold the internal state of option negotiation for this -option on the local side. - -=back - -=back - -=back - - -=over 4 - -=item B - output line delimiter - - $chars = $obj->ors; - - $prev = $obj->ors($chars); - -This method is synonymous with C. - -=back - - -=over 4 - -=item B - field separator for print - - $chars = $obj->output_field_separator; - - $prev = $obj->output_field_separator($chars); - -This method designates the output field separator for C. -Ordinarily the print method simply prints out the comma separated -fields you specify. Set this to specify what's printed between -fields. - -With no argument this method returns the current output field -separator set in the object. With an argument it sets the output -field separator to I<$chars> and returns the previous value. - -By default it's set to an empty string. - -=back - - -=over 4 - -=item B - log all output - - $fh = $obj->output_log; - - $fh = $obj->output_log($fh); - - $fh = $obj->output_log($filename); - -This method starts or stops logging of output. This is useful when -debugging. Also see C. Because most command interpreters -echo back commands received, it's likely all your output would also be -in an input log. See C. Note that output logging occurs -before newline translation. See C for details on newline -translation. - -If no argument is given, the log filehandle is returned. An empty -string indicates logging is off. - -To stop logging, use an empty string as an argument. - -If an open filehandle is given, it is used for logging and returned. -Otherwise, the argument is assumed to be the name of a file, the file -is opened for logging and a filehandle to it is returned. If the file -can't be opened for writing, the error mode action is performed. - -=back - - -=over 4 - -=item B - output line delimiter - - $chars = $obj->output_record_separator; - - $prev = $obj->output_record_separator($chars); - -This method designates the output line delimiter for C and -C. Set this to specify what's printed at the end of C -and C. - -The output record separator is set to C<"\n"> by default, so there's -no need to append all your commands with a newline. To avoid printing -the output_record_separator use C or set the -output_record_separator to an empty string. - -With no argument this method returns the current output record -separator set in the object. With an argument it sets the output -record separator to I<$chars> and returns the previous value. - -=back - - -=over 4 - -=item B - remote port - - $port = $obj->port; - - $prev = $obj->port($port); - -This method designates the remote TCP port. With no argument this -method returns the current port number. With an argument it sets the -current port number to I<$port> and returns the previous port. If -I<$port> is a TCP service name, then it's first converted to a port -number using the perl function C. - -The default value is C<23>. It may also be set by C or -C. - -A warning is printed to STDERR when attempting to set this attribute -to something that's not a positive integer or a valid TCP service -name. - -=back - - -=over 4 - -=item B - write to object - - $ok = $obj->print(@list); - -This method writes I<@list> followed by the I -to the open object and returns C<1> if all data was successfully -written. On time-out or other failures, the error mode action is -performed. See C. - -By default, the C is set to C<"\n"> so all -your commands automatically end with a newline. In most cases your -output is being read by a command interpreter which won't accept a -command until newline is read. This is similar to someone typing a -command and hitting the return key. To avoid printing a trailing -C<"\n"> use C instead or set the output_record_separator to an -empty string. - -On failure, it's possible that some data was written. If you choose -to try and recover from a print timing-out, use C to -determine how much was written before the error occurred. - -You may also use the output field separator to print a string between -the list elements. See C. - -=back - - -=over 4 - -=item B - number of bytes written by print - - $num = $obj->print_length; - -This returns the number of bytes successfully written by the most -recent C or C. - -=back - - -=over 4 - -=item B - pattern to match a prompt - - $matchop = $obj->prompt; - - $prev = $obj->prompt($matchop); - -This method sets the pattern used to find a prompt in the input -stream. It must be a string representing a valid perl pattern match -operator. The methods C and C try to read until -matching the prompt. They will fail with a time-out error if the -pattern you've chosen doesn't match what the remote side sends. - -With no argument this method returns the prompt set in the object. -With an argument it sets the prompt to I<$matchop> and returns the -previous value. - -The default prompt is C<'/[\$%#E] $/'> - -Always use single quotes, instead of double quotes, to construct -I<$matchop> (e.g. C<'/bash\$ $/'>). If you're constructing a DOS like -file path, you'll need to use four backslashes to represent one -(e.g. C<'/c:\\\\users\\\\billE$/i'>). - -Of course don't forget about regexp metacharacters like C<.>, C<[>, or -C<$>. You'll only need a single backslash to quote them. The anchor -metacharacters C<^> and C<$> refer to positions in the input buffer. - -A warning is printed to STDERR when attempting to set this attribute -with a match operator missing its opening delimiter. - -=back - - -=over 4 - -=item B - write to object - - $ok = $obj->put($string); - - $ok = $obj->put(String => $string, - [Binmode => $mode,] - [Errmode => $errmode,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This method writes I<$string> to the opened object and returns C<1> if -all data was successfully written. This method is like C -except that it doesn't write the trailing output_record_separator -("\n" by default). On time-out or other failures, the error mode -action is performed. See C. - -On failure, it's possible that some data was written. If you choose -to try and recover from a put timing-out, use C to -determine how much was written before the error occurred. - -Optional named parameters are provided to override the current -settings of binmode, errmode, telnetmode, and timeout. - -=back - - -=over 4 - -=item B - input line delimiter - - $chars = $obj->rs; - - $prev = $obj->rs($chars); - -This method is synonymous with C. - -=back - - -=over 4 - -=item B - turn off/on telnet command interpretation - - $mode = $obj->telnetmode; - - $prev = $obj->telnetmode($mode); - -This method controls whether or not TELNET commands in the data stream -are recognized and handled. The TELNET protocol uses certain -character sequences sent in the data stream to control the session. -If the port you're connecting to isn't using the TELNET protocol, then -you should turn this mode off. The default is I. - -If no argument is given, the current mode is returned. - -If I<$mode> is C<0> then telnet mode is off. If I<$mode> is C<1> then -telnet mode is on. - -=back - - -=over 4 - -=item B - time-out indicator - - $boolean = $obj->timed_out; - - $prev = $obj->timed_out($boolean); - -This method indicates if a previous read, write, or open method -timed-out. Remember that timing-out is itself an error. To be able -to invoke C after a time-out error, you'd have to change -the default error mode to something other than C<"die">. See -C. - -With no argument this method returns C<1> if the previous method -timed-out. With an argument it sets the indicator. Normally, only -internal methods set this indicator. - -=back - - -=over 4 - -=item B - I/O time-out interval - - $secs = $obj->timeout; - - $prev = $obj->timeout($secs); - -This method sets the timeout interval that's used when performing I/O -or connecting to a port. When a method doesn't complete within the -timeout interval then it's an error and the error mode action is -performed. - -A timeout may be expressed as a relative or absolute value. If -I<$secs> is greater than or equal to the time the program started, as -determined by $^T, then it's an absolute time value for when time-out -occurs. The perl function C may be used to obtain an absolute -time value. For a relative time-out value less than $^T, time-out -happens I<$secs> from when the method begins. - -If I<$secs> is C<0> then time-out occurs if the data cannot be -immediately read or written. Use the undefined value to turn off -timing-out completely. - -With no argument this method returns the timeout set in the object. -With an argument it sets the timeout to I<$secs> and returns the -previous value. The default timeout value is C<10> seconds. - -A warning is printed to STDERR when attempting to set this attribute -to something that's not an C or a non-negative integer. - -=back - - -=over 4 - -=item B - wait for pattern in the input - - $ok = $obj->waitfor($matchop); - $ok = $obj->waitfor([Match => $matchop,] - [String => $string,] - [Binmode => $mode,] - [Errmode => $errmode,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - - ($prematch, $match) = $obj->waitfor($matchop); - ($prematch, $match) = $obj->waitfor([Match => $matchop,] - [String => $string,] - [Binmode => $mode,] - [Errmode => $errmode,] - [Telnetmode => $mode,] - [Timeout => $secs,]); - -This method reads until a pattern match or string is found in the -input stream. All the characters before and including the match are -removed from the input stream. - -In a list context the characters before the match and the matched -characters are returned in I<$prematch> and I<$match>. In a scalar -context, the matched characters and all characters before it are -discarded and C<1> is returned on success. On time-out, eof, or other -failures, for both list and scalar context, the error mode action is -performed. See C. - -You can specify more than one pattern or string by simply providing -multiple I and/or I named parameters. A I<$matchop> -must be a string representing a valid Perl pattern match operator. -The I<$string> is just a substring to find in the input stream. - -Use C to debug when this method keeps timing-out and you -don't think it should. - -An optional named parameter is provided to override the current -setting of timeout. - -To avoid unexpected backslash interpretation, always use single quotes -instead of double quotes to construct a match operator argument for -C and C (e.g. C<'/bash\$ $/'>). If you're -constructing a DOS like file path, you'll need to use four backslashes -to represent one (e.g. C<'/c:\\\\users\\\\billE$/i'>). - -Of course don't forget about regexp metacharacters like C<.>, C<[>, or -C<$>. You'll only need a single backslash to quote them. The anchor -metacharacters C<^> and C<$> refer to positions in the input buffer. - -Optional named parameters are provided to override the current -settings of binmode, errmode, telnetmode, and timeout. - -=back - - -=head1 SEE ALSO - -=over 2 - -=item RFC 854 - -S - -S - -=item RFC 1143 - -S - -S - -=item TELNET Option Assignments - -S - -=back - - -=head1 EXAMPLES - -This example gets the current weather forecast for Brainerd, Minnesota. - - my ($forecast, $t); - - use Net::Telnet (); - $t = new Net::Telnet; - $t->open("rainmaker.wunderground.com"); - - ## Wait for first prompt and "hit return". - $t->waitfor('/continue:.*$/'); - $t->print(""); - - ## Wait for second prompt and respond with city code. - $t->waitfor('/city code.*$/'); - $t->print("BRD"); - - ## Read and print the first page of forecast. - ($forecast) = $t->waitfor('/[ \t]+press return to continue/i'); - print $forecast; - - exit; - - -This example checks a POP server to see if you have mail. - - my ($hostname, $line, $passwd, $pop, $username); - - $hostname = "your_destination_host_here"; - $username = "your_username_here"; - $passwd = "your_password_here"; - - use Net::Telnet (); - $pop = new Net::Telnet (Telnetmode => 0); - $pop->open(Host => $hostname, - Port => 110); - - - ## Read connection message. - $line = $pop->getline; - die $line unless $line =~ /^\+OK/; - - ## Send user name. - $pop->print("user $username"); - $line = $pop->getline; - die $line unless $line =~ /^\+OK/; - - ## Send password. - $pop->print("pass $passwd"); - $line = $pop->getline; - die $line unless $line =~ /^\+OK/; - - ## Request status of messages. - $pop->print("list"); - $line = $pop->getline; - print $line; - - exit; - - -Here's an example that uses the ssh program to connect to a remote -host. Because the ssh program reads and writes to its controlling -terminal, the IO::Pty module is used to create a new pseudo terminal -for use by ssh. A new Net::Telnet object is then created to read and -write to that pseudo terminal. To use the code below, substitute -"changeme" with the actual host, user, password, and command prompt. - - ## Main program. - { - my ($pty, $ssh, @lines); - my $host = "changeme"; - my $user = "changeme"; - my $password = "changeme"; - my $prompt = '/changeme:~> $/'; - - ## Start ssh program. - $pty = &spawn("ssh", "-l", $user, $host); # spawn() defined below - - ## Create a Net::Telnet object to perform I/O on ssh's tty. - use Net::Telnet; - $ssh = new Net::Telnet (-fhopen => $pty, - -prompt => $prompt, - -telnetmode => 0, - -cmd_remove_mode => 1, - -output_record_separator => "\r"); - - ## Login to remote host. - $ssh->waitfor(-match => '/password: ?$/i', - -errmode => "return") - or die "problem connecting to host: ", $ssh->lastline; - $ssh->print($password); - $ssh->waitfor(-match => $ssh->prompt, - -errmode => "return") - or die "login failed: ", $ssh->lastline; - - ## Send command, get and print its output. - @lines = $ssh->cmd("who"); - print @lines; - - exit; - } # end main program - - sub spawn { - my(@cmd) = @_; - my($pid, $pty, $tty, $tty_fd); - - ## Create a new pseudo terminal. - use IO::Pty (); - $pty = new IO::Pty - or die $!; - - ## Execute the program in another process. - unless ($pid = fork) { # child process - die "problem spawning program: $!\n" unless defined $pid; - - ## Disassociate process from existing controlling terminal. - use POSIX (); - POSIX::setsid - or die "setsid failed: $!"; - - ## Associate process with a new controlling terminal. - $tty = $pty->slave; - $tty_fd = $tty->fileno; - close $pty; - - ## Make stdio use the new controlling terminal. - open STDIN, "<&$tty_fd" or die $!; - open STDOUT, ">&$tty_fd" or die $!; - open STDERR, ">&STDOUT" or die $!; - close $tty; - - ## Execute requested program. - exec @cmd - or die "problem executing $cmd[0]\n"; - } # end child process - - $pty; - } # end sub spawn - - -Here's an example that changes a user's login password. Because the -passwd program always prompts for passwords on its controlling -terminal, the IO::Pty module is used to create a new pseudo terminal -for use by passwd. A new Net::Telnet object is then created to read -and write to that pseudo terminal. To use the code below, substitute -"changeme" with the actual old and new passwords. - - my ($pty, $passwd); - my $oldpw = "changeme"; - my $newpw = "changeme"; - - ## Start passwd program. - $pty = &spawn("passwd"); # spawn() defined above - - ## Create a Net::Telnet object to perform I/O on passwd's tty. - use Net::Telnet; - $passwd = new Net::Telnet (-fhopen => $pty, - -timeout => 2, - -output_record_separator => "\r", - -telnetmode => 0, - -cmd_remove_mode => 1); - $passwd->errmode("return"); - - ## Send existing password. - $passwd->waitfor('/password: ?$/i') - or die "no old password prompt: ", $passwd->lastline; - $passwd->print($oldpw); - - ## Send new password. - $passwd->waitfor('/new password: ?$/i') - or die "bad old password: ", $passwd->lastline; - $passwd->print($newpw); - - ## Send new password verification. - $passwd->waitfor('/new password: ?$/i') - or die "bad new password: ", $passwd->lastline; - $passwd->print($newpw); - - ## Display success or failure. - $passwd->waitfor('/changed/') - or die "bad new password: ", $passwd->lastline; - print $passwd->lastline; - - $passwd->close; - exit; - - -Here's an example you can use to down load a file of any type. The -file is read from the remote host's standard output using cat. To -prevent any output processing, the remote host's standard output is -put in raw mode using the Bourne shell. The Bourne shell is used -because some shells, notably tcsh, prevent changing tty modes. Upon -completion, FTP style statistics are printed to stderr. - - my ($block, $filename, $host, $hostname, $k_per_sec, $line, - $num_read, $passwd, $prevblock, $prompt, $size, $size_bsd, - $size_sysv, $start_time, $total_time, $username); - - $hostname = "your_destination_host_here"; - $username = "your_username_here"; - $passwd = "your_password_here"; - $filename = "your_download_file_here"; - - ## Connect and login. - use Net::Telnet (); - $host = new Net::Telnet (Timeout => 30, - Prompt => '/[%#>] $/'); - $host->open($hostname); - $host->login($username, $passwd); - - ## Make sure prompt won't match anything in send data. - $prompt = "_funkyPrompt_"; - $host->prompt("/$prompt\$/"); - $host->cmd("set prompt = '$prompt'"); - - ## Get size of file. - ($line) = $host->cmd("/bin/ls -l $filename"); - ($size_bsd, $size_sysv) = (split ' ', $line)[3,4]; - if ($size_sysv =~ /^\d+$/) { - $size = $size_sysv; - } - elsif ($size_bsd =~ /^\d+$/) { - $size = $size_bsd; - } - else { - die "$filename: no such file on $hostname"; - } - - ## Start sending the file. - binmode STDOUT; - $host->binmode(1); - $host->print("/bin/sh -c 'stty raw; cat $filename'"); - $host->getline; # discard echoed back line - - ## Read file a block at a time. - $num_read = 0; - $prevblock = ""; - $start_time = time; - while (($block = $host->get) and ($block !~ /$prompt$/o)) { - if (length $block >= length $prompt) { - print $prevblock; - $num_read += length $prevblock; - $prevblock = $block; - } - else { - $prevblock .= $block; - } - - } - $host->close; - - ## Print last block without trailing prompt. - $prevblock .= $block; - $prevblock =~ s/$prompt$//; - print $prevblock; - $num_read += length $prevblock; - die "error: expected size $size, received size $num_read\n" - unless $num_read == $size; - - ## Print totals. - $total_time = (time - $start_time) || 1; - $k_per_sec = ($size / 1024) / $total_time; - $k_per_sec = sprintf "%3.1f", $k_per_sec; - warn("$num_read bytes received in $total_time seconds ", - "($k_per_sec Kbytes/s)\n"); - - exit; - - -=head1 AUTHOR - -Jay Rogers - - -=head1 COPYRIGHT - -Copyright 1997, 2000, 2002 by Jay Rogers. All rights reserved. -This program is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. diff --git a/agc_2-X/trunk/libs/Time/HiRes.1.59.pm b/agc_2-X/trunk/libs/Time/HiRes.1.59.pm deleted file mode 100644 index 98d31429..00000000 --- a/agc_2-X/trunk/libs/Time/HiRes.1.59.pm +++ /dev/null @@ -1,359 +0,0 @@ -package Time::HiRes; - -use strict; -use vars qw($VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); - -require Exporter; -require DynaLoader; - -@ISA = qw(Exporter DynaLoader); - -@EXPORT = qw( ); -@EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval - getitimer setitimer - ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF - d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer - d_nanosleep); - -$VERSION = '1.59'; -$XS_VERSION = $VERSION; -$VERSION = eval $VERSION; - -sub AUTOLOAD { - my $constname; - ($constname = $AUTOLOAD) =~ s/.*:://; - die "&Time::HiRes::constant not defined" if $constname eq 'constant'; - my ($error, $val) = constant($constname); - if ($error) { die $error; } - { - no strict 'refs'; - *$AUTOLOAD = sub { $val }; - } - goto &$AUTOLOAD; -} - -bootstrap Time::HiRes; - -# Preloaded methods go here. - -sub tv_interval { - # probably could have been done in C - my ($a, $b) = @_; - $b = [gettimeofday()] unless defined($b); - (${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000); -} - -# Autoload methods go after =cut, and are processed by the autosplit program. - -1; -__END__ - -=head1 NAME - -Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers - -=head1 SYNOPSIS - - use Time::HiRes qw( usleep ualarm gettimeofday tv_interval ); - - usleep ($microseconds); - - ualarm ($microseconds); - ualarm ($microseconds, $interval_microseconds); - - $t0 = [gettimeofday]; - ($seconds, $microseconds) = gettimeofday; - - $elapsed = tv_interval ( $t0, [$seconds, $microseconds]); - $elapsed = tv_interval ( $t0, [gettimeofday]); - $elapsed = tv_interval ( $t0 ); - - use Time::HiRes qw ( time alarm sleep ); - - $now_fractions = time; - sleep ($floating_seconds); - alarm ($floating_seconds); - alarm ($floating_seconds, $floating_interval); - - use Time::HiRes qw( setitimer getitimer - ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF ); - - setitimer ($which, $floating_seconds, $floating_interval ); - getitimer ($which); - -=head1 DESCRIPTION - -The C module implements a Perl interface to the C, -C, C, and C/C system calls, in other -words, high resolution time and timers. See the L section below -and the test scripts for usage; see your system documentation for the -description of the underlying C or C, C, -C, and C/C calls. - -If your system lacks C or an emulation of it you don't -get C or the one-argument form of C. If your system lacks all of -C, C, and C, you don't get -C or C. If your system lacks both -C and C you don't get -C or C. - -If you try to import an unimplemented function in the C statement -it will fail at compile time. - -If your subsecond sleeping is implemented with C instead of -C, you can mix subsecond sleeping with signals since -C does not use signals. This, however is unportable, and you -should first check for the truth value of C<&Time::HiRes::d_nanosleep> to -see whether you have nanosleep, and then carefully read your -C C API documentation for any peculiarities. (There is no -separate interface to call C; just use C -or C with small enough values.) - -Unless using C for mixing sleeping with signals, give -some thought to whether Perl is the tool you should be using for work -requiring nanosecond accuracies. - -The following functions can be imported from this module. -No functions are exported by default. - -=over 4 - -=item gettimeofday () - -In array context returns a two-element array with the seconds and -microseconds since the epoch. In scalar context returns floating -seconds like C (see below). - -=item usleep ( $useconds ) - -Sleeps for the number of microseconds specified. Returns the number -of microseconds actually slept. Can sleep for more than one second, -unlike the C system call. See also C below. - -=item ualarm ( $useconds [, $interval_useconds ] ) - -Issues a C call; the C<$interval_useconds> is optional and -will be zero if unspecified, resulting in C-like behaviour. - -=item tv_interval - -tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] ) - -Returns the floating seconds between the two times, which should have -been returned by C. If the second argument is omitted, -then the current time is used. - -=item time () - -Returns a floating seconds since the epoch. This function can be -imported, resulting in a nice drop-in replacement for the C below. - -B: This higher resolution timer can return values either less -or more than the core C, depending on whether your platform -rounds the higher resolution timer values up, down, or to the nearest second -to get the core C, but naturally the difference should be never -more than half a second. - -B: Since Sunday, September 9th, 2001 at 01:46:40 AM GMT, when -the C seconds since epoch rolled over to 1_000_000_000, the -default floating point format of Perl and the seconds since epoch have -conspired to produce an apparent bug: if you print the value of -C you seem to be getting only five decimals, not six -as promised (microseconds). Not to worry, the microseconds are there -(assuming your platform supports such granularity in first place). -What is going on is that the default floating point format of Perl -only outputs 15 digits. In this case that means ten digits before the -decimal separator and five after. To see the microseconds you can use -either C/C with C<"%.6f">, or the C function in -list context, which will give you the seconds and microseconds as two -separate values. - -=item sleep ( $floating_seconds ) - -Sleeps for the specified amount of seconds. Returns the number of -seconds actually slept (a floating point value). This function can be -imported, resulting in a nice drop-in replacement for the C -provided with perl, see the L below. - -=item alarm ( $floating_seconds [, $interval_floating_seconds ] ) - -The C signal is sent after the specified number of seconds. -Implemented using C. The C<$interval_floating_seconds> argument -is optional and will be zero if unspecified, resulting in C-like -behaviour. This function can be imported, resulting in a nice drop-in -replacement for the C provided with perl, see the L below. - -B: With some operating system and Perl release combinations -C restarts C, instead of interuping it. -This means that an C followed by a C -may together take the sum of the times specified for the the -C and the C, not just the time of the C. - -=item setitimer ( $which, $floating_seconds [, $interval_floating_seconds ] ) - -Start up an interval timer: after a certain time, a signal arrives, -and more signals may keep arriving at certain intervals. To disable a -timer, use C<$floating_seconds> of zero. If the C<$interval_floating_seconds> -is set to zero (or unspecified), the timer is disabled B the -next delivered signal. - -Use of interval timers may interfere with C, C, -and C. In standard-speak the "interaction is unspecified", -which means that I may happen: it may work, it may not. - -In scalar context, the remaining time in the timer is returned. - -In list context, both the remaining time and the interval are returned. - -There are usually three or four interval timers available: the C<$which> -can be C, C, C, or C. -Note that which ones are available depends: true UNIX platforms usually -have the first three, but (for example) Win32 and Cygwin have only -C, and only Solaris seems to have C (which is -used to profile multithreaded programs). - -C results in C-like behavior. Time is counted in -I; that is, wallclock time. C is delivered when -the timer expires. - -C counts time in (process) I; that is, only -when the process is running. In multiprocessor/user/CPU systems this -may be more or less than real or wallclock time. (This time is also -known as the I.) C is delivered when the timer expires. - -C counts time when either the process virtual time or when -the operating system is running on behalf of the process (such as I/O). -(This time is also known as the I.) (The sum of user -time and system time is known as the I.) C is -delivered when the timer expires. C can interrupt system calls. - -The semantics of interval timers for multithreaded programs are -system-specific, and some systems may support additional interval -timers. See your C documentation. - -=item getitimer ( $which ) - -Return the remaining time in the interval timer specified by C<$which>. - -In scalar context, the remaining time is returned. - -In list context, both the remaining time and the interval are returned. -The interval is always what you put in using C. - -=back - -=head1 EXAMPLES - - use Time::HiRes qw(usleep ualarm gettimeofday tv_interval); - - $microseconds = 750_000; - usleep $microseconds; - - # signal alarm in 2.5s & every .1s thereafter - ualarm 2_500_000, 100_000; - - # get seconds and microseconds since the epoch - ($s, $usec) = gettimeofday; - - # measure elapsed time - # (could also do by subtracting 2 gettimeofday return values) - $t0 = [gettimeofday]; - # do bunch of stuff here - $t1 = [gettimeofday]; - # do more stuff here - $t0_t1 = tv_interval $t0, $t1; - - $elapsed = tv_interval ($t0, [gettimeofday]); - $elapsed = tv_interval ($t0); # equivalent code - - # - # replacements for time, alarm and sleep that know about - # floating seconds - # - use Time::HiRes; - $now_fractions = Time::HiRes::time; - Time::HiRes::sleep (2.5); - Time::HiRes::alarm (10.6666666); - - use Time::HiRes qw ( time alarm sleep ); - $now_fractions = time; - sleep (2.5); - alarm (10.6666666); - - # Arm an interval timer to go off first at 10 seconds and - # after that every 2.5 seconds, in process virtual time - - use Time::HiRes qw ( setitimer ITIMER_VIRTUAL time ); - - $SIG{VTALRM} = sub { print time, "\n" }; - setitimer(ITIMER_VIRTUAL, 10, 2.5); - -=head1 C API - -In addition to the perl API described above, a C API is available for -extension writers. The following C functions are available in the -modglobal hash: - - name C prototype - --------------- ---------------------- - Time::NVtime double (*)() - Time::U2time void (*)(UV ret[2]) - -Both functions return equivalent information (like C) -but with different representations. The names C and C -were selected mainly because they are operating system independent. -(C is Unix-centric, though some platforms like VMS have -emulations for it.) - -Here is an example of using C from C: - - double (*myNVtime)(); - SV **svp = hv_fetch(PL_modglobal, "Time::NVtime", 12, 0); - if (!svp) croak("Time::HiRes is required"); - if (!SvIOK(*svp)) croak("Time::NVtime isn't a function pointer"); - myNVtime = INT2PTR(double(*)(), SvIV(*svp)); - printf("The current time is: %f\n", (*myNVtime)()); - -=head1 DIAGNOSTICS - -=head2 negative time not invented yet - -You tried to use a negative time argument. - -=head2 internal error: useconds < 0 (unsigned ... signed ...) - -Something went horribly wrong-- the number of microseconds that cannot -become negative just became negative. Maybe your compiler is broken? - -=head1 CAVEATS - -Notice that the core C maybe rounding rather than truncating. -What this means is that the core C may be reporting the time -as one second later than C and C. - -Adjusting the system clock (either manually or by services like ntp) -may cause problems, especially for long running programs that assume -a monotonously increasing time (note that all platforms do not adjust -time as gracefully as UNIX ntp does). For example in Win32 (and derived -platforms like Cygwin and MinGW) the Time::HiRes::time() may temporarily -drift off from the system clock (and the original time()) by up to 0.5 -seconds. Time::HiRes will notice this eventually and recalibrate. - -=head1 AUTHORS - -D. Wegscheid -R. Schertler -J. Hietaniemi -G. Aas - -=head1 COPYRIGHT AND LICENSE - -Copyright (c) 1996-2002 Douglas E. Wegscheid. All rights reserved. - -Copyright (c) 2002,2003,2004 Jarkko Hietaniemi. All rights reserved. - -This program is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/agc_2-X/trunk/libs/Time/HiRes.1.65.pm b/agc_2-X/trunk/libs/Time/HiRes.1.65.pm deleted file mode 100644 index e47e09c7..00000000 --- a/agc_2-X/trunk/libs/Time/HiRes.1.65.pm +++ /dev/null @@ -1,369 +0,0 @@ -package Time::HiRes; - -use strict; -use vars qw($VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); - -require Exporter; -require DynaLoader; - -@ISA = qw(Exporter DynaLoader); - -@EXPORT = qw( ); -@EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval - getitimer setitimer - ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF - d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer - d_nanosleep); - -$VERSION = '1.65'; -$XS_VERSION = $VERSION; -$VERSION = eval $VERSION; - -sub AUTOLOAD { - my $constname; - ($constname = $AUTOLOAD) =~ s/.*:://; - die "&Time::HiRes::constant not defined" if $constname eq 'constant'; - my ($error, $val) = constant($constname); - if ($error) { die $error; } - { - no strict 'refs'; - *$AUTOLOAD = sub { $val }; - } - goto &$AUTOLOAD; -} - -bootstrap Time::HiRes; - -# Preloaded methods go here. - -sub tv_interval { - # probably could have been done in C - my ($a, $b) = @_; - $b = [gettimeofday()] unless defined($b); - (${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000); -} - -# Autoload methods go after =cut, and are processed by the autosplit program. - -1; -__END__ - -=head1 NAME - -Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers - -=head1 SYNOPSIS - - use Time::HiRes qw( usleep ualarm gettimeofday tv_interval ); - - usleep ($microseconds); - - ualarm ($microseconds); - ualarm ($microseconds, $interval_microseconds); - - $t0 = [gettimeofday]; - ($seconds, $microseconds) = gettimeofday; - - $elapsed = tv_interval ( $t0, [$seconds, $microseconds]); - $elapsed = tv_interval ( $t0, [gettimeofday]); - $elapsed = tv_interval ( $t0 ); - - use Time::HiRes qw ( time alarm sleep ); - - $now_fractions = time; - sleep ($floating_seconds); - alarm ($floating_seconds); - alarm ($floating_seconds, $floating_interval); - - use Time::HiRes qw( setitimer getitimer - ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF ); - - setitimer ($which, $floating_seconds, $floating_interval ); - getitimer ($which); - -=head1 DESCRIPTION - -The C module implements a Perl interface to the -C, C, C, and C/C -system calls, in other words, high resolution time and timers. See the -L section below and the test scripts for usage; see your -system documentation for the description of the underlying -C or C, C, C, and -C/C calls. - -If your system lacks C or an emulation of it you don't -get C or the one-argument form of C. -If your system lacks all of C, C, and -C, you don't get C or -C. If your system lacks both C and -C you don't get C or -C. - -If you try to import an unimplemented function in the C statement -it will fail at compile time. - -If your subsecond sleeping is implemented with C instead -of C, you can mix subsecond sleeping with signals since -C does not use signals. This, however, is not portable, -and you should first check for the truth value of -C<&Time::HiRes::d_nanosleep> to see whether you have nanosleep, and -then carefully read your C C API documentation for any -peculiarities. (There is no separate interface to call -C; just use C or -C with small enough values.) - -Unless using C for mixing sleeping with signals, give -some thought to whether Perl is the tool you should be using for -work requiring nanosecond accuracies. - -The following functions can be imported from this module. -No functions are exported by default. - -=over 4 - -=item gettimeofday () - -In array context returns a two-element array with the seconds and -microseconds since the epoch. In scalar context returns floating -seconds like C (see below). - -=item usleep ( $useconds ) - -Sleeps for the number of microseconds specified. Returns the number -of microseconds actually slept. Can sleep for more than one second, -unlike the C system call. See also C below. - -=item ualarm ( $useconds [, $interval_useconds ] ) - -Issues a C call; the C<$interval_useconds> is optional and -will be zero if unspecified, resulting in C-like behaviour. - -Note that the interaction between alarms and sleeps are unspecified. - -=item tv_interval - -tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] ) - -Returns the floating seconds between the two times, which should have -been returned by C. If the second argument is omitted, -then the current time is used. - -=item time () - -Returns a floating seconds since the epoch. This function can be -imported, resulting in a nice drop-in replacement for the C